Thread (23 messages) 23 messages, 5 authors, 2012-06-14
STALE5099d
Revisions (3)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 current

[PATCH 1/5] ARM: OMAP3EVM: Add NAND flash definition

From: Zumeng Chen <hidden>
Date: 2012-06-12 02:22:50
Also in: linux-omap

Possibly related (same subject, not in this thread)

Hi Jon,

Many thanks for your quickly reply, please see my in-line reply

2012/6/11 Jon Hunter [off-list ref]

On 06/11/2012 09:00 AM, Zumeng Chen wrote:
quoted
Signed-off-by: Vaibhav Hiremath <redacted>
Tested-by: Zumeng Chen <redacted>
I think that you need to have something in the changelog above, even if
this is a trivial change.
Yes, I'll add it in V2
quoted
---
 arch/arm/mach-omap2/board-omap3evm.c |   39
++++++++++++++++++++++++++++++++++
quoted
 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
quoted
index 639bd07..fef911d 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -24,6 +24,10 @@
 #include <linux/leds.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/ads7846.h>
 #include <linux/i2c/twl.h>
@@ -43,6 +47,7 @@

 #include <plat/board.h>
 #include <plat/usb.h>
+#include <plat/nand.h>
 #include "common.h"
 #include <plat/mcspi.h>
 #include <video/omapdss.h>
@@ -607,6 +612,37 @@ static struct regulator_consumer_supply
dummy_supplies[] = {
quoted
      REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
 };

+static struct mtd_partition omap3evm_nand_partitions[] = {
+     /* All the partition sizes are listed in terms of NAND block size
*/
quoted
+     {
+             .name           = "xloader-nand",
Is this the only non-volatile memory on the EVM? If so, you can probably
drop the "-nand" part from the name. Also, if you look at other board
files to be consistent in naming they use "X-Loader".
As this kind usage, yes, the only memory. so I'll remove "nand" for all.
quoted
+             .offset         = 0,
+             .size           = 4*(SZ_128K),
+             .mask_flags     = MTD_WRITEABLE
+     },
+     {
+             .name           = "uboot-nand",
"U-Boot"
quoted
+             .offset         = MTDPART_OFS_APPEND,
+             .size           = 14*(SZ_128K),
+             .mask_flags     = MTD_WRITEABLE
+     },
+     {
+             .name           = "params-nand",
"U-Boot Env"
quoted
+             .offset         = MTDPART_OFS_APPEND,
+             .size           = 2*(SZ_128K)
+     },
+     {
+             .name           = "linux-nand",
"Kernel"
quoted
+             .offset         = MTDPART_OFS_APPEND,
+             .size           = 40*(SZ_128K)
+     },
+     {
+             .name           = "jffs2-nand",
"File System"
quoted
+             .size           = MTDPART_SIZ_FULL,
+             .offset         = MTDPART_OFS_APPEND,
+     },
+};
+
 static void __init omap3_evm_init(void)
 {
      struct omap_board_mux *obm;
@@ -656,6 +692,9 @@ static void __init omap3_evm_init(void)
      }
      usb_musb_init(&musb_board_data);
      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);
      omap3evm_init_smsc911x();
      omap3_evm_display_init();
All fixed in V2.

Regards,
Zumeng
Cheers
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120612/cad88cf4/attachment-0001.html>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help