Subject: Quick patch for cl7500 loader

From: Jason Gunthorpe <[email-masked]>
Date: Mon, 5 Jun 2000 19:39:59 -0600 (MDT)

Hi Russell,

This is an isolated patch that fixes up the ucompress.h for cl7500. 
Whoever wrote the original was using com2 and had the wrong baud divisor
(weird). I also made the serial port base easially changeable.. 

Thanks,
Jason

--- linux2/include/asm-arm/arch-cl7500/uncompress.h	Tue Nov 23 23:23:11 1999
+++ linux/include/asm-arm/arch-cl7500/uncompress.h	Mon Jun  5 19:35:09 2000
@@ -5,11 +5,12 @@
  */
 
 #define BASE 0x03010000
+#define SERBASE (BASE + (0x3f8 << 2))
 
 static __inline__ void putc(char c)
 {
-	while (!(*((volatile unsigned int *)(BASE + 0xbf4)) & 0x20));
-	*((volatile unsigned int *)(BASE + 0xbe0)) = c;
+	while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20));
+	*((volatile unsigned int *)(SERBASE)) = c;
 }
 
 /*
@@ -27,13 +28,13 @@
 
 static __inline__ void arch_decomp_setup(void)
 {
-	int baud = 3686400 / (9600 * 16);
+	int baud = 3686400 / (9600 * 32);
 
-	*((volatile unsigned int *)(BASE + 0xBEC)) = 0x80;
-	*((volatile unsigned int *)(BASE + 0xBE0)) = baud & 0xff;
-	*((volatile unsigned int *)(BASE + 0xBE4)) = (baud & 0xff00) >> 8;
-	*((volatile unsigned int *)(BASE + 0xBEC)) = 3; /* 8 bits */
-	*((volatile unsigned int *)(BASE + 0xBF0)) = 3; /* DTR, RTS */
+	*((volatile unsigned int *)(SERBASE + 0xC)) = 0x80;
+	*((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff;
+	*((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8;
+	*((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */
+	*((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */
 }
 
 /*

unsubscribe: body of `unsubscribe linux-arm-kernel' to [email-masked]