diff options
Diffstat (limited to 'arch/arm/mach-pxa/tosa.c')
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index f3b12d2897a6..fa903e7ae624 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -22,6 +22,9 @@ | |||
22 | #include <linux/fb.h> | 22 | #include <linux/fb.h> |
23 | #include <linux/mmc/host.h> | 23 | #include <linux/mmc/host.h> |
24 | #include <linux/mfd/tc6393xb.h> | 24 | #include <linux/mfd/tc6393xb.h> |
25 | #include <linux/mfd/tmio.h> | ||
26 | #include <linux/mtd/nand.h> | ||
27 | #include <linux/mtd/partitions.h> | ||
25 | #include <linux/pm.h> | 28 | #include <linux/pm.h> |
26 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
27 | #include <linux/gpio_keys.h> | 30 | #include <linux/gpio_keys.h> |
@@ -666,6 +669,39 @@ static int tosa_tc6393xb_suspend(struct platform_device *dev) | |||
666 | return 0; | 669 | return 0; |
667 | } | 670 | } |
668 | 671 | ||
672 | static struct mtd_partition tosa_nand_partition[] = { | ||
673 | { | ||
674 | .name = "smf", | ||
675 | .offset = 0, | ||
676 | .size = 7 * 1024 * 1024, | ||
677 | }, | ||
678 | { | ||
679 | .name = "root", | ||
680 | .offset = MTDPART_OFS_APPEND, | ||
681 | .size = 28 * 1024 * 1024, | ||
682 | }, | ||
683 | { | ||
684 | .name = "home", | ||
685 | .offset = MTDPART_OFS_APPEND, | ||
686 | .size = MTDPART_SIZ_FULL, | ||
687 | }, | ||
688 | }; | ||
689 | |||
690 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; | ||
691 | |||
692 | static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = { | ||
693 | .options = 0, | ||
694 | .offs = 4, | ||
695 | .len = 2, | ||
696 | .pattern = scan_ff_pattern | ||
697 | }; | ||
698 | |||
699 | static struct tmio_nand_data tosa_tc6393xb_nand_config = { | ||
700 | .num_partitions = ARRAY_SIZE(tosa_nand_partition), | ||
701 | .partition = tosa_nand_partition, | ||
702 | .badblock_pattern = &tosa_tc6393xb_nand_bbt, | ||
703 | }; | ||
704 | |||
669 | static struct tc6393xb_platform_data tosa_tc6393xb_setup = { | 705 | static struct tc6393xb_platform_data tosa_tc6393xb_setup = { |
670 | .scr_pll2cr = 0x0cc1, | 706 | .scr_pll2cr = 0x0cc1, |
671 | .scr_gper = 0x3300, | 707 | .scr_gper = 0x3300, |
@@ -681,6 +717,8 @@ static struct tc6393xb_platform_data tosa_tc6393xb_setup = { | |||
681 | .disable = tosa_tc6393xb_disable, | 717 | .disable = tosa_tc6393xb_disable, |
682 | .suspend = tosa_tc6393xb_suspend, | 718 | .suspend = tosa_tc6393xb_suspend, |
683 | .resume = tosa_tc6393xb_resume, | 719 | .resume = tosa_tc6393xb_resume, |
720 | |||
721 | .nand_data = &tosa_tc6393xb_nand_config, | ||
684 | }; | 722 | }; |
685 | 723 | ||
686 | 724 | ||