Skip to contentSkip to conversation

m68knommu: hard set the ColdFire MBAR register on startup

PATCH New [email protected] 1 participant 1 message Nov 25, 2011 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68knommu: hard set the ColdFire MBAR register on startup

From: Greg Ungerer <[email protected]>

The ColdFire MBAR register that holds the mapping of the peripheral region on some ColdFire CPUs is configurable. It can be configured at some address different to that of the bootloader that loaded the kernel. So hard set the MBAR register mapping at kernel startup time.

---
 arch/m68k/platform/coldfire/head.S |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
arch/m68k/platform/coldfire/head.S +4 -0
index 49666b4..0ed41ed 100644
@@ -149,6 +149,10 @@ _start:
 #if defined(CONFIG_UBOOT)
 	movel	%sp,_init_sp			/* save initial stack pointer */
 #endif
+#ifdef CONFIG_MBAR
+	movel	#CONFIG_MBAR+1,%d0		/* configured MBAR address */
+	movec	%d0,%MBAR			/* set it */
+#endif
 
 	/*
 	 *	Do any platform or board specific setup now. Most boards
Signature · 1 line
1.7.0.4