mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-20 03:04:01 +08:00
[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>
This commit is contained in:
parent
97f0fb68f1
commit
cc2b28ba61
@ -122,6 +122,29 @@ static struct spi_board_info dk_spi_devices[] = {
|
|||||||
#endif
|
#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)
|
static void __init dk_board_init(void)
|
||||||
{
|
{
|
||||||
/* Serial */
|
/* 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_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
||||||
at91_add_device_mmc(&dk_mmc_data);
|
at91_add_device_mmc(&dk_mmc_data);
|
||||||
#endif
|
#endif
|
||||||
|
/* NAND */
|
||||||
|
at91_add_device_nand(&dk_nand_data);
|
||||||
/* VGA */
|
/* VGA */
|
||||||
// dk_add_device_video();
|
// dk_add_device_video();
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,29 @@ static struct at91_mmc_data __initdata kb9202_mmc_data = {
|
|||||||
.wire4 = 1,
|
.wire4 = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct mtd_partition __initdata kb9202_nand_partition[] = {
|
||||||
|
{
|
||||||
|
.name = "nand_fs",
|
||||||
|
.offset = 0,
|
||||||
|
.size = MTDPART_SIZ_FULL,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct mtd_partition *nand_partitions(int size, int *num_partitions)
|
||||||
|
{
|
||||||
|
*num_partitions = ARRAY_SIZE(kb9202_nand_partition);
|
||||||
|
return kb9202_nand_partition;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct at91_nand_data __initdata kb9202_nand_data = {
|
||||||
|
.ale = 22,
|
||||||
|
.cle = 21,
|
||||||
|
// .det_pin = ... not there
|
||||||
|
.rdy_pin = AT91_PIN_PC29,
|
||||||
|
.enable_pin = AT91_PIN_PC28,
|
||||||
|
.partition_info = nand_partitions,
|
||||||
|
};
|
||||||
|
|
||||||
static void __init kb9202_board_init(void)
|
static void __init kb9202_board_init(void)
|
||||||
{
|
{
|
||||||
/* Serial */
|
/* Serial */
|
||||||
@ -105,6 +128,8 @@ static void __init kb9202_board_init(void)
|
|||||||
at91_add_device_i2c();
|
at91_add_device_i2c();
|
||||||
/* SPI */
|
/* SPI */
|
||||||
at91_add_device_spi(NULL, 0);
|
at91_add_device_spi(NULL, 0);
|
||||||
|
/* NAND */
|
||||||
|
at91_add_device_nand(&kb9202_nand_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(KB9200, "KB920x")
|
MACHINE_START(KB9200, "KB920x")
|
||||||
|
Loading…
Reference in New Issue
Block a user