Skip to contentSkip to conversation

resend#2 [PATCH 2/2] ColdFire: Add M5373EVB platform support - 2

U-Boot-Users Tsi-Chung Liew 1 participant 1 message Jan 16, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw
---
 MAINTAINERS                   |    1 +
 MAKEALL                       |    3 +-
 Makefile                      |   10 ++
 cpu/mcf532x/cpu.c             |   20 +++-
 doc/README.m5373evb           |  333 +++++++++++++++++++++++++++++++++++++++++
 include/asm-m68k/immap.h      |    4 +-
 include/asm-m68k/immap_5329.h |   89 +++++++++---
 include/asm-m68k/m5329.h      |    5 +
 include/configs/M5373EVB.h    |  267 +++++++++++++++++++++++++++++++++
 9 files changed, 708 insertions(+), 24 deletions(-)
 create mode 100644 doc/README.m5373evb
 create mode 100644 include/configs/M5373EVB.h
MAINTAINERS +1 -0
index 40b2b51..bddcf48 100644
@@ -644,6 +644,7 @@ TsiChung Liew <[email protected]>
 
 	M5235EVB		mcf52x2
 	M5329EVB		mcf532x
+	M5373EVB		mcf532x
 	M54455EVB		mcf5445x
 
 Hayden Fraser <[email protected]>
MAKEALL +2 -1
index bec3541..da25497 100755
@@ -647,7 +647,8 @@ LIST_coldfire="			\
 	M5271EVB		\
 	M5272C3			\
 	M5282EVB		\
-	M5329EVB		\
+	M5329AFEE		\
+	M5373EVB		\
 	M54455EVB		\
 	r5200			\
 	TASREG			\
Makefile +10 -0
index 8a888b9..7b73f6e 100644
@@ -1811,6 +1811,16 @@ M5329BFEE_config :	unconfig
 	fi
 	@$(MKCONFIG) -a M5329EVB m68k mcf532x m5329evb freescale
 
+M5373EVB_config :	unconfig
+	@case "$@" in \
+	M5373EVB_config)	NAND=16;; \
+	esac; \
+	>include/config.h ; \
+	if [ "$${NAND}" != "0" ] ; then \
+		echo "#define NANDFLASH_SIZE	$${NAND}" > $(obj)include/config.h ; \
+	fi
+	@$(MKCONFIG) -a M5373EVB m68k mcf532x m5373evb freescale
+
 M54455EVB_config \
 M54455EVB_atmel_config \
 M54455EVB_intel_config \
cpu/mcf532x/cpu.c +18 -2
index 89cc8ad..61541ab 100644
@@ -64,6 +64,18 @@ int checkcpu(void)
 	case 0x61:
 		id = 5327;
 		break;
+	case 0x65:
+		id = 5373;
+		break;
+	case 0x68:
+		id = 53721;
+		break;
+	case 0x69:
+		id = 5372;
+		break;
+	case 0x6B:
+		id = 5372;
+		break;
 	}
 
 	if (id) {
@@ -84,6 +96,7 @@ void watchdog_reset(void)
 	volatile wdog_t *wdp = (wdog_t *) (MMAP_WDOG);
 
 	wdp->sr = 0x5555;	/* Count register */
+	wdp->sr = 0xAAAA;	/* Count register */
 }
 
 int watchdog_disable(void)
@@ -104,8 +117,11 @@ int watchdog_init(void)
 
 	/* set timeout and enable watchdog */
 	wdog_module = ((CFG_CLK / 1000) * CONFIG_WATCHDOG_TIMEOUT);
-	wdog_module |= (wdog_module / 8192);
-	wdp->mr = wdog_module;
+#ifdef CONFIG_M5329
+	wdp->mr = (wdog_module / 8192);
+#else
+	wdp->mr = (wdog_module / 4096);
+#endif
 
 	wdp->cr = WTM_WCR_EN;
 	puts("WATCHDOG:enabled\n");
doc/README.m5373evb new file +333 -0

333 lines not on this page · raw message

include/asm-m68k/immap.h +2 -2
index 912753d..852d941 100644
@@ -169,7 +169,7 @@
 #endif
 #endif				/* CONFIG_M5282 */
 
-#ifdef CONFIG_M5329
+#if defined(CONFIG_M5329) || defined(CONFIG_M5373)
 #include <asm/immap_5329.h>
 #include <asm/m5329.h>
 
@@ -197,7 +197,7 @@
 
 #define CFG_INTR_BASE		(MMAP_INTC0)
 #define CFG_NUM_IRQS		(128)
-#endif				/* CONFIG_M5329 */
+#endif				/* CONFIG_M5329 && CONFIG_M5373 */
 
 #ifdef CONFIG_M54455
 #include <asm/immap_5445x.h>
include/asm-m68k/immap_5329.h +70 -19

183 lines not on this page · raw message

include/asm-m68k/m5329.h +5 -0
index 8316fcf..c1669dc 100644
@@ -1118,6 +1118,7 @@
 #define GPIO_PCLRR_LCDCTLL7		(0x80)
 
 /* Bit definitions and macros for GPIO_PAR_FEC */
+#ifdef CONFIG_M5329
 #define GPIO_PAR_FEC_MII(x)		(((x)&0x03)<<0)
 #define GPIO_PAR_FEC_7W(x)		(((x)&0x03)<<2)
 #define GPIO_PAR_FEC_7W_GPIO		(0x00)
@@ -1126,6 +1127,10 @@
 #define GPIO_PAR_FEC_MII_GPIO		(0x00)
 #define GPIO_PAR_FEC_MII_UART		(0x01)
 #define GPIO_PAR_FEC_MII_FEC		(0x03)
+#else
+#define GPIO_PAR_FEC_7W_FEC		(0x08)
+#define GPIO_PAR_FEC_MII_FEC		(0x02)
+#endif
 
 /* Bit definitions and macros for GPIO_PAR_PWM */
 #define GPIO_PAR_PWM1(x)		(((x)&0x03)<<0)
include/configs/M5373EVB.h new file +267 -0

267 lines not on this page · raw message

Signature · 1 line
1.5.2