From 7e95d1f1714cb993bc5b7e3a3d532b715b32d80a Mon Sep 17 00:00:00 2001 From: Janusz Krzysztofik Date: Tue, 14 Dec 2010 21:09:40 +0100 Subject: mtd: nand: ams-delta: convert to platform driver In its current form, the driver may interfere with different hardware on different boards if built into the kernel, hence is not suitable for inclusion into a defconfig, inteded to be usable with multiple OMAP1 cpu and machine types. Convert it to a platform driver, that should be free from this issue. Created and tested against linux-2.6.37-rc5 on Amstrad Delta. Signed-off-by: Janusz Krzysztofik Acked-by: Tony Lindgren Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- arch/arm/mach-omap1/board-ams-delta.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 1d4163b9f0b7..81282f5e8b2d 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -181,6 +181,11 @@ static struct omap_board_config_kernel ams_delta_config[] = { { OMAP_TAG_LCD, &ams_delta_lcd_config }, }; +static struct platform_device ams_delta_nand_device = { + .name = "ams-delta-nand", + .id = -1 +}; + static struct resource ams_delta_kp_resources[] = { [0] = { .start = INT_KEYBOARD, @@ -263,6 +268,7 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = { }; static struct platform_device *ams_delta_devices[] __initdata = { + &ams_delta_nand_device, &ams_delta_kp_device, &ams_delta_lcd_device, &ams_delta_led_device, -- cgit v1.2.3 From eaca491f75af5afa9265a6bdfcbbfff6837634ab Mon Sep 17 00:00:00 2001 From: Janusz Krzysztofik Date: Wed, 15 Dec 2010 15:43:44 +0100 Subject: mtd: nand: ams-delta: drop omap_read/write, use ioremap There is a common requirement for not using OMAP specific omap_readw() / omap_writew() function calls in drivers/, but replace them with readw() / writew() on ioremap()ped addresses passed from arch/ instead. The patch implements this idea for the Amstrad Delta NAND driver. To be able to use the modified driver, the board file is updated with the platform device I/O resource declaration, which is passed from there. Created and tested against linux-2.6.37-rc5, on top of recent patch 'MTD: NAND: ams-delta: convert to platform driver'. Signed-off-by: Janusz Krzysztofik Acked-by: Tony Lindgren Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- arch/arm/mach-omap1/board-ams-delta.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 81282f5e8b2d..b75ff0b03853 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -181,9 +181,20 @@ static struct omap_board_config_kernel ams_delta_config[] = { { OMAP_TAG_LCD, &ams_delta_lcd_config }, }; +static struct resource ams_delta_nand_resources[] = { + [0] = { + .start = OMAP1_MPUIO_BASE, + .end = OMAP1_MPUIO_BASE + + OMAP_MPUIO_IO_CNTL + sizeof(u32) - 1, + .flags = IORESOURCE_MEM, + }, +}; + static struct platform_device ams_delta_nand_device = { .name = "ams-delta-nand", - .id = -1 + .id = -1, + .num_resources = ARRAY_SIZE(ams_delta_nand_resources), + .resource = ams_delta_nand_resources, }; static struct resource ams_delta_kp_resources[] = { -- cgit v1.2.3 From 9ac4e613a88d7f6a7a9651d863e9c8f63b582718 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Fri, 19 Feb 2010 15:39:53 +0100 Subject: mtd: OneNAND: OMAP2/3: prevent regulator sleeping while OneNAND is in use Prevent OneNAND's voltage regulator from going to sleep while OneNAND is in use, by explicitly enabling and disabling the regulator as appropriate. Signed-off-by: Adrian Hunter Signed-off-by: David Woodhouse --- arch/arm/plat-omap/include/plat/onenand.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/plat-omap/include/plat/onenand.h b/arch/arm/plat-omap/include/plat/onenand.h index 72f433d7d827..affe87e9ece7 100644 --- a/arch/arm/plat-omap/include/plat/onenand.h +++ b/arch/arm/plat-omap/include/plat/onenand.h @@ -23,6 +23,7 @@ struct omap_onenand_platform_data { int (*onenand_setup)(void __iomem *, int freq); int dma_channel; u8 flags; + u8 regulator_can_sleep; }; #define ONENAND_MAX_PARTITIONS 8 -- cgit v1.2.3