Commit dc42c8bd authored by Zumeng Chen's avatar Zumeng Chen Committed by Tony Lindgren

ARM: OMAP3EVM: Add NAND flash definition

Signed-off-by: default avatarVaibhav Hiremath <hvaibhav@ti.com>
Tested-by: default avatarZumeng Chen <zumeng.chen@windriver.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 3d6bbca9
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
#include <linux/i2c/twl.h> #include <linux/i2c/twl.h>
...@@ -43,6 +47,7 @@ ...@@ -43,6 +47,7 @@
#include <plat/board.h> #include <plat/board.h>
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/nand.h>
#include "common.h" #include "common.h"
#include <plat/mcspi.h> #include <plat/mcspi.h>
#include <video/omapdss.h> #include <video/omapdss.h>
...@@ -607,6 +612,37 @@ static struct regulator_consumer_supply dummy_supplies[] = { ...@@ -607,6 +612,37 @@ static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
}; };
static struct mtd_partition omap3evm_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
{
.name = "X-Loader",
.offset = 0,
.size = 4*(SZ_128K),
.mask_flags = MTD_WRITEABLE
},
{
.name = "U-Boot",
.offset = MTDPART_OFS_APPEND,
.size = 14*(SZ_128K),
.mask_flags = MTD_WRITEABLE
},
{
.name = "U-Boot Env",
.offset = MTDPART_OFS_APPEND,
.size = 2*(SZ_128K)
},
{
.name = "Kernel",
.offset = MTDPART_OFS_APPEND,
.size = 40*(SZ_128K)
},
{
.name = "File system",
.size = MTDPART_SIZ_FULL,
.offset = MTDPART_OFS_APPEND,
},
};
static void __init omap3_evm_init(void) static void __init omap3_evm_init(void)
{ {
struct omap_board_mux *obm; struct omap_board_mux *obm;
...@@ -656,6 +692,9 @@ static void __init omap3_evm_init(void) ...@@ -656,6 +692,9 @@ static void __init omap3_evm_init(void)
} }
usb_musb_init(&musb_board_data); usb_musb_init(&musb_board_data);
usbhs_init(&usbhs_bdata); usbhs_init(&usbhs_bdata);
omap_nand_flash_init(NAND_BUSWIDTH_16, omap3evm_nand_partitions,
ARRAY_SIZE(omap3evm_nand_partitions));
omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
omap3evm_init_smsc911x(); omap3evm_init_smsc911x();
omap3_evm_display_init(); omap3_evm_display_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment