[U-Boot] [PATCH] sunxi: makes an invisible option for H3-like DRAM controllers

Maxime Ripard maxime.ripard at free-electrons.com
Tue Jan 10 20:09:22 CET 2017


On Mon, Jan 09, 2017 at 09:01:22PM +0800, Icenowy Zheng wrote:
> 
> 2017年1月9日 下午7:06于 Maxime Ripard <maxime.ripard at free-electrons.com>写道:
> >
> > On Fri, Jan 06, 2017 at 07:13:17AM +0800, Icenowy Zheng wrote: 
> > > 
> > > 
> > > 06.01.2017, 06:16, "Maxime Ripard" <maxime.ripard at free-electrons.com>: 
> > > > On Thu, Dec 29, 2016 at 02:50:48AM +0800, Icenowy Zheng wrote: 
> > > >>  Allwinner SoCs after H3 (e.g. A64, H5, R40, V3s) uses a H3-like 
> > > >>  DesignWare DRAM controller, which do not have official free DRAM 
> > > >>  initialization code, but can use modified dram_sun8i_h3.c. 
> > > >> 
> > > >>  Add a invisible option for easier DRAM initialization code reuse. 
> > > > 
> > > > Since it's used on all the newer SoCs, do we need to keep the H3 name 
> > > > in the config option name? 
> > > 
> > > Good question... 
> > > 
> > > Name it "SUNXI_DW_DRAM"? 
> >
> > Looks good. 
> >
> > > (Although I think at least A33 uses the same series of DRAM controller) 
> >
> > Does it? Why do we need a separate DRAM init code then? 
> 
> I think it does. See dram_sun8i_a33.c .
> 
> We used to use per-device dram code, but failed after allwinner uses
> libdram, then we worked on modifying H3 code.
> 
> I think it's also possible to make H3 code capable of A33, but since
> our A33 code works well, should we do it?

Code duplication is a nightmare, and opportunities of consolidation
should always be at least considered. So, yes, please do :)

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170110/080712bd/attachment.sig>


More information about the U-Boot mailing list