diff options
Diffstat (limited to 'arch/arm/mach-pxa/poodle.c')
-rw-r--r-- | arch/arm/mach-pxa/poodle.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index ae88855bf974..f9093beba752 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
26 | #include <linux/spi/ads7846.h> | 26 | #include <linux/spi/ads7846.h> |
27 | #include <linux/mtd/sharpsl.h> | ||
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
@@ -414,6 +415,55 @@ static struct pxafb_mach_info poodle_fb_info = { | |||
414 | .lcd_conn = LCD_COLOR_TFT_16BPP, | 415 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
415 | }; | 416 | }; |
416 | 417 | ||
418 | static struct mtd_partition sharpsl_nand_partitions[] = { | ||
419 | { | ||
420 | .name = "System Area", | ||
421 | .offset = 0, | ||
422 | .size = 7 * 1024 * 1024, | ||
423 | }, | ||
424 | { | ||
425 | .name = "Root Filesystem", | ||
426 | .offset = 7 * 1024 * 1024, | ||
427 | .size = 22 * 1024 * 1024, | ||
428 | }, | ||
429 | { | ||
430 | .name = "Home Filesystem", | ||
431 | .offset = MTDPART_OFS_APPEND, | ||
432 | .size = MTDPART_SIZ_FULL, | ||
433 | }, | ||
434 | }; | ||
435 | |||
436 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; | ||
437 | |||
438 | static struct nand_bbt_descr sharpsl_bbt = { | ||
439 | .options = 0, | ||
440 | .offs = 4, | ||
441 | .len = 2, | ||
442 | .pattern = scan_ff_pattern | ||
443 | }; | ||
444 | |||
445 | static struct sharpsl_nand_platform_data sharpsl_nand_platform_data = { | ||
446 | .badblock_pattern = &sharpsl_bbt, | ||
447 | .partitions = sharpsl_nand_partitions, | ||
448 | .nr_partitions = ARRAY_SIZE(sharpsl_nand_partitions), | ||
449 | }; | ||
450 | |||
451 | static struct resource sharpsl_nand_resources[] = { | ||
452 | { | ||
453 | .start = 0x0C000000, | ||
454 | .end = 0x0C000FFF, | ||
455 | .flags = IORESOURCE_MEM, | ||
456 | }, | ||
457 | }; | ||
458 | |||
459 | static struct platform_device sharpsl_nand_device = { | ||
460 | .name = "sharpsl-nand", | ||
461 | .id = -1, | ||
462 | .resource = sharpsl_nand_resources, | ||
463 | .num_resources = ARRAY_SIZE(sharpsl_nand_resources), | ||
464 | .dev.platform_data = &sharpsl_nand_platform_data, | ||
465 | }; | ||
466 | |||
417 | static struct mtd_partition sharpsl_rom_parts[] = { | 467 | static struct mtd_partition sharpsl_rom_parts[] = { |
418 | { | 468 | { |
419 | .name ="Boot PROM Filesystem", | 469 | .name ="Boot PROM Filesystem", |
@@ -447,6 +497,7 @@ static struct platform_device sharpsl_rom_device = { | |||
447 | static struct platform_device *devices[] __initdata = { | 497 | static struct platform_device *devices[] __initdata = { |
448 | &poodle_locomo_device, | 498 | &poodle_locomo_device, |
449 | &poodle_scoop_device, | 499 | &poodle_scoop_device, |
500 | &sharpsl_nand_device, | ||
450 | &sharpsl_rom_device, | 501 | &sharpsl_rom_device, |
451 | }; | 502 | }; |
452 | 503 | ||