[U-Boot] [PATCH 38/48] mpc83xx: Get rid of CONFIG_83XX_CLKIN

Mario Six mario.six at gdsys.cc
Fri Sep 28 11:20:28 UTC 2018


MPC83xx uses CONFIG_83XX_CLKIN instead of CONFIG_SYS_CLK_FREQ to set the
system clock. To migrate the architecture, we can replace
CONFIG_83XX_CLKIN with CONFIG_SYS_CLK_FREQ.

To do this
* replace all occurrences of CONFIG_83XX_CLKIN with CONFIG_SYS_CLK_FREQ
* set CONFIG_SYS_CLK_FREQ to the old value of CONFIG_83XX_CLKIN in all
  MPC83xx config files

Signed-off-by: Mario Six <mario.six at gdsys.cc>
---
 Kconfig                                 |  2 +-
 arch/powerpc/cpu/mpc83xx/speed.c        |  4 ++--
 arch/powerpc/cpu/mpc83xx/spl_minimal.c  |  2 +-
 board/freescale/mpc8349emds/MAINTAINERS |  1 +
 board/freescale/mpc837xerdb/MAINTAINERS |  1 +
 board/tqc/tqm834x/pci.c                 |  2 +-
 configs/MPC8308RDB_defconfig            |  1 +
 configs/MPC8313ERDB_33_defconfig        |  1 +
 configs/MPC8313ERDB_66_defconfig        |  1 +
 configs/MPC8313ERDB_NAND_33_defconfig   |  1 +
 configs/MPC8313ERDB_NAND_66_defconfig   |  1 +
 configs/MPC8315ERDB_defconfig           |  1 +
 configs/MPC8323ERDB_defconfig           |  1 +
 configs/MPC832XEMDS_ATM_defconfig       |  1 +
 configs/MPC832XEMDS_HOST_33_defconfig   |  1 +
 configs/MPC832XEMDS_HOST_66_defconfig   |  1 +
 configs/MPC832XEMDS_SLAVE_defconfig     |  1 +
 configs/MPC832XEMDS_defconfig           |  1 +
 configs/MPC8349EMDS_SDRAM_defconfig     |  1 +
 configs/MPC8349EMDS_SLAVE_defconfig     | 22 ++++++++++++++++++++++
 configs/MPC8349EMDS_defconfig           |  1 +
 configs/MPC8349ITXGP_defconfig          |  2 ++
 configs/MPC8349ITX_LOWBOOT_defconfig    |  1 +
 configs/MPC8349ITX_defconfig            |  1 +
 configs/MPC837XEMDS_HOST_defconfig      |  1 +
 configs/MPC837XEMDS_defconfig           |  1 +
 configs/MPC837XERDB_SLAVE_defconfig     | 31 +++++++++++++++++++++++++++++++
 configs/MPC837XERDB_defconfig           |  2 ++
 configs/TQM834x_defconfig               |  1 +
 configs/caddy2_defconfig                |  1 +
 configs/hrcon_defconfig                 |  1 +
 configs/hrcon_dh_defconfig              |  1 +
 configs/ids8313_defconfig               |  1 +
 configs/kmcoge5ne_defconfig             |  1 +
 configs/kmeter1_defconfig               |  1 +
 configs/kmopti2_defconfig               |  1 +
 configs/kmsupx5_defconfig               |  1 +
 configs/kmtegr1_defconfig               |  1 +
 configs/kmtepr2_defconfig               |  1 +
 configs/kmvect1_defconfig               |  1 +
 configs/mpc8308_p1m_defconfig           |  1 +
 configs/sbc8349_PCI_33_defconfig        |  1 +
 configs/sbc8349_PCI_66_defconfig        |  1 +
 configs/sbc8349_defconfig               |  1 +
 configs/strider_con_defconfig           |  1 +
 configs/strider_con_dp_defconfig        |  1 +
 configs/strider_cpu_defconfig           |  1 +
 configs/strider_cpu_dp_defconfig        |  1 +
 configs/suvd3_defconfig                 |  1 +
 configs/tuge1_defconfig                 |  1 +
 configs/tuxx1_defconfig                 |  1 +
 configs/ve8313_defconfig                |  1 +
 configs/vme8349_defconfig               |  1 +
 include/configs/MPC8308RDB.h            |  6 ------
 include/configs/MPC8313ERDB_NAND.h      | 17 +----------------
 include/configs/MPC8313ERDB_NOR.h       | 15 +--------------
 include/configs/MPC8315ERDB.h           |  6 ------
 include/configs/MPC8323ERDB.h           |  9 ---------
 include/configs/MPC832XEMDS.h           | 13 -------------
 include/configs/MPC8349EMDS.h           | 19 ++-----------------
 include/configs/MPC8349EMDS_SDRAM.h     | 19 ++-----------------
 include/configs/MPC8349ITX.h            |  7 -------
 include/configs/MPC837XEMDS.h           | 13 -------------
 include/configs/MPC837XERDB.h           | 14 --------------
 include/configs/TQM834x.h               |  3 ---
 include/configs/caddy2.h                | 11 -----------
 include/configs/hrcon.h                 |  6 ------
 include/configs/ids8313.h               |  3 ---
 include/configs/kmeter1.h               |  7 -------
 include/configs/mpc8308_p1m.h           |  6 ------
 include/configs/sbc8349.h               | 16 ----------------
 include/configs/strider.h               |  6 ------
 include/configs/ve8313.h                |  4 ----
 include/configs/vme8349.h               |  9 ---------
 74 files changed, 113 insertions(+), 208 deletions(-)
 create mode 100644 configs/MPC8349EMDS_SLAVE_defconfig
 create mode 100644 configs/MPC837XERDB_SLAVE_defconfig

