mpc8313erdb: Fix whitespace.
PATCH 1/4 mpc8313erdb: Fix whitespace.
--- arch/powerpc/platforms/83xx/mpc8313_rdb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/83xx/mpc8313_rdb.c +2 -2
@@ -70,9 +70,9 @@ void __init mpc8313_rdb_init_IRQ(void)*/ static int __init mpc8313_rdb_probe (void ) { -unsigned long root =of_get_flat_dt_root (); +unsigned long root =of_get_flat_dt_root (); -return of_flat_dt_is_compatible (root,"MPC8313ERDB" ); +return of_flat_dt_is_compatible (root,"MPC8313ERDB" ); }define_machine (mpc8313_rdb) {
Signature · 1 line
1.5.3.7
PATCH 2/4 mpc8313erdb: Add NAND to device tree, and call of_platform_bus_probe().
--- arch/powerpc/boot/dts/mpc8313erdb.dts | 37 +++++++++++++++++++++++++++++ arch/powerpc/platforms/83xx/mpc8313_rdb.c | 17 +++++++++++++ 2 files changed, 54 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/mpc8313erdb.dts +37 -0
@@ -37,6 +37,43 @@ reg = <00000000 08000000>; // 128MB at 0 }; + localbus { + #address-cells = <2>; + #size-cells = <1>; + compatible = "fsl,mpc8313-elbc", "fsl,elbc"; + reg = <e0005000 1000>; + interrupts = <d#77 8>; + interrupt-parent = <&ipic>; + + // CS0 and CS1 are swapped when + // booting from nand, but the + // addresses are the same. + ranges = <0 0 fe000000 00800000 + 1 0 e2800000 00008000 + 2 0 f0000000 00020000 + 3 0 fa000000 00008000>; + + nand@1,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,mpc8313-fcm-nand", "fsl,elbc-fcm-nand"; + reg = <1 0 2000>; + + u-boot@0 { + reg = <0 100000>; + read-only; + }; + + kernel@100000 { + reg = <100000 300000>; + }; + + fs@400000 { + reg = <400000 1c00000>; + }; + }; + }; + soc8313@e0000000 { #address-cells = <1>; #size-cells = <1>;
arch/powerpc/platforms/83xx/mpc8313_rdb.c +17 -0
@@ -14,6 +14,7 @@*/ #include <linux/pci.h> +#include <linux/of_platform.h> #include <asm/time.h> #include <asm/ipic.h>
@@ -75,6 +76,22 @@ static int __init mpc8313_rdb_probe(void)return of_flat_dt_is_compatible (root,"MPC8313ERDB" ); } +static struct of_device_id __initdata of_bus_ids[] = { + { .name ="soc8313" , }, + { .name ="localbus" , }, + {}, +}; + +static int __init declare_of_platform_devices (void ) +{ +if (!machine_is (mpc8313_rdb)) +return 0 ; + +of_platform_bus_probe (NULL , of_bus_ids,NULL ); +return 0 ; +} +device_initcall (declare_of_platform_devices); +define_machine (mpc8313_rdb) { .name = "MPC8313 RDB", .probe = mpc8313_rdb_probe,
Signature · 1 line
1.5.3.7
Re: [PATCH 2/4] mpc8313erdb: Add NAND to device tree, and call of_platform_bus_probe().
Quoted 14 lines · Scott Wood
Signed-off-by Scott Wood <[email protected]>arch/powerpc/platforms/83xx/mpc8313_rdb.c +1
-0@@ -14,6 +14,7 @@*/ #include <linux/pci.h> +#include <linux/of_platform.h> #include <asm/time.h> #include <asm/ipic.h>
arch/powerpc/platforms/83xx/mpc8313_rdb.c static int __init mpc8313_rdb_probe(void) · line 81
Quoted 6 lines
arch/powerpc/platforms/83xx/mpc8313_rdb.c +3
-0@@ -75,6 +76,22 @@ static int __init mpc8313_rdb_probe(void)return of_flat_dt_is_compatible (root,"MPC8313ERDB" ); } +static struct of_device_id __initdata of_bus_ids[] = { + { .name ="soc8313" , }, + { .name ="localbus" , },
Please probe based on compatible instead of name properties.
Thanks,
Olof
Re: [PATCH 2/4] mpc8313erdb: Add NAND to device tree, and call of_platform_bus_probe().
In reply to Scott WoodQuoted 11 lines · Scott Wood
Signed-off-by Scott Wood <[email protected]>--- arch/powerpc/boot/dts/mpc8313erdb.dts | 37 +++++++++++++++++++++++++++++ arch/powerpc/platforms/83xx/mpc8313_rdb.c | 17 +++++++++++++ 2 files changed, 54 insertions(+), 0 deletions(-)arch/powerpc/boot/dts/mpc8313erdb.dts +0
-0
arch/powerpc/boot/dts/mpc8313erdb.dts line 40
Quoted 4 lines
arch/powerpc/boot/dts/mpc8313erdb.dts +1
-0@@ -37,6 +37,43 @@ reg = <00000000 08000000>; // 128MB at 0 }; + localbus {
Should be "localbus@e0005000".
arch/powerpc/boot/dts/mpc8313erdb.dts line 45
Quoted 5 lines
arch/powerpc/boot/dts/mpc8313erdb.dts +5
-0+ #address-cells = <2>; + #size-cells = <1>; + compatible = "fsl,mpc8313-elbc", "fsl,elbc"; + reg = <e0005000 1000>; + interrupts = <d#77 8>;
The IPIC has interrupt numbers up to 77? Wow..
Signature · 4 lines
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
PATCH 3/4 mpc8313erdb: Add NOR flash to the device tree.
In reply to Scott Wood--- arch/powerpc/boot/dts/mpc8313erdb.dts | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
arch/powerpc/boot/dts/mpc8313erdb.dts +9 -0
@@ -53,6 +53,15 @@ 2 0 f0000000 00020000 3 0 fa000000 00008000>; + flash@0,0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0 0 800000>; + bank-width = <2>; + device-width = <1>; + }; + nand@1,0 { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
1.5.3.7
PATCH 4/4 mpc8313erdb: Update defconfig with NOR flash, NAND flash, and JFFS enabled.
In reply to Scott Wood--- arch/powerpc/configs/mpc8313_rdb_defconfig | 45 ++++++++++++++++++++------- 1 files changed, 33 insertions(+), 12 deletions(-)
arch/powerpc/configs/mpc8313_rdb_defconfig +33 -12
@@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.24-rc4 -# Thu Dec 6 16:48:31 2007 +# Wed Dec 12 17:01:53 2007 # # CONFIG_PPC64 is not set
@@ -336,15 +336,17 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set # CONFIG_MTD_CONCAT is not set -# CONFIG_MTD_PARTITIONS is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +CONFIG_MTD_OF_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_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set
@@ -381,11 +383,8 @@ CONFIG_MTD_CFI_UTIL=y # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0xfe000000 -CONFIG_MTD_PHYSMAP_LEN=0x1000000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=2 -# CONFIG_MTD_PHYSMAP_OF is not set +# CONFIG_MTD_PHYSMAP is not set +CONFIG_MTD_PHYSMAP_OF=y # CONFIG_MTD_INTEL_VR_NOR is not set # CONFIG_MTD_PLATRAM is not set
@@ -406,7 +405,17 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # 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_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_ECC_SMC is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_CAFE is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +CONFIG_MTD_NAND_FSL_ELBC=y # CONFIG_MTD_ONENAND is not set #
@@ -1178,7 +1187,17 @@ CONFIG_TMPFS=y # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set -# CONFIG_JFFS2_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# 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_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set
@@ -1242,6 +1261,8 @@ CONFIG_BITREVERSE=y 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
Signature · 1 line
1.5.3.7