public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] Generic gpmc-onenand initialization, v3
@ 2009-05-05  0:25 Tony Lindgren
  2009-05-05  0:25 ` [PATCH 1/7] onenand init: Rename board-n800-flash.c to gpmc-onenand.c Tony Lindgren
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:25 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Hi all,

Here's the whole series one more time, looks like I missed Juha
from the recipients originally. After all it's mostly Juha's
code! :)

To recap, this series creates a generic gpmc-onenand.c out of the
board-n800-flash.c so we can get this init code to the mainline
kernel. This series is against the linux-omap tree, the patch
against the mainline tree will be posted later.

Regards,

Tony

---

Tony Lindgren (7):
      onenand_init: Clean-up for checkpatch.pl
      onenand init: Convert omap3430sdp to use gpmc-onenand
      onenand_init: Allow disabling sync read and write based on flags, v3
      onenand init: Pass configuration data from board-*.c files
      onenand init: Rename n800_* functions to gpmc_onenand_* functions
      onenand init: Build gpmc-onenand.o based on CONFIG_MTD_ONENAND_OMAP2
      onenand init: Rename board-n800-flash.c to gpmc-onenand.c


 arch/arm/mach-omap2/Makefile                 |    7 +-
 arch/arm/mach-omap2/board-3430sdp-flash.c    |   28 -------
 arch/arm/mach-omap2/board-n800.c             |   50 ++++++++++++
 arch/arm/mach-omap2/board-rx51-flash.c       |   21 -----
 arch/arm/mach-omap2/board-rx51-peripherals.c |   47 ++++++++++++
 arch/arm/mach-omap2/board-rx51.c             |    2 
 arch/arm/mach-omap2/gpmc-onenand.c           |  105 ++++++++++++--------------
 arch/arm/plat-omap/include/mach/board.h      |    8 --
 arch/arm/plat-omap/include/mach/onenand.h    |   29 +++++++
 9 files changed, 177 insertions(+), 120 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-rx51-flash.c
 rename arch/arm/mach-omap2/{board-n800-flash.c => gpmc-onenand.c} (78%)

-- 
Signature

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/7] onenand init: Rename board-n800-flash.c to gpmc-onenand.c
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
@ 2009-05-05  0:25 ` Tony Lindgren
  2009-05-05  0:26 ` [PATCH 2/7] onenand init: Build gpmc-onenand.o based on CONFIG_MTD_ONENAND_OMAP2 Tony Lindgren
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:25 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Rename board-n800-flash.c to gpmc-onenand.c.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/Makefile           |    4 ++--
 arch/arm/mach-omap2/gpmc-onenand.c     |    0 
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename arch/arm/mach-omap2/{board-n800-flash.c => gpmc-onenand.c} (100%)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 76acefa..9127a94 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -55,14 +55,14 @@ obj-$(CONFIG_MACH_OMAP_LDP)		+= board-ldp.o \
 obj-$(CONFIG_MACH_OMAP_APOLLON)		+= board-apollon.o \
 					   board-apollon-mmc.o	\
 					   board-apollon-keys.o
-obj-$(CONFIG_MACH_NOKIA_N800)		+= board-n800.o board-n800-flash.o \
+obj-$(CONFIG_MACH_NOKIA_N800)		+= board-n800.o gpmc-onenand.o \
 					   board-n800-mmc.o board-n800-bt.o \
 					   board-n800-usb.o \
 					   board-n800-dsp.o \
 					   board-n800-camera.o
 obj-$(CONFIG_MACH_NOKIA_N810)		+= board-n810.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
-					   board-n800-flash.o \
+					   gpmc-onenand.o \
 					   board-rx51-flash.o \
 					   board-rx51-sdram.o \
 					   board-rx51-video.o \
diff --git a/arch/arm/mach-omap2/board-n800-flash.c b/arch/arm/mach-omap2/gpmc-onenand.c
similarity index 100%
rename from arch/arm/mach-omap2/board-n800-flash.c
rename to arch/arm/mach-omap2/gpmc-onenand.c


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/7] onenand init: Build gpmc-onenand.o based on CONFIG_MTD_ONENAND_OMAP2
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
  2009-05-05  0:25 ` [PATCH 1/7] onenand init: Rename board-n800-flash.c to gpmc-onenand.c Tony Lindgren
@ 2009-05-05  0:26 ` Tony Lindgren
  2009-05-05  0:26 ` [PATCH 3/7] onenand init: Rename n800_* functions to gpmc_onenand_* functions Tony Lindgren
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:26 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Build gpmc-onenand.o based on CONFIG_MTD_ONENAND_OMAP2

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/Makefile |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 9127a94..9cb2662 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -55,14 +55,13 @@ obj-$(CONFIG_MACH_OMAP_LDP)		+= board-ldp.o \
 obj-$(CONFIG_MACH_OMAP_APOLLON)		+= board-apollon.o \
 					   board-apollon-mmc.o	\
 					   board-apollon-keys.o
-obj-$(CONFIG_MACH_NOKIA_N800)		+= board-n800.o gpmc-onenand.o \
+obj-$(CONFIG_MACH_NOKIA_N800)		+= board-n800.o \
 					   board-n800-mmc.o board-n800-bt.o \
 					   board-n800-usb.o \
 					   board-n800-dsp.o \
 					   board-n800-camera.o
 obj-$(CONFIG_MACH_NOKIA_N810)		+= board-n810.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