diff --git a/Kconfig b/Kconfig
index 1aadf5dd2d..bef0547ba8 100644
--- a/Kconfig
+++ b/Kconfig
@@ -464,7 +464,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
diff --git a/arch/powerpc/cpu/mpc83xx/speed.c b/arch/powerpc/cpu/mpc83xx/speed.c
index 668ed27862..e870a23103 100644
--- a/arch/powerpc/cpu/mpc83xx/speed.c
+++ b/arch/powerpc/cpu/mpc83xx/speed.c
@@ -137,8 +137,8 @@ int get_clocks(void)
 	clkin_div = ((im->clk.spmr & SPMR_CKID) >> SPMR_CKID_SHIFT);
 
 	if (im->reset.rcwh & HRCWH_PCI_HOST) {
-#if defined(CONFIG_83XX_CLKIN)
-		pci_sync_in = CONFIG_83XX_CLKIN / (1 + clkin_div);
+#if defined(CONFIG_SYS_CLK_FREQ)
+		pci_sync_in = CONFIG_SYS_CLK_FREQ / (1 + clkin_div);
 #else
 		pci_sync_in = 0xDEADBEEF;
 #endif
diff --git a/arch/powerpc/cpu/mpc83xx/spl_minimal.c b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
index 3315ee05e1..2d6ba12e2d 100644
--- a/arch/powerpc/cpu/mpc83xx/spl_minimal.c
+++ b/arch/powerpc/cpu/mpc83xx/spl_minimal.c
@@ -95,5 +95,5 @@ ulong get_bus_freq(ulong dummy)
 	volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
 	u8 spmf = (im->clk.spmr & SPMR_SPMF) >> SPMR_SPMF_SHIFT;
 
-	return CONFIG_83XX_CLKIN * spmf;
+	return CONFIG_SYS_CLK_FREQ * spmf;
 }
diff --git a/board/freescale/mpc8349emds/MAINTAINERS b/board/freescale/mpc8349emds/MAINTAINERS
index e6648d66a0..f236d543cc 100644
--- a/board/freescale/mpc8349emds/MAINTAINERS
+++ b/board/freescale/mpc8349emds/MAINTAINERS
@@ -4,3 +4,4 @@ S:	Orphan (since 2018-05)
 F:	board/freescale/mpc8349emds/
 F:	include/configs/MPC8349EMDS.h
 F:	configs/MPC8349EMDS_defconfig
+F:	configs/MPC8349EMDS_SLAVE_defconfig
diff --git a/board/freescale/mpc837xerdb/MAINTAINERS b/board/freescale/mpc837xerdb/MAINTAINERS
index 81b4eed5ed..9f44a37a0d 100644
--- a/board/freescale/mpc837xerdb/MAINTAINERS
+++ b/board/freescale/mpc837xerdb/MAINTAINERS
@@ -4,3 +4,4 @@ S:	Maintained
 F:	board/freescale/mpc837xerdb/
 F:	include/configs/MPC837XERDB.h
 F:	configs/MPC837XERDB_defconfig
