aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-05-20 07:25:59 -0400
committerBen Dooks <ben-linux@fluff.org>2010-05-20 07:25:59 -0400
commit206a1a825dc67060ee319c99569755ba11250907 (patch)
treee4cdbd7b8b745e0ad4adfd59fa57c3bcabe3daf4 /arch/arm/mach-s3c64xx
parent6aeaad51aaecc9ebc8c1e8f132655e2ae8141f8c (diff)
parent999304be1177d42d16bc59c546228c6ac5a3e76a (diff)
ARM: Merge for-2635-4/onenand
Merge branch 'for-2635-4/onenand' into for-2635-4/partial2 Conflicts: arch/arm/mach-s5pc100/cpu.c arch/arm/mach-s5pc100/include/mach/map.h arch/arm/mach-s5pv210/Makefile
Diffstat (limited to 'arch/arm/mach-s3c64xx')
-rw-r--r--arch/arm/mach-s3c64xx/Kconfig5
-rw-r--r--arch/arm/mach-s3c64xx/Makefile1
-rw-r--r--arch/arm/mach-s3c64xx/dev-onenand1.c55
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/irqs.h4
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/map.h13
-rw-r--r--arch/arm/mach-s3c64xx/s3c6400.c4
-rw-r--r--arch/arm/mach-s3c64xx/s3c6410.c3
7 files changed, 85 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 44a9def318fb..ccdde04f6feb 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -35,6 +35,11 @@ config S3C64XX_SETUP_SDHCI
35 Internal configuration for default SDHCI setup for S3C6400 and 35 Internal configuration for default SDHCI setup for S3C6400 and
36 S3C6410 SoCs. 36 S3C6410 SoCs.
37 37
38config S3C64XX_DEV_ONENAND1
39 bool
40 help
41 Compile in platform device definition for OneNAND1 controller
42
38# platform specific device setup 43# platform specific device setup
39 44
40config S3C64XX_SETUP_I2C0 45config S3C64XX_SETUP_I2C0
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 39ef55e2655f..9d1006938f5c 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -62,3 +62,4 @@ obj-y += dev-uart.o
62obj-y += dev-audio.o 62obj-y += dev-audio.o
63obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o 63obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
64obj-$(CONFIG_S3C64XX_DEV_TS) += dev-ts.o 64obj-$(CONFIG_S3C64XX_DEV_TS) += dev-ts.o
65obj-$(CONFIG_S3C64XX_DEV_ONENAND1) += dev-onenand1.o
diff --git a/arch/arm/mach-s3c64xx/dev-onenand1.c b/arch/arm/mach-s3c64xx/dev-onenand1.c
new file mode 100644
index 000000000000..92ffd5bac104
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/dev-onenand1.c
@@ -0,0 +1,55 @@
1/*
2 * linux/arch/arm/mach-s3c64xx/dev-onenand1.c
3 *
4 * Copyright (c) 2008-2010 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com>
6 *
7 * S3C64XX series device definition for OneNAND devices
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/kernel.h>
15#include <linux/platform_device.h>
16#include <linux/mtd/mtd.h>
17#include <linux/mtd/onenand.h>
18
19#include <mach/irqs.h>
20#include <mach/map.h>
21
22static struct resource s3c64xx_onenand1_resources[] = {
23 [0] = {
24 .start = S3C64XX_PA_ONENAND1,
25 .end = S3C64XX_PA_ONENAND1 + 0x400 - 1,
26 .flags = IORESOURCE_MEM,
27 },
28 [1] = {
29 .start = S3C64XX_PA_ONENAND1_BUF,
30 .end = S3C64XX_PA_ONENAND1_BUF + S3C64XX_SZ_ONENAND1_BUF - 1,
31 .flags = IORESOURCE_MEM,
32 },
33 [2] = {
34 .start = IRQ_ONENAND1,
35 .end = IRQ_ONENAND1,
36 .flags = IORESOURCE_IRQ,
37 },
38};
39
40struct platform_device s3c64xx_device_onenand1 = {
41 .name = "samsung-onenand",
42 .id = 1,
43 .num_resources = ARRAY_SIZE(s3c64xx_onenand1_resources),
44 .resource = s3c64xx_onenand1_resources,
45};
46
47void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
48{
49 struct onenand_platform_data *pd;
50
51 pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL);
52 if (!pd)
53 printk(KERN_ERR "%s: no memory for platform data\n", __func__);
54 s3c64xx_device_onenand1.dev.platform_data = pd;
55}
diff --git a/arch/arm/mach-s3c64xx/include/mach/irqs.h b/arch/arm/mach-s3c64xx/include/mach/irqs.h
index e9ab4ac0b9a8..8e2df26cf14a 100644
--- a/arch/arm/mach-s3c64xx/include/mach/irqs.h
+++ b/arch/arm/mach-s3c64xx/include/mach/irqs.h
@@ -212,5 +212,9 @@
212 212
213#define NR_IRQS (IRQ_BOARD_END + 1) 213#define NR_IRQS (IRQ_BOARD_END + 1)
214 214
215/* Compatibility */
216
217#define IRQ_ONENAND IRQ_ONENAND0
218
215#endif /* __ASM_MACH_S3C64XX_IRQS_H */ 219#endif /* __ASM_MACH_S3C64XX_IRQS_H */
216 220
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h b/arch/arm/mach-s3c64xx/include/mach/map.h
index c3e48cdfb990..e1eab3c94aea 100644
--- a/arch/arm/mach-s3c64xx/include/mach/map.h
+++ b/arch/arm/mach-s3c64xx/include/mach/map.h
@@ -52,6 +52,16 @@
52 52
53#define S3C64XX_PA_SROM (0x70000000) 53#define S3C64XX_PA_SROM (0x70000000)
54 54
55#define S3C64XX_PA_ONENAND0 (0x70100000)
56#define S3C64XX_PA_ONENAND0_BUF (0x20000000)
57#define S3C64XX_SZ_ONENAND0_BUF (SZ_64M)
58
59/* NAND and OneNAND1 controllers occupy the same register region
60 (depending on SoC POP version) */
61#define S3C64XX_PA_ONENAND1 (0x70200000)
62#define S3C64XX_PA_ONENAND1_BUF (0x28000000)
63#define S3C64XX_SZ_ONENAND1_BUF (SZ_64M)
64
55#define S3C64XX_PA_NAND (0x70200000) 65#define S3C64XX_PA_NAND (0x70200000)
56#define S3C64XX_PA_FB (0x77100000) 66#define S3C64XX_PA_FB (0x77100000)
57#define S3C64XX_PA_USB_HSOTG (0x7C000000) 67#define S3C64XX_PA_USB_HSOTG (0x7C000000)
@@ -99,6 +109,9 @@
99#define S3C_PA_IIC S3C64XX_PA_IIC0 109#define S3C_PA_IIC S3C64XX_PA_IIC0
100#define S3C_PA_IIC1 S3C64XX_PA_IIC1 110#define S3C_PA_IIC1 S3C64XX_PA_IIC1
101#define S3C_PA_NAND S3C64XX_PA_NAND 111#define S3C_PA_NAND S3C64XX_PA_NAND
112#define S3C_PA_ONENAND S3C64XX_PA_ONENAND0
113#define S3C_PA_ONENAND_BUF S3C64XX_PA_ONENAND0_BUF
114#define S3C_SZ_ONENAND_BUF S3C64XX_SZ_ONENAND0_BUF
102#define S3C_PA_FB S3C64XX_PA_FB 115#define S3C_PA_FB S3C64XX_PA_FB
103#define S3C_PA_USBHOST S3C64XX_PA_USBHOST 116#define S3C_PA_USBHOST S3C64XX_PA_USBHOST
104#define S3C_PA_USB_HSOTG S3C64XX_PA_USB_HSOTG 117#define S3C_PA_USB_HSOTG S3C64XX_PA_USB_HSOTG
diff --git a/arch/arm/mach-s3c64xx/s3c6400.c b/arch/arm/mach-s3c64xx/s3c6400.c
index 707e34e3afd1..5e93fe3f3f40 100644
--- a/arch/arm/mach-s3c64xx/s3c6400.c
+++ b/arch/arm/mach-s3c64xx/s3c6400.c
@@ -37,6 +37,7 @@
37#include <plat/clock.h> 37#include <plat/clock.h>
38#include <plat/sdhci.h> 38#include <plat/sdhci.h>
39#include <plat/iic-core.h> 39#include <plat/iic-core.h>
40#include <plat/onenand-core.h>
40#include <mach/s3c6400.h> 41#include <mach/s3c6400.h>
41 42
42void __init s3c6400_map_io(void) 43void __init s3c6400_map_io(void)
@@ -51,6 +52,9 @@ void __init s3c6400_map_io(void)
51 s3c_i2c0_setname("s3c2440-i2c"); 52 s3c_i2c0_setname("s3c2440-i2c");
52 53
53 s3c_device_nand.name = "s3c6400-nand"; 54 s3c_device_nand.name = "s3c6400-nand";
55
56 s3c_onenand_setname("s3c6400-onenand");
57 s3c64xx_onenand1_setname("s3c6400-onenand");
54} 58}
55 59
56void __init s3c6400_init_clocks(int xtal) 60void __init s3c6400_init_clocks(int xtal)
diff --git a/arch/arm/mach-s3c64xx/s3c6410.c b/arch/arm/mach-s3c64xx/s3c6410.c
index 3ab695c691ee..014401c39f36 100644
--- a/arch/arm/mach-s3c64xx/s3c6410.c
+++ b/arch/arm/mach-s3c64xx/s3c6410.c
@@ -39,6 +39,7 @@
39#include <plat/sdhci.h> 39#include <plat/sdhci.h>
40#include <plat/iic-core.h> 40#include <plat/iic-core.h>
41#include <plat/adc.h> 41#include <plat/adc.h>
42#include <plat/onenand-core.h>
42#include <mach/s3c6400.h> 43#include <mach/s3c6400.h>
43#include <mach/s3c6410.h> 44#include <mach/s3c6410.h>
44 45
@@ -55,6 +56,8 @@ void __init s3c6410_map_io(void)
55 56
56 s3c_device_adc.name = "s3c64xx-adc"; 57 s3c_device_adc.name = "s3c64xx-adc";
57 s3c_device_nand.name = "s3c6400-nand"; 58 s3c_device_nand.name = "s3c6400-nand";
59 s3c_onenand_setname("s3c6410-onenand");
60 s3c64xx_onenand1_setname("s3c6410-onenand");
58} 61}
59 62
60void __init s3c6410_init_clocks(int xtal) 63void __init s3c6410_init_clocks(int xtal)