Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36663
b: refs/heads/master
c: cc2b28b
h: refs/heads/master
i:
  36661: c50b3d5
  36659: 84c5517
  36655: 6355b9f
v: v3
  • Loading branch information
Andrew Victor authored and Russell King committed Sep 28, 2006
1 parent 5f8fd3a commit 2ad8298
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97f0fb68f142b477773c05140da27c1dbd31a2ab
refs/heads/master: cc2b28ba61b0a6bdfcf18274b8b883b98486eca4
25 changes: 25 additions & 0 deletions trunk/arch/arm/mach-at91rm9200/board-dk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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();
}
Expand Down
25 changes: 25 additions & 0 deletions trunk/arch/arm/mach-at91rm9200/board-kb9202.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,29 @@ static struct at91_mmc_data __initdata kb9202_mmc_data = {
.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)
{
/* Serial */
Expand All @@ -105,6 +128,8 @@ static void __init kb9202_board_init(void)
at91_add_device_i2c();
/* SPI */
at91_add_device_spi(NULL, 0);
/* NAND */
at91_add_device_nand(&kb9202_nand_data);
}

MACHINE_START(KB9200, "KB920x")
Expand Down

0 comments on commit 2ad8298

Please sign in to comment.