linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [[PATCH] 1/4] orion/kirkwood: add RnB line support to orion mtd driver
       [not found] <20100420091407.379013348@fluff.org.uk>
@ 2010-04-20  9:14 ` Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2010-04-20  9:14 UTC (permalink / raw)
  Cc: Linux MTD

[-- Attachment #1: slinux/arm/kirkwood/mtd-ready-not-busy-support.patch --]
[-- Type: text/plain, Size: 1286 bytes --]

Add support for a board to register a callback to get the state of the
RnB line if it has it attached.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Linux MTD <linux-mtd@lists.infradead.org>

Index: linux-2.6-2.6.32.9/arch/arm/plat-orion/include/plat/orion_nand.h
===================================================================
--- linux-2.6-2.6.32.9.orig/arch/arm/plat-orion/include/plat/orion_nand.h	2010-02-23 15:38:51.%N +0000
+++ linux-2.6-2.6.32.9/arch/arm/plat-orion/include/plat/orion_nand.h	2010-03-11 13:24:27.%N +0000
@@ -14,6 +14,7 @@
  */
 struct orion_nand_data {
 	struct mtd_partition *parts;
+	int (*dev_ready)(struct mtd_info *mtd);
 	u32 nr_parts;
 	u8 ale;		/* address line number connected to ALE */
 	u8 cle;		/* address line number connected to CLE */
Index: linux-2.6-2.6.32.9/drivers/mtd/nand/orion_nand.c
===================================================================
--- linux-2.6-2.6.32.9.orig/drivers/mtd/nand/orion_nand.c	2010-02-23 15:38:51.%N +0000
+++ linux-2.6-2.6.32.9/drivers/mtd/nand/orion_nand.c	2010-03-11 13:24:27.%N +0000
@@ -114,6 +114,9 @@
 	if (board->width == 16)
 		nc->options |= NAND_BUSWIDTH_16;
 
+	if (board->dev_ready)
+		nc->dev_ready = board->dev_ready;
+
 	platform_set_drvdata(pdev, mtd);
 
 	if (nand_scan(mtd, 1)) {

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

* [patch 1/4] orion/kirkwood: add RnB line support to orion mtd driver
       [not found] <20100420092617.075835456@fluff.org.uk>
@ 2010-04-20  9:26 ` Ben Dooks
  2010-04-28 13:49   ` Artem Bityutskiy
  2010-04-20  9:26 ` [patch 2/4] kirkwood: allow machines to register RnB callback Ben Dooks
  1 sibling, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2010-04-20  9:26 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Linux MTD

