diff options
author | Andrew Victor <andrew@sanpeople.com> | 2006-09-28 05:27:00 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-28 06:53:55 -0400 |
commit | cc2b28ba61b0a6bdfcf18274b8b883b98486eca4 (patch) | |
tree | 63b6c8c1be3708399d116a4b84485516bf0a90a8 /arch/arm/mach-at91rm9200 | |
parent | 97f0fb68f142b477773c05140da27c1dbd31a2ab (diff) |
[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')
-rw-r--r-- | arch/arm/mach-at91rm9200/board-dk.c | 25 | ||||
-rw-r--r-- | arch/arm/mach-at91rm9200/board-kb9202.c | 25 |
2 files changed, 50 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[] = { | |||
122 | #endif | 122 | #endif |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static struct mtd_partition __initdata dk_nand_partition[] = { | ||
126 | { | ||
127 | .name = "NAND Partition 1", | ||
128 | .offset = 0, | ||
129 | .size = MTDPART_SIZ_FULL, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct mtd_partition *nand_partitions(int size, int *num_partitions) | ||
134 | { | ||
135 | *num_partitions = ARRAY_SIZE(dk_nand_partition); | ||
136 | return dk_nand_partition; | ||
137 | } | ||
138 | |||
139 | static struct at91_nand_data __initdata dk_nand_data = { | ||
140 | .ale = 22, | ||
141 | .cle = 21, | ||
142 | .det_pin = AT91_PIN_PB1, | ||
143 | .rdy_pin = AT91_PIN_PC2, | ||
144 | // .enable_pin = ... not there | ||
145 | .partition_info = nand_partitions, | ||
146 | }; | ||
147 | |||
125 | static void __init dk_board_init(void) | 148 | static void __init dk_board_init(void) |
126 | { | 149 | { |
127 | /* Serial */ | 150 | /* Serial */ |
@@ -147,6 +170,8 @@ static void __init dk_board_init(void) | |||
147 | at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ | 170 | at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */ |
148 | at91_add_device_mmc(&dk_mmc_data); | 171 | at91_add_device_mmc(&dk_mmc_data); |
149 | #endif | 172 | #endif |
173 | /* NAND */ | ||
174 | at91_add_device_nand(&dk_nand_data); | ||
150 | /* VGA */ | 175 | /* VGA */ |
151 | // dk_add_device_video(); | 176 | // dk_add_device_video(); |
152 | } | 177 | } |
diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91rm9200/board-kb9202.c index 55b08f9b9537..272fe43bceca 100644 --- a/arch/arm/mach-at91rm9200/board-kb9202.c +++ b/arch/arm/mach-at91rm9200/board-kb9202.c | |||
@@ -89,6 +89,29 @@ static struct at91_mmc_data __initdata kb9202_mmc_data = { | |||
89 | .wire4 = 1, | 89 | .wire4 = 1, |
90 | }; | 90 | }; |
91 | 91 | ||
92 | static struct mtd_partition __initdata kb9202_nand_partition[] = { | ||
93 | { | ||
94 | .name = "nand_fs", | ||
95 | .offset = 0, | ||
96 | .size = MTDPART_SIZ_FULL, | ||
97 | }, | ||
98 | }; | ||
99 | |||
100 | static struct mtd_partition *nand_partitions(int size, int *num_partitions) | ||
101 | { | ||
102 | *num_partitions = ARRAY_SIZE(kb9202_nand_partition); | ||
103 | return kb9202_nand_partition; | ||
104 | } | ||
105 | |||
106 | static struct at91_nand_data __initdata kb9202_nand_data = { | ||
107 | .ale = 22, | ||
108 | .cle = 21, | ||
109 | // .det_pin = ... not there | ||
110 | .rdy_pin = AT91_PIN_PC29, | ||
111 | .enable_pin = AT91_PIN_PC28, | ||
112 | .partition_info = nand_partitions, | ||
113 | }; | ||
114 | |||
92 | static void __init kb9202_board_init(void) | 115 | static void __init kb9202_board_init(void) |
93 | { | 116 | { |
94 | /* Serial */ | 117 | /* Serial */ |
@@ -105,6 +128,8 @@ static void __init kb9202_board_init(void) | |||
105 | at91_add_device_i2c(); | 128 | at91_add_device_i2c(); |
106 | /* SPI */ | 129 | /* SPI */ |
107 | at91_add_device_spi(NULL, 0); | 130 | at91_add_device_spi(NULL, 0); |
131 | /* NAND */ | ||
132 | at91_add_device_nand(&kb9202_nand_data); | ||
108 | } | 133 | } |
109 | 134 | ||
110 | MACHINE_START(KB9200, "KB920x") | 135 | MACHINE_START(KB9200, "KB920x") |