diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-27 00:56:54 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-17 21:33:34 -0400 |
commit | 13904fba37aa00867dee0b4fe13df92fed1120f9 (patch) | |
tree | a47b2fb665480802a2ecba7550d8f78a02584673 /arch/arm/plat-s5p | |
parent | cd07202cc8262e1669edff0d97715f3dd9260917 (diff) |
ARM: S5P: Move OneNAND device definitions in plat-s5p
This patch moves OneNAND device definitions from mach-s5pv210 to plat-s5p
so that can support it commonly.
Note: S5PC110 and S5PC210 have same OneNAND driver.
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Diffstat (limited to 'arch/arm/plat-s5p')
-rw-r--r-- | arch/arm/plat-s5p/Kconfig | 5 | ||||
-rw-r--r-- | arch/arm/plat-s5p/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/plat-s5p/dev-onenand.c | 57 |
3 files changed, 63 insertions, 0 deletions
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig index c6a855db2fb6..407e3236809d 100644 --- a/arch/arm/plat-s5p/Kconfig +++ b/arch/arm/plat-s5p/Kconfig | |||
@@ -46,3 +46,8 @@ config S5P_DEV_FIMC2 | |||
46 | bool | 46 | bool |
47 | help | 47 | help |
48 | Compile in platform device definitions for FIMC controller 2 | 48 | Compile in platform device definitions for FIMC controller 2 |
49 | |||
50 | config S5P_DEV_ONENAND | ||
51 | bool | ||
52 | help | ||
53 | Compile in platform device definition for OneNAND controller | ||
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile index b2e029673950..f3e917e27da8 100644 --- a/arch/arm/plat-s5p/Makefile +++ b/arch/arm/plat-s5p/Makefile | |||
@@ -24,3 +24,4 @@ obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o | |||
24 | obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o | 24 | obj-$(CONFIG_S5P_DEV_FIMC0) += dev-fimc0.o |
25 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o | 25 | obj-$(CONFIG_S5P_DEV_FIMC1) += dev-fimc1.o |
26 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o | 26 | obj-$(CONFIG_S5P_DEV_FIMC2) += dev-fimc2.o |
27 | obj-$(CONFIG_S5P_DEV_ONENAND) += dev-onenand.o | ||
diff --git a/arch/arm/plat-s5p/dev-onenand.c b/arch/arm/plat-s5p/dev-onenand.c new file mode 100644 index 000000000000..6db926202caa --- /dev/null +++ b/arch/arm/plat-s5p/dev-onenand.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* linux/arch/arm/plat-s5p/dev-onenand.c | ||
2 | * | ||
3 | * Copyright 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com | ||
5 | * | ||
6 | * Copyright (c) 2008-2010 Samsung Electronics | ||
7 | * Kyungmin Park <kyungmin.park@samsung.com> | ||
8 | * | ||
9 | * S5P series device definition for OneNAND devices | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/mtd/mtd.h> | ||
19 | #include <linux/mtd/onenand.h> | ||
20 | |||
21 | #include <mach/irqs.h> | ||
22 | #include <mach/map.h> | ||
23 | |||
24 | static struct resource s5p_onenand_resources[] = { | ||
25 | [0] = { | ||
26 | .start = S5P_PA_ONENAND, | ||
27 | .end = S5P_PA_ONENAND + SZ_128K - 1, | ||
28 | .flags = IORESOURCE_MEM, | ||
29 | }, | ||
30 | [1] = { | ||
31 | .start = S5P_PA_ONENAND_DMA, | ||
32 | .end = S5P_PA_ONENAND_DMA + SZ_8K - 1, | ||
33 | .flags = IORESOURCE_MEM, | ||
34 | }, | ||
35 | [2] = { | ||
36 | .start = IRQ_ONENAND_AUDI, | ||
37 | .end = IRQ_ONENAND_AUDI, | ||
38 | .flags = IORESOURCE_IRQ, | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | struct platform_device s5p_device_onenand = { | ||
43 | .name = "s5pc110-onenand", | ||
44 | .id = -1, | ||
45 | .num_resources = ARRAY_SIZE(s5p_onenand_resources), | ||
46 | .resource = s5p_onenand_resources, | ||
47 | }; | ||
48 | |||
49 | void s5p_onenand_set_platdata(struct onenand_platform_data *pdata) | ||
50 | { | ||
51 | struct onenand_platform_data *pd; | ||
52 | |||
53 | pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL); | ||
54 | if (!pd) | ||
55 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
56 | s5p_device_onenand.dev.platform_data = pd; | ||
57 | } | ||