diff options
author | Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> | 2010-12-15 09:43:44 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-01-06 10:28:22 -0500 |
commit | eaca491f75af5afa9265a6bdfcbbfff6837634ab (patch) | |
tree | 1dd373ecd237b464cc2ccb252594b84fca5f2ccc /arch/arm/mach-omap1/board-ams-delta.c | |
parent | dcf12463c3416b4a8fc84545233424df0a91e406 (diff) |
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 <jkrzyszt@tis.icnet.pl>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-ams-delta.c')
-rw-r--r-- | arch/arm/mach-omap1/board-ams-delta.c | 13 |
1 files changed, 12 insertions, 1 deletions
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[] = { | |||
181 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, | 181 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | static struct resource ams_delta_nand_resources[] = { | ||
185 | [0] = { | ||
186 | .start = OMAP1_MPUIO_BASE, | ||
187 | .end = OMAP1_MPUIO_BASE + | ||
188 | OMAP_MPUIO_IO_CNTL + sizeof(u32) - 1, | ||
189 | .flags = IORESOURCE_MEM, | ||
190 | }, | ||
191 | }; | ||
192 | |||
184 | static struct platform_device ams_delta_nand_device = { | 193 | static struct platform_device ams_delta_nand_device = { |
185 | .name = "ams-delta-nand", | 194 | .name = "ams-delta-nand", |
186 | .id = -1 | 195 | .id = -1, |
196 | .num_resources = ARRAY_SIZE(ams_delta_nand_resources), | ||
197 | .resource = ams_delta_nand_resources, | ||
187 | }; | 198 | }; |
188 | 199 | ||
189 | static struct resource ams_delta_kp_resources[] = { | 200 | static struct resource ams_delta_kp_resources[] = { |