u-boot/arch/powerpc/cpu/mpc83xx/hrcw/hrcw.h
Mario Six 21c1502a4a mpc83xx: Kconfig: Migrate HRCW to Kconfig
The HRCW (hardware reset configuration word) is a constant that must be
hard-coded into the boot loader image. So, it must be available at
compile time, and cannot be migrated to the DT mechanism, but has to be
kept in Kconfig.

Configuration of this crucial variable should still be somewhat
comfortable. Hence, make its fields configurable in Kconfig, and
assemble the final value from these.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
2019-05-21 07:52:25 +02:00

37 lines
1.2 KiB
C

#ifdef CONFIG_ARCH_MPC8349
#define TSEC1_MODE_SHIFT 17
#define TSEC2_MODE_SHIFT 19
#else
#define TSEC1_MODE_SHIFT 18
#define TSEC2_MODE_SHIFT 21
#endif
#define CONFIG_SYS_HRCW_LOW (\
(CONFIG_LBMC_CLOCK_MODE << (31 - 0)) |\
(CONFIG_DDR_MC_CLOCK_MODE << (31 - 1)) |\
(CONFIG_SYSTEM_PLL_VCO_DIV << (31 - 3)) |\
(CONFIG_SYSTEM_PLL_FACTOR << (31 - 7)) |\
(CONFIG_CORE_PLL_RATIO << (31 - 15)) |\
(CONFIG_QUICC_VCO_DIVIDER << (31 - 25)) |\
(CONFIG_QUICC_DIV_FACTOR << (31 - 26)) |\
(CONFIG_QUICC_MULT_FACTOR << (31 - 31)) \
)
#define CONFIG_SYS_HRCW_HIGH (\
(CONFIG_PCI_HOST_MODE << (31 - 0)) |\
(CONFIG_PCI_64BIT_MODE << (31 - 1)) |\
(CONFIG_PCI_INT_ARBITER1 << (31 - 2)) |\
(CONFIG_PCI_INT_ARBITER2 << (31 - 3)) |\
(CONFIG_PCI_CLOCK_OUTPUT_DRIVE << (31 - 3)) |\
(CONFIG_CORE_DISABLE_MODE << (31 - 4)) |\
(CONFIG_BOOT_MEMORY_SPACE << (31 - 5)) |\
(CONFIG_BOOT_SEQUENCER << (31 - 7)) |\
(CONFIG_SOFTWARE_WATCHDOG << (31 - 8)) |\
(CONFIG_BOOT_ROM_INTERFACE << (31 - 13)) |\
(CONFIG_TSEC1_MODE << (31 - TSEC1_MODE_SHIFT)) |\
(CONFIG_TSEC2_MODE << (31 - TSEC2_MODE_SHIFT)) |\
(CONFIG_SECONDARY_DDR_IO << (31 - 27)) |\
(CONFIG_TRUE_LITTLE_ENDIAN << (31 - 28)) |\
(CONFIG_LALE_TIMING << (31 - 29)) |\
(CONFIG_LDP_PIN_MUX_STATE << (31 - 30)) \
)