Re: [PATCH v2 06/10] ARM: at91: remove at91sam9g45_get_ddram_size helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <s.hauer@xxxxxxxxxxxxxx>
> Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>

> -#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
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux