From 681988ba0c369795def0346d210ce96d6177059a Mon Sep 17 00:00:00 2001 From: Afzal Mohammed Date: Thu, 30 Aug 2012 12:53:23 -0700 Subject: ARM: OMAP2+: gpmc-onenand: provide memory as resource Currently omap onenand driver invokes gpmc_cs_request, obtains address space allocated by gpmc to onenand. Remove this, instead use resource structure; this is now updated with address space for onenand by gpmc initialization with the help of gpmc_cs_request. And remove usage of gpmc_cs_request in onenand driver. This helps in smooth migration of gpmc to driver. Signed-off-by: Afzal Mohammed Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/gpmc-onenand.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-omap2/gpmc-onenand.c') diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index a0fa9bb2bda5..71d7c07dd350 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c @@ -23,11 +23,19 @@ #include #include +#define ONENAND_IO_SIZE SZ_128K + static struct omap_onenand_platform_data *gpmc_onenand_data; +static struct resource gpmc_onenand_resource = { + .flags = IORESOURCE_MEM, +}; + static struct platform_device gpmc_onenand_device = { .name = "omap2-onenand", .id = -1, + .num_resources = 1, + .resource = &gpmc_onenand_resource, }; static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base) @@ -390,6 +398,8 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr) void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) { + int err; + gpmc_onenand_data = _onenand_data; gpmc_onenand_data->onenand_setup = gpmc_onenand_setup; gpmc_onenand_device.dev.platform_data = gpmc_onenand_data; @@ -401,8 +411,19 @@ void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data) gpmc_onenand_data->flags |= ONENAND_SYNC_READ; } + err = gpmc_cs_request(gpmc_onenand_data->cs, ONENAND_IO_SIZE, + (unsigned long *)&gpmc_onenand_resource.start); + if (err < 0) { + pr_err("%s: Cannot request GPMC CS\n", __func__); + return; + } + + gpmc_onenand_resource.end = gpmc_onenand_resource.start + + ONENAND_IO_SIZE - 1; + if (platform_device_register(&gpmc_onenand_device) < 0) { - printk(KERN_ERR "Unable to register OneNAND device\n"); + pr_err("%s: Unable to register OneNAND device\n", __func__); + gpmc_cs_free(gpmc_onenand_data->cs); return; } } -- cgit v1.2.3 From cf3a6ec2c0a499ef019d25d4dbc79df66e7d3f0c Mon Sep 17 00:00:00 2001 From: Igor Grinberg Date: Wed, 29 Aug 2012 02:18:57 +0300 Subject: ARM: OMAP: remove plat/board.h file plat/board.h file is now empty - remove it. Cc: Jarkko Lavinen Cc: Chris Ball Cc: Kyungmin Park Cc: linux-mmc@vger.kernel.org Cc: linux-mtd@lists.infradead.org Signed-off-by: Igor Grinberg Acked-by: Chris Ball Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/board-generic.c | 1 - arch/arm/mach-omap1/board-voiceblue.c | 1 - arch/arm/mach-omap1/devices.c | 1 - arch/arm/mach-omap1/serial.c | 1 - arch/arm/mach-omap2/board-2430sdp.c | 1 - arch/arm/mach-omap2/board-4430sdp.c | 1 - arch/arm/mach-omap2/board-apollon.c | 1 - arch/arm/mach-omap2/board-devkit8000.c | 1 - arch/arm/mach-omap2/board-generic.c | 1 - arch/arm/mach-omap2/board-igep0020.c | 1 - arch/arm/mach-omap2/board-ldp.c | 1 - arch/arm/mach-omap2/board-n8x0.c | 1 - arch/arm/mach-omap2/board-omap3beagle.c | 1 - arch/arm/mach-omap2/board-omap3logic.c | 1 - arch/arm/mach-omap2/board-omap3pandora.c | 1 - arch/arm/mach-omap2/board-omap3touchbook.c | 1 - arch/arm/mach-omap2/board-omap4panda.c | 1 - arch/arm/mach-omap2/board-overo.c | 1 - arch/arm/mach-omap2/board-rx51-peripherals.c | 1 - arch/arm/mach-omap2/board-rx51.c | 1 - arch/arm/mach-omap2/board-zoom.c | 1 - arch/arm/mach-omap2/common.c | 1 - arch/arm/mach-omap2/devices.c | 1 - arch/arm/mach-omap2/gpmc-nand.c | 1 - arch/arm/mach-omap2/gpmc-onenand.c | 1 - arch/arm/mach-omap2/gpmc-smc91x.c | 1 - arch/arm/mach-omap2/gpmc-smsc911x.c | 1 - arch/arm/mach-omap2/pm-debug.c | 1 - arch/arm/mach-omap2/pm24xx.c | 1 - arch/arm/mach-omap2/serial.c | 1 - arch/arm/plat-omap/common.c | 1 - arch/arm/plat-omap/counter_32k.c | 1 - arch/arm/plat-omap/debug-devices.c | 3 --- arch/arm/plat-omap/devices.c | 1 - arch/arm/plat-omap/include/plat/board.h | 13 ------------- arch/arm/plat-omap/include/plat/mmc.h | 1 - arch/arm/plat-omap/include/plat/usb.h | 1 - arch/arm/plat-omap/sram.c | 1 - drivers/mmc/host/omap.c | 1 - drivers/mmc/host/omap_hsmmc.c | 1 - drivers/mtd/onenand/omap2.c | 2 -- 41 files changed, 56 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/board.h (limited to 'arch/arm/mach-omap2/gpmc-onenand.c') diff --git a/arch/arm/mach-omap1/board-generic.c b/arch/arm/mach-omap1/board-generic.c index d0327346aeea..04b5fdaff831 100644 --- a/arch/arm/mach-omap1/board-generic.c +++ b/arch/arm/mach-omap1/board-generic.c @@ -23,7 +23,6 @@ #include #include -#include #include diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 11e1ff38386d..1668af3017de 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index fa1fa4deb6aa..1feca354ce08 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 6809c9e56c93..0d1709b1a6fe 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c @@ -22,7 +22,6 @@ #include -#include #include #include diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 9511584fdc4f..36eee4b512f6 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c @@ -33,7 +33,6 @@ #include #include -#include #include "common.h" #include #include diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index ad8a7d94afcd..04e857419bb6 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -34,7 +34,6 @@ #include #include -#include #include "common.h" #include #include diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index e5fa46bfde2f..a6a1b481cac1 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c @@ -35,7 +35,6 @@ #include #include -#include #include "common.h" #include diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 6567c1cd5572..870a2a55a032 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c @@ -40,7 +40,6 @@ #include #include -#include #include "common.h" #include #include diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 6f93a20536ea..38024a57f6bf 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c @@ -20,7 +20,6 @@ #include #include -#include #include "common.h" #include "common-board-devices.h" diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 28214483aaba..01103b38f77f 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -29,7 +29,6 @@ #include #include -#include #include "common.h" #include #include diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index ef9e82977499..c37c2a17c410 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c @@ -35,7 +35,6 @@ #include #include -#include #include "common.h" #include #include diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 677357ff61ac..5397209c0b09 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c @@ -25,7 +25,6 @@ #include #include -#include #include "common.h" #include #include diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 6202fc76e490..293e3b26c471 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -39,7 +39,6 @@ #include #include -#include #include "common.h" #include