[U-Boot] [PATCH v3 14/26] sunxi: H3: Rework MBUS priority setup

Maxime Ripard maxime.ripard at free-electrons.com
Mon Dec 19 10:44:47 CET 2016


On Mon, Dec 19, 2016 at 01:50:04AM +0000, Andre Przywara wrote:
> From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> 
> So far the MBUS priority setup was done by writing "magic" values taken
> from a DRAM controller register dump after a boot0 run.
> By peeking at the Linux (sic!) MBUS driver [1] from the Allwinner BSP
> kernel, we learned more about the actual meaning of those bits.
> Add macros and refactor the setup function to make the MBUS setup much
> more readable and meaningful.
> The actual values used now are a transformation of the values used
> before, which are assembled by the new code to result in the same register
> writes. So this rework does not change any settings, also the code size
> stays the same.
> 
> The respective source files in the BSP kernel had a proper GPL header,
> so lifting this code and information into U-Boot is legal.
> 
> [Andre: provide a convenience macro to fit definitions on one line]
> 
> [1] https://github.com/longsleep/linux-pine64/blob/lichee-dev-v3.10.65/drivers/bus/sunxi_mbus.c
> 
> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>

Nice cleanup!

Acked-by: Maxime Ripard <maxime.ripard at free-electrons.com>

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/20161219/5ba71fa0/attachment.sig>


More information about the U-Boot mailing list