]> git.sur5r.net Git - u-boot/commitdiff
FSL: Convert board/freescale/common/Makefile to use CONFIG_
authorJon Loeliger <jdl@freescale.com>
Tue, 15 Jan 2008 19:42:41 +0000 (13:42 -0600)
committerJon Loeliger <jdl@freescale.com>
Wed, 16 Jan 2008 18:05:05 +0000 (12:05 -0600)
Convert the board/freescale/common/Makefile to use
CONFIG_* options to select which files to conditionally
compile into the board/freescale/common library rather
than conditionally compiling entire files.

Now handles::
    CONFIG_FSL_PIXIS
    CONFIG_FSL_DIU_FB
    CONFIG_PQ_MDS_PIB

CONFIG_ID_EEPROM is introduced until CFG_ID_EEPROM is gone.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
board/freescale/common/Makefile
board/freescale/common/fsl_diu_fb.c
board/freescale/common/pixis.c
board/freescale/common/pq-mds-pib.c
board/freescale/common/sys_eeprom.c
board/freescale/mpc8610hpcd/Makefile
include/configs/MPC8610HPCD.h
include/configs/MPC8641HPCN.h

index 9cee9f19bb542155148400b7ccd99189b37c1a15..6665e7f7caec11495aa14efe9cdcb00bc28a4d1b 100644 (file)
@@ -29,14 +29,13 @@ endif
 
 LIB    = $(obj)lib$(VENDOR).a
 
-COBJS  := sys_eeprom.o \
-          pixis.o      \
-          pq-mds-pib.o \
-          fsl_logo_bmp.o \
-          fsl_diu_fb.o
-
-SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS   := $(addprefix $(obj),$(COBJS))
+COBJS-${CONFIG_PQ_MDS_PIB}     += pq-mds-pib.o
+COBJS-${CONFIG_ID_EEPROM}      += sys_eeprom.o
+COBJS-${CONFIG_FSL_DIU_FB}     += fsl_diu_fb.o fsl_logo_bmp.o
+COBJS-${CONFIG_FSL_PIXIS}      += pixis.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
 
 $(LIB):        $(obj).depend $(OBJS)
index 5a8576ea2b06de152b01465633b3dfaa3b0662b5..2336f6bc5c31d087c97c8d580ff9915fc014a5d1 100644 (file)
@@ -27,8 +27,6 @@
 #include <i2c.h>
 #include <malloc.h>
 
-#ifdef CONFIG_FSL_DIU_FB
-
 #include "fsl_diu_fb.h"
 
 #ifdef DEBUG
@@ -615,4 +613,3 @@ void fsl_diu_clear_screen(void)
 
        memset(info->screen_base, 0, info->smem_len);
 }
-#endif /* CONFIG_FSL_DIU_FB */
index 45dcf4dab03d425e9d867a6a1a7badef747d7237..00eb4a0928b1beabf35390ba3bbec04aa04ea888 100644 (file)
@@ -25,9 +25,8 @@
 #include <common.h>
 #include <command.h>
 #include <watchdog.h>
-
-#ifdef CONFIG_FSL_PIXIS
 #include <asm/cache.h>
+
 #include "pixis.h"
 
 
@@ -474,4 +473,3 @@ U_BOOT_CMD(
        "    pixis_reset altbank cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>\n"
        "    pixis_reset cf <SYSCLK freq> <COREPLL ratio> <MPXPLL ratio>\n"
        );
-#endif /* CONFIG_FSL_PIXIS */
index e4f96e8848dbff691d60a0197dd834ae527958f7..6c72aa1a43f25e81bbaa3ee84f7fca180462dac7 100644 (file)
@@ -12,8 +12,6 @@
 #include <i2c.h>
 #include <asm/io.h>
 
-#ifdef CONFIG_PQ_MDS_PIB
-
 #include "pq-mds-pib.h"
 
 int pib_init(void)
@@ -102,4 +100,3 @@ int pib_init(void)
        i2c_set_bus_num(orig_i2c_bus);
        return 0;
 }
-#endif /* CONFIG_PQ_MDS_PIB */
index 7bc663bba464f765a35f9c8fe725086a5f8c7ec9..bb91e67262b0ab8c49d2f39893532f19f84b4a35 100644 (file)
@@ -27,7 +27,6 @@
 #include <i2c.h>
 #include <linux/ctype.h>
 
-#ifdef CFG_ID_EEPROM
 typedef struct {
        unsigned char id[4];            /* 0x0000 - 0x0003 */
        unsigned char sn[12];           /* 0x0004 - 0x000F */
@@ -253,4 +252,3 @@ int mac_read_from_eeprom(void)
        }
        return 0;
 }
-#endif /* CFG_ID_EEPROM */
index 76087c12a6e2a74fe6e2397781c811c83c0c3a86..12a92ae7dc3e40fc6e91c3f4f7e28a7093fa16b3 100644 (file)
@@ -27,14 +27,14 @@ endif
 
 LIB    = $(obj)lib$(BOARD).a
 
-COBJS  := $(BOARD).o \
-       ../common/sys_eeprom.o \
-       ../common/pixis.o \
-       mpc8610hpcd_diu.o \
-       ../common/fsl_diu_fb.o
-
 SOBJS  := init.o
 
+COBJS  := $(BOARD).o
+
+COBJS-${CONFIG_FSL_DIU_FB}     += mpc8610hpcd_diu.o
+
+COBJS  += ${COBJS-y}
+
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
index f77c29d06044128e26ef3ceeb27463995753c642..ac4b3e133f4fdfe00cda633652f369219ca5ec0b 100644 (file)
 #endif
 
 #define CFG_ID_EEPROM
+#ifdef CFG_ID_EEPROM
+#define CONFIG_ID_EEPROM
+#endif
 #define ID_EEPROM_ADDR         0x57
 
 
index 7f485c68f6c8e40feb907cffc0d909d7479a6159..ab875f036c9c1122ae6e4d0145eaf9fc8260e72d 100644 (file)
@@ -152,6 +152,9 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);
 #endif
 
 #define CFG_ID_EEPROM  1
+#ifdef CFG_ID_EEPROM
+#define CONFIG_ID_EEPROM
+#endif
 #define ID_EEPROM_ADDR 0x57
 
 /*