+F:	configs/MPC837XERDB_SLAVE_defconfig
diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c
index 34c68ac463..c9b05e44c2 100644
--- a/board/tqc/tqm834x/pci.c
+++ b/board/tqc/tqm834x/pci.c
@@ -71,7 +71,7 @@ pci_init_board(void)
 	reg32 = 0xff000000;
 #endif
 	if (clk->spmr & SPMR_CKID) {
-		/* PCI Clock is half CONFIG_83XX_CLKIN so need to set up OCCR
+		/* PCI Clock is half CONFIG_SYS_CLK_FREQ so need to set up OCCR
 		 * fields accordingly */
 		reg32 |= (OCCR_PCI1CR | OCCR_PCI2CR);
 
diff --git a/configs/MPC8308RDB_defconfig b/configs/MPC8308RDB_defconfig
index 8e9cf9bf04..eaa30f4870 100644
--- a/configs/MPC8308RDB_defconfig
+++ b/configs/MPC8308RDB_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8308RDB=y
 CONFIG_FIT=y
diff --git a/configs/MPC8313ERDB_33_defconfig b/configs/MPC8313ERDB_33_defconfig
index e0cdd56273..a893cd66f0 100644
--- a/configs/MPC8313ERDB_33_defconfig
+++ b/configs/MPC8313ERDB_33_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8313ERDB_NOR=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC8313ERDB_66_defconfig b/configs/MPC8313ERDB_66_defconfig
index b232a3275c..4522cadc53 100644
--- a/configs/MPC8313ERDB_66_defconfig
+++ b/configs/MPC8313ERDB_66_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666667
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8313ERDB_NOR=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC8313ERDB_NAND_33_defconfig b/configs/MPC8313ERDB_NAND_33_defconfig
index fa8321c587..3d74d718fa 100644
--- a/configs/MPC8313ERDB_NAND_33_defconfig
+++ b/configs/MPC8313ERDB_NAND_33_defconfig
@@ -2,6 +2,7 @@ CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0x00100000
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8313ERDB_NAND=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC8313ERDB_NAND_66_defconfig b/configs/MPC8313ERDB_NAND_66_defconfig
index b468b0d34a..62c9f62d83 100644
--- a/configs/MPC8313ERDB_NAND_66_defconfig
+++ b/configs/MPC8313ERDB_NAND_66_defconfig
@@ -2,6 +2,7 @@ CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0x00100000
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL=y
+CONFIG_SYS_CLK_FREQ=66666667
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8313ERDB_NAND=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC8315ERDB_defconfig b/configs/MPC8315ERDB_defconfig
index 533a8fbb46..708a494554 100644
--- a/configs/MPC8315ERDB_defconfig
+++ b/configs/MPC8315ERDB_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666667
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8315ERDB=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC8323ERDB_defconfig b/configs/MPC8323ERDB_defconfig
index 0294061f1a..272b070ec5 100644
--- a/configs/MPC8323ERDB_defconfig
+++ b/configs/MPC8323ERDB_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666667
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8323ERDB=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC832XEMDS_ATM_defconfig b/configs/MPC832XEMDS_ATM_defconfig
index 637903b408..68d5c46112 100644
--- a/configs/MPC832XEMDS_ATM_defconfig
+++ b/configs/MPC832XEMDS_ATM_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC832XEMDS=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC832XEMDS_HOST_33_defconfig b/configs/MPC832XEMDS_HOST_33_defconfig
index 0ebd39b76f..5db4a15734 100644
--- a/configs/MPC832XEMDS_HOST_33_defconfig
+++ b/configs/MPC832XEMDS_HOST_33_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC832XEMDS=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC832XEMDS_HOST_66_defconfig b/configs/MPC832XEMDS_HOST_66_defconfig
index f611201cb7..15686600b4 100644
--- a/configs/MPC832XEMDS_HOST_66_defconfig
+++ b/configs/MPC832XEMDS_HOST_66_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC832XEMDS=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC832XEMDS_SLAVE_defconfig b/configs/MPC832XEMDS_SLAVE_defconfig
index 682a9a8337..ca9799cfe1 100644
--- a/configs/MPC832XEMDS_SLAVE_defconfig
+++ b/configs/MPC832XEMDS_SLAVE_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC832XEMDS=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC832XEMDS_defconfig b/configs/MPC832XEMDS_defconfig
index b607132fb3..e9eec2f6cb 100644
--- a/configs/MPC832XEMDS_defconfig
+++ b/configs/MPC832XEMDS_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC832XEMDS=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC8349EMDS_SDRAM_defconfig b/configs/MPC8349EMDS_SDRAM_defconfig
index 4da9774f07..ffb2850269 100644
--- a/configs/MPC8349EMDS_SDRAM_defconfig
+++ b/configs/MPC8349EMDS_SDRAM_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8349EMDS_SDRAM=y
 CONFIG_PCI_ONE_PCI1=y
diff --git a/configs/MPC8349EMDS_SLAVE_defconfig b/configs/MPC8349EMDS_SLAVE_defconfig
new file mode 100644
index 0000000000..a5f8686bda
--- /dev/null
+++ b/configs/MPC8349EMDS_SLAVE_defconfig
@@ -0,0 +1,22 @@
+CONFIG_PPC=y
+CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666666
+CONFIG_MPC83xx=y
+CONFIG_TARGET_MPC8349EMDS=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="PCISLAVE"
+CONFIG_BOOTDELAY=6
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_IMLS=y
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_DATE=y
+# CONFIG_MMC is not set
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_PHYLIB=y
+# CONFIG_PCI is not set
+CONFIG_SYS_NS16550=y
+CONFIG_OF_LIBFDT=y
diff --git a/configs/MPC8349EMDS_defconfig b/configs/MPC8349EMDS_defconfig
index 9f6dc44fea..da99227b79 100644
--- a/configs/MPC8349EMDS_defconfig
+++ b/configs/MPC8349EMDS_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8349EMDS=y
 CONFIG_PCI_ONE_PCI1=y
diff --git a/configs/MPC8349ITXGP_defconfig b/configs/MPC8349ITXGP_defconfig
index 7d523308d8..589900449e 100644
--- a/configs/MPC8349ITXGP_defconfig
+++ b/configs/MPC8349ITXGP_defconfig
@@ -1,9 +1,11 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666666
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8349ITX=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_TEXT_BASE=0xFE000000"
 CONFIG_BOOTDELAY=6
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="root=/dev/nfs rw nfsroot=:/nfsroot/rootfs ip=::::mpc8349emitxgp:eth0:off console=ttyS0,115200"
diff --git a/configs/MPC8349ITX_LOWBOOT_defconfig b/configs/MPC8349ITX_LOWBOOT_defconfig
index acc7eb5b5a..0d9d492963 100644
--- a/configs/MPC8349ITX_LOWBOOT_defconfig
+++ b/configs/MPC8349ITX_LOWBOOT_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666666
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8349ITX=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC8349ITX_defconfig b/configs/MPC8349ITX_defconfig
index e2b52bfee4..f194aec527 100644
--- a/configs/MPC8349ITX_defconfig
+++ b/configs/MPC8349ITX_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFEF00000
+CONFIG_SYS_CLK_FREQ=66666666
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8349ITX=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC837XEMDS_HOST_defconfig b/configs/MPC837XEMDS_HOST_defconfig
index 05afeb7b70..c0eb8289c0 100644
--- a/configs/MPC837XEMDS_HOST_defconfig
+++ b/configs/MPC837XEMDS_HOST_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC837XEMDS=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC837XEMDS_defconfig b/configs/MPC837XEMDS_defconfig
index 76a7c1c082..236f9f82ba 100644
--- a/configs/MPC837XEMDS_defconfig
+++ b/configs/MPC837XEMDS_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC837XEMDS=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/MPC837XERDB_SLAVE_defconfig b/configs/MPC837XERDB_SLAVE_defconfig
new file mode 100644
index 0000000000..b1a80dded9
--- /dev/null
+++ b/configs/MPC837XERDB_SLAVE_defconfig
@@ -0,0 +1,31 @@
+CONFIG_PPC=y
+CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666667
+CONFIG_MPC83xx=y
+CONFIG_TARGET_MPC837XERDB=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="PCISLAVE,PCIE"
+CONFIG_BOOTDELAY=6
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_IMLS=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SATA=y
+CONFIG_CMD_USB=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_MII=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_DATE=y
+CONFIG_CMD_EXT2=y
+CONFIG_CMD_FAT=y
+CONFIG_FSL_SATA=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_NETDEVICES=y
+CONFIG_TSEC_ENET=y
+CONFIG_SYS_NS16550=y
+CONFIG_USB=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_STORAGE=y
+CONFIG_OF_LIBFDT=y
diff --git a/configs/MPC837XERDB_defconfig b/configs/MPC837XERDB_defconfig
index 5d94a21639..cdf67f9e4c 100644
--- a/configs/MPC837XERDB_defconfig
+++ b/configs/MPC837XERDB_defconfig
@@ -1,9 +1,11 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=66666667
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC837XERDB=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="PCIE"
 CONFIG_BOOTDELAY=6
 CONFIG_MISC_INIT_R=y
 CONFIG_HUSH_PARSER=y
diff --git a/configs/TQM834x_defconfig b/configs/TQM834x_defconfig
index c1f30699f3..d576a207df 100644
--- a/configs/TQM834x_defconfig
+++ b/configs/TQM834x_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0x80000000
+CONFIG_SYS_CLK_FREQ=66666000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_TQM834X=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/caddy2_defconfig b/configs/caddy2_defconfig
index 1dc30c39dd..acf3b6b44f 100644
--- a/configs/caddy2_defconfig
+++ b/configs/caddy2_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFFF00000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_CADDY2=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/hrcon_defconfig b/configs/hrcon_defconfig
index 93d8330a62..b11a5c4cc1 100644
--- a/configs/hrcon_defconfig
+++ b/configs/hrcon_defconfig
@@ -1,6 +1,7 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
 CONFIG_IDENT_STRING=" hrcon 0.01"
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_HRCON=y
 CONFIG_CMD_IOLOOP=y
diff --git a/configs/hrcon_dh_defconfig b/configs/hrcon_dh_defconfig
index 6885bef055..050d5e3824 100644
--- a/configs/hrcon_dh_defconfig
+++ b/configs/hrcon_dh_defconfig
@@ -1,6 +1,7 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
 CONFIG_IDENT_STRING=" hrcon dh 0.01"
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_HRCON=y
 CONFIG_CMD_IOLOOP=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index cedd56528f..1321509ac4 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFFF00000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_IDS8313=y
 CONFIG_FIT=y
diff --git a/configs/kmcoge5ne_defconfig b/configs/kmcoge5ne_defconfig
index 649e07c5f4..21cf3ca18f 100644
--- a/configs/kmcoge5ne_defconfig
+++ b/configs/kmcoge5ne_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_KMCOGE5NE=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index cbb74e0022..00c24d1ad0 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_KMETER1=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index 43b7e7c62f..496bfc061f 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_KMOPTI2=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index 1b92c6e6a0..bb3aa0e9bf 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_KMSUPX5=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/kmtegr1_defconfig b/configs/kmtegr1_defconfig
index 528380a110..e0f3bb9096 100644
--- a/configs/kmtegr1_defconfig
+++ b/configs/kmtegr1_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_KMTEGR1=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index f62f7c2f3f..82a1231486 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_KMTEPR2=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/kmvect1_defconfig b/configs/kmvect1_defconfig
index 94bd6ce055..e2e1558513 100644
--- a/configs/kmvect1_defconfig
+++ b/configs/kmvect1_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_KMVECT1=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/mpc8308_p1m_defconfig b/configs/mpc8308_p1m_defconfig
index 661bafc915..0ac5d5dc14 100644
--- a/configs/mpc8308_p1m_defconfig
+++ b/configs/mpc8308_p1m_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFC000000
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_MPC8308_P1M=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/sbc8349_PCI_33_defconfig b/configs/sbc8349_PCI_33_defconfig
index decfc94f6b..8101b6bdb7 100644
--- a/configs/sbc8349_PCI_33_defconfig
+++ b/configs/sbc8349_PCI_33_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFF800000
+CONFIG_SYS_CLK_FREQ=33000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_SBC8349=y
 CONFIG_PCI_64BIT=y
diff --git a/configs/sbc8349_PCI_66_defconfig b/configs/sbc8349_PCI_66_defconfig
index d29a6b51f9..af3b37bfa0 100644
--- a/configs/sbc8349_PCI_66_defconfig
+++ b/configs/sbc8349_PCI_66_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFF800000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_SBC8349=y
 CONFIG_PCI_64BIT=y
diff --git a/configs/sbc8349_defconfig b/configs/sbc8349_defconfig
index 06b5ba0044..6a1980b21f 100644
--- a/configs/sbc8349_defconfig
+++ b/configs/sbc8349_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFF800000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_SBC8349=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/strider_con_defconfig b/configs/strider_con_defconfig
index 6268279cea..6e600ed77d 100644
--- a/configs/strider_con_defconfig
+++ b/configs/strider_con_defconfig
@@ -1,6 +1,7 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
 CONFIG_IDENT_STRING=" strider con 0.01"
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_STRIDER=y
 CONFIG_CMD_IOLOOP=y
diff --git a/configs/strider_con_dp_defconfig b/configs/strider_con_dp_defconfig
index a45aba1fc3..afcd3c02ed 100644
--- a/configs/strider_con_dp_defconfig
+++ b/configs/strider_con_dp_defconfig
@@ -1,6 +1,7 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
 CONFIG_IDENT_STRING=" strider con dp 0.01"
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_STRIDER=y
 CONFIG_CMD_IOLOOP=y
diff --git a/configs/strider_cpu_defconfig b/configs/strider_cpu_defconfig
index ef2f0e4eb4..2c0069e999 100644
--- a/configs/strider_cpu_defconfig
+++ b/configs/strider_cpu_defconfig
@@ -1,6 +1,7 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
 CONFIG_IDENT_STRING=" strider cpu 0.01"
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_STRIDER=y
 CONFIG_CMD_IOLOOP=y
diff --git a/configs/strider_cpu_dp_defconfig b/configs/strider_cpu_dp_defconfig
index be70e723b7..76e8f8ce38 100644
--- a/configs/strider_cpu_dp_defconfig
+++ b/configs/strider_cpu_dp_defconfig
@@ -1,6 +1,7 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
 CONFIG_IDENT_STRING=" strider cpu dp 0.01"
+CONFIG_SYS_CLK_FREQ=33333333
 CONFIG_MPC83xx=y
 CONFIG_TARGET_STRIDER=y
 CONFIG_CMD_IOLOOP=y
diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig
index 6bb1ae0e00..49426e651f 100644
--- a/configs/suvd3_defconfig
+++ b/configs/suvd3_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_SUVD3=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index e8603888d2..e7d309e7d2 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_TUGE1=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index 40cfe71047..857d8e1d52 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xF0000000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_TUXX1=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/ve8313_defconfig b/configs/ve8313_defconfig
index 018820b7a2..e68e693dc2 100644
--- a/configs/ve8313_defconfig
+++ b/configs/ve8313_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFE000000
+CONFIG_SYS_CLK_FREQ=32000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_VE8313=y
 CONFIG_OF_BOARD_SETUP=y
diff --git a/configs/vme8349_defconfig b/configs/vme8349_defconfig
index 8b46074884..56c6e6dd94 100644
--- a/configs/vme8349_defconfig
+++ b/configs/vme8349_defconfig
@@ -1,5 +1,6 @@
 CONFIG_PPC=y
 CONFIG_SYS_TEXT_BASE=0xFFF00000
+CONFIG_SYS_CLK_FREQ=66000000
 CONFIG_MPC83xx=y
 CONFIG_TARGET_VME8349=y
 CONFIG_PCI_64BIT=y
diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h
index 3ea310ad81..c135b3c528 100644
--- a/include/configs/MPC8308RDB.h
+++ b/include/configs/MPC8308RDB.h
@@ -27,12 +27,6 @@
 #define CONFIG_TSEC1
 #define CONFIG_VSC7385_ENET
 
-/*
- * System Clock Setup
- */
-#define CONFIG_83XX_CLKIN	33333333 /* in Hz */
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 /*
  * Hardware Reset Configuration Word
  * if CLKIN is 66.66MHz, then
diff --git a/include/configs/MPC8313ERDB_NAND.h b/include/configs/MPC8313ERDB_NAND.h
index d8d8c8e68a..6055cbd63f 100644
--- a/include/configs/MPC8313ERDB_NAND.h
+++ b/include/configs/MPC8313ERDB_NAND.h
@@ -54,16 +54,6 @@
 #define CONFIG_VSC7385_ENET
 #define CONFIG_TSEC2
 
-#ifdef CONFIG_SYS_66MHZ
-#define CONFIG_83XX_CLKIN	66666667	/* in Hz */
-#elif defined(CONFIG_SYS_33MHZ)
-#define CONFIG_83XX_CLKIN	33333333	/* in Hz */
-#else
-#error Unknown oscillator frequency.
-#endif
-
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 #define CONFIG_SYS_IMMR		0xE0000000
 
 #if !defined(CONFIG_SPL_BUILD)
@@ -449,9 +439,6 @@
 	HRCWL_DDR_TO_SCB_CLK_2X1 |\
 	HRCWL_CSB_TO_CLKIN_2X1 |\
 	HRCWL_CORE_TO_CSB_2X1)
