Replace CONFIG_MPC8540 with ARCH_MPC8540 in Kconfig and clean up existing
macros.

Signed-off-by: York Sun <york....@nxp.com>
---

 arch/powerpc/cpu/mpc85xx/Kconfig          | 4 ++++
 arch/powerpc/cpu/mpc85xx/cpu.c            | 2 +-
 arch/powerpc/cpu/mpc85xx/speed.c          | 4 ++--
 arch/powerpc/include/asm/config_mpc85xx.h | 2 +-
 arch/powerpc/include/asm/fsl_lbc.h        | 2 +-
 arch/powerpc/include/asm/immap_85xx.h     | 2 +-
 doc/README.mpc85xxads                     | 2 +-
 drivers/input/keyboard.c                  | 2 +-
 include/configs/MPC8540ADS.h              | 1 -
 include/keyboard.h                        | 2 +-
 scripts/config_whitelist.txt              | 1 -
 11 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig
index 682d4e7..69567db 100644
--- a/arch/powerpc/cpu/mpc85xx/Kconfig
+++ b/arch/powerpc/cpu/mpc85xx/Kconfig
@@ -60,6 +60,7 @@ config TARGET_MPC8536DS
 
 config TARGET_MPC8540ADS
        bool "Support MPC8540ADS"
+       select ARCH_MPC8540
 
 config TARGET_MPC8541CDS
        bool "Support MPC8541CDS"
@@ -193,6 +194,9 @@ config ARCH_C29X
 config ARCH_MPC8536
        bool
 
+config ARCH_MPC8540
+       bool
+
 config ARCH_MPC8544
        bool
 
diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index cabf64c..871935d 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -293,7 +293,7 @@ int checkcpu (void)
 int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 /* Everything after the first generation of PQ3 parts has RSTCR */
-#if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \
+#if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_MPC8541) || \
     defined(CONFIG_MPC8555) || defined(CONFIG_MPC8560)
        unsigned long val, msr;
 
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index be03e01..55d1431 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -625,7 +625,7 @@ void get_sys_info(sys_info_t *sys_info)
                 * for four times the clock divider values.
                 */
                lcrr_div *= 4;
-#elif !defined(CONFIG_MPC8540) && !defined(CONFIG_MPC8541) && \
+#elif !defined(CONFIG_ARCH_MPC8540) && !defined(CONFIG_MPC8541) && \
     !defined(CONFIG_MPC8555) && !defined(CONFIG_MPC8560)
                /*
                 * Yes, the entire PQ38 family use the same
@@ -681,7 +681,7 @@ int get_clocks (void)
         * for that SOC. This information is taken from application note
         * AN2919.
         */
-#if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \
+#if defined(CONFIG_ARCH_MPC8540) || defined(CONFIG_MPC8541) || \
        defined(CONFIG_MPC8560) || defined(CONFIG_MPC8555) || \
        defined(CONFIG_P1022)
        gd->arch.i2c1_clk = sys_info.freq_systembus;
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h 
b/arch/powerpc/include/asm/config_mpc85xx.h
index be1ab4a..7f9b2d9 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -44,7 +44,7 @@
 #define CONFIG_SYS_FSL_ERRATUM_A004508
 #define CONFIG_SYS_FSL_ERRATUM_A005125
 
-#elif defined(CONFIG_MPC8540)
+#elif defined(CONFIG_ARCH_MPC8540)
 #define CONFIG_MAX_CPUS                        1
 #define CONFIG_SYS_FSL_NUM_LAWS                8
 #define CONFIG_SYS_FSL_DDRC_GEN1
diff --git a/arch/powerpc/include/asm/fsl_lbc.h 
b/arch/powerpc/include/asm/fsl_lbc.h
index 402edd7..6e4b087 100644
--- a/arch/powerpc/include/asm/fsl_lbc.h
+++ b/arch/powerpc/include/asm/fsl_lbc.h
@@ -325,7 +325,7 @@ void lbc_sdram_init(void);
  */
 #define LCRR_CLKDIV                    0x0000001F
 #define LCRR_CLKDIV_SHIFT              0
-#if defined(CONFIG_MPC83xx) || defined (CONFIG_MPC8540) || \
+#if defined(CONFIG_MPC83xx) || defined(CONFIG_ARCH_MPC8540) || \
     defined(CONFIG_MPC8541) || defined (CONFIG_MPC8555) || \
     defined(CONFIG_MPC8560)
 #define LCRR_CLKDIV_2                  0x00000002
diff --git a/arch/powerpc/include/asm/immap_85xx.h 
b/arch/powerpc/include/asm/immap_85xx.h
index 1ae5af1..2e959dd 100644
--- a/arch/powerpc/include/asm/immap_85xx.h
+++ b/arch/powerpc/include/asm/immap_85xx.h
@@ -124,7 +124,7 @@ typedef struct ccsr_i2c {
        u8      res[4096 - 1 * sizeof(struct fsl_i2c_base)];
 } ccsr_i2c_t;
 
-#if defined(CONFIG_MPC8540) || \
+#if defined(CONFIG_ARCH_MPC8540) || \
        defined(CONFIG_MPC8541) || \
        defined(CONFIG_ARCH_MPC8548) || \
        defined(CONFIG_MPC8555)
diff --git a/doc/README.mpc85xxads b/doc/README.mpc85xxads
index ef92739..4a9aeb3 100644
--- a/doc/README.mpc85xxads
+++ b/doc/README.mpc85xxads
@@ -136,7 +136,7 @@ Updated 13-July-2004 Jon Loeliger
     CONFIG_BOOKE           BOOKE(e.g. Motorola MPC85xx, AMCC 440, etc)
     CONFIG_E500                    BOOKE e500 family(Motorola)
     CONFIG_MPC85xx         MPC8540,MPC8560 and their derivatives
-    CONFIG_MPC8540         MPC8540 specific
+    CONFIG_ARCH_MPC8540            MPC8540 specific
     CONFIG_MPC8540ADS      MPC8540ADS board specific
     CONFIG_MPC8560ADS      MPC8560ADS board specific
     CONFIG_TSEC_ENET       Use on-chip 10/100/1000 ethernet for networking
diff --git a/drivers/input/keyboard.c b/drivers/input/keyboard.c
index 48255bd..522b02f 100644
--- a/drivers/input/keyboard.c
+++ b/drivers/input/keyboard.c
@@ -20,7 +20,7 @@ static struct input_config config;
 
 static int kbd_read_keys(struct input_config *config)
 {
-#if defined(CONFIG_MPC5xxx) || defined(CONFIG_MPC8540) || \
+#if defined(CONFIG_MPC5xxx) || defined(CONFIG_ARCH_MPC8540) || \
                defined(CONFIG_MPC8541) || defined(CONFIG_MPC8555)
        /* no ISR is used, so received chars must be polled */
        ps2ser_check();
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index af3e85e..fab5a49 100644
--- a/include/configs/MPC8540ADS.h
+++ b/include/configs/MPC8540ADS.h
@@ -21,7 +21,6 @@
 /* High Level Configuration Options */
 #define CONFIG_BOOKE           1       /* BOOKE */
 #define CONFIG_E500            1       /* BOOKE e500 family */
-#define CONFIG_MPC8540         1       /* MPC8540 specific */
 #define CONFIG_MPC8540ADS      1       /* MPC8540ADS board specific */
 
 /*
diff --git a/include/keyboard.h b/include/keyboard.h
index 6725e48..e26f69e 100644
--- a/include/keyboard.h
+++ b/include/keyboard.h
@@ -98,7 +98,7 @@ extern int kbd_init_hw(void);
 extern void pckbd_leds(unsigned char leds);
 #endif /* !CONFIG_DM_KEYBOARD */
 
-#if defined(CONFIG_MPC5xxx) || defined(CONFIG_MPC8540) || \
+#if defined(CONFIG_MPC5xxx) || defined(CONFIG_ARCH_MPC8540) || \
                defined(CONFIG_MPC8541) || defined(CONFIG_MPC8555)
 int ps2ser_check(void);
 #endif
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 142d71d..8e74451 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -3140,7 +3140,6 @@ CONFIG_MPC83XX_GPIO_1_INIT_OPEN_DRAIN
 CONFIG_MPC83XX_GPIO_1_INIT_VALUE
 CONFIG_MPC83XX_PCI2
 CONFIG_MPC850
-CONFIG_MPC8540
 CONFIG_MPC8540ADS
 CONFIG_MPC8541
 CONFIG_MPC8541CDS
-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to