summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2010-12-15 15:43:44 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-01-06 15:28:22 +0000
commiteaca491f75af5afa9265a6bdfcbbfff6837634ab (patch)
tree1dd373ecd237b464cc2ccb252594b84fca5f2ccc /arch/arm/mach-omap1
parentdcf12463c3416b4a8fc84545233424df0a91e406 (diff)
downloadblackbird-op-linux-eaca491f75af5afa9265a6bdfcbbfff6837634ab.tar.gz
blackbird-op-linux-eaca491f75af5afa9265a6bdfcbbfff6837634ab.zip
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')
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c13
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[] = {
{ 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[] = {
OpenPOWER on IntegriCloud