-					   gpmc-onenand.o \
 					   board-rx51-flash.o \
 					   board-rx51-sdram.o \
 					   board-rx51-video.o \
@@ -79,6 +78,9 @@ obj-$(CONFIG_MACH_OMAP3_PANDORA)	+= board-omap3pandora.o \
 obj-$(CONFIG_USB_MUSB_SOC)		+= usb-musb.o
 obj-$(CONFIG_MACH_OMAP2_TUSB6010)	+= usb-tusb6010.o
 
+onenand-$(CONFIG_MTD_ONENAND_OMAP2)	:= gpmc-onenand.o
+obj-y					+= $(onenand-m) $(onenand-y)
+
 ifneq ($(CONFIG_USB_EHCI_HCD),)
 	obj-y				+= usb-ehci.o
 endif


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/7] onenand init: Rename n800_* functions to gpmc_onenand_* functions
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
  2009-05-05  0:25 ` [PATCH 1/7] onenand init: Rename board-n800-flash.c to gpmc-onenand.c Tony Lindgren
  2009-05-05  0:26 ` [PATCH 2/7] onenand init: Build gpmc-onenand.o based on CONFIG_MTD_ONENAND_OMAP2 Tony Lindgren
@ 2009-05-05  0:26 ` Tony Lindgren
  2009-05-05  0:26 ` [PATCH 4/7] onenand init: Pass configuration data from board-*.c files Tony Lindgren
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:26 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Rename n800_* functions to gpmc_onenand_* functions

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/Makefile              |    1 -
 arch/arm/mach-omap2/board-n800.c          |    2 +-
 arch/arm/mach-omap2/board-rx51-flash.c    |   21 -------------------
 arch/arm/mach-omap2/board-rx51.c          |    4 ++--
 arch/arm/mach-omap2/gpmc-onenand.c        |   32 +++++++++++++++--------------
 arch/arm/plat-omap/include/mach/onenand.h |   12 +++++++++++
 6 files changed, 31 insertions(+), 41 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-rx51-flash.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 9cb2662..d35996d 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -62,7 +62,6 @@ obj-$(CONFIG_MACH_NOKIA_N800)		+= board-n800.o \
 					   board-n800-camera.o
 obj-$(CONFIG_MACH_NOKIA_N810)		+= board-n810.o
 obj-$(CONFIG_MACH_NOKIA_RX51)		+= board-rx51.o \
-					   board-rx51-flash.o \
 					   board-rx51-sdram.o \
 					   board-rx51-video.o \
 					   board-rx51-peripherals.o \
diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index f1552f0..3d0a83b 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -689,7 +689,7 @@ void __init nokia_n800_common_init(void)
 {
 	platform_add_devices(n800_devices, ARRAY_SIZE(n800_devices));
 
-	n800_flash_init();
+	gpmc_onenand_init();
 	n800_mmc_init();
 	n800_bt_init();
 	n800_dsp_init();
diff --git a/arch/arm/mach-omap2/board-rx51-flash.c b/arch/arm/mach-omap2/board-rx51-flash.c
deleted file mode 100644
index f3b7eaf..0000000
--- a/arch/arm/mach-omap2/board-rx51-flash.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/board-rx51-flash.c
- *
- * Copyright (C) 2008 Nokia
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <mach/board-rx51.h>
-
-extern void __init n800_flash_init(void);
-
-void __init rx51_flash_init(void)
-{
-	n800_flash_init();
-}
-
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index c800b24..20a2470 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -30,6 +30,7 @@
 #include <mach/dma.h>
 #include <mach/gpmc.h>
 #include <mach/usb.h>
+#include <mach/onenand.h>
 #include <mach/board-rx51.h>
 
 static struct omap_uart_config rx51_uart_config = {
@@ -67,7 +68,6 @@ static void __init rx51_init_irq(void)
 	omap_gpio_init();
 }
 
-extern void __init rx51_flash_init(void);
 extern void __init rx51_peripherals_init(void);
 extern void __init rx51_video_init(void);
 
@@ -77,7 +77,7 @@ static void __init rx51_init(void)
 	omap_board_config_size = ARRAY_SIZE(rx51_config);
 	omap_serial_init();
 	usb_musb_init();
-	rx51_flash_init();
+	gpmc_onenand_init();
 	rx51_peripherals_init();
 	rx51_video_init();
 }
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 52aaf76..96f9358 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -19,22 +19,22 @@
 #include <mach/board.h>
 #include <mach/gpmc.h>
 
-struct mtd_partition n800_partitions[ONENAND_MAX_PARTITIONS];
+struct mtd_partition gpmc_onenand_partitions[ONENAND_MAX_PARTITIONS];
 
-int n800_onenand_setup(void __iomem *, int freq);
+int gpmc_onenand_setup(void __iomem *, int freq);
 
