Browse Source

cleanup: introduce CONFIG_MPC830x

Introduce a new configuration token CONFIG_MPC830x to be shared among
mpc8308 and mpc8309. Define it for existing 8308 boards, and refactor
existing common code so to make future introduction of 8309 simpler.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Gerlando Falauto 12 years ago
parent
commit
8afad91f15

+ 3 - 0
arch/powerpc/cpu/mpc83xx/speed.c

@@ -185,7 +185,10 @@ int get_clocks(void)
 		/* unkown SCCR_TSEC1CM value */
 		/* unkown SCCR_TSEC1CM value */
 		return -2;
 		return -2;
 	}
 	}
+#endif
 
 
+#if defined(CONFIG_MPC830x) || defined(CONFIG_MPC831x) || \
+	defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x)
 	switch ((sccr & SCCR_USBDRCM) >> SCCR_USBDRCM_SHIFT) {
 	switch ((sccr & SCCR_USBDRCM) >> SCCR_USBDRCM_SHIFT) {
 	case 0:
 	case 0:
 		usbdr_clk = 0;
 		usbdr_clk = 0;

+ 2 - 2
arch/powerpc/include/asm/immap_83xx.h

@@ -73,8 +73,8 @@ typedef struct sysconf83xx {
 	u32 obir;		/* Output Buffer Impedance Register */
 	u32 obir;		/* Output Buffer Impedance Register */
 	u8 res8[0xC];
 	u8 res8[0xC];
 	u32 pecr1;		/* PCI Express control register 1 */
 	u32 pecr1;		/* PCI Express control register 1 */
-#ifdef CONFIG_MPC8308
-	u32 sdhccr;		/* eSDHC Control Registers for MPC8308 */
+#if defined(CONFIG_MPC830x)
+	u32 sdhccr;		/* eSDHC Control Registers for MPC830x */
 #else
 #else
 	u32 pecr2;		/* PCI Express control register 2 */
 	u32 pecr2;		/* PCI Express control register 2 */
 #endif
 #endif

+ 1 - 0
include/configs/MPC8308RDB.h

@@ -30,6 +30,7 @@
  */
  */
 #define CONFIG_E300		1 /* E300 family */
 #define CONFIG_E300		1 /* E300 family */
 #define CONFIG_MPC83xx		1 /* MPC83xx family */
 #define CONFIG_MPC83xx		1 /* MPC83xx family */
+#define CONFIG_MPC830x		1 /* MPC830x family */
 #define CONFIG_MPC8308		1 /* MPC8308 CPU specific */
 #define CONFIG_MPC8308		1 /* MPC8308 CPU specific */
 #define CONFIG_MPC8308RDB	1 /* MPC8308RDB board specific */
 #define CONFIG_MPC8308RDB	1 /* MPC8308RDB board specific */
 
 

+ 1 - 0
include/configs/mpc8308_p1m.h

@@ -30,6 +30,7 @@
  */
  */
 #define CONFIG_E300		1 /* E300 family */
 #define CONFIG_E300		1 /* E300 family */
 #define CONFIG_MPC83xx		1 /* MPC83xx family */
 #define CONFIG_MPC83xx		1 /* MPC83xx family */
+#define CONFIG_MPC830x		1 /* MPC830x family */
 #define CONFIG_MPC8308		1 /* MPC8308 CPU specific */
 #define CONFIG_MPC8308		1 /* MPC8308 CPU specific */
 #define CONFIG_MPC8308_P1M	1 /* mpc8308_p1m board specific */
 #define CONFIG_MPC8308_P1M	1 /* mpc8308_p1m board specific */
 
 

+ 1 - 1
include/mpc83xx.h

@@ -969,7 +969,7 @@
  */
  */
 #define CSCONFIG_EN			0x80000000
 #define CSCONFIG_EN			0x80000000
 #define CSCONFIG_AP			0x00800000
 #define CSCONFIG_AP			0x00800000
-#if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x)
+#if defined(CONFIG_MPC830x) || defined(CONFIG_MPC831x)
 #define CSCONFIG_ODT_RD_NEVER		0x00000000
 #define CSCONFIG_ODT_RD_NEVER		0x00000000
 #define CSCONFIG_ODT_RD_ONLY_CURRENT	0x00100000
 #define CSCONFIG_ODT_RD_ONLY_CURRENT	0x00100000
 #define CSCONFIG_ODT_RD_ONLY_OTHER_CS	0x00200000
 #define CSCONFIG_ODT_RD_ONLY_OTHER_CS	0x00200000