bk://bk.arm.linux.org.uk/linux-2.6-rmk
ben-linux@org.rmk.(none)[rmk]|ChangeSet|20050314232639|26999 ben-linux

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/03/14 23:26:39+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2535/1: RPC - VIDC_BASE `void __iomem *` annotation
#   
#   Patch from Ben Dooks
#   
#   Add `void __iomem *` to VIDC_BASE
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-rpc/hardware.h
#   2005/03/12 14:18:38+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2535/1: RPC - VIDC_BASE `void __iomem *` annotation
# 
# ChangeSet
#   2005/03/14 23:07:28+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2538/1: S3C2410 - ADC IRQ correct edge handling
#   
#   Patch from Ben Dooks
#   
#   The S3C2410 ADC+TC interrupt where being registrered as
#   edge-sensitive IRQs, but the code was handling them as
#   if they where level-sensitive.
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# arch/arm/mach-s3c2410/irq.c
#   2005/03/14 10:10:44+00:00 ben-linux@org.rmk.(none) +21 -1
#   [PATCH] 2538/1: S3C2410 - ADC IRQ correct edge handling
# 
# ChangeSet
#   2005/03/14 22:46:53+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
#   
#   Patch from Ben Dooks
#   
#   Change all S3C24XX_VA defines to have the type `void __iomem *`
#   and the necessary changes to the other bits of the s3c24xx
#   support.
#   Note, the map_desc will need changing in the future to allow
#   `void __iomem *` instead of an unsigned long for IO
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# include/asm-arm/arch-s3c2410/system.h
#   2005/03/14 10:28:03+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# include/asm-arm/arch-s3c2410/map.h
#   2005/03/14 10:24:18+00:00 ben-linux@org.rmk.(none) +5 -0
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# include/asm-arm/arch-s3c2410/io.h
#   2005/03/14 10:49:30+00:00 ben-linux@org.rmk.(none) +4 -4
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# drivers/serial/s3c2410.c
#   2005/03/14 10:53:55+00:00 ben-linux@org.rmk.(none) +1 -2
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/s3c2440-dsc.c
#   2005/03/14 10:28:03+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/pm.h
#   2005/03/14 10:28:03+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/pm.c
#   2005/03/14 10:28:03+00:00 ben-linux@org.rmk.(none) +2 -2
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/mach-vr1000.c
#   2005/03/14 10:35:13+00:00 ben-linux@org.rmk.(none) +12 -11
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/mach-smdk2440.c
#   2005/03/14 10:33:49+00:00 ben-linux@org.rmk.(none) +4 -3
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/mach-smdk2410.c
#   2005/03/14 10:32:33+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/mach-rx3715.c
#   2005/03/14 10:35:56+00:00 ben-linux@org.rmk.(none) +4 -3
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/mach-n30.c
#   2005/03/14 10:32:12+00:00 ben-linux@org.rmk.(none) +1 -4
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/mach-h1940.c
#   2005/03/14 10:31:35+00:00 ben-linux@org.rmk.(none) +1 -1
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/mach-bast.c
#   2005/03/14 10:31:19+00:00 ben-linux@org.rmk.(none) +15 -25
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/irq.c
#   2005/03/14 10:28:03+00:00 ben-linux@org.rmk.(none) +2 -2
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/gpio.c
#   2005/03/14 10:28:03+00:00 ben-linux@org.rmk.(none) +10 -8
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# arch/arm/mach-s3c2410/cpu.h
#   2005/03/14 10:29:11+00:00 ben-linux@org.rmk.(none) +5 -2
#   [PATCH] 2537/2: S3C2410 - fix iomem warnings from sparse
# 
# ChangeSet
#   2005/03/13 20:16:48+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2536/1: SA1100 - serial sparse error
#   
#   Patch from Ben Dooks
#   
#   Fix the mapbase to have __iomem
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# drivers/serial/sa1100.c
#   2005/03/12 16:17:04+00:00 ben-linux@org.rmk.(none) +3 -3
#   [PATCH] 2536/1: SA1100 - serial sparse error
# 
# ChangeSet
#   2005/03/13 20:08:51+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2532/1: CLPS7500 build fix
#   
#   Patch from Ben Dooks
#   
#   Fixed missing sys_timer from timer initialisation,
#   renamed platform_register_device to platform_device_register
#   and ensured that the machine init is called.
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# arch/arm/mach-clps7500/core.c
#   2005/03/12 13:47:05+00:00 ben-linux@org.rmk.(none) +5 -4
#   [PATCH] 2532/1: CLPS7500 build fix
# 
# ChangeSet
#   2005/03/13 20:01:23+00:00 ben-linux@org.rmk.(none) 
#   [ARM PATCH] 2531/1: S3C2410 - OTOM1.1 and Nexcoder 2440 support
#   
#   Patch from Ben Dooks
#   
#   Support for OTOM v1.1 and Nexcoder 2440, from Guillaume Gourat.
#   
#   Signed-off-by: Guillaume GOURAT
#   Cleaned up for submission, and brough up-to-date by Ben Dooks
#   
#   Signed-off-by: Ben Dooks
#   Signed-off-by: Russell King
# 
# arch/arm/mach-s3c2410/mach-otom.c
#   2005/03/12 13:23:09+00:00 ben-linux@org.rmk.(none) +124 -0
#   [PATCH] 2531/1: S3C2410 - OTOM1.1 and Nexcoder 2440 support
# 
# arch/arm/mach-s3c2410/mach-nexcoder.c
#   2005/03/12 13:21:22+00:00 ben-linux@org.rmk.(none) +156 -0
#   [PATCH] 2531/1: S3C2410 - OTOM1.1 and Nexcoder 2440 support
# 
# arch/arm/mach-s3c2410/mach-otom.c
#   2005/03/12 13:23:09+00:00 ben-linux@org.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/mach-otom.c
# 
# arch/arm/mach-s3c2410/mach-nexcoder.c
#   2005/03/12 13:21:22+00:00 ben-linux@org.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/arch/arm/mach-s3c2410/mach-nexcoder.c
# 
# arch/arm/mach-s3c2410/Makefile
#   2005/03/12 13:30:14+00:00 ben-linux@org.rmk.(none) +2 -0
#   [PATCH] 2531/1: S3C2410 - OTOM1.1 and Nexcoder 2440 support
# 
# arch/arm/mach-s3c2410/Kconfig
#   2005/03/12 13:17:54+00:00 ben-linux@org.rmk.(none) +12 -0
#   [PATCH] 2531/1: S3C2410 - OTOM1.1 and Nexcoder 2440 support
# 
# arch/arm/configs/s3c2410_defconfig
#   2005/03/12 13:24:20+00:00 ben-linux@org.rmk.(none) +2 -0
#   [PATCH] 2531/1: S3C2410 - OTOM1.1 and Nexcoder 2440 support
# 
# include/asm-arm/arch-s3c2410/otom-map.h
#   2005/03/12 13:17:54+00:00 ben-linux@org.rmk.(none) +30 -0
#   [PATCH] 2531/1: S3C2410 - OTOM1.1 and Nexcoder 2440 support
# 
# include/asm-arm/arch-s3c2410/otom-map.h
#   2005/03/12 13:17:54+00:00 ben-linux@org.rmk.(none) +0 -0
#   BitKeeper file /usr/src/bk/linux-2.6-rmk/include/asm-arm/arch-s3c2410/otom-map.h
# 
# ChangeSet
#   2005/03/13 19:53:20+00:00 davis_g@com.rmk.(none) 
#   [ARM PATCH] 2529/1: Add semtimedop support - semop() with a timeout (with demuxed IPC syscall entry added)
#   
#   Patch from George G. Davis
#   
#   Adds ARM support for the semtimedop() function - semop with a timeout.
#   This updates ARM with same support added for other archs long ago.
#   Also includes sys_semtimeop syscall table entry appended to end of
#   syscall table as per RMK\'s request.
#   
#   Signed-off-by: George G. Davis
#   Signed-off-by: Russell King
# 
# include/asm-arm/unistd.h
#   2005/03/13 00:00:00+00:00 davis_g@com.rmk.(none) +4 -0
#   [PATCH] 2529/1: Add semtimedop support - semop() with a timeout (with demuxed IPC syscall entry added)
# 
# include/asm-arm/ipc.h
#   2005/03/13 00:00:00+00:00 davis_g@com.rmk.(none) +1 -0
#   [PATCH] 2529/1: Add semtimedop support - semop() with a timeout (with demuxed IPC syscall entry added)
# 
# arch/arm/kernel/sys_arm.c
#   2005/03/13 00:00:00+00:00 davis_g@com.rmk.(none) +5 -1
#   [PATCH] 2529/1: Add semtimedop support - semop() with a timeout (with demuxed IPC syscall entry added)
# 
# arch/arm/kernel/calls.S
#   2005/03/13 00:00:00+00:00 davis_g@com.rmk.(none) +1 -0
#   [PATCH] 2529/1: Add semtimedop support - semop() with a timeout (with demuxed IPC syscall entry added)
# 
diff -Nru a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
--- a/arch/arm/configs/s3c2410_defconfig	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/configs/s3c2410_defconfig	2005-03-15 23:46:17 -08:00
@@ -91,6 +91,8 @@
 CONFIG_ARCH_S3C2440=y
 CONFIG_MACH_VR1000=y
 CONFIG_MACH_RX3715=y
