diff options
author | Maarten ter Huurne <maarten@treewalker.org> | 2012-03-29 13:17:01 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-07-23 08:56:20 -0400 |
commit | 1471d41a5bdfdf83ed1e5c2148a9763e64b1f53b (patch) | |
tree | e3e9ffb84311be6af7ba2dccaad0d0f287a8cb32 /arch/mips/include | |
parent | 28a33cbc24e4256c143dce96c7d93bf423229f92 (diff) |
MTD: NAND: JZ4740: Multi-bank support with autodetection
The platform data can now specify which external memory banks to probe
for NAND chips, and in which order. Banks that contain a NAND are used
and the other banks are freed.
Squashed version of development done in jz-2.6.38 branch.
Original patch by Lars-Peter Clausen with some bug fixes from me.
Thanks to Paul Cercueil for the initial autodetection patch.
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/3560/
Acked-By: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/mach-jz4740/jz4740_nand.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-jz4740/jz4740_nand.h b/arch/mips/include/asm/mach-jz4740/jz4740_nand.h index bb5b9a4e29c..986982db7c3 100644 --- a/arch/mips/include/asm/mach-jz4740/jz4740_nand.h +++ b/arch/mips/include/asm/mach-jz4740/jz4740_nand.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/mtd/nand.h> | 19 | #include <linux/mtd/nand.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | 21 | ||
22 | #define JZ_NAND_NUM_BANKS 4 | ||
23 | |||
22 | struct jz_nand_platform_data { | 24 | struct jz_nand_platform_data { |
23 | int num_partitions; | 25 | int num_partitions; |
24 | struct mtd_partition *partitions; | 26 | struct mtd_partition *partitions; |
@@ -27,6 +29,8 @@ struct jz_nand_platform_data { | |||
27 | 29 | ||
28 | unsigned int busy_gpio; | 30 | unsigned int busy_gpio; |
29 | 31 | ||
32 | unsigned char banks[JZ_NAND_NUM_BANKS]; | ||
33 | |||
30 | void (*ident_callback)(struct platform_device *, struct nand_chip *, | 34 | void (*ident_callback)(struct platform_device *, struct nand_chip *, |
31 | struct mtd_partition **, int *num_partitions); | 35 | struct mtd_partition **, int *num_partitions); |
32 | }; | 36 | }; |