linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/4] Small 4xx updates for 2.6.24
@ 2007-09-14 18:54 Josh Boyer
  2007-09-14 18:54 ` [patch 1/4] cuimage for Bamboo board Josh Boyer
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Josh Boyer @ 2007-09-14 18:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: david

Below is a small update series for 4xx that I intend to put in my 2.6.24 branch
soon and send to Paul.  It contains an already acked cuboot wrapper for Bamboo,
a fix for the newly updated physmap_of driver, and updates to the walnut and
sequoia flash nodes in the DTS files.

josh

-- 

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

* [patch 1/4] cuimage for Bamboo board
  2007-09-14 18:54 [patch 0/4] Small 4xx updates for 2.6.24 Josh Boyer
@ 2007-09-14 18:54 ` Josh Boyer
  2007-09-15  2:19   ` David Gibson
  2007-09-14 18:54 ` [patch 2/4] Make partitions optional in physmap_of Josh Boyer
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 19+ messages in thread
From: Josh Boyer @ 2007-09-14 18:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: david

Add a cuboot wrapper for the Bamboo board.  This also removes some obsoleted
linker declarations that have been moved into ops.h

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
---
 arch/powerpc/boot/44x.h             |    2 +-
 arch/powerpc/boot/Makefile          |    4 ++--
 arch/powerpc/boot/bamboo.c          |    8 +++++---
 arch/powerpc/boot/cuboot-bamboo.c   |   30 ++++++++++++++++++++++++++++++
 arch/powerpc/boot/treeboot-bamboo.c |   22 +++++++++++++++++++---
 5 files changed, 57 insertions(+), 9 deletions(-)

--- linux-2.6.orig/arch/powerpc/boot/Makefile
+++ linux-2.6/arch/powerpc/boot/Makefile
@@ -49,7 +49,7 @@ src-wlib := string.S crt0.S stdio.c main
 src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
 		cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
 		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
-		cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c
+		cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -146,7 +146,7 @@ image-$(CONFIG_8260)			+= cuImage.pq2
 image-$(CONFIG_PPC_83xx)		+= cuImage.83xx
 image-$(CONFIG_PPC_85xx)		+= cuImage.85xx
 image-$(CONFIG_EBONY)			+= treeImage.ebony cuImage.ebony
-image-$(CONFIG_BAMBOO)			+= treeImage.bamboo
+image-$(CONFIG_BAMBOO)			+= treeImage.bamboo cuImage.bamboo
 image-$(CONFIG_SEQUOIA)			+= cuImage.sequoia
 image-$(CONFIG_WALNUT)			+= treeImage.walnut
 endif
--- /dev/null
+++ linux-2.6/arch/powerpc/boot/cuboot-bamboo.c
@@ -0,0 +1,30 @@
+/*
+ * Old U-boot compatibility for Ebony
+ *
+ * Author: Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ *
+ * Copyright 2007 IBM Corporation
+ *
+ * Based on cuboot-ebony.c
+ *
+ * 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 "ops.h"
+#include "stdio.h"
+#include "44x.h"
+#include "cuboot.h"
+
+#define TARGET_44x
+#include "ppcboot.h"
+
+static bd_t bd;
+
+void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+		unsigned long r6, unsigned long r7)
+{
+	CUBOOT_INIT();
+	bamboo_init(&bd.bi_enetaddr, &bd.bi_enet1addr);
+}
--- linux-2.6.orig/arch/powerpc/boot/44x.h
+++ linux-2.6/arch/powerpc/boot/44x.h
@@ -11,6 +11,6 @@
 #define _PPC_BOOT_44X_H_
 
 void ebony_init(void *mac0, void *mac1);
-void bamboo_init(void);
+void bamboo_init(void *mac0, void *mac1);
 
 #endif /* _PPC_BOOT_44X_H_ */
--- linux-2.6.orig/arch/powerpc/boot/bamboo.c
+++ linux-2.6/arch/powerpc/boot/bamboo.c
@@ -24,8 +24,7 @@
 #include "4xx.h"
 #include "44x.h"
 
-extern char _dtb_start[];
-extern char _dtb_end[];
+static u8 *bamboo_mac0, *bamboo_mac1;
 
 static void bamboo_fixups(void)
 {
@@ -34,12 +33,15 @@ static void bamboo_fixups(void)
 	ibm440ep_fixup_clocks(sysclk, 11059200);
 	ibm4xx_fixup_memsize();
 	ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
+	dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1);
 }
 
-void bamboo_init(void)
+void bamboo_init(void *mac0, void *mac1)
 {
 	platform_ops.fixups = bamboo_fixups;
 	platform_ops.exit = ibm44x_dbcr_reset;
+	bamboo_mac0 = mac0;
+	bamboo_mac1 = mac1;
 	ft_init(_dtb_start, 0, 32);
 	serial_console_init();
 }
--- linux-2.6.orig/arch/powerpc/boot/treeboot-bamboo.c
+++ linux-2.6/arch/powerpc/boot/treeboot-bamboo.c
@@ -12,16 +12,32 @@
 #include "ops.h"
 #include "stdio.h"
 #include "44x.h"
-
-extern char _end[];
+#include "stdlib.h"
 
 BSS_STACK(4096);
 
+#define PIBS_MAC0 0xfffc0400
+#define PIBS_MAC1 0xfffc0500
+char pibs_mac0[6];
+char pibs_mac1[6];
+
+static void read_pibs_mac(void)
+{
+	unsigned long long mac64;
+
+	mac64 = strtoull((char *)PIBS_MAC0, 0, 16);
+	memcpy(&pibs_mac0, (char *)&mac64+2, 6);
+
+	mac64 = strtoull((char *)PIBS_MAC1, 0, 16);
+	memcpy(&pibs_mac1, (char *)&mac64+2, 6);
+}
+
 void platform_init(void)
 {
 	unsigned long end_of_ram = 0x8000000;
 	unsigned long avail_ram = end_of_ram - (unsigned long)_end;
 
 	simple_alloc_init(_end, avail_ram, 32, 64);
-	bamboo_init();
+	read_pibs_mac();
+	bamboo_init((u8 *)&pibs_mac0, (u8 *)&pibs_mac1);
 }

-- 

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

* [patch 2/4] Make partitions optional in physmap_of
  2007-09-14 18:54 [patch 0/4] Small 4xx updates for 2.6.24 Josh Boyer
  2007-09-14 18:54 ` [patch 1/4] cuimage for Bamboo board Josh Boyer
@ 2007-09-14 18:54 ` Josh Boyer
  2007-09-15  2:21   ` David Gibson
  2007-09-14 18:54 ` [patch 3/4] 4xx: Convert Walnut flash mappings to new binding Josh Boyer
  2007-09-14 18:54 ` [patch 4/4] 4xx: Convert Seqouia " Josh Boyer
  3 siblings, 1 reply; 19+ messages in thread
From: Josh Boyer @ 2007-09-14 18:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: david

The latest physmap_of driver has a small error where it will fail the probe
with:

physmap-flash: probe of fff00000.small-flas failed with error -2

if there are no partition subnodes in the device tree and the old style binding
is not used.  Since partition definitions are optional, the probe should still
succeed.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

---
 drivers/mtd/maps/physmap_of.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-2.6.orig/drivers/mtd/maps/physmap_of.c
+++ linux-2.6/drivers/mtd/maps/physmap_of.c
@@ -142,6 +142,8 @@ static int __devinit process_partitions(
 		}
 	} else {
 		nr_parts = parse_obsolete_partitions(dev, info, dp);
+		if (nr_parts == -ENOENT)
+			nr_parts = 0;
 	}
 
 	if (nr_parts < 0)

-- 

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

* [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-14 18:54 [patch 0/4] Small 4xx updates for 2.6.24 Josh Boyer
  2007-09-14 18:54 ` [patch 1/4] cuimage for Bamboo board Josh Boyer
  2007-09-14 18:54 ` [patch 2/4] Make partitions optional in physmap_of Josh Boyer
@ 2007-09-14 18:54 ` Josh Boyer
  2007-09-15  2:22   ` David Gibson
  2007-09-15  3:23   ` Stefan Roese
  2007-09-14 18:54 ` [patch 4/4] 4xx: Convert Seqouia " Josh Boyer
  3 siblings, 2 replies; 19+ messages in thread
From: Josh Boyer @ 2007-09-14 18:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: david

A new binding for flash devices was recently introduced.  This updates the
Walnut DTS to use the new binding.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
 arch/powerpc/boot/dts/walnut.dts |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

--- linux-2.6.orig/arch/powerpc/boot/dts/walnut.dts
+++ linux-2.6/arch/powerpc/boot/dts/walnut.dts
@@ -137,6 +137,10 @@
 			dcr-reg = <012 2>;
 			#address-cells = <2>;
 			#size-cells = <1>;
+			/* The ranges property is supplied by the bootwrapper
+			 * and is based on the firmware's configuration of the
+			 * EBC bridge
+			 */
 			clock-frequency = <0>; /* Filled in by zImage */
 
 			sram@0,0 {
@@ -144,13 +148,16 @@
 			};
 
 			flash@0,80000 {
-				device_type = "rom";
-				compatible = "direct-mapped";
-				probe-type = "JEDEC";
+				compatible = "jedec-flash";
 				bank-width = <1>;
-				partitions = <0 80000>;
-				partition-names = "OpenBIOS";
 				reg = <0 80000 80000>;
+				#address-cells = <1>;
+				#size-cells = <1>;
+				partition@0 {
+					label = "OpenBIOS";
+					reg = <0 80000>;
+					read-only;
+				};
 			};
 
 			ds1743@1,0 {

-- 

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

* [patch 4/4] 4xx: Convert Seqouia flash mappings to new binding
  2007-09-14 18:54 [patch 0/4] Small 4xx updates for 2.6.24 Josh Boyer
                   ` (2 preceding siblings ...)
  2007-09-14 18:54 ` [patch 3/4] 4xx: Convert Walnut flash mappings to new binding Josh Boyer
@ 2007-09-14 18:54 ` Josh Boyer
  2007-09-15  2:23   ` David Gibson
  3 siblings, 1 reply; 19+ messages in thread
From: Josh Boyer @ 2007-09-14 18:54 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: david

A new binding for flash devices was recently introduced.  This updates the
Sequoia DTS to use the new binding and enabled MTD in the defconfig.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
---
 arch/powerpc/boot/dts/sequoia.dts      |   38 +++++++++----
 arch/powerpc/configs/sequoia_defconfig |   91 +++++++++++++++++++++++++++++++--
 2 files changed, 115 insertions(+), 14 deletions(-)

--- linux-2.6.orig/arch/powerpc/boot/dts/sequoia.dts
+++ linux-2.6/arch/powerpc/boot/dts/sequoia.dts
@@ -142,19 +142,35 @@
 				interrupt-parent = <&UIC1>;
 
 				nor_flash@0,0 {
-					device_type = "rom";
-					compatible = "direct-mapped";
-					probe-type = "CFI";
+					compatible = "amd,s29gl256n", "cfi-flash";
 					bank-width = <2>;
-					partitions = <	0	180000
-							180000	200000
-							380000	3aa0000
-							3e20000	140000
-							3f60000	40000
-							3fa0000	60000>;
-					partition-names = "Kernel", "ramdisk", "file system",
-								"kozio", "env", "u-boot";
 					reg = <0 000000 4000000>;
+					#address-cells = <1>;
+					#size-cells = <1>;
+					partition@0 {
+						label = "Kernel";
+						reg = <0 180000>;
+					};
+					partition@180000 {
+						label = "ramdisk";
+						reg = <180000 200000>;
+					};
+					partition@380000 {
+						label = "file system";
+						reg = <380000 3aa0000>;
+					};
+					partition@3e20000 {
+						label = "kozio";
+						reg = <3e20000 140000>;
+					};
+					partition@3f60000 {
+						label = "env";
+						reg = <3f60000 40000>;
+					};
+					partition@3fa0000 {
+						label = "u-boot";
+						reg = <3fa0000 60000>;
+					};
 				};
 
 			};
--- linux-2.6.orig/arch/powerpc/configs/sequoia_defconfig
+++ linux-2.6/arch/powerpc/configs/sequoia_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.23-rc3
-# Mon Aug 27 20:19:13 2007
+# Linux kernel version: 2.6.23-rc6
+# Fri Sep 14 13:20:06 2007
 #
 # CONFIG_PPC64 is not set
 
@@ -146,6 +146,7 @@ CONFIG_440A=y
 # CONFIG_GENERIC_IOMAP is not set
 # CONFIG_CPU_FREQ is not set
 # CONFIG_CPM2 is not set
+# CONFIG_FSL_ULI1575 is not set
 
 #
 # Kernel options
@@ -317,7 +318,81 @@ CONFIG_FW_LOADER=y
 # CONFIG_SYS_HYPERVISOR is not set
 CONFIG_CONNECTOR=y
 CONFIG_PROC_EVENTS=y
-# CONFIG_MTD is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_BLKDEVS is not set
+# CONFIG_MTD_BLOCK is not set
+# CONFIG_MTD_BLOCK_RO is not set
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
 CONFIG_OF_DEVICE=y
 # CONFIG_PARPORT is not set
 CONFIG_BLK_DEV=y
@@ -613,6 +688,15 @@ CONFIG_RAMFS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
 CONFIG_CRAMFS=y
 # CONFIG_VXFS_FS is not set
 # CONFIG_HPFS_FS is not set
@@ -671,6 +755,7 @@ CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
 CONFIG_PLIST=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y

-- 

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

* Re: [patch 1/4] cuimage for Bamboo board
  2007-09-14 18:54 ` [patch 1/4] cuimage for Bamboo board Josh Boyer
