aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/include/asm/mach-jz4740/jz4740_nand.h4
-rw-r--r--arch/mips/jz4740/platform.c20
2 files changed, 23 insertions, 1 deletions
diff --git a/arch/mips/include/asm/mach-jz4740/jz4740_nand.h b/arch/mips/include/asm/mach-jz4740/jz4740_nand.h
index bb5b9a4e29c8..986982db7c38 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
22struct jz_nand_platform_data { 24struct 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};
diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c
index 10929e2bc6d8..e342ed4cbd43 100644
--- a/arch/mips/jz4740/platform.c
+++ b/arch/mips/jz4740/platform.c
@@ -157,11 +157,29 @@ static struct resource jz4740_nand_resources[] = {
157 .flags = IORESOURCE_MEM, 157 .flags = IORESOURCE_MEM,
158 }, 158 },
159 { 159 {
160 .name = "bank", 160 .name = "bank1",
161 .start = 0x18000000, 161 .start = 0x18000000,
162 .end = 0x180C0000 - 1, 162 .end = 0x180C0000 - 1,
163 .flags = IORESOURCE_MEM, 163 .flags = IORESOURCE_MEM,
164 }, 164 },
165 {
166 .name = "bank2",
167 .start = 0x14000000,
168 .end = 0x140C0000 - 1,
169 .flags = IORESOURCE_MEM,
170 },
171 {
172 .name = "bank3",
173 .start = 0x0C000000,
174 .end = 0x0C0C0000 - 1,
175 .flags = IORESOURCE_MEM,
176 },
177 {
178 .name = "bank4",
179 .start = 0x08000000,
180 .end = 0x080C0000 - 1,
181 .flags = IORESOURCE_MEM,
182 },
165}; 183};
166 184
167struct platform_device jz4740_nand_device = { 185struct platform_device jz4740_nand_device = {