提交 91cf6a97 编写于 作者: M Marek Vasut 提交者: Eric Miao

[ARM] pxa/palm: Add NOR Flash support for PalmTX

Signed-off-by: NMarek Vasut <marek.vasut@gmail.com>
Signed-off-by: NEric Miao <eric.y.miao@gmail.com>
上级 3eb37ff0
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include <linux/usb/gpio_vbus.h> #include <linux/usb/gpio_vbus.h>
#include <linux/mtd/nand.h> #include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/physmap.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -143,6 +145,42 @@ static unsigned long palmtx_pin_config[] __initdata = { ...@@ -143,6 +145,42 @@ static unsigned long palmtx_pin_config[] __initdata = {
GPIO107_GPIO, /* earphone detect */ GPIO107_GPIO, /* earphone detect */
}; };
/******************************************************************************
* NOR Flash
******************************************************************************/
static struct mtd_partition palmtx_partitions[] = {
{
.name = "Flash",
.offset = 0x00000000,
.size = MTDPART_SIZ_FULL,
.mask_flags = 0
}
};
static struct physmap_flash_data palmtx_flash_data[] = {
{
.width = 2, /* bankwidth in bytes */
.parts = palmtx_partitions,
.nr_parts = ARRAY_SIZE(palmtx_partitions)
}
};
static struct resource palmtx_flash_resource = {
.start = PXA_CS0_PHYS,
.end = PXA_CS0_PHYS + SZ_8M - 1,
.flags = IORESOURCE_MEM,
};
static struct platform_device palmtx_flash = {
.name = "physmap-flash",
.id = 0,
.resource = &palmtx_flash_resource,
.num_resources = 1,
.dev = {
.platform_data = palmtx_flash_data,
},
};
/****************************************************************************** /******************************************************************************
* SD/MMC card controller * SD/MMC card controller
******************************************************************************/ ******************************************************************************/
...@@ -515,6 +553,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -515,6 +553,7 @@ static struct platform_device *devices[] __initdata = {
&power_supply, &power_supply,
&palmtx_asoc, &palmtx_asoc,
&palmtx_gpio_vbus, &palmtx_gpio_vbus,
&palmtx_flash,
&palmtx_nand, &palmtx_nand,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册