@ 2007-09-15  2:19   ` David Gibson
  2007-09-15 14:26     ` Josh Boyer
  0 siblings, 1 reply; 19+ messages in thread
From: David Gibson @ 2007-09-15  2:19 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

On Fri, Sep 14, 2007 at 01:54:11PM -0500, Josh Boyer wrote:
> Add a cuboot wrapper for the Bamboo board.  This also removes some obsoleted
> linker declarations that have been moved into ops.h
> 
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>

Heh, well, I know I acked this already, but...

[snip]
> --- /dev/null
> +++ linux-2.6/arch/powerpc/boot/cuboot-bamboo.c
> @@ -0,0 +1,30 @@
> +/*
> + * Old U-boot compatibility for Ebony

Error in the comment here.

[snip]
> --- linux-2.6.orig/arch/powerpc/boot/bamboo.c
> +++ linux-2.6/arch/powerpc/boot/bamboo.c
> @@ -24,8 +24,7 @@
>  #include "4xx.h"
>  #include "44x.h"
>  
> -extern char _dtb_start[];
> -extern char _dtb_end[];
> +static u8 *bamboo_mac0, *bamboo_mac1;

This additional handling of the MAC addresses should really also be
mentioned in the commit comment.

>  
>  static void bamboo_fixups(void)
>  {
> @@ -34,12 +33,15 @@ static void bamboo_fixups(void)
>  	ibm440ep_fixup_clocks(sysclk, 11059200);
>  	ibm4xx_fixup_memsize();
>  	ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
> +	dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1);
>  }
>  
> -void bamboo_init(void)
> +void bamboo_init(void *mac0, void *mac1)
>  {
>  	platform_ops.fixups = bamboo_fixups;
>  	platform_ops.exit = ibm44x_dbcr_reset;
> +	bamboo_mac0 = mac0;
> +	bamboo_mac1 = mac1;
>  	ft_init(_dtb_start, 0, 32);
>  	serial_console_init();
>  }
> --- linux-2.6.orig/arch/powerpc/boot/treeboot-bamboo.c
> +++ linux-2.6/arch/powerpc/boot/treeboot-bamboo.c
> @@ -12,16 +12,32 @@
>  #include "ops.h"
>  #include "stdio.h"
>  #include "44x.h"
> -
> -extern char _end[];
> +#include "stdlib.h"
>  
>  BSS_STACK(4096);
>  
> +#define PIBS_MAC0 0xfffc0400
> +#define PIBS_MAC1 0xfffc0500
> +char pibs_mac0[6];
> +char pibs_mac1[6];
> +
> +static void read_pibs_mac(void)
> +{
> +	unsigned long long mac64;
> +
> +	mac64 = strtoull((char *)PIBS_MAC0, 0, 16);
> +	memcpy(&pibs_mac0, (char *)&mac64+2, 6);
> +
> +	mac64 = strtoull((char *)PIBS_MAC1, 0, 16);
> +	memcpy(&pibs_mac1, (char *)&mac64+2, 6);
> +}
> +
>  void platform_init(void)
>  {
>  	unsigned long end_of_ram = 0x8000000;
>  	unsigned long avail_ram = end_of_ram - (unsigned long)_end;
>  
>  	simple_alloc_init(_end, avail_ram, 32, 64);
> -	bamboo_init();
> +	read_pibs_mac();
> +	bamboo_init((u8 *)&pibs_mac0, (u8 *)&pibs_mac1);
>  }
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [patch 2/4] Make partitions optional in physmap_of
  2007-09-14 18:54 ` [patch 2/4] Make partitions optional in physmap_of Josh Boyer
@ 2007-09-15  2:21   ` David Gibson
  0 siblings, 0 replies; 19+ messages in thread
From: David Gibson @ 2007-09-15  2:21 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

On Fri, Sep 14, 2007 at 01:54:12PM -0500, Josh Boyer wrote:
> The latest physmap_of driver has a small error where it will fail the probe
> with:
> 
> physmap-flash: probe of fff00000.small-flas failed with error -2
> 
> if there are no partition subnodes in the device tree and the old style binding
> is not used.  Since partition definitions are optional, the probe should still
> succeed.
> 
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-14 18:54 ` [patch 3/4] 4xx: Convert Walnut flash mappings to new binding Josh Boyer
@ 2007-09-15  2:22   ` David Gibson
  2007-09-15 14:25     ` Josh Boyer
  2007-09-15  3:23   ` Stefan Roese
  1 sibling, 1 reply; 19+ messages in thread
From: David Gibson @ 2007-09-15  2:22 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

On Fri, Sep 14, 2007 at 01:54:13PM -0500, Josh Boyer wrote:
> A new binding for flash devices was recently introduced.  This updates the
> Walnut DTS to use the new binding.
> 
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>

We should both really figure out the vendor/device ids of the JEDEC
flash chips in use here and on Ebony, and add the appropriate
properties as per the binding.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [patch 4/4] 4xx: Convert Seqouia flash mappings to new binding
  2007-09-14 18:54 ` [patch 4/4] 4xx: Convert Seqouia " Josh Boyer
@ 2007-09-15  2:23   ` David Gibson
  2007-09-15  3:32     ` Stefan Roese
  0 siblings, 1 reply; 19+ messages in thread
From: David Gibson @ 2007-09-15  2:23 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

On Fri, Sep 14, 2007 at 01:54:14PM -0500, Josh Boyer wrote:
> A new binding for flash devices was recently introduced.  This updates the
> Sequoia DTS to use the new binding and enabled MTD in the defconfig.
> 
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-14 18:54 ` [patch 3/4] 4xx: Convert Walnut flash mappings to new binding Josh Boyer
  2007-09-15  2:22   ` David Gibson
@ 2007-09-15  3:23   ` Stefan Roese
  2007-09-15 14:26     ` Josh Boyer
  1 sibling, 1 reply; 19+ messages in thread
From: Stefan Roese @ 2007-09-15  3:23 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: david

On Friday 14 September 2007, Josh Boyer wrote:
> A new binding for flash devices was recently introduced.  This updates the
> Walnut DTS to use the new binding.
>
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> ---
>  arch/powerpc/boot/dts/walnut.dts |   17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
>
> --- linux-2.6.orig/arch/powerpc/boot/dts/walnut.dts
> +++ linux-2.6/arch/powerpc/boot/dts/walnut.dts
> @@ -137,6 +137,10 @@
>  			dcr-reg = <012 2>;
>  			#address-cells = <2>;
>  			#size-cells = <1>;
> +			/* The ranges property is supplied by the bootwrapper
> +			 * and is based on the firmware's configuration of the
> +			 * EBC bridge
> +			 */
>  			clock-frequency = <0>; /* Filled in by zImage */
>
>  			sram@0,0 {
> @@ -144,13 +148,16 @@
>  			};
>
>  			flash@0,80000 {
> -				device_type = "rom";
> -				compatible = "direct-mapped";
> -				probe-type = "JEDEC";
> +				compatible = "jedec-flash";
>  				bank-width = <1>;
> -				partitions = <0 80000>;
> -				partition-names = "OpenBIOS";
>  				reg = <0 80000 80000>;
> +				#address-cells = <1>;
> +				#size-cells = <1>;
> +				partition@0 {
> +					label = "OpenBIOS";
> +					reg = <0 80000>;
> +					read-only;
> +				};

There are not only Bamboo board running PIBS, but running U-Boot too. How 
should we handle this different FLASH partitioning? Same goes for Ebony too 
btw.

Best regards,
Stefan

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

* Re: [patch 4/4] 4xx: Convert Seqouia flash mappings to new binding
  2007-09-15  2:23   ` David Gibson
@ 2007-09-15  3:32     ` Stefan Roese
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Roese @ 2007-09-15  3:32 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: David Gibson

On Saturday 15 September 2007, David Gibson wrote:
> On Fri, Sep 14, 2007 at 01:54:14PM -0500, Josh Boyer wrote:
> > A new binding for flash devices was recently introduced.  This updates
> > the Sequoia DTS to use the new binding and enabled MTD in the defconfig.
> >
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>

Acked-by: Stefan Roese <sr@denx.de>

Best regards,
Stefan

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-15  2:22   ` David Gibson
@ 2007-09-15 14:25     ` Josh Boyer
  0 siblings, 0 replies; 19+ messages in thread
From: Josh Boyer @ 2007-09-15 14:25 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

On Sat, 2007-09-15 at 12:22 +1000, David Gibson wrote:
> On Fri, Sep 14, 2007 at 01:54:13PM -0500, Josh Boyer wrote:
> > A new binding for flash devices was recently introduced.  This updates the
> > Walnut DTS to use the new binding.
> > 
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>
> 
> We should both really figure out the vendor/device ids of the JEDEC
> flash chips in use here and on Ebony, and add the appropriate
> properties as per the binding.

Yeah, I'll do that soon.

josh

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-15  3:23   ` Stefan Roese
@ 2007-09-15 14:26     ` Josh Boyer
  2007-09-15 15:09       ` Wolfgang Denk
  0 siblings, 1 reply; 19+ messages in thread
From: Josh Boyer @ 2007-09-15 14:26 UTC (permalink / raw)
  To: Stefan Roese; +Cc: linuxppc-dev, david

On Sat, 2007-09-15 at 05:23 +0200, Stefan Roese wrote:
> On Friday 14 September 2007, Josh Boyer wrote:
> > A new binding for flash devices was recently introduced.  This updates the
> > Walnut DTS to use the new binding.
> >
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> > ---
> >  arch/powerpc/boot/dts/walnut.dts |   17 ++++++++++++-----
> >  1 file changed, 12 insertions(+), 5 deletions(-)
> >
> > --- linux-2.6.orig/arch/powerpc/boot/dts/walnut.dts
> > +++ linux-2.6/arch/powerpc/boot/dts/walnut.dts
> > @@ -137,6 +137,10 @@
> >  			dcr-reg = <012 2>;
> >  			#address-cells = <2>;
> >  			#size-cells = <1>;
> > +			/* The ranges property is supplied by the bootwrapper
> > +			 * and is based on the firmware's configuration of the
> > +			 * EBC bridge
> > +			 */
> >  			clock-frequency = <0>; /* Filled in by zImage */
> >
> >  			sram@0,0 {
> > @@ -144,13 +148,16 @@
> >  			};
> >
> >  			flash@0,80000 {
> > -				device_type = "rom";
> > -				compatible = "direct-mapped";
> > -				probe-type = "JEDEC";
> > +				compatible = "jedec-flash";
> >  				bank-width = <1>;
> > -				partitions = <0 80000>;
> > -				partition-names = "OpenBIOS";
> >  				reg = <0 80000 80000>;
> > +				#address-cells = <1>;
> > +				#size-cells = <1>;
> > +				partition@0 {
> > +					label = "OpenBIOS";
> > +					reg = <0 80000>;
> > +					read-only;
> > +				};
> 
> There are not only Bamboo board running PIBS, but running U-Boot too. How 
> should we handle this different FLASH partitioning? Same goes for Ebony too 
> btw.

That's a good question.  I'm working on making the NOR flash show up for
Bamboo right now, and I had intended to just leave the partition
subnodes missing.

josh

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

* Re: [patch 1/4] cuimage for Bamboo board
  2007-09-15  2:19   ` David Gibson
@ 2007-09-15 14:26     ` Josh Boyer
  0 siblings, 0 replies; 19+ messages in thread
From: Josh Boyer @ 2007-09-15 14:26 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev

On Sat, 2007-09-15 at 12:19 +1000, David Gibson wrote:
> On Fri, Sep 14, 2007 at 01:54:11PM -0500, Josh Boyer wrote:
> > Add a cuboot wrapper for the Bamboo board.  This also removes some obsoleted
> > linker declarations that have been moved into ops.h
> > 
> > Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> > Acked-by: David Gibson <david@gibson.dropbear.id.au>
> 
> Heh, well, I know I acked this already, but...

:)

> 
> [snip]
> > --- /dev/null
> > +++ linux-2.6/arch/powerpc/boot/cuboot-bamboo.c
> > @@ -0,0 +1,30 @@
> > +/*
> > + * Old U-boot compatibility for Ebony
> 
> Error in the comment here.

Fixed.

> 
> [snip]
> > --- linux-2.6.orig/arch/powerpc/boot/bamboo.c
> > +++ linux-2.6/arch/powerpc/boot/bamboo.c
> > @@ -24,8 +24,7 @@
> >  #include "4xx.h"
> >  #include "44x.h"
> >  
> > -extern char _dtb_start[];
> > -extern char _dtb_end[];
> > +static u8 *bamboo_mac0, *bamboo_mac1;
> 
> This additional handling of the MAC addresses should really also be
> mentioned in the commit comment.

Quite right.  I'll revise the commit comment.

josh

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-15 14:26     ` Josh Boyer
@ 2007-09-15 15:09       ` Wolfgang Denk
  2007-09-15 17:35         ` Josh Boyer
  2007-09-17  2:02         ` David Gibson
  0 siblings, 2 replies; 19+ messages in thread
From: Wolfgang Denk @ 2007-09-15 15:09 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, Stefan Roese, david

In message <1189866379.17593.2.camel@localhost.localdomain> Josh Boyer wrote:
> On Sat, 2007-09-15 at 05:23 +0200, Stefan Roese wrote:
...
> > There are not only Bamboo board running PIBS, but running U-Boot too. How 
> > should we handle this different FLASH partitioning? Same goes for Ebony too 
> > btw.
> 
> That's a good question.  I'm working on making the NOR flash show up for
> Bamboo right now, and I had intended to just leave the partition
> subnodes missing.

Maybe we can have  U-Boot  add  the  partition  information  if  it's
missing in the device tree, and extend the mtdparts command in U-Boot
to add / adjust settings so they match what is defined in U-Boot.

Stefan, what do you think?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Without facts, the decision cannot be made logically. You  must  rely
on your human intuition.
	-- Spock, "Assignment: Earth", stardate unknown

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-15 15:09       ` Wolfgang Denk
@ 2007-09-15 17:35         ` Josh Boyer
  2007-09-15 19:20           ` Segher Boessenkool
  2007-09-17  2:02         ` David Gibson
  1 sibling, 1 reply; 19+ messages in thread
From: Josh Boyer @ 2007-09-15 17:35 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, Stefan Roese, david

On Sat, 2007-09-15 at 17:09 +0200, Wolfgang Denk wrote:
> In message <1189866379.17593.2.camel@localhost.localdomain> Josh Boyer wrote:
> > On Sat, 2007-09-15 at 05:23 +0200, Stefan Roese wrote:
> ...
> > > There are not only Bamboo board running PIBS, but running U-Boot too. How 
> > > should we handle this different FLASH partitioning? Same goes for Ebony too 
> > > btw.
> > 
> > That's a good question.  I'm working on making the NOR flash show up for
> > Bamboo right now, and I had intended to just leave the partition
> > subnodes missing.
> 
> Maybe we can have  U-Boot  add  the  partition  information  if  it's
> missing in the device tree, and extend the mtdparts command in U-Boot
> to add / adjust settings so they match what is defined in U-Boot.

That would be great for newer U-Boots.  For existing older ones, it
doesn't really solve the problem.  But then again, there's no way to
possibly define all the partitioning schemes people may have adopted to
their needs on their boards.  And I believe that is why David has
RedBoot and command line partitioning override what is in the DTS today.

josh

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-15 17:35         ` Josh Boyer
@ 2007-09-15 19:20           ` Segher Boessenkool
  2007-09-17  2:03             ` David Gibson
  0 siblings, 1 reply; 19+ messages in thread
From: Segher Boessenkool @ 2007-09-15 19:20 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev, Stefan Roese, david

>> Maybe we can have  U-Boot  add  the  partition  information  if  it's
>> missing in the device tree, and extend the mtdparts command in U-Boot
>> to add / adjust settings so they match what is defined in U-Boot.
>
> That would be great for newer U-Boots.  For existing older ones, it
> doesn't really solve the problem.  But then again, there's no way to
> possibly define all the partitioning schemes people may have adopted to
> their needs on their boards.  And I believe that is why David has
> RedBoot and command line partitioning override what is in the DTS 
> today.

Yeah, partitioning information really doesn't belong in the device
tree -- with the possible exception of the partitions that the
firmware (uboot in this case) needs to know about anyway.

You *can* put all partitioning info in the device tree, but that
doesn't mean you *should* :-)


Segher

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-15 15:09       ` Wolfgang Denk
  2007-09-15 17:35         ` Josh Boyer
@ 2007-09-17  2:02         ` David Gibson
  1 sibling, 0 replies; 19+ messages in thread
From: David Gibson @ 2007-09-17  2:02 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-dev, Stefan Roese

On Sat, Sep 15, 2007 at 05:09:01PM +0200, Wolfgang Denk wrote:
> In message <1189866379.17593.2.camel@localhost.localdomain> Josh Boyer wrote:
> > On Sat, 2007-09-15 at 05:23 +0200, Stefan Roese wrote:
> ...
> > > There are not only Bamboo board running PIBS, but running U-Boot too. How 
> > > should we handle this different FLASH partitioning? Same goes for Ebony too 
> > > btw.
> > 
> > That's a good question.  I'm working on making the NOR flash show up for
> > Bamboo right now, and I had intended to just leave the partition
> > subnodes missing.
> 
> Maybe we can have  U-Boot  add  the  partition  information  if  it's
> missing in the device tree, and extend the mtdparts command in U-Boot
> to add / adjust settings so they match what is defined in U-Boot.
> 
> Stefan, what do you think?

If U-Boot is supplying a device tree, it should certainly make the
partition information match its own idea of the partitions.

For older non-device-tree away u-boot, I guess we'll have to make the
cuboot and treeboot wrappers mangle the device tree differently to
correct the partition information.

I suspect the easiest way to do this will be for the dts to contain
both treeboot and u-boot partition info, and have the wrapper delete
or nop the nodes for the other firmware.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

* Re: [patch 3/4] 4xx: Convert Walnut flash mappings to new binding
  2007-09-15 19:20           ` Segher Boessenkool
@ 2007-09-17  2:03             ` David Gibson
  0 siblings, 0 replies; 19+ messages in thread
From: David Gibson @ 2007-09-17  2:03 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: linuxppc-dev, Stefan Roese

On Sat, Sep 15, 2007 at 09:20:10PM +0200, Segher Boessenkool wrote:
> >> Maybe we can have  U-Boot  add  the  partition  information  if  it's
> >> missing in the device tree, and extend the mtdparts command in U-Boot
> >> to add / adjust settings so they match what is defined in U-Boot.
> >
> > That would be great for newer U-Boots.  For existing older ones, it
> > doesn't really solve the problem.  But then again, there's no way to
> > possibly define all the partitioning schemes people may have adopted to
> > their needs on their boards.  And I believe that is why David has
> > RedBoot and command line partitioning override what is in the DTS 
> > today.
> 
> Yeah, partitioning information really doesn't belong in the device
> tree -- with the possible exception of the partitions that the
> firmware (uboot in this case) needs to know about anyway.

Indeed - but we had just the same problem, only worse, with the old
approach of hardcoded, configured-in flash maps.

> You *can* put all partitioning info in the device tree, but that
> doesn't mean you *should* :-)

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

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

end of thread, other threads:[~2007-09-17  2:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-14 18:54 [patch 0/4] Small 4xx updates for 2.6.24 Josh Boyer
2007-09-14 18:54 ` [patch 1/4] cuimage for Bamboo board Josh Boyer
2007-09-15  2:19   ` David Gibson
2007-09-15 14:26     ` Josh Boyer
2007-09-14 18:54 ` [patch 2/4] Make partitions optional in physmap_of Josh Boyer
2007-09-15  2:21   ` David Gibson
2007-09-14 18:54 ` [patch 3/4] 4xx: Convert Walnut flash mappings to new binding Josh Boyer
2007-09-15  2:22   ` David Gibson
2007-09-15 14:25     ` Josh Boyer
2007-09-15  3:23   ` Stefan Roese
2007-09-15 14:26     ` Josh Boyer
2007-09-15 15:09       ` Wolfgang Denk
2007-09-15 17:35         ` Josh Boyer
2007-09-15 19:20           ` Segher Boessenkool
2007-09-17  2:03             ` David Gibson
2007-09-17  2:02         ` David Gibson
2007-09-14 18:54 ` [patch 4/4] 4xx: Convert Seqouia " Josh Boyer
2007-09-15  2:23   ` David Gibson
2007-09-15  3:32     ` Stefan Roese

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