* [PATCH] omap3evm: add support for nand
@ 2011-05-10 11:41 Bryan DE FARIA
2011-05-31 13:09 ` Tony Lindgren
0 siblings, 1 reply; 2+ messages in thread
From: Bryan DE FARIA @ 2011-05-10 11:41 UTC (permalink / raw)
To: linux-omap; +Cc: Bryan DE FARIA, tony, jjhiblot
This patch adds a basic nand support for the omap3evm.
Signed-off-by: Bryan DE FARIA <bdefaria@adeneo-embedded.com>
---
arch/arm/mach-omap2/board-omap3evm.c | 38 ++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 5066b0b..6b5b5e1 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -30,6 +30,8 @@
#include <linux/usb/otg.h>
#include <linux/smsc911x.h>
+#include <linux/mtd/nand.h>
+
#include <linux/wl12xx.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
@@ -46,6 +48,7 @@
#include <plat/mcspi.h>
#include <plat/display.h>
#include <plat/panel-generic-dpi.h>
+#include <plat/nand.h>
#include "mux.h"
#include "sdram-micron-mt46h32m32lf-6.h"
@@ -69,6 +72,8 @@
#define OMAP3EVM_GEN1_ETHR_GPIO_RST 64
#define OMAP3EVM_GEN2_ETHR_GPIO_RST 7
+#define NAND_BLOCK_SIZE SZ_128K
+
static u8 omap3_evm_version;
u8 get_omap3_evm_rev(void)
@@ -315,6 +320,37 @@ static struct omap_dss_board_info omap3_evm_dss_data = {
.default_device = &omap3_evm_lcd_device,
};
+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 * NAND_BLOCK_SIZE,
+ .mask_flags = MTD_WRITEABLE, /* force read-only */
+ },
+ {
+ .name = "U-Boot",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */
+ .size = 15 * NAND_BLOCK_SIZE,
+ .mask_flags = MTD_WRITEABLE, /* force read-only */
+ },
+ {
+ .name = "U-Boot Env",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */
+ .size = 1 * NAND_BLOCK_SIZE,
+ },
+ {
+ .name = "Kernel",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */
+ .size = 32 * NAND_BLOCK_SIZE,
+ },
+ {
+ .name = "File System",
+ .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */
+ .size = MTDPART_SIZ_FULL,
+ },
+};
+
static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
.supply = "vmmc",
};
@@ -766,6 +802,8 @@ static void __init omap3_evm_init(void)
usb_musb_init(&musb_board_data);
usbhs_init(&usbhs_bdata);
omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL);
+ omap_nand_flash_init(NAND_BUSWIDTH_16, omap3evm_nand_partitions,
+ ARRAY_SIZE(omap3evm_nand_partitions));
omap3evm_init_smsc911x();
omap3_evm_display_init();
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] omap3evm: add support for nand
2011-05-10 11:41 [PATCH] omap3evm: add support for nand Bryan DE FARIA
@ 2011-05-31 13:09 ` Tony Lindgren
0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2011-05-31 13:09 UTC (permalink / raw)
To: Bryan DE FARIA; +Cc: linux-omap, jjhiblot
* Bryan DE FARIA <bdefaria@adeneo-embedded.com> [110510 04:39]:
> This patch adds a basic nand support for the omap3evm.
Looks like this needs to be refreshed against v3.0-rc1.
Tony
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-31 13:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 11:41 [PATCH] omap3evm: add support for nand Bryan DE FARIA
2011-05-31 13:09 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).