Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191890
b: refs/heads/master
c: bcc399b
h: refs/heads/master
v: v3
  • Loading branch information
Marek Vasut authored and Eric Miao committed May 11, 2010
1 parent 81bf7e0 commit 7adc646
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aeec1346884688b86ac7f0f36fb30aba30b459d8
refs/heads/master: bcc399bb491e0971d84aba593d79d3addf5d31ee
51 changes: 48 additions & 3 deletions trunk/arch/arm/mach-pxa/vpac270.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/onenand.h>
#include <linux/dm9000.h>
#include <linux/ucb1400.h>
#include <linux/ata_platform.h>
Expand Down Expand Up @@ -149,7 +150,7 @@ static unsigned long vpac270_pin_config[] __initdata = {
* NOR Flash
******************************************************************************/
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
static struct mtd_partition vpac270_partitions[] = {
static struct mtd_partition vpac270_nor_partitions[] = {
{
.name = "Flash",
.offset = 0x00000000,
Expand All @@ -160,8 +161,8 @@ static struct mtd_partition vpac270_partitions[] = {
static struct physmap_flash_data vpac270_flash_data[] = {
{
.width = 2, /* bankwidth in bytes */
.parts = vpac270_partitions,
.nr_parts = ARRAY_SIZE(vpac270_partitions)
.parts = vpac270_nor_partitions,
.nr_parts = ARRAY_SIZE(vpac270_nor_partitions)
}
};

Expand All @@ -188,6 +189,49 @@ static void __init vpac270_nor_init(void)
static inline void vpac270_nor_init(void) {}
#endif

/******************************************************************************
* OneNAND Flash
******************************************************************************/
#if defined(CONFIG_MTD_ONENAND) || defined(CONFIG_MTD_ONENAND_MODULE)
static struct mtd_partition vpac270_onenand_partitions[] = {
{
.name = "Flash",
.offset = 0x00000000,
.size = MTDPART_SIZ_FULL,
}
};

static struct onenand_platform_data vpac270_onenand_info = {
.parts = vpac270_onenand_partitions,
.nr_parts = ARRAY_SIZE(vpac270_onenand_partitions),
};

static struct resource vpac270_onenand_resources[] = {
[0] = {
.start = PXA_CS0_PHYS,
.end = PXA_CS0_PHYS + SZ_1M,
.flags = IORESOURCE_MEM,
},
};

static struct platform_device vpac270_onenand = {
.name = "onenand-flash",
.id = -1,
.resource = vpac270_onenand_resources,
.num_resources = ARRAY_SIZE(vpac270_onenand_resources),
.dev = {
.platform_data = &vpac270_onenand_info,
},
};

static void __init vpac270_onenand_init(void)
{
platform_device_register(&vpac270_onenand);
}
#else
static void __init vpac270_onenand_init(void) {}
#endif

/******************************************************************************
* SD/MMC card controller
******************************************************************************/
Expand Down Expand Up @@ -549,6 +593,7 @@ static void __init vpac270_init(void)
vpac270_lcd_init();
vpac270_mmc_init();
vpac270_nor_init();
vpac270_onenand_init();
vpac270_leds_init();
vpac270_keys_init();
vpac270_uhc_init();
Expand Down

0 comments on commit 7adc646

Please sign in to comment.