aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZumeng Chen <zumeng.chen@windriver.com>2012-06-20 05:14:49 -0400
committerTony Lindgren <tony@atomide.com>2012-07-06 04:33:15 -0400
commitdc42c8bd3866c5e553064d5d7e243c68b2711c05 (patch)
treee246ac0fe071d302383d5e610bdc75f41410153c
parent3d6bbca9364f28976695e17fa8ef045ec31620b8 (diff)
ARM: OMAP3EVM: Add NAND flash definition
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Tested-by: Zumeng Chen <zumeng.chen@windriver.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 639bd07ea38a..0b83d0e7e726 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -24,6 +24,10 @@
24#include <linux/leds.h> 24#include <linux/leds.h>
25#include <linux/interrupt.h> 25#include <linux/interrupt.h>
26 26
27#include <linux/mtd/mtd.h>
28#include <linux/mtd/partitions.h>
29#include <linux/mtd/nand.h>
30
27#include <linux/spi/spi.h> 31#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 32#include <linux/spi/ads7846.h>
29#include <linux/i2c/twl.h> 33#include <linux/i2c/twl.h>
@@ -43,6 +47,7 @@
43 47
44#include <plat/board.h> 48#include <plat/board.h>
45#include <plat/usb.h> 49#include <plat/usb.h>
50#include <plat/nand.h>
46#include "common.h" 51#include "common.h"
47#include <plat/mcspi.h> 52#include <plat/mcspi.h>
48#include <video/omapdss.h> 53#include <video/omapdss.h>
@@ -607,6 +612,37 @@ static struct regulator_consumer_supply dummy_supplies[] = {
607 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), 612 REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
608}; 613};
609 614
615static struct mtd_partition omap3evm_nand_partitions[] = {
616 /* All the partition sizes are listed in terms of NAND block size */
617 {
618 .name = "X-Loader",
619 .offset = 0,
620 .size = 4*(SZ_128K),
621 .mask_flags = MTD_WRITEABLE
622 },
623 {
624 .name = "U-Boot",
625 .offset = MTDPART_OFS_APPEND,
626 .size = 14*(SZ_128K),
627 .mask_flags = MTD_WRITEABLE
628 },
629 {
630 .name = "U-Boot Env",
631 .offset = MTDPART_OFS_APPEND,
632 .size = 2*(SZ_128K)
633 },
634 {
635 .name = "Kernel",
636 .offset = MTDPART_OFS_APPEND,
637 .size = 40*(SZ_128K)
638 },
639 {
640 .name = "File system",
641 .size = MTDPART_SIZ_FULL,
642 .offset = MTDPART_OFS_APPEND,
643 },
644};
645
610static void __init omap3_evm_init(void) 646static void __init omap3_evm_init(void)
611{ 647{
612 struct omap_board_mux *obm; 648 struct omap_board_mux *obm;
@@ -656,6 +692,9 @@ static void __init omap3_evm_init(void)
656 } 692 }
657 usb_musb_init(&musb_board_data); 693 usb_musb_init(&musb_board_data);
658 usbhs_init(&usbhs_bdata); 694 usbhs_init(&usbhs_bdata);
695 omap_nand_flash_init(NAND_BUSWIDTH_16, omap3evm_nand_partitions,
696 ARRAY_SIZE(omap3evm_nand_partitions));
697
659 omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); 698 omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
660 omap3evm_init_smsc911x(); 699 omap3evm_init_smsc911x();
661 omap3_evm_display_init(); 700 omap3_evm_display_init();