[-- Attachment #1: slinux/arm/kirkwood/mtd-ready-not-busy-support.patch --]
[-- Type: text/plain, Size: 1286 bytes --]

Add support for a board to register a callback to get the state of the
RnB line if it has it attached.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Linux MTD <linux-mtd@lists.infradead.org>

Index: linux-2.6-2.6.32.9/arch/arm/plat-orion/include/plat/orion_nand.h
===================================================================
--- linux-2.6-2.6.32.9.orig/arch/arm/plat-orion/include/plat/orion_nand.h	2010-02-23 15:38:51.%N +0000
+++ linux-2.6-2.6.32.9/arch/arm/plat-orion/include/plat/orion_nand.h	2010-03-11 13:24:27.%N +0000
@@ -14,6 +14,7 @@
  */
 struct orion_nand_data {
 	struct mtd_partition *parts;
+	int (*dev_ready)(struct mtd_info *mtd);
 	u32 nr_parts;
 	u8 ale;		/* address line number connected to ALE */
 	u8 cle;		/* address line number connected to CLE */
Index: linux-2.6-2.6.32.9/drivers/mtd/nand/orion_nand.c
===================================================================
--- linux-2.6-2.6.32.9.orig/drivers/mtd/nand/orion_nand.c	2010-02-23 15:38:51.%N +0000
+++ linux-2.6-2.6.32.9/drivers/mtd/nand/orion_nand.c	2010-03-11 13:24:27.%N +0000
@@ -114,6 +114,9 @@
 	if (board->width == 16)
 		nc->options |= NAND_BUSWIDTH_16;
 
+	if (board->dev_ready)
+		nc->dev_ready = board->dev_ready;
+
 	platform_set_drvdata(pdev, mtd);
 
 	if (nand_scan(mtd, 1)) {

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

* [patch 2/4] kirkwood: allow machines to register RnB callback
       [not found] <20100420092617.075835456@fluff.org.uk>
  2010-04-20  9:26 ` [patch 1/4] orion/kirkwood: add RnB line support to orion mtd driver Ben Dooks
@ 2010-04-20  9:26 ` Ben Dooks
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2010-04-20  9:26 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Linux MTD

[-- Attachment #1: slinux/arm/kirkwood/allow-mtd-ready-not-busy-registration.patch --]
[-- Type: text/plain, Size: 1855 bytes --]

Add a kirkwood_nand_init_rnb() call to allow boards which
have RnB line detection to register this instead of a
static delay.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Linux MTD <linux-mtd@lists.infradead.org>

Index: linux-2.6-2.6.32.9/arch/arm/mach-kirkwood/common.c
===================================================================
--- linux-2.6-2.6.32.9.orig/arch/arm/mach-kirkwood/common.c	2010-02-23 15:38:51.%N +0000
+++ linux-2.6-2.6.32.9/arch/arm/mach-kirkwood/common.c	2010-03-11 13:25:01.%N +0000
@@ -305,6 +305,15 @@
 	platform_device_register(&kirkwood_nand_flash);
 }
 
+void __init kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts,
+				   int (*dev_ready)(struct mtd_info *))
+{
+	kirkwood_clk_ctrl |= CGC_RUNIT;
+	kirkwood_nand_data.parts = parts;
+	kirkwood_nand_data.nr_parts = nr_parts;
+	kirkwood_nand_data.dev_ready = dev_ready;
+	platform_device_register(&kirkwood_nand_flash);
+}
 
 /*****************************************************************************
  * SoC RTC
Index: linux-2.6-2.6.32.9/arch/arm/mach-kirkwood/common.h
===================================================================
--- linux-2.6-2.6.32.9.orig/arch/arm/mach-kirkwood/common.h	2010-02-23 15:38:51.%N +0000
+++ linux-2.6-2.6.32.9/arch/arm/mach-kirkwood/common.h	2010-03-11 13:25:01.%N +0000
@@ -16,6 +16,7 @@
 struct mv_sata_platform_data;
 struct mvsdio_platform_data;
 struct mtd_partition;
+struct mtd_info;
 
 /*
  * Basic Kirkwood init functions used early by machine-setup.
@@ -41,6 +42,7 @@
 void kirkwood_uart0_init(void);
 void kirkwood_uart1_init(void);
 void kirkwood_nand_init(struct mtd_partition *parts, int nr_parts, int delay);
+void kirkwood_nand_init_rnb(struct mtd_partition *parts, int nr_parts, int (*dev_ready)(struct mtd_info *));
 
 extern int kirkwood_tclk;
 extern struct sys_timer kirkwood_timer;

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

* Re: [patch 1/4] orion/kirkwood: add RnB line support to orion mtd driver
  2010-04-20  9:26 ` [patch 1/4] orion/kirkwood: add RnB line support to orion mtd driver Ben Dooks
@ 2010-04-28 13:49   ` Artem Bityutskiy
  0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2010-04-28 13:49 UTC (permalink / raw)
  To: Ben Dooks; +Cc: Linux MTD, linux-arm-kernel

On Tue, 2010-04-20 at 10:26 +0100, Ben Dooks wrote:
> plain text document attachment (slinux)
> Add support for a board to register a callback to get the state of the
> RnB line if it has it attached.
> 
> Signed-off-by: Ben Dooks <ben@simtec.co.uk>
> Cc: Linux MTD <linux-mtd@lists.infradead.org>

Added both to l2-mtd-2.6.git / dunno

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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

end of thread, other threads:[~2010-04-28 13:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100420092617.075835456@fluff.org.uk>
2010-04-20  9:26 ` [patch 1/4] orion/kirkwood: add RnB line support to orion mtd driver Ben Dooks
2010-04-28 13:49   ` Artem Bityutskiy
2010-04-20  9:26 ` [patch 2/4] kirkwood: allow machines to register RnB callback Ben Dooks
     [not found] <20100420091407.379013348@fluff.org.uk>
2010-04-20  9:14 ` [[PATCH] 1/4] orion/kirkwood: add RnB line support to orion mtd driver Ben Dooks

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).