ARM: S3C: move s3c_device_nand from plat-s3c24xx to plat-s3c
authorPeter Korsgaard <jacmet@sunsite.dk>
Wed, 1 Jul 2009 15:47:06 +0000 (17:47 +0200)
committerBen Dooks <ben-linux@fluff.org>
Thu, 30 Jul 2009 23:10:24 +0000 (00:10 +0100)
Move the s3c_device_nand platform device from plat-s3c24xx to plat-s3c,
now that the nand driver also support the s3c64xx devices.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
arch/arm/mach-s3c2410/include/mach/map.h
arch/arm/mach-s3c24a0/include/mach/map.h
arch/arm/mach-s3c6400/include/mach/map.h
arch/arm/mach-s3c6400/s3c6400.c
arch/arm/mach-s3c6410/cpu.c
arch/arm/plat-s3c/Makefile
arch/arm/plat-s3c/dev-nand.c [new file with mode: 0644]
arch/arm/plat-s3c24xx/devs.c

index e99b212cb1ca6b6bec947a96529ccd3d2e4e8a5c..e9821850065dc2e81e65d5ecfc3f96c0097ad3da 100644 (file)
 #define S3C_PA_UART        S3C24XX_PA_UART
 #define S3C_PA_USBHOST S3C2410_PA_USBHOST
 #define S3C_PA_HSMMC0      S3C2443_PA_HSMMC
+#define S3C_PA_NAND        S3C24XX_PA_NAND
 
 #endif /* __ASM_ARCH_MAP_H */
index a01132717e34f59078f729dec3f4c456b0c0fb0b..79e4d93ea2b698cb9613c994f97af506bb1fe824 100644 (file)
@@ -81,5 +81,6 @@
 
 #define S3C_PA_UART            S3C24A0_PA_UART
 #define S3C_PA_IIC             S3C24A0_PA_IIC
+#define S3C_PA_NAND            S3C24XX_PA_NAND
 
 #endif /* __ASM_ARCH_24A0_MAP_H */
index 5057d9948d3588ceb784b179bbfad3ed3cdae6d9..fba241a719813854852bbfbc4536fd77a91f61db 100644 (file)
@@ -38,6 +38,7 @@
 #define S3C_VA_UART2           S3C_VA_UARTx(2)
 #define S3C_VA_UART3           S3C_VA_UARTx(3)
 
+#define S3C64XX_PA_NAND                (0x70200000)
 #define S3C64XX_PA_FB          (0x77100000)
 #define S3C64XX_PA_USB_HSOTG   (0x7C000000)
 #define S3C64XX_PA_WATCHDOG    (0x7E004000)
@@ -72,6 +73,7 @@
 #define S3C_PA_HSMMC2          S3C64XX_PA_HSMMC2
 #define S3C_PA_IIC             S3C64XX_PA_IIC0
 #define S3C_PA_IIC1            S3C64XX_PA_IIC1
+#define S3C_PA_NAND            S3C64XX_PA_NAND
 #define S3C_PA_FB              S3C64XX_PA_FB
 #define S3C_PA_USBHOST         S3C64XX_PA_USBHOST
 #define S3C_PA_USB_HSOTG       S3C64XX_PA_USB_HSOTG
index 1ece887d90bba1f298857ba84513adca4a2f1f6b..b42bdd0f213887a12aa47d2b0467fd3d04ff3427 100644 (file)
@@ -48,6 +48,8 @@ void __init s3c6400_map_io(void)
 
        /* the i2c devices are directly compatible with s3c2440 */
        s3c_i2c0_setname("s3c2440-i2c");
+
+       s3c_device_nand.name = "s3c6400-nand";
 }
 
 void __init s3c6400_init_clocks(int xtal)
index ade904de88953f8db6299601b07cdd7433d5b54c..9b67c663d9d87aa0c4241fa405f66739b93659b9 100644 (file)
@@ -62,6 +62,8 @@ void __init s3c6410_map_io(void)
        /* the i2c devices are directly compatible with s3c2440 */
        s3c_i2c0_setname("s3c2440-i2c");
        s3c_i2c1_setname("s3c2440-i2c");
+
+       s3c_device_nand.name = "s3c6400-nand";
 }
 
 void __init s3c6410_init_clocks(int xtal)
index 0761766b183325cc3f5f0a7565445bc3ff94705a..d0b4a0fda5c44b0fc158279b01dd6dafdee4007e 100644 (file)
@@ -38,3 +38,4 @@ obj-$(CONFIG_SND_S3C64XX_SOC_I2S)     += dev-audio.o
 obj-$(CONFIG_S3C_DEV_FB)       += dev-fb.o
 obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
 obj-$(CONFIG_S3C_DEV_USB_HSOTG)        += dev-usb-hsotg.o
+obj-y                          += dev-nand.o
diff --git a/arch/arm/plat-s3c/dev-nand.c b/arch/arm/plat-s3c/dev-nand.c
new file mode 100644 (file)
index 0000000..4e53237
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * S3C series device definition for nand device
+ *
+ * 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/platform_device.h>
+
+#include <mach/map.h>
+#include <plat/devs.h>
+
+static struct resource s3c_nand_resource[] = {
+       [0] = {
+               .start = S3C_PA_NAND,
+               .end   = S3C_PA_NAND + SZ_1M,
+               .flags = IORESOURCE_MEM,
+       }
+};
+
+struct platform_device s3c_device_nand = {
+       .name             = "s3c2410-nand",
+       .id               = -1,
+       .num_resources    = ARRAY_SIZE(s3c_nand_resource),
+       .resource         = s3c_nand_resource,
+};
+
+EXPORT_SYMBOL(s3c_device_nand);
index 4eb378c89a390541ca3e17bbd3d4eefaf866031b..20c114d6f6162651bc0c9eafa5a71f6b8bc9eea2 100644 (file)
@@ -180,25 +180,6 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
        }
 }
 
-/* NAND Controller */
-
-static struct resource s3c_nand_resource[] = {
-       [0] = {
-               .start = S3C24XX_PA_NAND,
-               .end   = S3C24XX_PA_NAND + S3C24XX_SZ_NAND - 1,
-               .flags = IORESOURCE_MEM,
-       }
-};
-
-struct platform_device s3c_device_nand = {
-       .name             = "s3c2410-nand",
-       .id               = -1,
-       .num_resources    = ARRAY_SIZE(s3c_nand_resource),
-       .resource         = s3c_nand_resource,
-};
-
-EXPORT_SYMBOL(s3c_device_nand);
-
 /* USB Device (Gadget)*/
 
 static struct resource s3c_usbgadget_resource[] = {