aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9g20ek.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2011-05-29 09:49:22 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-11 08:01:57 -0400
commit1754aab9bb869c173aa03b57587256827250e488 (patch)
treefafa68ef3f589204534a5fb89d45dfa19addadfd /arch/arm/mach-at91/board-sam9g20ek.c
parent9eeff8243677b8bbfc17e8e606e965bb591a759d (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-sam9g20ek.c')
-rw-r--r--arch/arm/mach-at91/board-sam9g20ek.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
index 817f59d7251b..003122772e63 100644
--- a/arch/arm/mach-at91/board-sam9g20ek.c
+++ b/arch/arm/mach-at91/board-sam9g20ek.c
@@ -157,19 +157,14 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
157 }, 157 },
158}; 158};
159 159
160static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
161{
162 *num_partitions = ARRAY_SIZE(ek_nand_partition);
163 return ek_nand_partition;
164}
165
166/* det_pin is not connected */ 160/* det_pin is not connected */
167static struct atmel_nand_data __initdata ek_nand_data = { 161static struct atmel_nand_data __initdata ek_nand_data = {
168 .ale = 21, 162 .ale = 21,
169 .cle = 22, 163 .cle = 22,
170 .rdy_pin = AT91_PIN_PC13, 164 .rdy_pin = AT91_PIN_PC13,
171 .enable_pin = AT91_PIN_PC14, 165 .enable_pin = AT91_PIN_PC14,
172 .partition_info = nand_partitions, 166 .parts = ek_nand_partition,
167 .num_parts = ARRAY_SIZE(ek_nand_partition),
173}; 168};
174 169
175static struct sam9_smc_config __initdata ek_nand_smc_config = { 170static struct sam9_smc_config __initdata ek_nand_smc_config = {