From: Ed Swarthout Date: Sun, 19 Aug 2007 03:52:18 -0500 Subject: [U-Boot-Users] [PATCH] Fix mcf build breaks. Message-ID: <11875135383895-git-send-email-ed.swarthout@hwdebug.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Do not try to include asm/{immap,rtc}.h if CONFIG_MCFRTC is not defined. Signed-off-by: Ed Swarthout --- The 8/18 Coldfile merge broke 85xx: mcfrtc.c:28:23: error: asm/immap.h: No such file or directory mcfrtc.c:29:21: error: asm/rtc.h: No such file or directory drivers/net/mcffec.c | 12 ++++++------ drivers/serial/mcfuart.c | 3 ++- rtc/mcfrtc.c | 5 +++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c index 2e0ddeb..ca0da0d 100644 --- a/drivers/net/mcffec.c +++ b/drivers/net/mcffec.c @@ -25,17 +25,19 @@ */ #include +#include + +#if defined(CONFIG_CMD_NET) && defined(CONFIG_MFCFEC) + #include #include #include -#include #include #include #include -#ifdef CONFIG_MCFFEC #undef ET_DEBUG #undef MII_DEBUG @@ -51,7 +53,6 @@ DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) struct fec_info_s fec_info[] = { #ifdef CFG_FEC0_IOBASE @@ -201,7 +202,7 @@ int fec_recv(struct eth_device *dev) for (;;) { #ifdef CFG_UNIFY_CACHE - icache_invalid(); + icache_invalid(); #endif /* section 16.9.23.2 */ if (info->rxbd[info->rxIdx].cbd_sc & BD_ENET_RX_EMPTY) { @@ -593,5 +594,4 @@ int mcffec_initialize(bd_t * bis) return 1; } -#endif /* CONFIG_CMD_NET, FEC_ENET & NET_MULTI */ -#endif /* CONFIG_MCFFEC */ +#endif /* CONFIG_CMD_NET & CONFIG_MCFFEC */ diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c index bc7077d..6c18c09 100644 --- a/drivers/serial/mcfuart.c +++ b/drivers/serial/mcfuart.c @@ -28,12 +28,13 @@ */ #include +#ifdef CONFIG_MCFUART + #include #include DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_MCFUART extern void uart_port_conf(void); int serial_init(void) diff --git a/rtc/mcfrtc.c b/rtc/mcfrtc.c index 76bb510..16dbae5 100644 --- a/rtc/mcfrtc.c +++ b/rtc/mcfrtc.c @@ -23,13 +23,14 @@ #include #include + +#if defined(CONFIG_MCFRTC) && defined(CONFIG_CMD_DATE) + #include #include #include -#if defined(CONFIG_MCFRTC) && defined(CONFIG_CMD_DATE) - #undef RTC_DEBUG #ifndef CFG_MCFRTC_BASE -- 1.5.3.rc5.18.ga85e4