Skip to contentSkip to conversation

Add support for Freescale M [...]

PATCH New DENX Support System 1 participant 1 message Mar 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add support for Freescale M [...]

Hello list,

inside the automatic U-Boot patch tracking system a new ticket [DNX#2006033142000963] was created:

<snip>

Quoted 90 lines

This change (and the two that will follow it) can be pulled from
http://labxtechnologies.com/u-boot.git. This is in preparation for the next patch adds a new board that uses the 5271. Please let me know if this patch or the following ones need any work.

CHANGELOG
* Add support for Freescale M5271 processor
Patch by Zachary Landau, 26 Jan 2006

---

 CHANGELOG                   |    3 +++
 cpu/mcf52x2/cpu.c           |   40
++++++++++++++++++++++++++++++++++++++++
 cpu/mcf52x2/cpu_init.c      |   37
+++++++++++++++++++++++++++++++++++++
 cpu/mcf52x2/fec.c           |   22 +++++++++++++++++++++-
 cpu/mcf52x2/interrupts.c    |    7 ++++++-
 cpu/mcf52x2/serial.c        |    8 +++++++-
 cpu/mcf52x2/start.S         |   34 +++++++++++++++++++++++++++++++++-
 include/asm-m68k/mcftimer.h |    2 +-
 include/asm-m68k/mcfuart.h  |    2 +-
 include/asm-m68k/ptrace.h   |    2 +-
 lib_m68k/time.c             |    9 +++++++--
 11 files changed, 157 insertions(+), 9 deletions(-)

eacbd317757327e8e7f018f5701c950429c4c6ae

CHANGELOG +3 -0
index 2f10f7f..607cde1 100644
@@ -2,6 +2,9 @@
 Changes since U-Boot 1.1.4:
 ======================================================================
 
+* Add support for Freescale M5271 processor
+  Patch by Zachary Landau, 26 Jan 2006
+
 * Fix 28F256J3A support on PM520 board
   (without bank-switching only 32 MB can be accessed)
 
cpu/mcf52x2/cpu.c +28 -0
index 32a524f..302832b 100644
@@ -25,6 +25,11 @@
 #include <watchdog.h>
 #include <command.h>
 
+#ifdef  CONFIG_M5271
+#include <asm/immap_5271.h>
+#include <asm/m5271.h>
+#endif
+
 #ifdef	CONFIG_M5272
 #include <asm/immap_5272.h>
 #include <asm/m5272.h>
@@ -38,6 +43,41 @@
 #include <asm/m5249.h>
 #endif
 
+#ifdef	CONFIG_M5271
+int checkcpu (void)
+{
+	puts ("CPU:   MOTOROLA Coldfire MCF5271\n");
+	return 0;
+}
+
+int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char
 *argv[]) {
+	mbar_writeByte(MCF_RCM_RCR,
+			MCF_RCM_RCR_SOFTRST | MCF_RCM_RCR_FRCRSTOUT);
+	return 0;
+};
+
+#if defined(CONFIG_WATCHDOG)
+void watchdog_reset (void)
+{
+	mbar_writeShort(MCF_WTM_WSR, 0x5555);
+	mbar_writeShort(MCF_WTM_WSR, 0xAAAA);
+}
+
+int watchdog_disable (void)
+{
+	mbar_writeShort(MCF_WTM_WCR, 0);

cpu/mcf52x2/cpu.c line 79

Quoted 10 lines
cpu/mcf52x2/cpu.c +10 -0
+	return (0);
+}
+
+int watchdog_init (void)
+{
+	mbar_writeShort(MCF_WTM_WCNTR, CONFIG_WATCHDOG_TIMEOUT);
+	mbar_writeShort(MCF_WTM_WCR, MCF_WTM_WCR_EN);
+	return (0);
+}
+#endif /* #ifdef CONFIG_WATCHDOG */

</snip>

Your U-Boot support team