[U-Boot] [PATCH 09/14] sunxi: dram: Add a helper function 'mctl_get_number_of_lanes'

Ian Campbell ijc at hellion.org.uk
Fri Jul 25 09:33:13 CEST 2014


On Fri, 2014-07-25 at 07:26 +0300, Siarhei Siamashka wrote:

> > > +	number_of_lanes = mctl_get_number_of_lanes();
> > 
> > There is a subtle functional change here since number_of_lanes can be 1
> > whereas n could never have been 2. Is that intended/ok? Please mention
> > in the commit message.
> 
> I tried to experiment with setting the 8-bit bus width and it is
> semi-workable (single byte access is OK, but accessing more than
> one byte is broken). This part of the patch looks like a forgotten
> leftover of these experiments. But it clearly has no practical
> value and we only normally deal with the 16-bit or 32-bit bus width.
> 
> The most correct way of handling this unexpected code branch would
> be to panic. But that's an unnecessarily increase of the code size.
> So I think that the best solution is just to keep the old code
> logic (expect only 16-bit or 32-bit bus width and 2 or 4 lanes).

Not sure how much a panic actually adds to the code size or if it is
worth worrying about, but removing the 8-bit stuff is fine by me anyway.

Ian.



More information about the U-Boot mailing list