patch-2.4.19 linux-2.4.19/arch/mips/au1000/common/dbg_io.c

Next file: linux-2.4.19/arch/mips/au1000/common/dma.c
Previous file: linux-2.4.19/arch/mips/au1000/common/clocks.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/arch/mips/au1000/common/dbg_io.c linux-2.4.19/arch/mips/au1000/common/dbg_io.c
@@ -53,8 +53,11 @@
 #define UART_MOD_CNTRL	0x100	/* Module Control */
 
 /* memory-mapped read/write of the port */
-#define UART16550_READ(y)    (inl(DEBUG_BASE + y) & 0xff)
-#define UART16550_WRITE(y,z) (outl(z&0xff, DEBUG_BASE + y))
+#define UART16550_READ(y)    (readl(DEBUG_BASE + y) & 0xff)
+#define UART16550_WRITE(y,z) (writel(z&0xff, DEBUG_BASE + y))
+
+extern unsigned long get_au1000_uart_baud_base(void);
+extern unsigned long cal_r4koff(void);
 
 void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop)
 {
@@ -72,12 +75,12 @@
 		uint32 divisor;
 
 		/* set divisor */
-		divisor = get_au1000_uart_baud() / baud;
+		divisor = get_au1000_uart_baud_base() / baud;
 		UART16550_WRITE(UART_CLK, divisor & 0xffff);
 	}
 
 	/* set data format */
-	UART16550_WRITE(UART_LCR, data | parity | stop);
+	UART16550_WRITE(UART_LCR, (data | parity | stop));
 }
 
 static int remoteDebugInitialized = 0;
@@ -99,7 +102,8 @@
 
 int putDebugChar(uint8 byte)
 {
-	int i;
+//	int i;
+
 	if (!remoteDebugInitialized) {
 		remoteDebugInitialized = 1;
 		debugInit(UART16550_BAUD_115200,

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