patch-2.4.0-test2 linux/include/asm-arm/arch-sa1100/uncompress.h

Next file: linux/include/asm-arm/arch-shark/time.h
Previous file: linux/include/asm-arm/arch-sa1100/time.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/include/asm-arm/arch-sa1100/uncompress.h linux/include/asm-arm/arch-sa1100/uncompress.h
@@ -2,58 +2,51 @@
  * linux/include/asm-arm/arch-brutus/uncompress.h
  *
  * (C) 1999 Nicolas Pitre <nico@cam.org>
+ *
+ * Reorganised to use machine_is_*() macros.
  */
 
-#include <linux/config.h>
-
-#if	defined(CONFIG_SA1100_EMPEG) || \
-	defined(CONFIG_SA1100_VICTOR) || \
-	defined(CONFIG_SA1100_LART)
-#define SERBASE _Ser3UTCR0;
-#elif	defined(CONFIG_SA1100_BRUTUS)
-#define SERBASE _Ser1UTCR0;
-#endif
-
-
-#ifdef SERBASE
-
 #include "hardware.h"
 #include "serial_reg.h"
 
-static volatile unsigned long* serial_port = (unsigned long*)SERBASE;
-
 /*
  * The following code assumes the serial port has already been
  * initialized by the bootloader or such...
  */
-
 static void puts( const char *s )
 {
-    int i;
+	volatile unsigned long *serial_port;
 
-    for (i = 0; *s; i++, s++) {
-	/* wait for space in the UART's transmiter */
-	while( !(serial_port[UTSR1] & UTSR1_TNF) );
-
-	/* send the character out. */
-	serial_port[UART_TX] = *s;
-
-	/* if a LF, also do CR... */
-	if (*s == 10) {
-	    while( !(serial_port[UTSR1] & UTSR1_TNF) );
-	    serial_port[UART_TX] = 13;
+	if (machine_is_assabet()) {
+		if (0/*SA1111 connected*/)
+			serial_port = (unsigned long *)_Ser3UTCR0;
+		else
+			serial_port = (unsigned long *)_Ser1UTCR0;
+	} else if (machine_is_brutus())
+		serial_port = (unsigned long *)_Ser1UTCR0;
+	else if (machine_is_empeg() || machine_is_bitsy() ||
+		 machine_is_victor() || machine_is_lart())
+		serial_port = (unsigned long *)_Ser3UTCR0;
+	else
+		return;
+
+	for (; *s; s++) {
+		/* wait for space in the UART's transmiter */
+		while (!(serial_port[UTSR1] & UTSR1_TNF));
+
+		/* send the character out. */
+		serial_port[UART_TX] = *s;
+
+		/* if a LF, also do CR... */
+		if (*s == 10) {
+			while (!(serial_port[UTSR1] & UTSR1_TNF));
+			serial_port[UART_TX] = 13;
+		}
 	}
-    }
 }
 
-#else
-
-static inline void puts( const char *s ) {}
-
-#endif
-
-
-/* Nothing to do for these */
+/*
+ * Nothing to do for these
+ */
 #define arch_decomp_setup()
 #define arch_decomp_wdog()
-

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)