-static struct omap_onenand_platform_data n800_onenand_data = {
+static struct omap_onenand_platform_data gpmc_onenand_data = {
 	.cs = 0,
-	.parts = n800_partitions,
+	.parts = gpmc_onenand_partitions,
 	.nr_parts = 0, /* filled later */
-	.onenand_setup = n800_onenand_setup,
+	.onenand_setup = gpmc_onenand_setup,
 };
 
-static struct platform_device n800_onenand_device = {
+static struct platform_device gpmc_onenand_device = {
 	.name		= "omap2-onenand",
 	.id		= -1,
 	.dev = {
-		.platform_data = &n800_onenand_data,
+		.platform_data = &gpmc_onenand_data,
 	},
 };
 
@@ -305,10 +305,10 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 	return 0;
 }
 
-int n800_onenand_setup(void __iomem *onenand_base, int freq)
+int gpmc_onenand_setup(void __iomem *onenand_base, int freq)
 {
-	struct omap_onenand_platform_data *datap = &n800_onenand_data;
-	struct device *dev = &n800_onenand_device.dev;
+	struct omap_onenand_platform_data *datap = &gpmc_onenand_data;
+	struct device *dev = &gpmc_onenand_device.dev;
 
 	/* Set sync timings in GPMC */
 	if (omap2_onenand_set_sync_mode(datap->cs, onenand_base, freq) < 0) {
@@ -319,30 +319,30 @@ int n800_onenand_setup(void __iomem *onenand_base, int freq)
 	return 0;
 }
 
-void __init n800_flash_init(void)
+void __init gpmc_flash_init(void)
 {
 	const struct omap_partition_config *part;
 	int i = 0;
 
-	n800_onenand_data.gpio_irq = cpu_is_omap34xx() ? 65 : 26;
+	gpmc_onenand_data.gpio_irq = cpu_is_omap34xx() ? 65 : 26;
 
 	while ((part = omap_get_nr_config(OMAP_TAG_PARTITION,
 				struct omap_partition_config, i)) != NULL) {
 		struct mtd_partition *mpart;
 
-		mpart = n800_partitions + i;
+		mpart = gpmc_onenand_partitions + i;
 		mpart->name = (char *) part->name;
 		mpart->size = part->size;
 		mpart->offset = part->offset;
 		mpart->mask_flags = part->mask_flags;
 		i++;
-		if (i == ARRAY_SIZE(n800_partitions)) {
+		if (i == ARRAY_SIZE(gpmc_onenand_partitions)) {
 			printk(KERN_ERR "Too many partitions supplied\n");
 			return;
 		}
 	}
-	n800_onenand_data.nr_parts = i;
-	if (platform_device_register(&n800_onenand_device) < 0) {
+	gpmc_onenand_data.nr_parts = i;
+	if (platform_device_register(&gpmc_onenand_device) < 0) {
 		printk(KERN_ERR "Unable to register OneNAND device\n");
 		return;
 	}
diff --git a/arch/arm/plat-omap/include/mach/onenand.h b/arch/arm/plat-omap/include/mach/onenand.h
index 4649d30..f97cf55 100644
--- a/arch/arm/plat-omap/include/mach/onenand.h
+++ b/arch/arm/plat-omap/include/mach/onenand.h
@@ -23,3 +23,15 @@ struct omap_onenand_platform_data {
 int omap2_onenand_rephase(void);
 
 #define ONENAND_MAX_PARTITIONS 8
+
+#if defined(CONFIG_MTD_ONENAND) || defined(CONFIG_MTD_ONENAND_MODULE)
+
+extern void gpmc_onenand_init(void);
+
+#else
+
+static inline void gpmc_onenand_init(void)
+{
+}
+
+#endif


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/7] onenand init: Pass configuration data from board-*.c files
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
                   ` (2 preceding siblings ...)
  2009-05-05  0:26 ` [PATCH 3/7] onenand init: Rename n800_* functions to gpmc_onenand_* functions Tony Lindgren
@ 2009-05-05  0:26 ` Tony Lindgren
  2009-05-05  0:26 ` [PATCH 5/7] onenand_init: Allow disabling sync read and write based on flags, v3 Tony Lindgren
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:26 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Pass configuration data from board-*.c files.

Also remove support for the OMAP_TAG_PARTITION tag.
If the partition info is passed, it should be passed from
cmdline, and probably should be done in a generic way
in the drivers/mtd.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-n800.c             |   49 +++++++++++++++++++++++++-
 arch/arm/mach-omap2/board-rx51-peripherals.c |   46 ++++++++++++++++++++++++
 arch/arm/mach-omap2/board-rx51.c             |    2 -
 arch/arm/mach-omap2/gpmc-onenand.c           |   47 +++++--------------------
 arch/arm/plat-omap/include/mach/board.h      |    8 ----
 arch/arm/plat-omap/include/mach/onenand.h    |   16 +++++++-
 6 files changed, 116 insertions(+), 52 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index 3d0a83b..e882e4b 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -41,6 +41,7 @@
 #include <mach/gpio-switch.h>
 #include <mach/omapfb.h>
 #include <mach/blizzard.h>
+#include <mach/onenand.h>
 #include <mach/board-nokia.h>
 
 #include <../drivers/cbus/tahvo.h>
@@ -685,11 +686,55 @@ static struct i2c_board_info __initdata_or_module n810_i2c_board_info_2[] = {
 	},
 };
 
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+
+static struct mtd_partition onenand_partitions[] = {
+	{
+		.name           = "bootloader",
+		.offset         = 0,
+		.size           = 0x20000,
+		.mask_flags     = MTD_WRITEABLE,	/* Force read-only */
+	},
+	{
+		.name           = "config",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 0x60000,
+	},
+	{
+		.name           = "kernel",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 0x200000,
+	},
+	{
+		.name           = "initfs",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 0x400000,
+	},
+	{
+		.name           = "rootfs",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = MTDPART_SIZ_FULL,
+	},
+};
+
+static struct omap_onenand_platform_data board_onenand_data = {
+	.cs		= 0,
+	.gpio_irq	= 26,
+	.parts		= onenand_partitions,
+	.nr_parts	= ARRAY_SIZE(onenand_partitions),
+};
+
+static void __init board_onenand_init(void)
+{
+	gpmc_onenand_init(&board_onenand_data);
+}
+
+#endif
+
 void __init nokia_n800_common_init(void)
 {
 	platform_add_devices(n800_devices, ARRAY_SIZE(n800_devices));
 
-	gpmc_onenand_init();
 	n800_mmc_init();
 	n800_bt_init();
 	n800_dsp_init();
@@ -717,6 +762,7 @@ void __init nokia_n800_common_init(void)
 		
 	mipid_dev_init();
 	blizzard_dev_init();
+	board_onenand_init();
 }
 
 static void __init nokia_n800_init(void)
@@ -728,6 +774,7 @@ static void __init nokia_n800_init(void)
 	tea5761_dev_init();
 	omap_register_gpio_switches(n800_gpio_switches,
 				    ARRAY_SIZE(n800_gpio_switches));
+	board_onenand_init();
 }
 
 void __init nokia_n800_map_io(void)
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 22183af..7b1ee3d 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -27,6 +27,7 @@
 #include <mach/common.h>
 #include <mach/dma.h>
 #include <mach/gpmc.h>
+#include <mach/onenand.h>
 
 #include "mmc-twl4030.h"
 
@@ -478,6 +479,50 @@ static int __init rx51_i2c_init(void)
 	return 0;
 }
 
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+
+static struct mtd_partition onenand_partitions[] = {
+	{
+		.name           = "bootloader",
+		.offset         = 0,
+		.size           = 0x20000,
+		.mask_flags     = MTD_WRITEABLE,	/* Force read-only */
+	},
+	{
+		.name           = "config",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 0x60000,
+	},
+	{
+		.name           = "kernel",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 0x200000,
+	},
+	{
+		.name           = "initfs",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = 0x200000,
+	},
+	{
+		.name           = "rootfs",
+		.offset         = MTDPART_OFS_APPEND,
+		.size           = MTDPART_SIZ_FULL,
+	},
+};
+
+static struct omap_onenand_platform_data board_onenand_data = {
+	.cs		= 0,
+	.gpio_irq	= 65,
+	.parts		= onenand_partitions,
+	.nr_parts	= ARRAY_SIZE(onenand_partitions),
+};
+
+static void __init board_onenand_init(void)
+{
+	gpmc_onenand_init(&board_onenand_data);
+}
+
+#endif
 
 void __init rx51_peripherals_init(void)
 {
@@ -488,5 +533,6 @@ void __init rx51_peripherals_init(void)
 	rx51_i2c_init();
 	rx51_init_smc91x();
 	rx51_init_tsc2005();
+	board_onenand_init();
 }
 
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 20a2470..5ee62f8 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -30,7 +30,6 @@
 #include <mach/dma.h>
 #include <mach/gpmc.h>
 #include <mach/usb.h>
-#include <mach/onenand.h>
 #include <mach/board-rx51.h>
 
 static struct omap_uart_config rx51_uart_config = {
@@ -77,7 +76,6 @@ static void __init rx51_init(void)
 	omap_board_config_size = ARRAY_SIZE(rx51_config);
 	omap_serial_init();
 	usb_musb_init();
-	gpmc_onenand_init();
 	rx51_peripherals_init();
 	rx51_video_init();
 }
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 96f9358..fc79183 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -19,23 +19,11 @@
 #include <mach/board.h>
 #include <mach/gpmc.h>
 
-struct mtd_partition gpmc_onenand_partitions[ONENAND_MAX_PARTITIONS];
-
-int gpmc_onenand_setup(void __iomem *, int freq);
-
-static struct omap_onenand_platform_data gpmc_onenand_data = {
-	.cs = 0,
-	.parts = gpmc_onenand_partitions,
-	.nr_parts = 0, /* filled later */
-	.onenand_setup = gpmc_onenand_setup,
-};
+static struct omap_onenand_platform_data *gpmc_onenand_data;
 
 static struct platform_device gpmc_onenand_device = {
 	.name		= "omap2-onenand",
 	.id		= -1,
-	.dev = {
-		.platform_data = &gpmc_onenand_data,
-	},
 };
 
 static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base)
@@ -305,13 +293,13 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 	return 0;
 }
 
