diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2008-11-24 16:57:30 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2008-12-02 01:43:49 -0500 |
commit | 431a2cff07446b0325ec063e5b401ca7c11e0058 (patch) | |
tree | e7f62cd8f77353ee28b6258450dc11779232e76d | |
parent | 4a9295ccb43ead9ec054d0bd374c992c692b2cf4 (diff) |
[ARM] pxa/poodle: add physmap mapping for ROM
Add mapping for system ROM using physmap-flash mapping.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 2e3bd8b1523b..ae88855bf974 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
21 | #include <linux/pm.h> | 21 | #include <linux/pm.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/mtd/physmap.h> | ||
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
25 | #include <linux/spi/ads7846.h> | 26 | #include <linux/spi/ads7846.h> |
@@ -413,9 +414,40 @@ static struct pxafb_mach_info poodle_fb_info = { | |||
413 | .lcd_conn = LCD_COLOR_TFT_16BPP, | 414 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
414 | }; | 415 | }; |
415 | 416 | ||
417 | static struct mtd_partition sharpsl_rom_parts[] = { | ||
418 | { | ||
419 | .name ="Boot PROM Filesystem", | ||
420 | .offset = 0x00120000, | ||
421 | .size = MTDPART_SIZ_FULL, | ||
422 | }, | ||
423 | }; | ||
424 | |||
425 | static struct physmap_flash_data sharpsl_rom_data = { | ||
426 | .width = 2, | ||
427 | .nr_parts = ARRAY_SIZE(sharpsl_rom_parts), | ||
428 | .parts = sharpsl_rom_parts, | ||
429 | }; | ||
430 | |||
431 | static struct resource sharpsl_rom_resources[] = { | ||
432 | { | ||
433 | .start = 0x00000000, | ||
434 | .end = 0x007fffff, | ||
435 | .flags = IORESOURCE_MEM, | ||
436 | }, | ||
437 | }; | ||
438 | |||
439 | static struct platform_device sharpsl_rom_device = { | ||
440 | .name = "physmap-flash", | ||
441 | .id = -1, | ||
442 | .resource = sharpsl_rom_resources, | ||
443 | .num_resources = ARRAY_SIZE(sharpsl_rom_resources), | ||
444 | .dev.platform_data = &sharpsl_rom_data, | ||
445 | }; | ||
446 | |||
416 | static struct platform_device *devices[] __initdata = { | 447 | static struct platform_device *devices[] __initdata = { |
417 | &poodle_locomo_device, | 448 | &poodle_locomo_device, |
418 | &poodle_scoop_device, | 449 | &poodle_scoop_device, |
450 | &sharpsl_rom_device, | ||
419 | }; | 451 | }; |
420 | 452 | ||
421 | static void poodle_poweroff(void) | 453 | static void poodle_poweroff(void) |