diff options
Diffstat (limited to 'arch/powerpc/cpu')
-rw-r--r-- | arch/powerpc/cpu/mpc5xxx/speed.c | 2 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8260/spi.c | 7 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc83xx/Kconfig | 6 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/Kconfig | 25 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc86xx/Kconfig | 2 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/commproc.c | 69 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/fec.c | 10 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/i2c.c | 10 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/scc.c | 10 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/serial.c | 17 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xx/spi.c | 7 | ||||
-rw-r--r-- | arch/powerpc/cpu/mpc8xxx/cpu.c | 2 |
13 files changed, 41 insertions, 127 deletions
diff --git a/arch/powerpc/cpu/mpc5xxx/speed.c b/arch/powerpc/cpu/mpc5xxx/speed.c index 30a0a358dd..b37c4a5208 100644 --- a/arch/powerpc/cpu/mpc5xxx/speed.c +++ b/arch/powerpc/cpu/mpc5xxx/speed.c @@ -69,7 +69,7 @@ int get_clocks (void) return (0); } -int prt_mpc5xxx_clks (void) +int print_cpuinfo(void) { char buf1[32], buf2[32], buf3[32]; diff --git a/arch/powerpc/cpu/mpc8260/spi.c b/arch/powerpc/cpu/mpc8260/spi.c index 8c91a713bb..c7fb4e9a6c 100644 --- a/arch/powerpc/cpu/mpc8260/spi.c +++ b/arch/powerpc/cpu/mpc8260/spi.c @@ -181,14 +181,7 @@ void spi_init_f (void) spi->spi_tbc = 0; spi->spi_txtmp = 0; - /* Allocate space for one transmit and one receive buffer - * descriptor in the DP ram - */ -#ifdef CONFIG_SYS_ALLOC_DPRAM - dpaddr = m8260_cpm_dpalloc (sizeof(cbd_t)*2, 8); -#else dpaddr = CPM_SPI_BASE; -#endif /* 3 */ /* Set up the SPI parameters in the parameter ram */ diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig index 184063c40b..bf3be50c48 100644 --- a/arch/powerpc/cpu/mpc83xx/Kconfig +++ b/arch/powerpc/cpu/mpc83xx/Kconfig @@ -27,30 +27,36 @@ config TARGET_MPC8308RDB config TARGET_MPC8313ERDB bool "Support MPC8313ERDB" select SUPPORT_SPL + select BOARD_EARLY_INIT_F config TARGET_MPC8315ERDB bool "Support MPC8315ERDB" + select BOARD_EARLY_INIT_F config TARGET_MPC8323ERDB bool "Support MPC8323ERDB" config TARGET_MPC832XEMDS bool "Support MPC832XEMDS" + select BOARD_EARLY_INIT_F config TARGET_MPC8349EMDS bool "Support MPC8349EMDS" select SYS_FSL_DDR select SYS_FSL_HAS_DDR2 select SYS_FSL_DDR_BE + select BOARD_EARLY_INIT_F config TARGET_MPC8349ITX bool "Support MPC8349ITX" config TARGET_MPC837XEMDS bool "Support MPC837XEMDS" + select BOARD_EARLY_INIT_F config TARGET_MPC837XERDB bool "Support MPC837XERDB" + select BOARD_EARLY_INIT_F config TARGET_IDS8313 bool "Support ids8313" diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig index 615d7e13a9..38ea4c1440 100644 --- a/arch/powerpc/cpu/mpc85xx/Kconfig +++ b/arch/powerpc/cpu/mpc85xx/Kconfig @@ -25,6 +25,7 @@ config TARGET_B4420QDS config TARGET_B4860QDS bool "Support B4860QDS" select ARCH_B4860 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT @@ -32,15 +33,19 @@ config TARGET_BSC9131RDB bool "Support BSC9131RDB" select ARCH_BSC9131 select SUPPORT_SPL + select BOARD_EARLY_INIT_F config TARGET_BSC9132QDS bool "Support BSC9132QDS" select ARCH_BSC9132 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL + select BOARD_EARLY_INIT_F config TARGET_C29XPCIE bool "Support C29XPCIE" select ARCH_C29X + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select SUPPORT_TPL select PHYS_64BIT @@ -49,21 +54,25 @@ config TARGET_P3041DS bool "Support P3041DS" select PHYS_64BIT select ARCH_P3041 + select BOARD_LATE_INIT if CHAIN_OF_TRUST config TARGET_P4080DS bool "Support P4080DS" select PHYS_64BIT select ARCH_P4080 + select BOARD_LATE_INIT if CHAIN_OF_TRUST config TARGET_P5020DS bool "Support P5020DS" select PHYS_64BIT select ARCH_P5020 + select BOARD_LATE_INIT if CHAIN_OF_TRUST config TARGET_P5040DS bool "Support P5040DS" select PHYS_64BIT select ARCH_P5040 + select BOARD_LATE_INIT if CHAIN_OF_TRUST config TARGET_MPC8536DS bool "Support MPC8536DS" @@ -112,12 +121,14 @@ config TARGET_MPC8572DS config TARGET_P1010RDB_PA bool "Support P1010RDB_PA" select ARCH_P1010 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select SUPPORT_TPL config TARGET_P1010RDB_PB bool "Support P1010RDB_PB" select ARCH_P1010 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select SUPPORT_TPL @@ -186,6 +197,7 @@ config TARGET_P1_TWR config TARGET_P2041RDB bool "Support P2041RDB" select ARCH_P2041 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select PHYS_64BIT config TARGET_QEMU_PPCE500 @@ -196,65 +208,76 @@ config TARGET_QEMU_PPCE500 config TARGET_T1024QDS bool "Support T1024QDS" select ARCH_T1024 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T1023RDB bool "Support T1023RDB" select ARCH_T1023 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T1024RDB bool "Support T1024RDB" select ARCH_T1024 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T1040QDS bool "Support T1040QDS" select ARCH_T1040 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select PHYS_64BIT config TARGET_T1040RDB bool "Support T1040RDB" select ARCH_T1040 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T1040D4RDB bool "Support T1040D4RDB" select ARCH_T1040 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T1042RDB bool "Support T1042RDB" select ARCH_T1042 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T1042D4RDB bool "Support T1042D4RDB" select ARCH_T1042 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T1042RDB_PI bool "Support T1042RDB_PI" select ARCH_T1042 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T2080QDS bool "Support T2080QDS" select ARCH_T2080 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT config TARGET_T2080RDB bool "Support T2080RDB" select ARCH_T2080 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT @@ -267,6 +290,7 @@ config TARGET_T2081QDS config TARGET_T4160QDS bool "Support T4160QDS" select ARCH_T4160 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT @@ -279,6 +303,7 @@ config TARGET_T4160RDB config TARGET_T4240QDS bool "Support T4240QDS" select ARCH_T4240 + select BOARD_LATE_INIT if CHAIN_OF_TRUST select SUPPORT_SPL select PHYS_64BIT diff --git a/arch/powerpc/cpu/mpc86xx/Kconfig b/arch/powerpc/cpu/mpc86xx/Kconfig index ff21c4823b..fcac6584e8 100644 --- a/arch/powerpc/cpu/mpc86xx/Kconfig +++ b/arch/powerpc/cpu/mpc86xx/Kconfig @@ -11,10 +11,12 @@ choice config TARGET_SBC8641D bool "Support sbc8641d" select ARCH_MPC8641 + select BOARD_EARLY_INIT_F config TARGET_MPC8610HPCD bool "Support MPC8610HPCD" select ARCH_MPC8610 + select BOARD_EARLY_INIT_F config TARGET_MPC8641HPCN bool "Support MPC8641HPCN" diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile index f83fd5ecf4..6f81fee571 100644 --- a/arch/powerpc/cpu/mpc8xx/Makefile +++ b/arch/powerpc/cpu/mpc8xx/Makefile @@ -10,7 +10,6 @@ extra-y += start.o extra-y += traps.o obj-y += bedbug_860.o -obj-y += commproc.o obj-y += cpu.o obj-y += cpu_init.o obj-y += fec.o diff --git a/arch/powerpc/cpu/mpc8xx/commproc.c b/arch/powerpc/cpu/mpc8xx/commproc.c deleted file mode 100644 index f8581d130d..0000000000 --- a/arch/powerpc/cpu/mpc8xx/commproc.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * (C) Copyright 2000-2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <common.h> -#include <commproc.h> - -DECLARE_GLOBAL_DATA_PTR; - -#ifdef CONFIG_SYS_ALLOC_DPRAM - -int dpram_init (void) -{ - /* Reclaim the DP memory for our use. */ - gd->arch.dp_alloc_base = CPM_DATAONLY_BASE; - gd->arch.dp_alloc_top = CPM_DATAONLY_BASE + CPM_DATAONLY_SIZE; - - return (0); -} - -/* Allocate some memory from the dual ported ram. We may want to - * enforce alignment restrictions, but right now everyone is a good - * citizen. - */ -uint dpram_alloc (uint size) -{ - uint addr = gd->arch.dp_alloc_base; - - if ((gd->arch.dp_alloc_base + size) >= gd->arch.dp_alloc_top) - return (CPM_DP_NOSPACE); - - gd->arch.dp_alloc_base += size; - - return addr; -} - -uint dpram_base (void) -{ - return gd->arch.dp_alloc_base; -} - -/* Allocate some memory from the dual ported ram. We may want to - * enforce alignment restrictions, but right now everyone is a good - * citizen. - */ -uint dpram_alloc_align (uint size, uint align) -{ - uint addr, mask = align - 1; - - addr = (gd->arch.dp_alloc_base + mask) & ~mask; - - if ((addr + size) >= gd->arch.dp_alloc_top) - return (CPM_DP_NOSPACE); - - gd->arch.dp_alloc_base = addr + size; - - return addr; -} - -uint dpram_base_align (uint align) -{ - uint mask = align - 1; - - return (gd->arch.dp_alloc_base + mask) & ~mask; -} -#endif /* CONFIG_SYS_ALLOC_DPRAM */ diff --git a/arch/powerpc/cpu/mpc8xx/fec.c b/arch/powerpc/cpu/mpc8xx/fec.c index 0940906b1d..b27310fffb 100644 --- a/arch/powerpc/cpu/mpc8xx/fec.c +++ b/arch/powerpc/cpu/mpc8xx/fec.c @@ -570,14 +570,8 @@ static int fec_init (struct eth_device *dev, bd_t * bd) rxIdx = 0; txIdx = 0; - if (!rtx) { -#ifdef CONFIG_SYS_ALLOC_DPRAM - rtx = (RTXBD *) (immr->im_cpm.cp_dpmem + - dpram_alloc_align (sizeof (RTXBD), 8)); -#else - rtx = (RTXBD *) (immr->im_cpm.cp_dpmem + CPM_FEC_BASE); -#endif - } + if (!rtx) + rtx = (RTXBD *)(immr->im_cpm.cp_dpmem + CPM_FEC_BASE); /* * Setup Receiver Buffer Descriptors (13.14.24.18) * Settings: diff --git a/arch/powerpc/cpu/mpc8xx/i2c.c b/arch/powerpc/cpu/mpc8xx/i2c.c index 3dff4ab4ac..54d5cb5130 100644 --- a/arch/powerpc/cpu/mpc8xx/i2c.c +++ b/arch/powerpc/cpu/mpc8xx/i2c.c @@ -190,17 +190,7 @@ void i2c_init(int speed, int slaveaddr) iip->iic_rpbase = 0; #endif -#ifdef CONFIG_SYS_ALLOC_DPRAM - dpaddr = iip->iic_rbase; - if (dpaddr == 0) { - /* need to allocate dual port ram */ - dpaddr = dpram_alloc_align((NUM_RX_BDS * sizeof(I2C_BD)) + - (NUM_TX_BDS * sizeof(I2C_BD)) + - MAX_TX_SPACE, 8); - } -#else dpaddr = CPM_I2C_BASE; -#endif /* * initialise data in dual port ram: diff --git a/arch/powerpc/cpu/mpc8xx/scc.c b/arch/powerpc/cpu/mpc8xx/scc.c index 3474637fac..17bcc2fe0a 100644 --- a/arch/powerpc/cpu/mpc8xx/scc.c +++ b/arch/powerpc/cpu/mpc8xx/scc.c @@ -199,14 +199,8 @@ static int scc_init (struct eth_device *dev, bd_t * bis) rxIdx = 0; txIdx = 0; - if (!rtx) { -#ifdef CONFIG_SYS_ALLOC_DPRAM - rtx = (RTXBD *) (immr->im_cpm.cp_dpmem + - dpram_alloc_align (sizeof (RTXBD), 8)); -#else - rtx = (RTXBD *) (immr->im_cpm.cp_dpmem + CPM_SCC_BASE); -#endif - } + if (!rtx) + rtx = (RTXBD *)(immr->im_cpm.cp_dpmem + CPM_SCC_BASE); #if (defined(PA_ENET_RXD) && defined(PA_ENET_TXD)) /* Configure port A pins for Txd and Rxd. diff --git a/arch/powerpc/cpu/mpc8xx/serial.c b/arch/powerpc/cpu/mpc8xx/serial.c index 94c785f611..b6e12d0d85 100644 --- a/arch/powerpc/cpu/mpc8xx/serial.c +++ b/arch/powerpc/cpu/mpc8xx/serial.c @@ -176,15 +176,7 @@ static int smc_init (void) /* Set the physical address of the host memory buffers in * the buffer descriptors. */ - -#ifdef CONFIG_SYS_ALLOC_DPRAM - /* allocate - * size of struct serialbuffer with bd rx/tx, buffer rx/tx and rx index - */ - dpaddr = dpram_alloc_align((sizeof(serialbuffer_t)), 8); -#else - dpaddr = CPM_SERIAL_BASE ; -#endif + dpaddr = CPM_SERIAL_BASE; rtx = (serialbuffer_t *)&cp->cp_dpmem[dpaddr]; /* Allocate space for two buffer descriptors in the DP ram. @@ -421,12 +413,7 @@ static int scc_init (void) #endif /* Allocate space for two buffer descriptors in the DP ram. */ - -#ifdef CONFIG_SYS_ALLOC_DPRAM - dpaddr = dpram_alloc_align (sizeof(cbd_t)*2 + 2, 8) ; -#else - dpaddr = CPM_SERIAL2_BASE ; -#endif + dpaddr = dpram_alloc_align(sizeof(cbd_t)*2 + 2, 8); /* Enable SDMA. */ im->im_siu_conf.sc_sdcr = 0x0001; diff --git a/arch/powerpc/cpu/mpc8xx/spi.c b/arch/powerpc/cpu/mpc8xx/spi.c index 6267c0e204..35b425e7c1 100644 --- a/arch/powerpc/cpu/mpc8xx/spi.c +++ b/arch/powerpc/cpu/mpc8xx/spi.c @@ -187,14 +187,7 @@ void spi_init_f (void) spi->spi_tbc = 0; spi->spi_txtmp = 0; - /* Allocate space for one transmit and one receive buffer - * descriptor in the DP ram - */ -#ifdef CONFIG_SYS_ALLOC_DPRAM - dpaddr = dpram_alloc_align (sizeof(cbd_t)*2, 8); -#else dpaddr = CPM_SPI_BASE; -#endif /* 3 */ /* Set up the SPI parameters in the parameter ram */ diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c index 584f3b8d61..afb5b512ba 100644 --- a/arch/powerpc/cpu/mpc8xxx/cpu.c +++ b/arch/powerpc/cpu/mpc8xxx/cpu.c @@ -308,7 +308,7 @@ int is_core_valid(unsigned int core) return !!((1 << core) & cpu_mask()); } -int probecpu (void) +int arch_cpu_init(void) { uint svr; uint ver; |