On Mon, Apr 01, 2019 at 11:31:02AM +0200, Ahmad Fatoum wrote:
> Substitute the current #ifdefery in at91sam9_ddrsdr.h by
> open-coding at91sam9g45_get_ddram_size wherever it was called.
>
> Suggested-by: Sascha Hauer <[email protected]>
> Signed-off-by: Ahmad Fatoum <[email protected]>
> -#ifdef CONFIG_SOC_AT91SAM9G45
> -#include <mach/at91sam9g45.h>
> -static inline u32 at91sam9g45_get_ddram_size(int bank)
> -{
> - switch (bank) {
> - case 0:
> - return at91_get_ddram_size(IOMEM(AT91SAM9G45_BASE_DDRSDRC0),
> false);
> - case 1:
> - return at91_get_ddram_size(IOMEM(AT91SAM9G45_BASE_DDRSDRC1),
> false);
> - default:
> - return 0;
> - }
> -}
> -#else
> -static inline u32 at91sam9g45_get_ddram_size(int bank)
> -{
> - return 0;
> -}
> -#endif
Indeed you can remove the #ifdefs, but wouldn't it look nicer just to
keep at91sam9g45_get_ddram_size() and friends?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox