diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-05-29 09:49:22 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:01:57 -0400 |
commit | 1754aab9bb869c173aa03b57587256827250e488 (patch) | |
tree | fafa68ef3f589204534a5fb89d45dfa19addadfd /arch/arm/mach-at91/board-cap9adk.c | |
parent | 9eeff8243677b8bbfc17e8e606e965bb591a759d (diff) |
mtd: ATMEL, AVR32: inline nand partition table access
Currently atmel_nand driver used by AT91 and AVR32 calls a special callback
which return nand partition table and number of partitions. However in all
boards this callback returns just static data. So drop this callback and
make atmel_nand use partition table provided statically via platform_data.
Nicolas Ferre: I am in favor for a mainline inclusion through linux-mtd tree.
Hans-Christian Egtvedt: I'm fine by sending the changes for AVR32 through linux-mtd
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'arch/arm/mach-at91/board-cap9adk.c')
-rw-r--r-- | arch/arm/mach-at91/board-cap9adk.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index 679b0b743e92..858927e2aff5 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
@@ -169,19 +169,14 @@ static struct mtd_partition __initdata cap9adk_nand_partitions[] = { | |||
169 | }, | 169 | }, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
173 | { | ||
174 | *num_partitions = ARRAY_SIZE(cap9adk_nand_partitions); | ||
175 | return cap9adk_nand_partitions; | ||
176 | } | ||
177 | |||
178 | static struct atmel_nand_data __initdata cap9adk_nand_data = { | 172 | static struct atmel_nand_data __initdata cap9adk_nand_data = { |
179 | .ale = 21, | 173 | .ale = 21, |
180 | .cle = 22, | 174 | .cle = 22, |
181 | // .det_pin = ... not connected | 175 | // .det_pin = ... not connected |
182 | // .rdy_pin = ... not connected | 176 | // .rdy_pin = ... not connected |
183 | .enable_pin = AT91_PIN_PD15, | 177 | .enable_pin = AT91_PIN_PD15, |
184 | .partition_info = nand_partitions, | 178 | .parts = cap9adk_nand_partitions, |
179 | .num_parts = ARRAY_SIZE(cap9adk_nand_partitions), | ||
185 | }; | 180 | }; |
186 | 181 | ||
187 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { | 182 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { |