From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Date: Mon, 19 Dec 2016 10:44:47 +0100 Subject: [U-Boot] [PATCH v3 14/26] sunxi: H3: Rework MBUS priority setup In-Reply-To: <1482112216-12983-15-git-send-email-andre.przywara@arm.com> References: <1482112216-12983-1-git-send-email-andre.przywara@arm.com> <1482112216-12983-15-git-send-email-andre.przywara@arm.com> Message-ID: <20161219094447.ibqdybnmpfna727i@lukather> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Dec 19, 2016 at 01:50:04AM +0000, Andre Przywara wrote: > From: Philipp Tomsich > > 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 > Signed-off-by: Andre Przywara Nice cleanup! Acked-by: Maxime Ripard 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: