Commit e1a2ed71 authored by Tom Rini's avatar Tom Rini
Browse files

Merge git://git.denx.de/u-boot-mpc83xx

- Update MPC83xx platform support to current best practices, etc.
parents ffbad25b d494cdb9
......@@ -512,7 +512,7 @@ config SYS_TEXT_BASE
config SYS_CLK_FREQ
depends on ARC || ARCH_SUNXI
depends on ARC || ARCH_SUNXI || MPC83xx
int "CPU clock frequency"
help
TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
......
......@@ -39,6 +39,12 @@ config MPC8xx
endchoice
config HIGH_BATS
bool "Enable high BAT registers"
help
Enable BATs (block address translation registers) 4-7 on machines
that support them.
source "arch/powerpc/cpu/mpc83xx/Kconfig"
source "arch/powerpc/cpu/mpc85xx/Kconfig"
source "arch/powerpc/cpu/mpc86xx/Kconfig"
......
......@@ -10,38 +10,66 @@ choice
config TARGET_MPC8308_P1M
bool "Support mpc8308_p1m"
select ARCH_MPC8308
config TARGET_SBC8349
bool "Support sbc8349"
select ARCH_MPC8349
config TARGET_VE8313
bool "Support ve8313"
select ARCH_MPC8313
config TARGET_VME8349
bool "Support vme8349"
select ARCH_MPC8349
config TARGET_CADDY2
bool "Support caddy2"
select ARCH_MPC8349
config TARGET_MPC8308RDB
bool "Support MPC8308RDB"
select ARCH_MPC8308
select SYS_FSL_ERRATUM_ESDHC111
config TARGET_MPC8313ERDB
bool "Support MPC8313ERDB"
config TARGET_MPC8313ERDB_NOR
bool "Support MPC8313ERDB_NOR"
select ARCH_MPC8313
select BOARD_EARLY_INIT_F
select SUPPORT_SPL
config TARGET_MPC8313ERDB_NAND
bool "Support MPC8313ERDB_NAND"
select ARCH_MPC8313
select BOARD_EARLY_INIT_F
select SUPPORT_SPL
config TARGET_MPC8315ERDB
bool "Support MPC8315ERDB"
select ARCH_MPC8315
select BOARD_EARLY_INIT_F
config TARGET_MPC8323ERDB
bool "Support MPC8323ERDB"
select ARCH_MPC832X
config TARGET_MPC832XEMDS
bool "Support MPC832XEMDS"
select ARCH_MPC832X
select BOARD_EARLY_INIT_F
config TARGET_MPC8349EMDS
bool "Support MPC8349EMDS"
select ARCH_MPC8349
select BOARD_EARLY_INIT_F
select SYS_FSL_DDR
select SYS_FSL_DDR_BE
select SYS_FSL_HAS_DDR2
config TARGET_MPC8349EMDS_SDRAM
bool "Support MPC8349EMDS_SDRAM"
select ARCH_MPC8349
select BOARD_EARLY_INIT_F
select SYS_FSL_DDR
select SYS_FSL_DDR_BE
......@@ -49,53 +77,272 @@ config TARGET_MPC8349EMDS
config TARGET_MPC8349ITX
bool "Support MPC8349ITX"
select ARCH_MPC8349
imply CMD_IRQ
config TARGET_MPC837XEMDS
bool "Support MPC837XEMDS"
select ARCH_MPC837X
select BOARD_EARLY_INIT_F
imply CMD_SATA
imply FSL_SATA
config TARGET_MPC837XERDB
bool "Support MPC837XERDB"
select ARCH_MPC837X
select BOARD_EARLY_INIT_F
config TARGET_IDS8313
bool "Support ids8313"
select ARCH_MPC8313
select DM
imply CMD_DM
config TARGET_KM8360
bool "Support km8360"
config TARGET_KMETER1
bool "Support kmeter1"
select ARCH_MPC8360
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
config TARGET_KMCOGE5NE
bool "Support kmcoge5ne"
select ARCH_MPC8360
imply CMD_CRAMFS
imply CMD_DIAG
imply FS_CRAMFS
config TARGET_SUVD3
bool "Support suvd3"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_KMVECT1
bool "Support kmvect1"
select ARCH_MPC8309
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_KMTEGR1
bool "Support kmtegr1"
select ARCH_MPC8309
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_TUXX1
bool "Support tuxx1"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_KMSUPX5
bool "Support kmsupx5"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_TUGE1
bool "Support tuge1"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_KMOPTI2
bool "Support kmopti2"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_KMTEPR2
bool "Support kmtepr2"
select ARCH_MPC832X
imply CMD_CRAMFS
imply FS_CRAMFS
config TARGET_TQM834X
bool "Support TQM834x"
select ARCH_MPC8349
config TARGET_HRCON
bool "Support hrcon"
select ARCH_MPC8308
select SYS_FSL_ERRATUM_ESDHC111
config TARGET_STRIDER
bool "Support strider"
select ARCH_MPC8308
select SYS_FSL_ERRATUM_ESDHC111
imply CMD_PCA953X
config TARGET_GAZERBEAM
bool "Support gazerbeam"
select ARCH_MPC8308
select SYS_FSL_ERRATUM_ESDHC111
imply ENV_IS_IN_FLASH
help
The "Gazerbeam" is a modular system by Guntermann & Drunck GmbH
Systementwicklung based on the NXP MPC8308 SoC for usage in KVM
appliances.
Features include:
* Two gigabit ethernet ports
* Multiple USB ports (depending on variant)
* Several gigabit ethernet or optical fiber ports (depending on
variant)
* Several display port inputs and outputs, and supporting redrivers
(depending on variant)
* Several FPGAs with custom logic (depending on variant)
endchoice
config MPC83XX_QUICC_ENGINE
bool
# TODO: Imply MPC83xx PCI driver
config MPC83XX_PCI_SUPPORT
bool
# TODO: Imply TSEC driver
config MPC83XX_TSEC1_SUPPORT
bool
config MPC83XX_TSEC2_SUPPORT
bool
config MPC83XX_PCIE1_SUPPORT
bool
config MPC83XX_PCIE2_SUPPORT
bool
config MPC83XX_SDHC_SUPPORT
bool
config MPC83XX_SATA_SUPPORT
bool
config MPC83XX_SECOND_I2C_SUPPORT
bool
config MPC83XX_LDP_PIN
bool
config ARCH_MPC830X
bool
select MPC83XX_SDHC_SUPPORT
config ARCH_MPC8308
bool
select ARCH_MPC830X
select MPC83XX_TSEC1_SUPPORT
select MPC83XX_TSEC2_SUPPORT
select MPC83XX_PCIE1_SUPPORT
select MPC83XX_SECOND_I2C_SUPPORT
config ARCH_MPC8309
bool
select ARCH_MPC830X
select MPC83XX_QUICC_ENGINE
select MPC83XX_PCI_SUPPORT
select MPC83XX_SECOND_I2C_SUPPORT
config ARCH_MPC831X
bool
select MPC83XX_PCI_SUPPORT
select MPC83XX_TSEC1_SUPPORT
select MPC83XX_TSEC2_SUPPORT
config ARCH_MPC8313
bool
select ARCH_MPC831X
select MPC83XX_SECOND_I2C_SUPPORT
config ARCH_MPC8315
bool
select ARCH_MPC831X
select MPC83XX_PCIE1_SUPPORT
select MPC83XX_PCIE2_SUPPORT
select MPC83XX_SATA_SUPPORT
config ARCH_MPC832X
bool
select MPC83XX_QUICC_ENGINE
select MPC83XX_PCI_SUPPORT
config ARCH_MPC834X
bool
config ARCH_MPC8349
bool
select ARCH_MPC834X
select MPC83XX_PCI_SUPPORT
select MPC83XX_TSEC1_SUPPORT
select MPC83XX_TSEC2_SUPPORT
select MPC83XX_LDP_PIN
select MPC83XX_SECOND_I2C_SUPPORT
config ARCH_MPC8360
bool
select MPC83XX_QUICC_ENGINE
select MPC83XX_PCI_SUPPORT
select MPC83XX_LDP_PIN
select MPC83XX_SECOND_I2C_SUPPORT
config ARCH_MPC837X
bool
select MPC83XX_PCI_SUPPORT
select MPC83XX_TSEC1_SUPPORT
select MPC83XX_TSEC2_SUPPORT
select MPC83XX_PCIE1_SUPPORT
select MPC83XX_PCIE2_SUPPORT
select MPC83XX_SDHC_SUPPORT
select MPC83XX_SATA_SUPPORT
select MPC83XX_LDP_PIN
select MPC83XX_SECOND_I2C_SUPPORT
config SYS_IMMR
hex "Value for IMMR"
default 0xE0000000
help
Address for the Internal Memory-Mapped Registers (IMMR) window used
to configure the features of the SoC.
source "arch/powerpc/cpu/mpc83xx/hrcw/Kconfig"
source "arch/powerpc/cpu/mpc83xx/bats/Kconfig"
source "arch/powerpc/cpu/mpc83xx/lblaw/Kconfig"
source "arch/powerpc/cpu/mpc83xx/elbc/Kconfig"
source "arch/powerpc/cpu/mpc83xx/hid/Kconfig"
source "arch/powerpc/cpu/mpc83xx/sysio/Kconfig"
source "arch/powerpc/cpu/mpc83xx/arbiter/Kconfig"
source "arch/powerpc/cpu/mpc83xx/initreg/Kconfig"
menu "Legacy options"
if ARCH_MPC8349
#TODO(mario.six@gdsys.cc): Remove when mpc83xx PCI has been converted to DM/DT
choice
prompt "PMC slot configuration"
config PCI_ALL_PCI1
bool "All PMC slots on PCI1"
config PCI_ONE_PCI1
bool "First PMC1 on PCI1"
config PCI_TWO_PCI1
bool "First two PMC1 on PCI1"
endchoice
config PCI_64BIT
bool "PMC2 is 64bit"
endif
endmenu
source "board/esd/vme8349/Kconfig"
source "board/freescale/mpc8308rdb/Kconfig"
source "board/freescale/mpc8313erdb/Kconfig"
......
......@@ -29,7 +29,9 @@ obj-y += interrupts.o
obj-y += ecc.o
obj-$(CONFIG_QE) += qe_io.o
obj-$(CONFIG_FSL_SERDES) += serdes.o
ifndef CONFIG_ARCH_MPC8308
obj-$(CONFIG_PCI) += pci.o
endif
obj-$(CONFIG_PCIE) += pcie.o
obj-$(CONFIG_OF_LIBFDT) += fdt.o
......
menu "Arbiter"
choice
prompt "Pipeline depth"
config ACR_PIPE_DEP_UNSET
bool "Don't set value"
config ACR_PIPE_DEP_1
bool "1"
config ACR_PIPE_DEP_2
bool "2"
config ACR_PIPE_DEP_3
bool "3"
config ACR_PIPE_DEP_4
bool "4"
endchoice
choice
prompt "Repeat count"
config ACR_RPTCNT_UNSET
bool "Don't set value"
config ACR_RPTCNT_1
bool "1"
config ACR_RPTCNT_2
bool "2"
config ACR_RPTCNT_3
bool "3"
config ACR_RPTCNT_4
bool "4"
config ACR_RPTCNT_5
bool "5"
config ACR_RPTCNT_6
bool "6"
config ACR_RPTCNT_7
bool "7"
config ACR_RPTCNT_8
bool "8"
endchoice
choice
prompt "Address parking"
config ACR_APARK_UNSET
bool "Don't set value"
config ACR_APARK_MASTER
bool "Park to master"
config ACR_APARK_LAST
bool "Park to last owner"
config ACR_APARK_DISABLE
bool "Disabled"
endchoice
choice
prompt "Parking master"
config ACR_PARKM_UNSET
bool "Don't set value"
config ACR_PARKM_E300
bool "e300 core"
config ACR_PARKM_TSEC_1_2
bool "TSEC1, TSEC2"
config ACR_PARKM_USB_I2C1_BOOT
bool "USB/I2C1_BOOT"
config ACR_PARKM_DMA_ESDHC_USB
bool "DMA, ESDHC, USB"
config ACR_PARKM_PEX
bool "PCI Express"
if MPC83XX_QUICC_ENGINE
config ACR_PARKM_ENC_CORE
bool "Encryption core"
endif
endchoice
config ACR_PIPE_DEP
hex
default 0x0 if ACR_PIPE_DEP_UNSET
default 0x0 if ACR_PIPE_DEP_1
default 0x10000 if ACR_PIPE_DEP_2
default 0x20000 if ACR_PIPE_DEP_3
default 0x30000 if ACR_PIPE_DEP_4
config ACR_RPTCNT
hex
default 0x0 if ACR_RPTCNT_UNSET
default 0x0 if ACR_RPTCNT_1
default 0x100 if ACR_RPTCNT_2
default 0x200 if ACR_RPTCNT_3
default 0x300 if ACR_RPTCNT_4
default 0x400 if ACR_RPTCNT_5
default 0x500 if ACR_RPTCNT_6
default 0x600 if ACR_RPTCNT_7
default 0x700 if ACR_RPTCNT_8
config ACR_APARK
hex
default 0x0 if ACR_APARK_UNSET
default 0x0 if ACR_APARK_MASTER
default 0x10 if ACR_APARK_LAST
default 0x20 if ACR_APARK_DISABLE
config ACR_PARKM
hex
default 0x0 if ACR_PARKM_UNSET
default 0x0 if ACR_PARKM_E300
default 0x2 if ACR_PARKM_TSEC_1_2
default 0x3 if ACR_PARKM_USB_I2C1_BOOT
default 0x4 if ACR_PARKM_DMA_ESDHC_USB
default 0x5 if ACR_PARKM_PEX
default 0x5 if ACR_PARKM_ENC_CORE
endmenu
const __be32 acr_mask =
#ifndef CONFIG_ACR_PIPE_DEP_UNSET
ACR_PIPE_DEP |
#endif
#ifndef CONFIG_ACR_RPTCNT_UNSET
ACR_RPTCNT |
#endif
#ifndef CONFIG_ACR_APARK_UNSET
ACR_APARK |
#endif
#ifndef CONFIG_ACR_PARKM_UNSET
ACR_PARKM |
#endif
0;
const __be32 acr_val =
#ifndef CONFIG_ACR_PIPE_DEP_UNSET
CONFIG_ACR_PIPE_DEP |
#endif
#ifndef CONFIG_ACR_RPTCNT_UNSET
CONFIG_ACR_RPTCNT |
#endif
#ifndef CONFIG_ACR_APARK_UNSET
CONFIG_ACR_APARK |
#endif
#ifndef CONFIG_ACR_PARKM_UNSET
CONFIG_ACR_PARKM |
#endif
0;
This diff is collapsed.
#ifdef CONFIG_BAT0
#define CONFIG_SYS_IBAT0L (\
(CONFIG_BAT0_BASE) |\
(CONFIG_BAT0_PAGE_PROTECTION) |\
(CONFIG_BAT0_WIMG_ICACHE) \
)
#define CONFIG_SYS_IBAT0U (\
(CONFIG_BAT0_BASE) |\
(CONFIG_BAT0_LENGTH) |\
(CONFIG_BAT0_VALID_BITS) \
)
#define CONFIG_SYS_DBAT0L (\
(CONFIG_BAT0_BASE) |\
(CONFIG_BAT0_PAGE_PROTECTION) |\
(CONFIG_BAT0_WIMG_DCACHE) \
)
#define CONFIG_SYS_DBAT0U (\
(CONFIG_BAT0_BASE) |\
(CONFIG_BAT0_LENGTH) |\
(CONFIG_BAT0_VALID_BITS) \
)
#else
#define CONFIG_SYS_IBAT0L (0)
#define CONFIG_SYS_IBAT0U (0)
#define CONFIG_SYS_DBAT0L (0)
#define CONFIG_SYS_DBAT0U (0)
#endif /* CONFIG_BAT0 */
#ifdef CONFIG_BAT1
#define CONFIG_SYS_IBAT1L (\
(CONFIG_BAT1_BASE) |\
(CONFIG_BAT1_PAGE_PROTECTION) |\
(CONFIG_BAT1_WIMG_ICACHE) \
)
#define CONFIG_SYS_IBAT1U (\
(CONFIG_BAT1_BASE) |\
(CONFIG_BAT1_LENGTH) |\
(CONFIG_BAT1_VALID_BITS) \
)
#define CONFIG_SYS_DBAT1L (\
(CONFIG_BAT1_BASE) |\
(CONFIG_BAT1_PAGE_PROTECTION) |\
(CONFIG_BAT1_WIMG_DCACHE) \
)
#define CONFIG_SYS_DBAT1U (\
(CONFIG_BAT1_BASE) |\
(CONFIG_BAT1_LENGTH) |\
(CONFIG_BAT1_VALID_BITS) \
)
#else
#define CONFIG_SYS_IBAT1L (0)
#define CONFIG_SYS_IBAT1U (0)
#define CONFIG_SYS_DBAT1L (0)
#define CONFIG_SYS_DBAT1U (0)
#endif /* CONFIG_BAT1 */
#ifdef CONFIG_BAT2
#define CONFIG_SYS_IBAT2L (\
(CONFIG_BAT2_BASE) |\
(CONFIG_BAT2_PAGE_PROTECTION) |\
(CONFIG_BAT2_WIMG_ICACHE) \
)
#define CONFIG_SYS_IBAT2U (\
(CONFIG_BAT2_BASE) |\
(CONFIG_BAT2_LENGTH) |\
(CONFIG_BAT2_VALID_BITS) \
)
#define CONFIG_SYS_DBAT2L (\
(CONFIG_BAT2_BASE) |\
(CONFIG_BAT2_PAGE_PROTECTION) |\
(CONFIG_BAT2_WIMG_DCACHE) \
)
#define CONFIG_SYS_DBAT2U (\
(CONFIG_BAT2_BASE) |\
(CONFIG_BAT2_LENGTH) |\
(CONFIG_BAT2_VALID_BITS) \
)
#else
#define CONFIG_SYS_IBAT2L (0)
#define CONFIG_SYS_IBAT2U (0)
#define CONFIG_SYS_DBAT2L (0)
#define CONFIG_SYS_DBAT2U (0)
#endif /* CONFIG_BAT2 */
#ifdef CONFIG_BAT3
#define CONFIG_SYS_IBAT3L (\
(CONFIG_BAT3_BASE) |\
(CONFIG_BAT3_PAGE_PROTECTION) |\
(CONFIG_BAT3_WIMG_ICACHE) \
)
#define CONFIG_SYS_IBAT3U (\
(CONFIG_BAT3_BASE) |\
(CONFIG_BAT3_LENGTH) |\
(CONFIG_BAT3_VALID_BITS) \
)
#define CONFIG_SYS_DBAT3L (\
(CONFIG_BAT3_BASE) |\
(CONFIG_BAT3_PAGE_PROTECTION) |\
(CONFIG_BAT3_WIMG_DCACHE) \