-int gpmc_onenand_setup(void __iomem *onenand_base, int freq)
+static int gpmc_onenand_setup(void __iomem *onenand_base, int freq)
 {
-	struct omap_onenand_platform_data *datap = &gpmc_onenand_data;
 	struct device *dev = &gpmc_onenand_device.dev;
 
 	/* Set sync timings in GPMC */
-	if (omap2_onenand_set_sync_mode(datap->cs, onenand_base, freq) < 0) {
+	if (omap2_onenand_set_sync_mode(gpmc_onenand_data->cs, onenand_base,
+			freq) < 0) {
 		dev_err(dev, "Unable to set synchronous mode\n");
 		return -EINVAL;
 	}
@@ -319,29 +307,12 @@ int gpmc_onenand_setup(void __iomem *onenand_base, int freq)
 	return 0;
 }
 
-void __init gpmc_flash_init(void)
+void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
 {
-	const struct omap_partition_config *part;
-	int i = 0;
-
-	gpmc_onenand_data.gpio_irq = cpu_is_omap34xx() ? 65 : 26;
-
-	while ((part = omap_get_nr_config(OMAP_TAG_PARTITION,
-				struct omap_partition_config, i)) != NULL) {
-		struct mtd_partition *mpart;
-
-		mpart = gpmc_onenand_partitions + i;
-		mpart->name = (char *) part->name;
-		mpart->size = part->size;
-		mpart->offset = part->offset;
-		mpart->mask_flags = part->mask_flags;
-		i++;
-		if (i == ARRAY_SIZE(gpmc_onenand_partitions)) {
-			printk(KERN_ERR "Too many partitions supplied\n");
-			return;
-		}
-	}
-	gpmc_onenand_data.nr_parts = i;
+	gpmc_onenand_data = _onenand_data;
+	gpmc_onenand_data->onenand_setup = gpmc_onenand_setup;
+	gpmc_onenand_device.dev.platform_data = gpmc_onenand_data;
+
 	if (platform_device_register(&gpmc_onenand_device) < 0) {
 		printk(KERN_ERR "Unable to register OneNAND device\n");
 		return;
diff --git a/arch/arm/plat-omap/include/mach/board.h b/arch/arm/plat-omap/include/mach/board.h
index ae8c2db..4d8d10a 100644
--- a/arch/arm/plat-omap/include/mach/board.h
+++ b/arch/arm/plat-omap/include/mach/board.h
@@ -125,14 +125,6 @@ struct omap_tmp105_config {
 	int (* set_power)(int enable);
 };
 
-struct omap_partition_config {
-	char name[16];
-	unsigned int size;
-	unsigned int offset;
-	/* same as in include/linux/mtd/partitions.h */
-	unsigned int mask_flags;
-};
-
 struct omap_flash_part_str_config {
 	char part_table[0];
 };
diff --git a/arch/arm/plat-omap/include/mach/onenand.h b/arch/arm/plat-omap/include/mach/onenand.h
index f97cf55..2a391fa 100644
--- a/arch/arm/plat-omap/include/mach/onenand.h
+++ b/arch/arm/plat-omap/include/mach/onenand.h
@@ -9,8 +9,11 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
+#ifndef __ASM_ARCH_OMAP_ONENAND_H__
+
 struct omap_onenand_platform_data {
 	int			cs;
 	int			gpio_irq;
@@ -24,14 +27,21 @@ int omap2_onenand_rephase(void);
 
 #define ONENAND_MAX_PARTITIONS 8
 
-#if defined(CONFIG_MTD_ONENAND) || defined(CONFIG_MTD_ONENAND_MODULE)
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
 
-extern void gpmc_onenand_init(void);
+extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
 
 #else
 
-static inline void gpmc_onenand_init(void)
+#define board_onenand_data	NULL
+
+static inline void board_onenand_init(void)
+{
+}
+
+static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d)
 {
 }
 
 #endif
+#endif


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/7] onenand_init: Allow disabling sync read and write based on flags, v3
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
                   ` (3 preceding siblings ...)
  2009-05-05  0:26 ` [PATCH 4/7] onenand init: Pass configuration data from board-*.c files Tony Lindgren
@ 2009-05-05  0:26 ` Tony Lindgren
  2009-05-05  0:26 ` [PATCH 6/7] onenand init: Convert omap3430sdp to use gpmc-onenand Tony Lindgren
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:26 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Allow disabling sync read and write based on flags

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-n800.c             |    1 +
 arch/arm/mach-omap2/board-rx51-peripherals.c |    1 +
 arch/arm/mach-omap2/gpmc-onenand.c           |   43 ++++++++++++++++++--------
 arch/arm/plat-omap/include/mach/onenand.h    |    4 ++
 4 files changed, 36 insertions(+), 13 deletions(-)

diff --git a/arch/arm/mach-omap2/board-n800.c b/arch/arm/mach-omap2/board-n800.c
index e882e4b..74e7ea4 100644
--- a/arch/arm/mach-omap2/board-n800.c
+++ b/arch/arm/mach-omap2/board-n800.c
@@ -722,6 +722,7 @@ static struct omap_onenand_platform_data board_onenand_data = {
 	.gpio_irq	= 26,
 	.parts		= onenand_partitions,
 	.nr_parts	= ARRAY_SIZE(onenand_partitions),
+	.flags		= ONENAND_SYNC_READ,
 };
 
 static void __init board_onenand_init(void)
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 7b1ee3d..55e8568 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -515,6 +515,7 @@ static struct omap_onenand_platform_data board_onenand_data = {
 	.gpio_irq	= 65,
 	.parts		= onenand_partitions,
 	.nr_parts	= ARRAY_SIZE(onenand_partitions),
+	.flags		= ONENAND_SYNC_READWRITE,
 };
 
 static void __init board_onenand_init(void)
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index fc79183..d243228 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -86,15 +86,18 @@ static void omap2_onenand_writew(unsigned short value, void __iomem *addr)
 }
 
 static void set_onenand_cfg(void __iomem *onenand_base, int latency,
-			    int sync_write, int hf)
+				int sync_read, int sync_write, int hf)
 {
 	u32 reg;
 
 	reg = omap2_onenand_readw(onenand_base + ONENAND_REG_SYS_CFG1);
 	reg &= ~((0x7 << ONENAND_SYS_CFG1_BRL_SHIFT) | (0x7 << 9));
 	reg |=	(latency << ONENAND_SYS_CFG1_BRL_SHIFT) |
-		ONENAND_SYS_CFG1_SYNC_READ |
 		ONENAND_SYS_CFG1_BL_16;
+	if (sync_read)
+		reg |= ONENAND_SYS_CFG1_SYNC_READ;
+	else
+		reg &= ~ONENAND_SYS_CFG1_SYNC_READ;
 	if (sync_write)
 		reg |= ONENAND_SYS_CFG1_SYNC_WRITE;
 	else
@@ -106,8 +109,9 @@ static void set_onenand_cfg(void __iomem *onenand_base, int latency,
 	omap2_onenand_writew(reg, onenand_base + ONENAND_REG_SYS_CFG1);
 }
 
-static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
-				       int freq)
+static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
+					void __iomem *onenand_base,
+					int freq)
 {
 	struct gpmc_timings t;
 	const int t_cer  = 15;
@@ -118,9 +122,17 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 	const int t_wph  = 30;
 	int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo;
 	int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
-	int err, ticks_cez, sync_write = 0, first_time = 0, hf = 0;
+	int err, ticks_cez, sync_read = 0, sync_write = 0, first_time = 0, hf = 0;
+	int cs = cfg->cs;
 	u32 reg;
 
+	if (cfg->flags & ONENAND_SYNC_READ) {
+		sync_read = 1;
+	} else if (cfg->flags & ONENAND_SYNC_READWRITE) {
+		sync_read = 1;
+		sync_write = 1;
+	}
+
 	if (!freq) {
 		/* Very first call freq is not known */
 		err = omap2_onenand_set_async_mode(cs, onenand_base);
@@ -160,8 +172,6 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 		t_ach   = 6;
 		t_aavdh = 6;
 		t_rdyo  = 9;
-		if (cpu_is_omap34xx())
-			sync_write = 1;
 		break;
 	case 66:
 		min_gpmc_clk_period = 15; /* 66 MHz */
@@ -171,8 +181,6 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 		t_ach   = 6;
 		t_aavdh = 6;
 		t_rdyo  = 11;
-		if (cpu_is_omap34xx())
-			sync_write = 1;
 		break;
 	default:
 		min_gpmc_clk_period = 18; /* 54 MHz */
@@ -182,6 +190,7 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 		t_ach   = 9;
 		t_aavdh = 7;
 		t_rdyo  = 15;
+		sync_write = 0;
 		break;
 	}
 
@@ -198,7 +207,8 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 		latency = 4;
 
 	if (first_time)
-		set_onenand_cfg(onenand_base, latency, sync_write, hf);
+		set_onenand_cfg(onenand_base, latency,
+					sync_read, sync_write, hf);
 
 	if (div == 1) {
 		reg = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG2);
@@ -272,7 +282,7 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 	gpmc_cs_write_reg(cs, GPMC_CS_CONFIG1,
 			  GPMC_CONFIG1_WRAPBURST_SUPP |
 			  GPMC_CONFIG1_READMULTIPLE_SUPP |
-			  GPMC_CONFIG1_READTYPE_SYNC |
+			  (sync_read ? GPMC_CONFIG1_READTYPE_SYNC : 0) |
 			  (sync_write ? GPMC_CONFIG1_WRITEMULTIPLE_SUPP : 0) |
 			  (sync_write ? GPMC_CONFIG1_WRITETYPE_SYNC : 0) |
 			  GPMC_CONFIG1_CLKACTIVATIONTIME(fclk_offset) |
@@ -288,7 +298,7 @@ static int omap2_onenand_set_sync_mode(int cs, void __iomem *onenand_base,
 	if (err)
 		return err;
 
-	set_onenand_cfg(onenand_base, latency, sync_write, hf);
+	set_onenand_cfg(onenand_base, latency, sync_read, sync_write, hf);
 
 	return 0;
 }
@@ -298,7 +308,7 @@ static int gpmc_onenand_setup(void __iomem *onenand_base, int freq)
 	struct device *dev = &gpmc_onenand_device.dev;
 
 	/* Set sync timings in GPMC */
-	if (omap2_onenand_set_sync_mode(gpmc_onenand_data->cs, onenand_base,
+	if (omap2_onenand_set_sync_mode(gpmc_onenand_data, onenand_base,
 			freq) < 0) {
 		dev_err(dev, "Unable to set synchronous mode\n");
 		return -EINVAL;
@@ -313,6 +323,13 @@ void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
 	gpmc_onenand_data->onenand_setup = gpmc_onenand_setup;
 	gpmc_onenand_device.dev.platform_data = gpmc_onenand_data;
 
+	if (cpu_is_omap24xx() &&
+			(gpmc_onenand_data->flags & ONENAND_SYNC_READWRITE)) {
+		printk(KERN_ERR "Onenand using only SYNC_READ on 24xx\n");
+		gpmc_onenand_data->flags &= ~ONENAND_SYNC_READWRITE;
+		gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
+	}
+
 	if (platform_device_register(&gpmc_onenand_device) < 0) {
 		printk(KERN_ERR "Unable to register OneNAND device\n");
 		return;
diff --git a/arch/arm/plat-omap/include/mach/onenand.h b/arch/arm/plat-omap/include/mach/onenand.h
index 2a391fa..bb66d0b 100644
--- a/arch/arm/plat-omap/include/mach/onenand.h
+++ b/arch/arm/plat-omap/include/mach/onenand.h
@@ -14,6 +14,9 @@
 
 #ifndef __ASM_ARCH_OMAP_ONENAND_H__
 
+#define ONENAND_SYNC_READ	(1 << 0)
+#define ONENAND_SYNC_READWRITE	(1 << 1)
+
 struct omap_onenand_platform_data {
 	int			cs;
 	int			gpio_irq;
@@ -21,6 +24,7 @@ struct omap_onenand_platform_data {
 	int			nr_parts;
 	int                     (*onenand_setup)(void __iomem *, int freq);
 	int			dma_channel;
+	u8			flags;
 };
 
 int omap2_onenand_rephase(void);


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/7] onenand init: Convert omap3430sdp to use gpmc-onenand
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
                   ` (4 preceding siblings ...)
  2009-05-05  0:26 ` [PATCH 5/7] onenand_init: Allow disabling sync read and write based on flags, v3 Tony Lindgren
@ 2009-05-05  0:26 ` Tony Lindgren
  2009-05-05  0:27 ` [PATCH 7/7] onenand_init: Clean-up for checkpatch.pl Tony Lindgren
  2009-05-06 18:07 ` [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:26 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Convert omap3430sdp to use gpmc-onenand. Note that sync mode
does not seem to work for some reason, so disable it with flags.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-3430sdp-flash.c |   28 ++--------------------------
 1 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/arch/arm/mach-omap2/board-3430sdp-flash.c b/arch/arm/mach-omap2/board-3430sdp-flash.c
index f0e25a4..e0ea564 100644
--- a/arch/arm/mach-omap2/board-3430sdp-flash.c
+++ b/arch/arm/mach-omap2/board-3430sdp-flash.c
@@ -103,8 +103,6 @@ static struct platform_device sdp_nor_device = {
 	.resource	= &sdp_nor_resource,
 };
 
-static int sdp_onenand_setup(void __iomem *, int freq);
-
 static struct mtd_partition sdp_onenand_partitions[] = {
 	{
 		.name		= "X-Loader-OneNAND",
@@ -138,30 +136,9 @@ static struct mtd_partition sdp_onenand_partitions[] = {
 static struct omap_onenand_platform_data sdp_onenand_data = {
 	.parts		= sdp_onenand_partitions,
 	.nr_parts	= ARRAY_SIZE(sdp_onenand_partitions),
-	.onenand_setup	= sdp_onenand_setup,
 	.dma_channel	= -1,	/* disable DMA in OMAP OneNAND driver */
 };
 
-static struct platform_device sdp_onenand_device = {
-	.name		= "omap2-onenand",
-	.id		= -1,
-	.dev = {
-		.platform_data = &sdp_onenand_data,
-	},
-};
-
-/*
- * sdp_onenand_setup - The function configures the onenand flash.
- * @onenand_base: Onenand base address
- *
- * @return int:	Currently always returning zero.
- */
-static int sdp_onenand_setup(void __iomem *onenand_base, int freq)
-{
-	/* Onenand setup does nothing at present */
-	return 0;
-}
-
 static struct mtd_partition sdp_nand_partitions[] = {
 	/* All the partition sizes are listed in terms of NAND block size */
 	{
@@ -262,7 +239,7 @@ void __init sdp3430_flash_init(void)
 		} else {
 			ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
 			if ((ret & 0x3F) == (ONENAND_MAP >> 24))
-			onenandcs = cs;
+				onenandcs = cs;
 		}
 		cs++;
 	}
@@ -284,7 +261,6 @@ void __init sdp3430_flash_init(void)
 
 	if (onenandcs < GPMC_CS_NUM) {
 		sdp_onenand_data.cs = onenandcs;
-		if (platform_device_register(&sdp_onenand_device) < 0)
-			printk(KERN_ERR "Unable to register OneNAND device\n");
+		gpmc_onenand_init(&sdp_onenand_data);
 	}
 }


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/7] onenand_init: Clean-up for checkpatch.pl
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
                   ` (5 preceding siblings ...)
  2009-05-05  0:26 ` [PATCH 6/7] onenand init: Convert omap3430sdp to use gpmc-onenand Tony Lindgren
@ 2009-05-05  0:27 ` Tony Lindgren
  2009-05-06 18:07 ` [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-05  0:27 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

Clean-up for checkpatch.pl

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/gpmc-onenand.c        |   15 +++++++++------
 arch/arm/plat-omap/include/mach/onenand.h |    5 ++---
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index d243228..71fc05a 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -1,8 +1,9 @@
 /*
- * linux/arch/arm/mach-omap2/board-n800-flash.c
+ * linux/arch/arm/mach-omap2/gpmc-onenand.c
  *
- * Copyright (C) 2006 Nokia Corporation
- * Author: Juha Yrjola
+ * Copyright (C) 2006 - 2009 Nokia Corporation
+ * Contacts:	Juha Yrjola
+ *		Tony Lindgren
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -14,7 +15,7 @@
 #include <asm/mach/flash.h>
 #include <linux/mtd/onenand_regs.h>
 
-#include <asm/io.h>
+#include <linux/io.h>
 #include <mach/onenand.h>
 #include <mach/board.h>
 #include <mach/gpmc.h>
@@ -122,7 +123,8 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
 	const int t_wph  = 30;
 	int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo;
 	int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
-	int err, ticks_cez, sync_read = 0, sync_write = 0, first_time = 0, hf = 0;
+	int first_time = 0, hf = 0 sync_read = 0, sync_write = 0;
+	int err, ticks_cez;
 	int cs = cfg->cs;
 	u32 reg;
 
@@ -267,7 +269,8 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
 			t.wr_access = t.access;
 		}
 	} else {
-		t.adv_wr_off = gpmc_round_ns_to_ticks(max_t(int, t_avdp, t_cer));
+		t.adv_wr_off = gpmc_round_ns_to_ticks(max_t(int,
+							t_avdp, t_cer));
 		t.we_on  = t.adv_wr_off + gpmc_round_ns_to_ticks(t_aavdh);
 		t.we_off = t.we_on + gpmc_round_ns_to_ticks(t_wpl);
 		t.cs_wr_off = t.we_off + gpmc_round_ns_to_ticks(t_wph);
diff --git a/arch/arm/plat-omap/include/mach/onenand.h b/arch/arm/plat-omap/include/mach/onenand.h
index bb66d0b..94cde73 100644
--- a/arch/arm/plat-omap/include/mach/onenand.h
+++ b/arch/arm/plat-omap/include/mach/onenand.h
@@ -27,11 +27,10 @@ struct omap_onenand_platform_data {
 	u8			flags;
 };
 
-int omap2_onenand_rephase(void);
-
 #define ONENAND_MAX_PARTITIONS 8
 
-#if defined(CONFIG_MTD_ONENAND_OMAP2) || defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
+#if defined(CONFIG_MTD_ONENAND_OMAP2) || \
+	defined(CONFIG_MTD_ONENAND_OMAP2_MODULE)
 
 extern void gpmc_onenand_init(struct omap_onenand_platform_data *d);
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/7] Generic gpmc-onenand initialization, v3
  2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
                   ` (6 preceding siblings ...)
  2009-05-05  0:27 ` [PATCH 7/7] onenand_init: Clean-up for checkpatch.pl Tony Lindgren
@ 2009-05-06 18:07 ` Tony Lindgren
  7 siblings, 0 replies; 9+ messages in thread
From: Tony Lindgren @ 2009-05-06 18:07 UTC (permalink / raw)
  To: dedekind, juha.yrjola, linux-omap, adrian.hunter

* Tony Lindgren <tony@atomide.com> [090504 17:25]:
> Hi all,
> 
> Here's the whole series one more time, looks like I missed Juha
> from the recipients originally. After all it's mostly Juha's
> code! :)
> 
> To recap, this series creates a generic gpmc-onenand.c out of the
> board-n800-flash.c so we can get this init code to the mainline
> kernel. This series is against the linux-omap tree, the patch
> against the mainline tree will be posted later.

Pushing this series to linux-omap tree today.
 
> Regards,
> 
> Tony
> 
> ---
> 
> Tony Lindgren (7):
>       onenand_init: Clean-up for checkpatch.pl
>       onenand init: Convert omap3430sdp to use gpmc-onenand
>       onenand_init: Allow disabling sync read and write based on flags, v3
>       onenand init: Pass configuration data from board-*.c files
>       onenand init: Rename n800_* functions to gpmc_onenand_* functions
>       onenand init: Build gpmc-onenand.o based on CONFIG_MTD_ONENAND_OMAP2
>       onenand init: Rename board-n800-flash.c to gpmc-onenand.c
> 
> 
>  arch/arm/mach-omap2/Makefile                 |    7 +-
>  arch/arm/mach-omap2/board-3430sdp-flash.c    |   28 -------
>  arch/arm/mach-omap2/board-n800.c             |   50 ++++++++++++
>  arch/arm/mach-omap2/board-rx51-flash.c       |   21 -----
>  arch/arm/mach-omap2/board-rx51-peripherals.c |   47 ++++++++++++
>  arch/arm/mach-omap2/board-rx51.c             |    2 
>  arch/arm/mach-omap2/gpmc-onenand.c           |  105 ++++++++++++--------------
>  arch/arm/plat-omap/include/mach/board.h      |    8 --
>  arch/arm/plat-omap/include/mach/onenand.h    |   29 +++++++
>  9 files changed, 177 insertions(+), 120 deletions(-)
>  delete mode 100644 arch/arm/mach-omap2/board-rx51-flash.c
>  rename arch/arm/mach-omap2/{board-n800-flash.c => gpmc-onenand.c} (78%)
> 
> -- 
> Signature
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-05-06 18:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-05  0:25 [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren
2009-05-05  0:25 ` [PATCH 1/7] onenand init: Rename board-n800-flash.c to gpmc-onenand.c Tony Lindgren
2009-05-05  0:26 ` [PATCH 2/7] onenand init: Build gpmc-onenand.o based on CONFIG_MTD_ONENAND_OMAP2 Tony Lindgren
2009-05-05  0:26 ` [PATCH 3/7] onenand init: Rename n800_* functions to gpmc_onenand_* functions Tony Lindgren
2009-05-05  0:26 ` [PATCH 4/7] onenand init: Pass configuration data from board-*.c files Tony Lindgren
2009-05-05  0:26 ` [PATCH 5/7] onenand_init: Allow disabling sync read and write based on flags, v3 Tony Lindgren
2009-05-05  0:26 ` [PATCH 6/7] onenand init: Convert omap3430sdp to use gpmc-onenand Tony Lindgren
2009-05-05  0:27 ` [PATCH 7/7] onenand_init: Clean-up for checkpatch.pl Tony Lindgren
2009-05-06 18:07 ` [PATCH 0/7] Generic gpmc-onenand initialization, v3 Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox