diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2008-11-24 16:57:29 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2008-12-02 01:43:49 -0500 |
commit | 4a9295ccb43ead9ec054d0bd374c992c692b2cf4 (patch) | |
tree | b2fa3f1a8bb36ce54ec9f0c0367120e03a3ad99e /arch/arm/mach-pxa | |
parent | e5d3bf3c106c0557199076a57800adb85206c1ce (diff) |
[ARM] pxa/corgi: 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>
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/corgi.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 65558d6aa220..c5e28a46b292 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/mtd/physmap.h> | ||
22 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <linux/backlight.h> | 25 | #include <linux/backlight.h> |
@@ -541,11 +542,42 @@ err_free_1: | |||
541 | static inline void corgi_init_spi(void) {} | 542 | static inline void corgi_init_spi(void) {} |
542 | #endif | 543 | #endif |
543 | 544 | ||
545 | static struct mtd_partition sharpsl_rom_parts[] = { | ||
546 | { | ||
547 | .name ="Boot PROM Filesystem", | ||
548 | .offset = 0x00120000, | ||
549 | .size = MTDPART_SIZ_FULL, | ||
550 | }, | ||
551 | }; | ||
552 | |||
553 | static struct physmap_flash_data sharpsl_rom_data = { | ||
554 | .width = 2, | ||
555 | .nr_parts = ARRAY_SIZE(sharpsl_rom_parts), | ||
556 | .parts = sharpsl_rom_parts, | ||
557 | }; | ||
558 | |||
559 | static struct resource sharpsl_rom_resources[] = { | ||
560 | { | ||
561 | .start = 0x00000000, | ||
562 | .end = 0x007fffff, | ||
563 | .flags = IORESOURCE_MEM, | ||
564 | }, | ||
565 | }; | ||
566 | |||
567 | static struct platform_device sharpsl_rom_device = { | ||
568 | .name = "physmap-flash", | ||
569 | .id = -1, | ||
570 | .resource = sharpsl_rom_resources, | ||
571 | .num_resources = ARRAY_SIZE(sharpsl_rom_resources), | ||
572 | .dev.platform_data = &sharpsl_rom_data, | ||
573 | }; | ||
574 | |||
544 | static struct platform_device *devices[] __initdata = { | 575 | static struct platform_device *devices[] __initdata = { |
545 | &corgiscoop_device, | 576 | &corgiscoop_device, |
546 | &corgifb_device, | 577 | &corgifb_device, |
547 | &corgikbd_device, | 578 | &corgikbd_device, |
548 | &corgiled_device, | 579 | &corgiled_device, |
580 | &sharpsl_rom_device, | ||
549 | }; | 581 | }; |
550 | 582 | ||
551 | static void corgi_poweroff(void) | 583 | static void corgi_poweroff(void) |