-
-#define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 2)
-
 #elif defined(CONFIG_SYS_33MHZ)
 
 /* 33MHz IN, 165MHz CSB, 330 DDR, 330 CORE */
@@ -463,9 +450,6 @@
 	HRCWL_DDR_TO_SCB_CLK_2X1 |\
 	HRCWL_CSB_TO_CLKIN_5X1 |\
 	HRCWL_CORE_TO_CSB_2X1)
-
-#define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 5)
-
 #endif
 
 #define CONFIG_SYS_HRCW_HIGH_BASE (\
@@ -482,6 +466,7 @@
 		       HRCWH_FROM_0XFFF00100 |\
 		       HRCWH_ROM_LOC_NAND_SP_8BIT |\
 		       HRCWH_RL_EXT_NAND)
+#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0))
 
 /* System IO Config */
 #define CONFIG_SYS_SICRH	(SICRH_TSOBI1 | SICRH_TSOBI2)	/* RGMII */
diff --git a/include/configs/MPC8313ERDB_NOR.h b/include/configs/MPC8313ERDB_NOR.h
index 03420a181c..29ea1a5b96 100644
--- a/include/configs/MPC8313ERDB_NOR.h
+++ b/include/configs/MPC8313ERDB_NOR.h
@@ -30,16 +30,6 @@
 #define CONFIG_VSC7385_ENET
 #define CONFIG_TSEC2
 
