
On Mon, Dec 19, 2016 at 01:50:04AM +0000, Andre Przywara wrote:
From: Philipp Tomsich philipp.tomsich@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/b...
Signed-off-by: Philipp Tomsich philipp.tomsich@theobroma-systems.com Signed-off-by: Andre Przywara andre.przywara@arm.com
Nice cleanup!
Acked-by: Maxime Ripard maxime.ripard@free-electrons.com
Thanks, Maxime