[PATCHv4 6/7] S5P DRAM support
Sascha Hauer
s.hauer at pengutronix.de
Mon May 21 16:02:49 EDT 2012
On Fri, May 18, 2012 at 03:43:30PM +0600, Alexey Galakhov wrote:
> +void __bare_init s5p_init_dram_bank(uint32_t base, uint32_t mc0, uint32_t mc1)
> +{
> +#ifdef S5P_DRAM_LPDDR
> + uint32_t reg = 0x100;
> +#endif
> +#ifdef S5P_DRAM_LPDDR2
> + uint32_t reg = 0x200;
> +#endif
> +#ifdef S5P_DRAM_DDR2
> + uint32_t reg = 0x400;
> +#endif
> + reg |= (S5P_DRAM_BURST) << 20;
> +#ifdef S5P_DRAM_16BIT
> + reg |= 0x1000;
> +#else /* 32-bit */
> + reg |= 0x2000;
> +#endif
Since this function is called from board specific code, can we pass in
the DDR/DDR2 16BIT/32BIT settings as arguments to this function and
get rid of these ifdefs?
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 |
More information about the barebox
mailing list