-#ifdef CONFIG_SYS_66MHZ
-#define CONFIG_83XX_CLKIN	66666667	/* in Hz */
-#elif defined(CONFIG_SYS_33MHZ)
-#define CONFIG_83XX_CLKIN	33333333	/* in Hz */
-#else
-#error Unknown oscillator frequency.
-#endif
-
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 #define CONFIG_SYS_IMMR		0xE0000000
 
 #define CONFIG_SYS_MEMTEST_START	0x00001000
@@ -423,8 +413,6 @@
 	HRCWL_CSB_TO_CLKIN_2X1 |\
 	HRCWL_CORE_TO_CSB_2X1)
 
-#define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 2)
-
 #elif defined(CONFIG_SYS_33MHZ)
 
 /* 33MHz IN, 165MHz CSB, 330 DDR, 330 CORE */
@@ -437,8 +425,6 @@
 	HRCWL_CSB_TO_CLKIN_5X1 |\
 	HRCWL_CORE_TO_CSB_2X1)
 
-#define CONFIG_SYS_NS16550_CLK (CONFIG_83XX_CLKIN * 5)
-
 #endif
 
 #define CONFIG_SYS_HRCW_HIGH_BASE (\
@@ -455,6 +441,7 @@
 		       HRCWH_FROM_0X00000100 |\
 		       HRCWH_ROM_LOC_LOCAL_16BIT |\
 		       HRCWH_RL_EXT_LEGACY)
