aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorStanislav Brabec <utx@penguin.cz>2009-10-22 17:05:03 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-11-02 21:49:53 -0500
commit5e0fa3f63eda875cbe23be37d64a16c65a577209 (patch)
treeac475ee196b704cdcdaded462d155b74f3af2fc9 /arch
parentb6727b12dd2ffb4a890eb5b13a298230c29ba45d (diff)
[ARM] pxa/zaurus: fix NAND flash OOB layout for Borzoi
Borzoi, Terrier and Akita use the same NAND Flash OOB layout, which seems to be different from Spitz for some reason. Here is a fix. When the code was ported to the platform data, the map was applied just for Akita. After this patch, Flash works again on Borzoi. Terrier still has a problem with partition table different from Borzoi (unfixable without reading of the system configuration in flash) and JFFS2 partitions can be mounted (with some "Empty flash at ... ends at ..." in the syslog). Signed-off-by: Stanislav Brabec <utx@penguin.cz> Acked-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-pxa/spitz.c39
1 files changed, 23 insertions, 16 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 82ff5733e4dc..3da45d051743 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -779,11 +779,34 @@ static void __init common_init(void)
779 pxa_set_i2c_info(NULL); 779 pxa_set_i2c_info(NULL);
780} 780}
781 781
782#if defined(CONFIG_MACH_AKITA) || defined(CONFIG_MACH_BORZOI)
783static struct nand_bbt_descr sharpsl_akita_bbt = {
784 .options = 0,
785 .offs = 4,
786 .len = 1,
787 .pattern = scan_ff_pattern
788};
789
790static struct nand_ecclayout akita_oobinfo = {
791 .eccbytes = 24,
792 .eccpos = {
793 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11,
794 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
795 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37},
796 .oobfree = {{0x08, 0x09}}
797};
798#endif
799
782#if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI) 800#if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
783static void __init spitz_init(void) 801static void __init spitz_init(void)
784{ 802{
785 spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON; 803 spitz_ficp_platform_data.gpio_pwdown = SPITZ_GPIO_IR_ON;
786 804
805 if (machine_is_borzoi()) {
806 sharpsl_nand_platform_data.badblock_pattern = &sharpsl_akita_bbt;
807 sharpsl_nand_platform_data.ecc_layout = &akita_oobinfo;
808 }
809
787 platform_scoop_config = &spitz_pcmcia_config; 810 platform_scoop_config = &spitz_pcmcia_config;
788 811
789 common_init(); 812 common_init();
@@ -808,22 +831,6 @@ static struct i2c_board_info akita_i2c_board_info[] = {
808 }, 831 },
809}; 832};
810 833
811static struct nand_bbt_descr sharpsl_akita_bbt = {
812 .options = 0,
813 .offs = 4,
814 .len = 1,
815 .pattern = scan_ff_pattern
816};
817
818static struct nand_ecclayout akita_oobinfo = {
819 .eccbytes = 24,
820 .eccpos = {
821 0x5, 0x1, 0x2, 0x3, 0x6, 0x7, 0x15, 0x11,
822 0x12, 0x13, 0x16, 0x17, 0x25, 0x21, 0x22, 0x23,
823 0x26, 0x27, 0x35, 0x31, 0x32, 0x33, 0x36, 0x37},
824 .oobfree = {{0x08, 0x09}}
825};
826
827static void __init akita_init(void) 834static void __init akita_init(void)
828{ 835{
829 spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON; 836 spitz_ficp_platform_data.gpio_pwdown = AKITA_GPIO_IR_ON;