]> git.sur5r.net Git - u-boot/commitdiff
microblaze: Repare intc handling
authorMichal Simek <monstr@monstr.eu>
Sun, 4 May 2008 13:42:41 +0000 (15:42 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 9 May 2008 19:11:02 +0000 (21:11 +0200)
Signed-off-by: Michal Simek <monstr@monstr.eu>
include/configs/ml401.h
include/configs/xupv2p.h

index 360e2e11d2afe31b9c9b2a6c73a3320fdf63d6aa..7e0df870191871e690f31053a437d56473658311 100644 (file)
 /* ethernet */
 #ifdef XILINX_EMAC_BASEADDR
 #define CONFIG_XILINX_EMAC     1
+#define CFG_ENET
 #else
 #ifdef XILINX_EMACLITE_BASEADDR
 #define CONFIG_XILINX_EMACLITE 1
+#define CFG_ENET
 #endif
 #endif
 #undef ET_DEBUG
 #endif
 
 /* interrupt controller */
+#ifdef XILINX_INTC_BASEADDR
 #define        CFG_INTC_0              1
 #define        CFG_INTC_0_ADDR         XILINX_INTC_BASEADDR
 #define        CFG_INTC_0_NUM          XILINX_INTC_NUM_INTR_INPUTS
+#endif
 
 /* timer */
+#ifdef XILINX_TIMER_BASEADDR
+#if (XILINX_TIMER_IRQ != -1)
 #define        CFG_TIMER_0             1
 #define        CFG_TIMER_0_ADDR        XILINX_TIMER_BASEADDR
 #define        CFG_TIMER_0_IRQ         XILINX_TIMER_IRQ
 #define        FREQUENCE               XILINX_CLOCK_FREQ
 #define        CFG_TIMER_0_PRELOAD     ( FREQUENCE/1000 )
+#endif
+#else
+#ifdef XILINX_CLOCK_FREQ
 #define        CONFIG_XILINX_CLOCK_FREQ        XILINX_CLOCK_FREQ
-
+#else
+#error BAD CLOCK FREQ
+#endif
+#endif
 /* FSL */
 /* #define     CFG_FSL_2 */
 /* #define     FSL_INTR_2      1 */
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_MFSL
-#define CONFIG_CMD_PING
+
+#ifndef CFG_ENET
+       #undef CONFIG_CMD_NET
+#else
+       #define CONFIG_CMD_PING
+#endif
 
 #if defined(CONFIG_SYSTEMACE)
        #define CONFIG_CMD_EXT2
index 30fb303c9613c01a8167e12fb6dbaea19574d735..c738567a5f4c034ea6cc0d0f4a0d0ee5b3b4b007 100644 (file)
 /* ethernet */
 #ifdef XILINX_EMAC_BASEADDR
 #define CONFIG_XILINX_EMAC     1
+#define CFG_ENET
 #else
 #ifdef XILINX_EMACLITE_BASEADDR
 #define CONFIG_XILINX_EMACLITE 1
+#define CFG_ENET
 #endif
 #endif
 #undef ET_DEBUG
 #endif
 
 /* interrupt controller */
+#ifdef XILINX_INTC_BASEADDR
 #define        CFG_INTC_0              1
 #define        CFG_INTC_0_ADDR         XILINX_INTC_BASEADDR
 #define        CFG_INTC_0_NUM          XILINX_INTC_NUM_INTR_INPUTS
+#endif
 
 /* timer */
+#ifdef XILINX_TIMER_BASEADDR
+#if (XILINX_TIMER_IRQ != -1)
 #define        CFG_TIMER_0             1
 #define        CFG_TIMER_0_ADDR        XILINX_TIMER_BASEADDR
 #define        CFG_TIMER_0_IRQ         XILINX_TIMER_IRQ
 #define        FREQUENCE               XILINX_CLOCK_FREQ
 #define        CFG_TIMER_0_PRELOAD     ( FREQUENCE/1000 )
+#endif
+#else
+#ifdef XILINX_CLOCK_FREQ
 #define        CONFIG_XILINX_CLOCK_FREQ        XILINX_CLOCK_FREQ
-
+#else
+#error BAD CLOCK FREQ
+#endif
+#endif
 /*
  * memory layout - Example
  * TEXT_BASE = 0x3600_0000;
 #define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_CACHE
 #define CONFIG_CMD_IRQ
-#define CONFIG_CMD_PING
+
+#ifndef CFG_ENET
+       #undef CONFIG_CMD_NET
+#else
+       #define CONFIG_CMD_PING
+#endif
 
 #ifdef XILINX_SYSACE_BASEADDR
 #define CONFIG_CMD_EXT2