+#define CONFIG_SYS_NS16550_CLK (get_bus_freq(0))
 
 /* System IO Config */
 #define CONFIG_SYS_SICRH	(SICRH_TSOBI1 | SICRH_TSOBI2)	/* RGMII */
diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index 8466e867bb..10a7a7b6ce 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -23,12 +23,6 @@
  */
 #define CONFIG_E300		1 /* E300 family */
 
-/*
- * System Clock Setup
- */
-#define CONFIG_83XX_CLKIN	66666667 /* in Hz */
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 /*
  * Hardware Reset Configuration Word
  * if CLKIN is 66.66MHz, then
diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index 0ef9dadd04..c0bcdeac6b 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -15,15 +15,6 @@
 #define CONFIG_E300		1	/* E300 family */
 #define CONFIG_QE		1	/* Has QE */
 
-/*
- * System Clock Setup
- */
-#define CONFIG_83XX_CLKIN	66666667	/* in Hz */
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-#endif
-
 /*
  * Hardware Reset Configuration Word
  */
diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h
index a4047513d8..6f75909293 100644
--- a/include/configs/MPC832XEMDS.h
+++ b/include/configs/MPC832XEMDS.h
@@ -12,19 +12,6 @@
 #define CONFIG_E300		1	/* E300 family */
 #define CONFIG_QE		1	/* Has QE */
 
-/*
- * System Clock Setup
- */
-#ifdef CONFIG_PCISLAVE
-#define CONFIG_83XX_PCICLK	66000000	/* in HZ */
-#else
-#define CONFIG_83XX_CLKIN	66000000	/* in Hz */
-#endif
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#define CONFIG_SYS_CLK_FREQ	66000000
-#endif
-
 /*
  * Hardware Reset Configuration Word
  */
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index 9cfced6d21..2696dfd748 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -17,26 +17,11 @@
  */
 #define CONFIG_E300		1	/* E300 Family */
 
-#define CONFIG_PCI_66M
-#ifdef CONFIG_PCI_66M
-#define CONFIG_83XX_CLKIN	66000000	/* in Hz */
-#else
-#define CONFIG_83XX_CLKIN	33000000	/* in Hz */
-#endif
-
-#ifdef CONFIG_PCISLAVE
-#define CONFIG_83XX_PCICLK	66666666	/* in Hz */
-#endif /* CONFIG_PCISLAVE */
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#ifdef CONFIG_PCI_66M
-#define CONFIG_SYS_CLK_FREQ	66000000
+#if CONFIG_SYS_CLK_FREQ == 66000000 || CONFIG_SYS_CLK_FREQ == 66666666
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_4X1
-#else
-#define CONFIG_SYS_CLK_FREQ	33000000
+#elif CONFIG_SYS_CLK_FREQ == 33000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_8X1
 #endif
-#endif
 
 #define CONFIG_SYS_IMMR		0xE0000000
 
diff --git a/include/configs/MPC8349EMDS_SDRAM.h b/include/configs/MPC8349EMDS_SDRAM.h
index 8837e4d207..6d0ee81746 100644
--- a/include/configs/MPC8349EMDS_SDRAM.h
+++ b/include/configs/MPC8349EMDS_SDRAM.h
@@ -17,26 +17,11 @@
  */
 #define CONFIG_E300		1	/* E300 Family */
 
