u-boot-brain/arch
Philipp Tomsich dcb50090d7 sunxi: H3: Rework MBUS priority setup
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@theobroma-systems.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-01-04 16:37:42 +01:00
..
arc libfdt: replace ARCH_FIXUP_FDT with ARCH_FIXUP_FDT_MEMORY 2016-12-02 20:54:34 -07:00
arm sunxi: H3: Rework MBUS priority setup 2017-01-04 16:37:42 +01:00
avr32 efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
blackfin common/Kconfig: Add DISPLAY_CPUINFO 2016-10-12 08:04:34 -04:00
m68k efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
microblaze libfdt: replace ARCH_FIXUP_FDT with ARCH_FIXUP_FDT_MEMORY 2016-12-02 20:54:34 -07:00
mips libfdt: replace ARCH_FIXUP_FDT with ARCH_FIXUP_FDT_MEMORY 2016-12-02 20:54:34 -07:00
nds32 nds32: Support relocation. 2016-09-29 15:38:10 +08:00
nios2 efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
openrisc efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
powerpc powerpc: Retain compatible property for L2 cache 2016-12-20 09:13:19 -08:00
sandbox spl: sandbox: Drop spl_board_announce_boot_device() 2016-12-09 08:40:18 -05:00
sh sh: generate position independent code for all platforms 2016-12-02 21:32:54 -05:00
sparc efi: Use asmlinkage for EFIAPI 2016-10-19 09:01:53 +02:00
x86 x86: Add file names from Kconfig in CMC/FSP/VGA nodes in u-boot.dtsi 2016-12-26 13:36:21 +08:00
xtensa Remove arch/${ARCH}/include/asm/errno.h 2016-09-23 17:56:18 -04:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig sandbox, x86: select DM_KEYBOARD instead of default y entry 2016-10-01 20:04:33 -04:00