summaryrefslogtreecommitdiffstats
path: root/board/freescale
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2008-01-15 13:42:41 -0600
committerJon Loeliger <jdl@freescale.com>2008-01-16 12:05:05 -0600
commitad8f8687b78c3e917b173f038926695383c55555 (patch)
tree06444e1c48b7b404a23fb337b75584e0274c5c47 /board/freescale
parent7c2221eb230372a9e537c4f6636b147b0909325f (diff)
downloadblackbird-obmc-uboot-ad8f8687b78c3e917b173f038926695383c55555.tar.gz
blackbird-obmc-uboot-ad8f8687b78c3e917b173f038926695383c55555.zip
FSL: Convert board/freescale/common/Makefile to use CONFIG_
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>
Diffstat (limited to 'board/freescale')
-rw-r--r--board/freescale/common/Makefile15
-rw-r--r--board/freescale/common/fsl_diu_fb.c3
-rw-r--r--board/freescale/common/pixis.c4
-rw-r--r--board/freescale/common/pq-mds-pib.c3
-rw-r--r--board/freescale/common/sys_eeprom.c2
-rw-r--r--board/freescale/mpc8610hpcd/Makefile12
6 files changed, 14 insertions, 25 deletions
diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 9cee9f19bb..6665e7f7ca 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -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)
diff --git a/board/freescale/common/fsl_diu_fb.c b/board/freescale/common/fsl_diu_fb.c
index 5a8576ea2b..2336f6bc5c 100644
--- a/board/freescale/common/fsl_diu_fb.c
+++ b/board/freescale/common/fsl_diu_fb.c
@@ -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 */
diff --git a/board/freescale/common/pixis.c b/board/freescale/common/pixis.c
index 45dcf4dab0..00eb4a0928 100644
--- a/board/freescale/common/pixis.c
+++ b/board/freescale/common/pixis.c
@@ -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 */
diff --git a/board/freescale/common/pq-mds-pib.c b/board/freescale/common/pq-mds-pib.c
index e4f96e8848..6c72aa1a43 100644
--- a/board/freescale/common/pq-mds-pib.c
+++ b/board/freescale/common/pq-mds-pib.c
@@ -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 */
diff --git a/board/freescale/common/sys_eeprom.c b/board/freescale/common/sys_eeprom.c
index 7bc663bba4..bb91e67262 100644
--- a/board/freescale/common/sys_eeprom.c
+++ b/board/freescale/common/sys_eeprom.c
@@ -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 */
diff --git a/board/freescale/mpc8610hpcd/Makefile b/board/freescale/mpc8610hpcd/Makefile
index 76087c12a6..12a92ae7dc 100644
--- a/board/freescale/mpc8610hpcd/Makefile
+++ b/board/freescale/mpc8610hpcd/Makefile
@@ -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))
OpenPOWER on IntegriCloud