diff mbox

[2/2] ARM: Kirkwood: Describe iconnect nand in DT.

Message ID 20120805203920.908663535@rtp-net.org (mailing list archive)
State New, archived
Headers show

Commit Message

Arnaud Patard (Rtp) Aug. 5, 2012, 8:39 p.m. UTC
Define the nand and its partitions in DT and remove them from cmdline

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

Comments

Jason Cooper Aug. 14, 2012, 7:48 p.m. UTC | #1
On Sun, Aug 05, 2012 at 10:39:13PM +0200, Arnaud Patard wrote:
> Define the nand and its partitions in DT and remove them from cmdline
> 
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

applied to:

git://git.infradead.org/users/jcooper/linux.git boards-for-v3.7

thx,

Jason.
diff mbox

Patch

Index: alunn/arch/arm/boot/dts/kirkwood-iconnect.dts
===================================================================
--- alunn.orig/arch/arm/boot/dts/kirkwood-iconnect.dts	2012-07-25 23:46:57.819861775 +0200
+++ alunn/arch/arm/boot/dts/kirkwood-iconnect.dts	2012-07-25 23:54:47.307841120 +0200
@@ -12,7 +12,7 @@ 
 	};
 
 	chosen {
-		bootargs = "console=ttyS0,115200n8 earlyprintk mtdparts=orion_nand:0xc0000@0x0(uboot),0x20000@0xa0000(env),0x300000@0x100000(zImage),0x300000@0x540000(initrd),0x1f400000@0x980000(boot)";
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
 		linux,initrd-start = <0x4500040>;
 		linux,initrd-end   = <0x4800000>;
 	};
@@ -30,7 +30,37 @@ 
 			clock-frequency = <200000000>;
 			status = "ok";
 		};
+
+		nand@3000000 {
+			status = "okay";
+
+			partition@0 {
+				label = "uboot";
+				reg = <0x0000000 0xc0000>;
+			};
+
+			partition@a0000 {
+				label = "env";
+				reg = <0xa0000 0x20000>;
+			};
+
+			partition@100000 {
+				label = "zImage";
+				reg = <0x100000 0x300000>;
+			};
+
+			partition@540000 {
+				label = "initrd";
+				reg = <0x540000 0x300000>;
+			};
+
+			partition@980000 {
+				label = "boot";
+				reg = <0x980000 0x1f400000>;
+			};
+		};
 	};
+
 	gpio-leds {
 		compatible = "gpio-leds";
 
Index: alunn/arch/arm/mach-kirkwood/board-iconnect.c
===================================================================
--- alunn.orig/arch/arm/mach-kirkwood/board-iconnect.c	2012-07-25 23:46:57.831861775 +0200
+++ alunn/arch/arm/mach-kirkwood/board-iconnect.c	2012-07-25 23:46:57.000000000 +0200
@@ -16,7 +16,6 @@ 
 #include <linux/of_fdt.h>
 #include <linux/of_irq.h>
 #include <linux/of_platform.h>
-#include <linux/mtd/partitions.h>
 #include <linux/mv643xx_eth.h>
 #include <linux/gpio.h>
 #include <asm/mach/arch.h>
@@ -42,18 +41,9 @@  static unsigned int iconnect_mpp_config[
 	0
 };
 
-static struct mtd_partition iconnect_nand_parts[] = {
-	{
-		.name = "flash",
-		.offset = 0,
-		.size = MTDPART_SIZ_FULL,
-	},
-};
-
 void __init iconnect_init(void)
 {
 	kirkwood_mpp_conf(iconnect_mpp_config);
-	kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25);
 
 	kirkwood_ehci_init();
 	kirkwood_ge00_init(&iconnect_ge00_data);