+CONFIG_MACH_OTOM=y
+CONFIG_MACH_NEXCODER_2440=y
 CONFIG_CPU_S3C2410=y
 CONFIG_CPU_S3C2440=y
 
diff -Nru a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
--- a/arch/arm/kernel/calls.S	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/kernel/calls.S	2005-03-15 23:46:17 -08:00
@@ -326,6 +326,7 @@
 		.long	sys_add_key
 /* 310 */	.long	sys_request_key
 		.long	sys_keyctl
+		.long	sys_semtimedop
 __syscall_end:
 
 		.rept	NR_syscalls - (__syscall_end - __syscall_start) / 4
diff -Nru a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
--- a/arch/arm/kernel/sys_arm.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/kernel/sys_arm.c	2005-03-15 23:46:17 -08:00
@@ -169,7 +169,11 @@
 
 	switch (call) {
 	case SEMOP:
-		return sys_semop(first, (struct sembuf __user *)ptr, second);
+		return sys_semtimedop (first, (struct sembuf __user *)ptr, second, NULL);
+	case SEMTIMEDOP:
+		return sys_semtimedop(first, (struct sembuf __user *)ptr, second,
+					(const struct timespec __user *)fifth);
+
 	case SEMGET:
 		return sys_semget (first, second, third);
 	case SEMCTL: {
diff -Nru a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c
--- a/arch/arm/mach-clps7500/core.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-clps7500/core.c	2005-03-15 23:46:17 -08:00
@@ -12,6 +12,7 @@
 #include <linux/list.h>
 #include <linux/sched.h>
 #include <linux/init.h>
+#include <linux/device.h>
 #include <linux/serial_8250.h>
 
 #include <asm/mach/arch.h>
@@ -305,11 +306,10 @@
 static void __init clps7500_timer_init(void)
 {
 	ioctime_init();
-
 	setup_irq(IRQ_TIMER, &clps7500_timer_irq);
 }
 
-static struct clps7500_timer = {
+static struct sys_timer clps7500_timer = {
 	.init		= clps7500_timer_init,
 	.offset		= ioc_timer_gettimeoffset,
 };
@@ -360,7 +360,7 @@
 
 static int __init clps7500_init(void)
 {
-	return platform_register_device(&serial_device);
+	return platform_device_register(&serial_device);
 }
 
 MACHINE_START(CLPS7500, "CL-PS7500")
@@ -368,6 +368,7 @@
 	BOOT_MEM(0x10000000, 0x03000000, 0xe0000000)
 	MAPIO(clps7500_map_io)
 	INITIRQ(clps7500_init_irq)
-	.timer		= &clps7500_timer,
+		.init_machine	= clps7500_init,
+		.timer		= &clps7500_timer,
 MACHINE_END
 
diff -Nru a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
--- a/arch/arm/mach-s3c2410/Kconfig	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/Kconfig	2005-03-15 23:46:17 -08:00
@@ -58,6 +58,18 @@
 	  See <http://www.handhelds.org/projects/rx3715.html> for more
 	  information on this project
 
+config MACH_OTOM
+ 	bool "NexVision OTOM Board"
+ 	select CPU_S3C2410
+	help
+ 	  Say Y here if you are using the Nex Vision OTOM board
+
+config MACH_NEXCODER_2440
+ 	bool "NexVision NEXCODER 2440 Light Board"
+ 	select CPU_S3C2440
+	help
+ 	  Say Y here if you are using the Nex Vision NEXCODER 2440 Light Board
+
 endmenu
 
 config CPU_S3C2410
diff -Nru a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
--- a/arch/arm/mach-s3c2410/Makefile	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/Makefile	2005-03-15 23:46:17 -08:00
@@ -32,3 +32,5 @@
 obj-$(CONFIG_ARCH_S3C2440)	+= mach-smdk2440.o
 obj-$(CONFIG_MACH_VR1000)	+= mach-vr1000.o usb-simtec.o
 obj-$(CONFIG_MACH_RX3715)	+= mach-rx3715.o
+obj-$(CONFIG_MACH_OTOM)		+= mach-otom.o
+obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
diff -Nru a/arch/arm/mach-s3c2410/cpu.h b/arch/arm/mach-s3c2410/cpu.h
--- a/arch/arm/mach-s3c2410/cpu.h	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/cpu.h	2005-03-15 23:46:17 -08:00
@@ -15,10 +15,13 @@
  *     04-Jan-2005 BJD  New uart initialisation
  *     10-Jan-2005 BJD  Moved generic init here, specific to cpu headers
  *     14-Jan-2005 BJD  Added s3c24xx_init_clocks() call
- *     10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} on IODESC_ENT
+ *     10-Mar-2005 LCVR Changed S3C2410_{VA,SZ} to S3C24XX_{VA,SZ} & IODESC_ENT
+ *     14-Mar-2005 BJD  Updated for __iomem
 */
 
-#define IODESC_ENT(x) { S3C24XX_VA_##x, S3C2410_PA_##x, S3C24XX_SZ_##x, MT_DEVICE }
+/* todo - fix when rmk changes iodescs to use `void __iomem *` */
+
+#define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, S3C2410_PA_##x, S3C24XX_SZ_##x, MT_DEVICE }
 
 #ifndef MHZ
 #define MHZ (1000*1000)
diff -Nru a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c
--- a/arch/arm/mach-s3c2410/gpio.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/gpio.c	2005-03-15 23:46:17 -08:00
@@ -1,7 +1,7 @@
 /* linux/arch/arm/mach-s3c2410/gpio.c
  *
- * Copyright (c) 2004 Simtec Electronics
- * Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2004-2005 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
  *
  * S3C2410 GPIO support
  *
@@ -29,9 +29,11 @@
  *	01-Oct-2004  BJD  Added getirq() to turn pin into irqno
  *	04-Oct-2004  BJD  Added irq filter controls for GPIO
  *	05-Nov-2004  BJD  EXPORT_SYMBOL() added for all code
+ *	13-Mar-2005  BJD  Updates for __iomem
  */
 
 
+#include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
@@ -45,7 +47,7 @@
 
 void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
 {
-	unsigned long base = S3C2410_GPIO_BASE(pin);
+	void __iomem *base = S3C2410_GPIO_BASE(pin);
 	unsigned long mask;
 	unsigned long con;
 	unsigned long flags;
@@ -71,7 +73,7 @@
 
 unsigned int s3c2410_gpio_getcfg(unsigned int pin)
 {
-	unsigned long base = S3C2410_GPIO_BASE(pin);
+	void __iomem *base = S3C2410_GPIO_BASE(pin);
 	unsigned long mask;
 
 	if (pin < S3C2410_GPIO_BANKB) {
@@ -87,7 +89,7 @@
 
 void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
 {
-	unsigned long base = S3C2410_GPIO_BASE(pin);
+	void __iomem *base = S3C2410_GPIO_BASE(pin);
 	unsigned long offs = S3C2410_GPIO_OFFSET(pin);
 	unsigned long flags;
 	unsigned long up;
@@ -109,7 +111,7 @@
 
 void s3c2410_gpio_setpin(unsigned int pin, unsigned int to)
 {
-	unsigned long base = S3C2410_GPIO_BASE(pin);
+	void __iomem *base = S3C2410_GPIO_BASE(pin);
 	unsigned long offs = S3C2410_GPIO_OFFSET(pin);
 	unsigned long flags;
 	unsigned long dat;
@@ -128,7 +130,7 @@
 
 unsigned int s3c2410_gpio_getpin(unsigned int pin)
 {
-	unsigned long base = S3C2410_GPIO_BASE(pin);
+	void __iomem *base = S3C2410_GPIO_BASE(pin);
 	unsigned long offs = S3C2410_GPIO_OFFSET(pin);
 
 	return __raw_readl(base + 0x04) & (1<< offs);
@@ -175,7 +177,7 @@
 int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
 			   unsigned int config)
 {
-	unsigned long reg = S3C2410_EINFLT0;
+	void __iomem *reg = S3C2410_EINFLT0;
 	unsigned long flags;
 	unsigned long val;
 
diff -Nru a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c
--- a/arch/arm/mach-s3c2410/irq.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/irq.c	2005-03-15 23:46:17 -08:00
@@ -39,6 +39,9 @@
  *
  *   04-Nov-2004  Ben Dooks
  *		  Fix standard IRQ wake for EINT0..4 and RTC
+ *
+ *   22-Feb-2004  Ben Dooks
+ *		  Fixed edge-triggering on ADC IRQ
 */
 
 #include <linux/init.h>
@@ -262,8 +265,8 @@
 static int
 s3c_irqext_type(unsigned int irq, unsigned int type)
 {
-	unsigned long extint_reg;
-	unsigned long gpcon_reg;
+	void __iomem *extint_reg;
+	void __iomem *gpcon_reg;
 	unsigned long gpcon_offset, extint_offset;
 	unsigned long newvalue = 0, value;
 
@@ -426,6 +429,23 @@
 	}
 }
 
+static inline void
+s3c_irqsub_ack(unsigned int irqno, unsigned int parentmask, unsigned int group)
+{
+	unsigned int bit = 1UL << (irqno - IRQ_S3CUART_RX0);
+
+	__raw_writel(bit, S3C2410_SUBSRCPND);
+
+	/* only ack parent if we've got all the irqs (seems we must
+	 * ack, all and hope that the irq system retriggers ok when
+	 * the interrupt goes off again)
+	 */
+
+	if (1) {
+		__raw_writel(parentmask, S3C2410_SRCPND);
+		__raw_writel(parentmask, S3C2410_INTPND);
+	}
+}
 
 /* UART0 */
 
@@ -522,7 +542,7 @@
 static void
 s3c_irq_adc_ack(unsigned int irqno)
 {
-	s3c_irqsub_maskack(irqno, INTMSK_ADCPARENT, 3 << 9);
+	s3c_irqsub_ack(irqno, INTMSK_ADCPARENT, 3 << 9);
 }
 
 static struct irqchip s3c_irq_adc = {
diff -Nru a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
--- a/arch/arm/mach-s3c2410/mach-bast.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/mach-bast.c	2005-03-15 23:46:17 -08:00
@@ -25,6 +25,7 @@
  *     14-Jan-2005 BJD  Add support for muitlple NAND devices
  *     03-Mar-2005 BJD  Ensured that bast-cpld.h is included
  *     10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
+ *     14-Mar-2006 BJD  Updated for __iomem changes
 */
 
 #include <linux/kernel.h>
@@ -68,10 +69,10 @@
 #define COPYRIGHT ", (c) 2004-2005 Simtec Electronics"
 
 /* macros for virtual address mods for the io space entries */
-#define VA_C5(item) ((item) + BAST_VAM_CS5)
-#define VA_C4(item) ((item) + BAST_VAM_CS4)
-#define VA_C3(item) ((item) + BAST_VAM_CS3)
-#define VA_C2(item) ((item) + BAST_VAM_CS2)
+#define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
+#define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4)
+#define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3)
+#define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2)
 
 /* macros to modify the physical addresses for io space */
 
@@ -83,8 +84,8 @@
 static struct map_desc bast_iodesc[] __initdata = {
   /* ISA IO areas */
 
-  { S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO),	   SZ_16M, MT_DEVICE },
-  { S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO),	   SZ_16M, MT_DEVICE },
+  { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO),   SZ_16M, MT_DEVICE },
+  { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO),   SZ_16M, MT_DEVICE },
 
   /* we could possibly compress the next set down into a set of smaller tables
    * pagetables, but that would mean using an L2 section, and it still means
@@ -92,26 +93,15 @@
    */
 
   /* bast CPLD control registers, and external interrupt controls */
-  { BAST_VA_CTRL1, BAST_PA_CTRL1,		   SZ_1M, MT_DEVICE },
-  { BAST_VA_CTRL2, BAST_PA_CTRL2,		   SZ_1M, MT_DEVICE },
-  { BAST_VA_CTRL3, BAST_PA_CTRL3,		   SZ_1M, MT_DEVICE },
-  { BAST_VA_CTRL4, BAST_PA_CTRL4,		   SZ_1M, MT_DEVICE },
+  { (u32)BAST_VA_CTRL1, BAST_PA_CTRL1,		   SZ_1M, MT_DEVICE },
+  { (u32)BAST_VA_CTRL2, BAST_PA_CTRL2,		   SZ_1M, MT_DEVICE },
+  { (u32)BAST_VA_CTRL3, BAST_PA_CTRL3,		   SZ_1M, MT_DEVICE },
+  { (u32)BAST_VA_CTRL4, BAST_PA_CTRL4,		   SZ_1M, MT_DEVICE },
 
   /* PC104 IRQ mux */
-  { BAST_VA_PC104_IRQREQ,  BAST_PA_PC104_IRQREQ,   SZ_1M, MT_DEVICE },
-  { BAST_VA_PC104_IRQRAW,  BAST_PA_PC104_IRQRAW,   SZ_1M, MT_DEVICE },
-  { BAST_VA_PC104_IRQMASK, BAST_PA_PC104_IRQMASK,  SZ_1M, MT_DEVICE },
-
-  /* onboard 8bit lcd port */
-
-  { BAST_VA_LCD_RCMD1,  BAST_PA_LCD_RCMD1,	   SZ_1M, MT_DEVICE },
-  { BAST_VA_LCD_WCMD1,  BAST_PA_LCD_WCMD1,	   SZ_1M, MT_DEVICE },
-  { BAST_VA_LCD_RDATA1, BAST_PA_LCD_RDATA1,	   SZ_1M, MT_DEVICE },
-  { BAST_VA_LCD_WDATA1, BAST_PA_LCD_WDATA1,	   SZ_1M, MT_DEVICE },
-  { BAST_VA_LCD_RCMD2,  BAST_PA_LCD_RCMD2,	   SZ_1M, MT_DEVICE },
-  { BAST_VA_LCD_WCMD2,  BAST_PA_LCD_WCMD2,	   SZ_1M, MT_DEVICE },
-  { BAST_VA_LCD_RDATA2, BAST_PA_LCD_RDATA2,	   SZ_1M, MT_DEVICE },
-  { BAST_VA_LCD_WDATA2, BAST_PA_LCD_WDATA2,	   SZ_1M, MT_DEVICE },
+  { (u32)BAST_VA_PC104_IRQREQ,  BAST_PA_PC104_IRQREQ,   SZ_1M, MT_DEVICE },
+  { (u32)BAST_VA_PC104_IRQRAW,  BAST_PA_PC104_IRQRAW,   SZ_1M, MT_DEVICE },
+  { (u32)BAST_VA_PC104_IRQMASK, BAST_PA_PC104_IRQMASK,  SZ_1M, MT_DEVICE },
 
   /* peripheral space... one for each of fast/slow/byte/16bit */
   /* note, ide is only decoded in word space, even though some registers
@@ -410,7 +400,7 @@
 
 MACHINE_START(BAST, "Simtec-BAST")
      MAINTAINER("Ben Dooks <ben@simtec.co.uk>")
-     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(bast_map_io)
      INITIRQ(bast_init_irq)
diff -Nru a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c
--- a/arch/arm/mach-s3c2410/mach-h1940.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/mach-h1940.c	2005-03-15 23:46:17 -08:00
@@ -118,7 +118,7 @@
 
 MACHINE_START(H1940, "IPAQ-H1940")
      MAINTAINER("Ben Dooks <ben@fluff.org>")
-     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(h1940_map_io)
      INITIRQ(h1940_init_irq)
diff -Nru a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
--- a/arch/arm/mach-s3c2410/mach-n30.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/mach-n30.c	2005-03-15 23:46:17 -08:00
@@ -11,9 +11,6 @@
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
- *
- * Modifications:
- *     10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
 */
 
 #include <linux/kernel.h>
@@ -141,7 +138,7 @@
 
 MACHINE_START(N30, "Acer-N30")
      MAINTAINER("Christer Weinigel <christer@weinigel.se>, Ben Dooks <ben-linux@fluff.org>")
-     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
 
 	.timer		= &s3c24xx_timer,
diff -Nru a/arch/arm/mach-s3c2410/mach-nexcoder.c b/arch/arm/mach-s3c2410/mach-nexcoder.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/mach-s3c2410/mach-nexcoder.c	2005-03-15 23:46:17 -08:00
@@ -0,0 +1,156 @@
+/* linux/arch/arm/mach-s3c2410/mach-nexcoder.c
+ *
+ * Copyright (c) 2004 Nex Vision
+ *   Guillaume GOURAT <guillaume.gourat@nexvision.tv>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Modifications:
+ *     15-10-2004 GG  Created initial version
+ *     12-03-2005 BJD Updated for release
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
+#include <linux/timer.h>
+#include <linux/init.h>
+#include <linux/string.h>
+#include <linux/device.h>
+
+#include <linux/mtd/map.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <asm/setup.h>
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/mach-types.h>
+
+//#include <asm/debug-ll.h>
+#include <asm/arch/regs-gpio.h>
+#include <asm/arch/regs-serial.h>
+
+#include "s3c2410.h"
+#include "s3c2440.h"
+#include "clock.h"
+#include "devs.h"
+#include "cpu.h"
+
+static struct map_desc nexcoder_iodesc[] __initdata = {
+	/* nothing here yet */
+};
+
+#define UCON S3C2410_UCON_DEFAULT
+#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
+#define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE
+
+static struct s3c2410_uartcfg nexcoder_uartcfgs[] = {
+	[0] = {
+		.hwport	     = 0,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	[1] = {
+		.hwport	     = 1,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	[2] = {
+		.hwport	     = 2,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	}
+};
+
+/* NOR Flash on NexVision NexCoder 2440 board */
+
+static struct resource nexcoder_nor_resource[] = {
+	[0] = {
+		.start = S3C2410_CS0,
+		.end   = S3C2410_CS0 + (8*1024*1024) - 1,
+		.flags = IORESOURCE_MEM,
+	}
+};
+
+static struct map_info nexcoder_nor_map = {
+	.bankwidth = 2,
+};
+
+static struct platform_device nexcoder_device_nor = {
+	.name		= "mtd-flash",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(nexcoder_nor_resource),
+	.resource	= nexcoder_nor_resource,
+	.dev =
+	{
+		.platform_data = &nexcoder_nor_map,
+	}
+};
+
+/* Standard Nexcoder devices */
+
+static struct platform_device *nexcoder_devices[] __initdata = {
+	&s3c_device_usb,
+	&s3c_device_lcd,
+	&s3c_device_wdt,
+	&s3c_device_i2c,
+	&s3c_device_iis,
+ 	&s3c_device_rtc,
+	&s3c_device_camif,
+	&s3c_device_spi0,
+	&s3c_device_spi1,
+	&nexcoder_device_nor,
+};
+
+static struct s3c24xx_board nexcoder_board __initdata = {
+	.devices       = nexcoder_devices,
+	.devices_count = ARRAY_SIZE(nexcoder_devices),
+};
+
+
+static void __init nexcoder_sensorboard_init(void)
+{
+	// Initialize SCCB bus
+	s3c2410_gpio_setpin(S3C2410_GPE14, 1); // IICSCL
+	s3c2410_gpio_cfgpin(S3C2410_GPE14, S3C2410_GPE14_OUTP);
+	s3c2410_gpio_setpin(S3C2410_GPE15, 1); // IICSDA
+	s3c2410_gpio_cfgpin(S3C2410_GPE15, S3C2410_GPE15_OUTP);
+
+	// Power up the sensor board
+	s3c2410_gpio_setpin(S3C2410_GPF1, 1);
+	s3c2410_gpio_cfgpin(S3C2410_GPF1, S3C2410_GPF1_OUTP); // CAM_GPIO7 => nLDO_PWRDN
+	s3c2410_gpio_setpin(S3C2410_GPF2, 0);
+	s3c2410_gpio_cfgpin(S3C2410_GPF2, S3C2410_GPF2_OUTP); // CAM_GPIO6 => CAM_PWRDN
+}
+
+void __init nexcoder_map_io(void)
+{
+	s3c24xx_init_io(nexcoder_iodesc, ARRAY_SIZE(nexcoder_iodesc));
+	s3c24xx_init_clocks(0);
+	s3c24xx_init_uarts(nexcoder_uartcfgs, ARRAY_SIZE(nexcoder_uartcfgs));
+	s3c24xx_set_board(&nexcoder_board);
+	nexcoder_sensorboard_init();
+}
+
+
+MACHINE_START(NEXCODER_2440, "NexVision - Nexcoder 2440")
+     MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>")
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
+	.map_io		= nexcoder_map_io,
+	.init_irq	= s3c24xx_init_irq,
+	.timer		= &s3c24xx_timer,
+MACHINE_END
diff -Nru a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/arm/mach-s3c2410/mach-otom.c	2005-03-15 23:46:17 -08:00
@@ -0,0 +1,124 @@
+/* linux/arch/arm/mach-s3c2410/mach-otom.c
+ *
+ * Copyright (c) 2004 Nex Vision
+ *   Guillaume GOURAT <guillaume.gourat@nexvision.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/list.h>
+#include <linux/timer.h>
+#include <linux/init.h>
+#include <linux/device.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <asm/arch/otom-map.h>
+
+#include <asm/hardware.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/mach-types.h>
+
+#include <asm/arch/regs-serial.h>
+#include <asm/arch/regs-gpio.h>
+
+#include "s3c2410.h"
+#include "clock.h"
+#include "devs.h"
+#include "cpu.h"
+
+static struct map_desc otom11_iodesc[] __initdata = {
+  /* Device area */
+	{ OTOM_VA_CS8900A_BASE,  OTOM_PA_CS8900A_BASE,	   SZ_16M, MT_DEVICE },
+};
+
+#define UCON S3C2410_UCON_DEFAULT
+#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
+#define UFCON S3C2410_UFCON_RXTRIG12 | S3C2410_UFCON_FIFOMODE
+
+static struct s3c2410_uartcfg otom11_uartcfgs[] = {
+	[0] = {
+		.hwport	     = 0,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	[1] = {
+		.hwport	     = 1,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	},
+	/* port 2 is not actually used */
+	[2] = {
+		.hwport	     = 2,
+		.flags	     = 0,
+		.ucon	     = UCON,
+		.ulcon	     = ULCON,
+		.ufcon	     = UFCON,
+	}
+};
+
+/* NOR Flash on NexVision OTOM board */
+
+static struct resource otom_nor_resource[] = {
+	[0] = {
+		.start = S3C2410_CS0,
+		.end   = S3C2410_CS0 + (4*1024*1024) - 1,
+		.flags = IORESOURCE_MEM,
+	}
+};
+
+static struct platform_device otom_device_nor = {
+	.name		= "mtd-flash",
+	.id		= -1,
+	.num_resources	= ARRAY_SIZE(otom_nor_resource),
+	.resource	= otom_nor_resource,
+};
+
+/* Standard OTOM devices */
+
+static struct platform_device *otom11_devices[] __initdata = {
+	&s3c_device_usb,
+	&s3c_device_lcd,
+	&s3c_device_wdt,
+	&s3c_device_i2c,
+	&s3c_device_iis,
+ 	&s3c_device_rtc,
+	&otom_device_nor,
+};
+
+static struct s3c24xx_board otom11_board __initdata = {
+	.devices       = otom11_devices,
+	.devices_count = ARRAY_SIZE(otom11_devices)
+};
+
+
+void __init otom11_map_io(void)
+{
+	s3c24xx_init_io(otom11_iodesc, ARRAY_SIZE(otom11_iodesc));
+	s3c24xx_init_clocks(0);
+	s3c24xx_init_uarts(otom11_uartcfgs, ARRAY_SIZE(otom11_uartcfgs));
+	s3c24xx_set_board(&otom11_board);
+}
+
+
+MACHINE_START(OTOM, "Nex Vision - Otom 1.1")
+     MAINTAINER("Guillaume GOURAT <guillaume.gourat@nexvision.tv>")
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
+	.map_io		= otom11_map_io,
+	.init_irq	= s3c24xx_init_irq,
+	.timer		= &s3c24xx_timer,
+MACHINE_END
diff -Nru a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.c
--- a/arch/arm/mach-s3c2410/mach-rx3715.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/mach-rx3715.c	2005-03-15 23:46:17 -08:00
@@ -15,6 +15,7 @@
  *	10-Jan-2005 BJD  Removed include of s3c2410.h s3c2440.h
  *	14-Jan-2005 BJD  Added new clock init
  *	10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
+ *	14-Mar-2005 BJD  Fixed __iomem warnings
 */
 
 #include <linux/kernel.h>
@@ -49,8 +50,8 @@
 static struct map_desc rx3715_iodesc[] __initdata = {
 	/* dump ISA space somewhere unused */
 
-	{ S3C24XX_VA_ISA_WORD, S3C2410_CS3, SZ_16M, MT_DEVICE },
-	{ S3C24XX_VA_ISA_BYTE, S3C2410_CS3, SZ_16M, MT_DEVICE },
+	{ (u32)S3C24XX_VA_ISA_WORD, S3C2410_CS3, SZ_16M, MT_DEVICE },
+	{ (u32)S3C24XX_VA_ISA_BYTE, S3C2410_CS3, SZ_16M, MT_DEVICE },
 };
 
 static struct s3c2410_uartcfg rx3715_uartcfgs[] = {
@@ -115,7 +116,7 @@
 
 MACHINE_START(RX3715, "IPAQ-RX3715")
      MAINTAINER("Ben Dooks <ben@fluff.org>")
-     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(rx3715_map_io)
      INITIRQ(rx3715_init_irq)
diff -Nru a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c
--- a/arch/arm/mach-s3c2410/mach-smdk2410.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/mach-smdk2410.c	2005-03-15 23:46:17 -08:00
@@ -113,7 +113,7 @@
 MACHINE_START(SMDK2410, "SMDK2410") /* @TODO: request a new identifier and switch
 				    * to SMDK2410 */
      MAINTAINER("Jonas Dietsche")
-     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(smdk2410_map_io)
      INITIRQ(smdk2410_init_irq)
diff -Nru a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.c
--- a/arch/arm/mach-s3c2410/mach-smdk2440.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/mach-smdk2440.c	2005-03-15 23:46:17 -08:00
@@ -17,6 +17,7 @@
  *	04-Jan-2005 BJD   Fixes for pre-release
  *	22-Feb-2005 BJD   Updated for 2.6.11-rc5 relesa
  *	10-Mar-2005 LCVR  Replaced S3C2410_VA by S3C24XX_VA
+ *	14-Mar-2005 BJD	  void __iomem fixes
 */
 
 #include <linux/kernel.h>
@@ -51,8 +52,8 @@
 static struct map_desc smdk2440_iodesc[] __initdata = {
 	/* ISA IO Space map (memory space selected by A24) */
 
-	{ S3C24XX_VA_ISA_WORD, S3C2410_CS2, SZ_16M, MT_DEVICE },
-	{ S3C24XX_VA_ISA_BYTE, S3C2410_CS2, SZ_16M, MT_DEVICE },
+	{ (u32)S3C24XX_VA_ISA_WORD, S3C2410_CS2, SZ_16M, MT_DEVICE },
+	{ (u32)S3C24XX_VA_ISA_BYTE, S3C2410_CS2, SZ_16M, MT_DEVICE },
 };
 
 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
@@ -124,7 +125,7 @@
 
 MACHINE_START(S3C2440, "SMDK2440")
 	MAINTAINER("Ben Dooks <ben@fluff.org>")
-	BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+	BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)
 	BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
 
 	.init_irq	= s3c24xx_init_irq,
diff -Nru a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
--- a/arch/arm/mach-s3c2410/mach-vr1000.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c	2005-03-15 23:46:17 -08:00
@@ -26,6 +26,7 @@
  *     20-Jan-2005 BJD  Use UPF_IOREMAP for ports
  *     10-Feb-2005 BJD  Added power-off capability
  *     10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
+ *     14-Mar-2006 BJD  void __iomem fixes
 */
 
 #include <linux/kernel.h>
@@ -63,10 +64,10 @@
 #include "usb-simtec.h"
 
 /* macros for virtual address mods for the io space entries */
-#define VA_C5(item) ((item) + BAST_VAM_CS5)
-#define VA_C4(item) ((item) + BAST_VAM_CS4)
-#define VA_C3(item) ((item) + BAST_VAM_CS3)
-#define VA_C2(item) ((item) + BAST_VAM_CS2)
+#define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5)
+#define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4)
+#define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3)
+#define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2)
 
 /* macros to modify the physical addresses for io space */
 
@@ -78,8 +79,8 @@
 static struct map_desc vr1000_iodesc[] __initdata = {
   /* ISA IO areas */
 
-  { S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO),	   SZ_16M, MT_DEVICE },
-  { S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO),	   SZ_16M, MT_DEVICE },
+  { (u32)S3C24XX_VA_ISA_BYTE, PA_CS2(BAST_PA_ISAIO),	   SZ_16M, MT_DEVICE },
+  { (u32)S3C24XX_VA_ISA_WORD, PA_CS3(BAST_PA_ISAIO),	   SZ_16M, MT_DEVICE },
 
   /* we could possibly compress the next set down into a set of smaller tables
    * pagetables, but that would mean using an L2 section, and it still means
@@ -87,10 +88,10 @@
    */
 
   /* bast CPLD control registers, and external interrupt controls */
-  { VR1000_VA_CTRL1, VR1000_PA_CTRL1,		       SZ_1M, MT_DEVICE },
-  { VR1000_VA_CTRL2, VR1000_PA_CTRL2,		       SZ_1M, MT_DEVICE },
-  { VR1000_VA_CTRL3, VR1000_PA_CTRL3,		       SZ_1M, MT_DEVICE },
-  { VR1000_VA_CTRL4, VR1000_PA_CTRL4,		       SZ_1M, MT_DEVICE },
+  { (u32)VR1000_VA_CTRL1, VR1000_PA_CTRL1,	       SZ_1M, MT_DEVICE },
+  { (u32)VR1000_VA_CTRL2, VR1000_PA_CTRL2,	       SZ_1M, MT_DEVICE },
+  { (u32)VR1000_VA_CTRL3, VR1000_PA_CTRL3,	       SZ_1M, MT_DEVICE },
+  { (u32)VR1000_VA_CTRL4, VR1000_PA_CTRL4,	       SZ_1M, MT_DEVICE },
 
   /* peripheral space... one for each of fast/slow/byte/16bit */
   /* note, ide is only decoded in word space, even though some registers
@@ -308,7 +309,7 @@
 
 MACHINE_START(VR1000, "Thorcom-VR1000")
      MAINTAINER("Ben Dooks <ben@simtec.co.uk>")
-     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, S3C24XX_VA_UART)
+     BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)
      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)
      MAPIO(vr1000_map_io)
      INITIRQ(vr1000_init_irq)
diff -Nru a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
--- a/arch/arm/mach-s3c2410/pm.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/pm.c	2005-03-15 23:46:17 -08:00
@@ -396,7 +396,7 @@
 {
 	for (; count > 0; count--, ptr++) {
 		ptr->val = __raw_readl(ptr->reg);
-		DBG("saved %08lx value %08lx\n", ptr->reg, ptr->val);
+		DBG("saved %p value %08lx\n", ptr->reg, ptr->val);
 	}
 }
 
@@ -411,7 +411,7 @@
 void s3c2410_pm_do_restore(struct sleep_save *ptr, int count)
 {
 	for (; count > 0; count--, ptr++) {
-		printk(KERN_DEBUG "restore %08lx (restore %08lx, was %08x)\n",
+		printk(KERN_DEBUG "restore %p (restore %08lx, was %08x)\n",
 		       ptr->reg, ptr->val, __raw_readl(ptr->reg));
 
 		__raw_writel(ptr->val, ptr->reg);
diff -Nru a/arch/arm/mach-s3c2410/pm.h b/arch/arm/mach-s3c2410/pm.h
--- a/arch/arm/mach-s3c2410/pm.h	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/pm.h	2005-03-15 23:46:17 -08:00
@@ -48,7 +48,7 @@
 /* sleep save info */
 
 struct sleep_save {
-	unsigned long	reg;
+	void __iomem	*reg;
 	unsigned long	val;
 };
 
diff -Nru a/arch/arm/mach-s3c2410/s3c2440-dsc.c b/arch/arm/mach-s3c2410/s3c2440-dsc.c
--- a/arch/arm/mach-s3c2410/s3c2440-dsc.c	2005-03-15 23:46:17 -08:00
+++ b/arch/arm/mach-s3c2410/s3c2440-dsc.c	2005-03-15 23:46:17 -08:00
@@ -37,7 +37,7 @@
 
 int s3c2440_set_dsc(unsigned int pin, unsigned int value)
 {
-	unsigned long base;
+	void __iomem *base;
 	unsigned long val;
 	unsigned long flags;
 	unsigned long mask;
diff -Nru a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
--- a/drivers/serial/s3c2410.c	2005-03-15 23:46:17 -08:00
+++ b/drivers/serial/s3c2410.c	2005-03-15 23:46:17 -08:00
@@ -1094,8 +1094,7 @@
 	dbg("resource %p (%lx..%lx)\n", res, res->start, res->end);
 
 	port->mapbase	= res->start;
-	port->membase	= (void __iomem *)(res->start - S3C2410_PA_UART);
-	port->membase  += S3C24XX_VA_UART;
+	port->membase	= S3C24XX_VA_UART + (res->start - S3C2410_PA_UART);
 	port->irq	= platform_get_irq(platdev, 0);
 
 	ourport->clk	= clk_get(&platdev->dev, "uart");
diff -Nru a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
--- a/drivers/serial/sa1100.c	2005-03-15 23:46:17 -08:00
+++ b/drivers/serial/sa1100.c	2005-03-15 23:46:17 -08:00
@@ -687,21 +687,21 @@
 
 	switch (port) {
 	case 1:
-		sa1100_ports[idx].port.membase = (void *)&Ser1UTCR0;
+		sa1100_ports[idx].port.membase = (void __iomem *)&Ser1UTCR0;
 		sa1100_ports[idx].port.mapbase = _Ser1UTCR0;
 		sa1100_ports[idx].port.irq     = IRQ_Ser1UART;
 		sa1100_ports[idx].port.flags   = ASYNC_BOOT_AUTOCONF;
 		break;
 
 	case 2:
-		sa1100_ports[idx].port.membase = (void *)&Ser2UTCR0;
+		sa1100_ports[idx].port.membase = (void __iomem *)&Ser2UTCR0;
 		sa1100_ports[idx].port.mapbase = _Ser2UTCR0;
 		sa1100_ports[idx].port.irq     = IRQ_Ser2ICP;
 		sa1100_ports[idx].port.flags   = ASYNC_BOOT_AUTOCONF;
 		break;
 
 	case 3:
-		sa1100_ports[idx].port.membase = (void *)&Ser3UTCR0;
+		sa1100_ports[idx].port.membase = (void __iomem *)&Ser3UTCR0;
 		sa1100_ports[idx].port.mapbase = _Ser3UTCR0;
 		sa1100_ports[idx].port.irq     = IRQ_Ser3UART;
 		sa1100_ports[idx].port.flags   = ASYNC_BOOT_AUTOCONF;
diff -Nru a/include/asm-arm/arch-rpc/hardware.h b/include/asm-arm/arch-rpc/hardware.h
--- a/include/asm-arm/arch-rpc/hardware.h	2005-03-15 23:46:17 -08:00
+++ b/include/asm-arm/arch-rpc/hardware.h	2005-03-15 23:46:17 -08:00
@@ -46,7 +46,7 @@
 /*
  * IO Addresses
  */
-#define VIDC_BASE		0xe0400000
+#define VIDC_BASE		(void __iomem *)0xe0400000
 #define EXPMASK_BASE		0xe0360000
 #define IOMD_BASE		0xe0200000
 #define IOC_BASE		0xe0200000
diff -Nru a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h
--- a/include/asm-arm/arch-s3c2410/io.h	2005-03-15 23:46:17 -08:00
+++ b/include/asm-arm/arch-s3c2410/io.h	2005-03-15 23:46:17 -08:00
@@ -66,9 +66,9 @@
 	return (unsigned sz)value;					\
 }
 
-static inline void __iomem *__ioaddr (unsigned int port)
+static inline void __iomem *__ioaddr (unsigned long port)
 {
-	return (void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + port : port);
+	return __PORT_PCIO(port) ? (PCIO_BASE + port) : (void __iomem *)port;
 }
 
 #define DECLARE_IO(sz,fnsuffix,instr)	\
@@ -168,7 +168,7 @@
 	result;								\
 })
 
-#define __ioaddrc(port)	((void __iomem *)(__PORT_PCIO(port) ? PCIO_BASE + (port) : (port)))
+#define __ioaddrc(port)	((__PORT_PCIO(port) ? PCIO_BASE + (port) : (void __iomem *)(port)))
 
 #define inb(p)		(__builtin_constant_p((p)) ? __inbc(p)	   : __inb(p))
 #define inw(p)		(__builtin_constant_p((p)) ? __inwc(p)	   : __inw(p))
@@ -178,7 +178,7 @@
 #define outl(v,p)	(__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p))
 #define __ioaddr(p)	(__builtin_constant_p((p)) ? __ioaddr(p)  : __ioaddrc(p))
 /* the following macro is deprecated */
-#define ioaddr(port)			__ioaddr((port))
+#define ioaddr(port)	__ioaddr((port))
 
 #define insb(p,d,l)	__raw_readsb(__ioaddr(p),d,l)
 #define insw(p,d,l)	__raw_readsw(__ioaddr(p),d,l)
diff -Nru a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h
--- a/include/asm-arm/arch-s3c2410/map.h	2005-03-15 23:46:17 -08:00
+++ b/include/asm-arm/arch-s3c2410/map.h	2005-03-15 23:46:17 -08:00
@@ -30,7 +30,12 @@
  * as they are only useful to certain drivers...
  */
 
+#ifndef __ASSEMBLY__
+#define S3C2410_ADDR(x)	  ((void __iomem *)0xF0000000 + (x))
+#else
 #define S3C2410_ADDR(x)	  (0xF0000000 + (x))
+#endif
+
 #define S3C2400_ADDR(x)	  S3C2410_ADDR(x)
 
 /* interrupt controller is the first thing we put in, to make
diff -Nru a/include/asm-arm/arch-s3c2410/otom-map.h b/include/asm-arm/arch-s3c2410/otom-map.h
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/include/asm-arm/arch-s3c2410/otom-map.h	2005-03-15 23:46:17 -08:00
@@ -0,0 +1,30 @@
+/* linux/include/asm-arm/arch-s3c2410/otom-map.h
+ *
+ * (c) 2005 Guillaume GOURAT / NexVision
+ *          guillaume.gourat@nexvision.fr
+ *
+ * NexVision OTOM board memory map definitions
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+/* needs arch/map.h including with this */
+
+/* ok, we've used up to 0x01300000, now we need to find space for the
+ * peripherals that live in the nGCS[x] areas, which are quite numerous
+ * in their space.
+ */
+
+#ifndef __ASM_ARCH_OTOMMAP_H
+#define __ASM_ARCH_OTOMMAP_H
+
+#define OTOM_PA_CS8900A_BASE       (S3C2410_CS3 + 0x01000000)	/* nGCS3 +0x01000000 */
+#define OTOM_VA_CS8900A_BASE       S3C2410_ADDR(0x04000000)		/* 0xF4000000 */
+
+/* physical offset addresses for the peripherals */
+
+#define OTOM_PA_FLASH0_BASE        (S3C2410_CS0)				/* Bank 0 */
+
+#endif /* __ASM_ARCH_OTOMMAP_H */
diff -Nru a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h
--- a/include/asm-arm/arch-s3c2410/system.h	2005-03-15 23:46:17 -08:00
+++ b/include/asm-arm/arch-s3c2410/system.h	2005-03-15 23:46:17 -08:00
@@ -30,7 +30,7 @@
 
 void s3c24xx_default_idle(void)
 {
-	unsigned long reg = S3C2410_CLKCON;
+	void __iomem *reg = S3C2410_CLKCON;
 	unsigned long tmp;
 	int i;
 
diff -Nru a/include/asm-arm/ipc.h b/include/asm-arm/ipc.h
--- a/include/asm-arm/ipc.h	2005-03-15 23:46:17 -08:00
+++ b/include/asm-arm/ipc.h	2005-03-15 23:46:17 -08:00
@@ -14,6 +14,7 @@
 #define SEMOP		 1
 #define SEMGET		 2
 #define SEMCTL		 3
+#define SEMTIMEDOP	 4
 #define MSGSND		11
 #define MSGRCV		12
 #define MSGGET		13
diff -Nru a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h
--- a/include/asm-arm/unistd.h	2005-03-15 23:46:17 -08:00
+++ b/include/asm-arm/unistd.h	2005-03-15 23:46:17 -08:00
@@ -345,6 +345,10 @@
 #define __NR_request_key		(__NR_SYSCALL_BASE+310)
 #define __NR_keyctl			(__NR_SYSCALL_BASE+311)
 
+#if 0 /* reserved for un-muxing ipc */
+#define __NR_semtimedop			(__NR_SYSCALL_BASE+312)
+#endif
+
 /*
  * The following SWIs are ARM private.
  */