-#define CONFIG_PCI_66M
-#ifdef CONFIG_PCI_66M
-#define CONFIG_83XX_CLKIN	66000000	/* in Hz */
-#else
-#define CONFIG_83XX_CLKIN	33000000	/* in Hz */
-#endif
-
-#ifdef CONFIG_PCISLAVE
-#define CONFIG_83XX_PCICLK	66666666	/* in Hz */
-#endif /* CONFIG_PCISLAVE */
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#ifdef CONFIG_PCI_66M
-#define CONFIG_SYS_CLK_FREQ	66000000
+#if CONFIG_SYS_CLK_FREQ == 66000000 || CONFIG_SYS_CLK_FREQ == 66666666
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_4X1
-#else
-#define CONFIG_SYS_CLK_FREQ	33000000
+#elif CONFIG_SYS_CLK_FREQ == 33000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_8X1
 #endif
-#endif
 
 #define CONFIG_SYS_IMMR		0xE0000000
 
diff --git a/include/configs/MPC8349ITX.h b/include/configs/MPC8349ITX.h
index 76386979fb..402e0d297d 100644
--- a/include/configs/MPC8349ITX.h
+++ b/include/configs/MPC8349ITX.h
@@ -394,13 +394,6 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #endif
 
-#define CONFIG_PCI_66M
-#ifdef CONFIG_PCI_66M
-#define CONFIG_83XX_CLKIN	66666666	/* in Hz */
-#else
-#define CONFIG_83XX_CLKIN	33333333	/* in Hz */
-#endif
-
 /* TSEC */
 
 #ifdef CONFIG_TSEC_ENET
diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h
index c693486d04..5148bcf994 100644
--- a/include/configs/MPC837XEMDS.h
+++ b/include/configs/MPC837XEMDS.h
@@ -12,19 +12,6 @@
  */
 #define CONFIG_E300		1 /* E300 family */
 
-/*
- * System Clock Setup
- */
-#ifdef CONFIG_PCISLAVE
-#define CONFIG_83XX_PCICLK	66000000 /* in HZ */
-#else
-#define CONFIG_83XX_CLKIN	66000000 /* in Hz */
-#endif
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#define CONFIG_SYS_CLK_FREQ	66000000
-#endif
-
 /*
  * Hardware Reset Configuration Word
  * if CLKIN is 66MHz, then
diff --git a/include/configs/MPC837XERDB.h b/include/configs/MPC837XERDB.h
index f924883da3..7ad0cf5c33 100644
--- a/include/configs/MPC837XERDB.h
+++ b/include/configs/MPC837XERDB.h
@@ -20,20 +20,6 @@
  */
 #define CONFIG_VSC7385_ENET
 
-/*
- * System Clock Setup
- */
-#ifdef CONFIG_PCISLAVE
-#define CONFIG_83XX_PCICLK	66666667 /* in HZ */
-#else
-#define CONFIG_83XX_CLKIN	66666667 /* in Hz */
-#define CONFIG_PCIE
-#endif
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-#endif
-
 /*
  * Hardware Reset Configuration Word
  */
diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h
index 916951466b..68f6d66e0f 100644
--- a/include/configs/TQM834x.h
+++ b/include/configs/TQM834x.h
@@ -19,9 +19,6 @@
 /* IMMR Base Address Register, use Freescale default: 0xff400000 */
 #define CONFIG_SYS_IMMR		0xff400000
 
-/* System clock. Primary input clock when in PCI host mode */
-#define CONFIG_83XX_CLKIN	66666000	/* 66,666 MHz */
-
 /*
  * Local Bus LCRR
  *    LCRR:  DLL bypass, Clock divider is 8
diff --git a/include/configs/caddy2.h b/include/configs/caddy2.h
index e50996f610..08a9c06059 100644
--- a/include/configs/caddy2.h
+++ b/include/configs/caddy2.h
@@ -25,22 +25,11 @@
 /* Don't enable PCI2 on vme834x - it doesn't exist physically. */
 #undef CONFIG_MPC83XX_PCI2		/* support for 2nd PCI controller */
 
-#define CONFIG_PCI_66M
 #ifdef CONFIG_PCI_66M
-#define CONFIG_83XX_CLKIN	66000000	/* in Hz */
-#else
-#define CONFIG_83XX_CLKIN	33000000	/* in Hz */
-#endif
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#ifdef CONFIG_PCI_66M
-#define CONFIG_SYS_CLK_FREQ	66000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_4X1
 #else
-#define CONFIG_SYS_CLK_FREQ	33000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_8X1
 #endif
-#endif
 
 #define CONFIG_SYS_IMMR		0xE0000000
 
diff --git a/include/configs/hrcon.h b/include/configs/hrcon.h
index bcf5692578..552826c2b1 100644
--- a/include/configs/hrcon.h
+++ b/include/configs/hrcon.h
@@ -16,12 +16,6 @@
 
 #define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC83xx_ESDHC_ADDR
 
