Update of /cvsroot/gc-linux/linux/drivers/input/si
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv32021
Modified Files:
gcn-si.c
Log Message:
s/0xcc/0xcd/ thanks to mth.
Index: gcn-si.c
===================================================================
RCS file: /cvsroot/gc-linux/linux/drivers/input/si/gcn-si.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- gcn-si.c 14 Nov 2007 23:08:49 -0000 1.7
+++ gcn-si.c 4 Mar 2008 06:01:49 -0000 1.8
@@ -2,7 +2,7 @@
* drivers/input/gcn-si.c
*
* Nintendo GameCube Serial Interface driver
- * Copyright (C) 2004 The GameCube Linux Team
+ * Copyright (C) 2004-2008 The GameCube Linux Team
* Copyright (C) 2004 Steven Looman
* Copyright (C) 2005 Albert Herranz
*
@@ -24,6 +24,12 @@
#include <asm/io.h>
+#ifdef CONFIG_PPC_MERGE
+#include <platforms/embedded6xx/gamecube.h>
+#else
+#include <platforms/gamecube.h>
+#endif
+
#ifdef SI_DEBUG
# define DPRINTK(fmt, args...) \
printk(KERN_ERR "%s: " fmt, __FUNCTION__ , ## args)
@@ -61,14 +67,16 @@
#define REFRESH_TIME HZ/100
-#define SICOUTBUF(x) ((void __iomem *)(0xcc006400 + (x)*12))
-#define SICINBUFH(x) ((void __iomem *)(0xcc006404 + (x)*12))
-#define SICINBUFL(x) ((void __iomem *)(0xcc006408 + (x)*12))
+#define SI_BASE (GCN_IO2_BASE | 0x00006400)
-#define SIPOLL ((void __iomem *)0xcc006430)
-#define SICOMCSR ((void __iomem *)0xcc006434)
-#define SISR ((void __iomem *)0xcc006438)
-#define SIEXILK ((void __iomem *)0xcc00643c)
+#define SICOUTBUF(x) ((void __iomem *)(SI_BASE + 0 + (x)*12))
+#define SICINBUFH(x) ((void __iomem *)(SI_BASE + 4 + (x)*12))
+#define SICINBUFL(x) ((void __iomem *)(SI_BASE + 8 + (x)*12))
+
+#define SIPOLL ((void __iomem *)(SI_BASE + 0x30))
+#define SICOMCSR ((void __iomem *)(SI_BASE + 0x34))
+#define SISR ((void __iomem *)(SI_BASE + 0x38))
+#define SIEXILK ((void __iomem *)(SI_BASE + 0x3c))
#define ID_PAD 0x0900
#define ID_KEYBOARD 0x0820
@@ -90,8 +98,8 @@
static struct resource gcn_si_resources = {
- .start = 0xcc006400,
- .end = 0xcc006500,
+ .start = SI_BASE,
+ .end = SI_BASE + 0x0100,
.name = DRV_MODULE_NAME,
.flags = IORESOURCE_MEM | IORESOURCE_BUSY
};
@@ -166,20 +174,20 @@
out_be32(SICOMCSR, 0);
out_be32(SISR, 0);
- out_be32((void __iomem *)0xcc006480, 0);
- out_be32((void __iomem *)0xcc006484, 0);
- out_be32((void __iomem *)0xcc006488, 0);
- out_be32((void __iomem *)0xcc00648c, 0);
+ out_be32((void __iomem *)(SI_BASE + 0x80), 0);
+ out_be32((void __iomem *)(SI_BASE + 0x84), 0);
+ out_be32((void __iomem *)(SI_BASE + 0x88), 0);
+ out_be32((void __iomem *)(SI_BASE + 0x8c), 0);
- out_be32((void __iomem *)0xcc006490, 0);
- out_be32((void __iomem *)0xcc006494, 0);
- out_be32((void __iomem *)0xcc006498, 0);
- out_be32((void __iomem *)0xcc00649c, 0);
+ out_be32((void __iomem *)(SI_BASE + 0x90), 0);
+ out_be32((void __iomem *)(SI_BASE + 0x94), 0);
+ out_be32((void __iomem *)(SI_BASE + 0x98), 0);
+ out_be32((void __iomem *)(SI_BASE + 0x9c), 0);
- out_be32((void __iomem *)0xcc0064a0, 0);
- out_be32((void __iomem *)0xcc0064a4, 0);
- out_be32((void __iomem *)0xcc0064a8, 0);
- out_be32((void __iomem *)0xcc0064ac, 0);
+ out_be32((void __iomem *)(SI_BASE + 0xa0), 0);
+ out_be32((void __iomem *)(SI_BASE + 0xa4), 0);
+ out_be32((void __iomem *)(SI_BASE + 0xa8), 0);
+ out_be32((void __iomem *)(SI_BASE + 0xac), 0);
}
/**
@@ -210,7 +218,7 @@
gcn_si_wait_transfer_done();
- return in_be32((void __iomem *)0xcc006480);
+ return in_be32((void __iomem *)(SI_BASE + 0x80));
}
/**
|