diff options
author | Andrew Victor <andrew@sanpeople.com> | 2006-09-28 13:27:00 +0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-28 14:53:55 +0400 |
commit | cc2b28ba61b0a6bdfcf18274b8b883b98486eca4 (patch) | |
tree | 63b6c8c1be3708399d116a4b84485516bf0a90a8 /arch/arm/mach-at91rm9200/board-dk.c | |
parent | 97f0fb68f142b477773c05140da27c1dbd31a2ab (diff) | |
download | linux-cc2b28ba61b0a6bdfcf18274b8b883b98486eca4.tar.xz |
[ARM] 3869/1: AT91: NAND support for DK and KB9202 boards
This patch adds support for the NAND flash on the Atmel AT91RM9200-DK
and KwikByte KB920x boards.
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91rm9200/board-dk.c')
-rw-r--r-- | arch/arm/mach-at91rm9200/board-dk.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-at91rm9200/board-dk.c b/arch/arm/mach-at91rm9200/board-dk.c index 54c32d00b610..c699f3984d4b 100644 --- a/arch/arm/mach-at91rm9200/board-dk.c +++ b/arch/arm/mach-at91rm9200/board-dk.c @@ -122,6 +122,29 @@ static struct spi_board_info dk_spi_devices[] = { #endif }; +static struct mtd_partition __initdata dk_nand_partition[] = { + { + .name = "NAND Partition 1", + .offset = 0, + .size = MTDPART_SIZ_FULL, + }, +}; + +static struct mtd_partition *nand_partitions(int size, int *num_partitions) +{ + *num_partitions = ARRAY_SIZE(dk_nand_partition); + return dk_nand_partition; +} + +static struct at91_nand_data __initdata dk_nand_data = { + .ale = 22, + .cle = 21, + .det_pin = AT91_PIN_PB1, + .rdy_pin = AT91_PIN_PC2, + // .enable_pin = ... not there + .partition_info = nand_partitions, +}; + static void __init dk_board_init(void) { /* Serial */ @@ -147,6 +170,8 @@ static void __init dk_board_init(void) at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ at91_add_device_mmc(&dk_mmc_data); #endif + /* NAND */ + at91_add_device_nand(&dk_nand_data); /* VGA */ // dk_add_device_video(); } |