-/*
- * System Clock Setup
- */
-#define CONFIG_83XX_CLKIN	33333333 /* in Hz */
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 /*
  * Hardware Reset Configuration Word
  * if CLKIN is 66.66MHz, then
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index b371b3b1ba..2813b74872 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -20,9 +20,6 @@
 #define CONFIG_BOOT_RETRY_MIN		30
 #define CONFIG_RESET_TO_RETRY
 
-#define CONFIG_83XX_CLKIN		66000000	/* in Hz */
-#define CONFIG_SYS_CLK_FREQ		CONFIG_83XX_CLKIN
-
 #define CONFIG_SYS_IMMR		0xF0000000
 
 #define CONFIG_SYS_ACR_PIPE_DEP	3	/* Arbiter pipeline depth (0-3) */
diff --git a/include/configs/kmeter1.h b/include/configs/kmeter1.h
index b4cadd3e0f..ac636b7e21 100644
--- a/include/configs/kmeter1.h
+++ b/include/configs/kmeter1.h
@@ -25,13 +25,6 @@
 #include "km/keymile-common.h"
 #include "km/km-powerpc.h"
 
-/*
- * System Clock Setup
- */
-#define CONFIG_83XX_CLKIN		66000000
-#define CONFIG_SYS_CLK_FREQ		66000000
-#define CONFIG_83XX_PCICLK		66000000
-
 /*
  * IMMR new address
  */
diff --git a/include/configs/mpc8308_p1m.h b/include/configs/mpc8308_p1m.h
index d2140e7302..5613d3b335 100644
--- a/include/configs/mpc8308_p1m.h
+++ b/include/configs/mpc8308_p1m.h
@@ -21,12 +21,6 @@
 #define CONFIG_TSEC1
 #define CONFIG_TSEC2
 
-/*
- * System Clock Setup
- */
-#define CONFIG_83XX_CLKIN	33333333 /* in Hz */
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 /*
  * Hardware Reset Configuration Word
  * if CLKIN is 66.66MHz, then
diff --git a/include/configs/sbc8349.h b/include/configs/sbc8349.h
index ba6ddbbc14..1f7bfd63a7 100644
--- a/include/configs/sbc8349.h
+++ b/include/configs/sbc8349.h
@@ -22,27 +22,11 @@
 /* Don't enable PCI2 on sbc834x - it doesn't exist physically. */
 #undef CONFIG_MPC83XX_PCI2		/* support for 2nd PCI controller */
 
-/*
- * The default if PCI isn't enabled, or if no PCI clk setting is given
- * is 66MHz; this is what the board defaults to when the PCI slot is
- * physically empty.  The board will automatically (i.e w/o jumpers)
- * clock down to 33MHz if you insert a 33MHz PCI card.
- */
 #ifdef CONFIG_PCI_33M
-#define CONFIG_83XX_CLKIN	33000000	/* in Hz */
-#else	/* 66M */
-#define CONFIG_83XX_CLKIN	66000000	/* in Hz */
-#endif
-
-#ifndef CONFIG_SYS_CLK_FREQ
-#ifdef CONFIG_PCI_33M
-#define CONFIG_SYS_CLK_FREQ	33000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_8X1
 #else	/* 66M */
-#define CONFIG_SYS_CLK_FREQ	66000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_4X1
 #endif
-#endif
 
 #define CONFIG_SYS_IMMR		0xE0000000
 
diff --git a/include/configs/strider.h b/include/configs/strider.h
index 121edd7745..48cbbdaace 100644
--- a/include/configs/strider.h
+++ b/include/configs/strider.h
@@ -16,12 +16,6 @@
 
 #define CONFIG_SYS_FSL_ESDHC_ADDR	CONFIG_SYS_MPC83xx_ESDHC_ADDR
 
-/*
- * System Clock Setup
- */
-#define CONFIG_83XX_CLKIN	33333333 /* in Hz */
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 /*
  * Hardware Reset Configuration Word
  * if CLKIN is 66.66MHz, then
diff --git a/include/configs/ve8313.h b/include/configs/ve8313.h
index deac6a9e60..b08a8eb116 100644
--- a/include/configs/ve8313.h
+++ b/include/configs/ve8313.h
@@ -24,10 +24,6 @@
  * On-board devices
  *
  */
-#define CONFIG_83XX_CLKIN	32000000	/* in Hz */
-
-#define CONFIG_SYS_CLK_FREQ	CONFIG_83XX_CLKIN
-
 #define CONFIG_SYS_IMMR		0xE0000000
 
 #define CONFIG_SYS_MEMTEST_START	0x00001000
diff --git a/include/configs/vme8349.h b/include/configs/vme8349.h
index 48fd86f1d1..ee84d09791 100644
--- a/include/configs/vme8349.h
+++ b/include/configs/vme8349.h
@@ -26,21 +26,12 @@
 #undef CONFIG_MPC83XX_PCI2		/* support for 2nd PCI controller */
 
 #define CONFIG_PCI_66M
-#ifdef CONFIG_PCI_66M
-#define CONFIG_83XX_CLKIN	66000000	/* in Hz */
-#else
-#define CONFIG_83XX_CLKIN	33000000	/* in Hz */
-#endif
 
-#ifndef CONFIG_SYS_CLK_FREQ
 #ifdef CONFIG_PCI_66M
-#define CONFIG_SYS_CLK_FREQ	66000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_4X1
 #else
-#define CONFIG_SYS_CLK_FREQ	33000000
 #define HRCWL_CSB_TO_CLKIN	HRCWL_CSB_TO_CLKIN_8X1
 #endif
-#endif
 
 #define CONFIG_SYS_IMMR		0xE0000000
 
-- 
2.16.4



More information about the U-Boot mailing list