Current 4xx patch queue
Subsystems (3)
cover Current 4xx patch queue
Hi All,
Below is my latest patch queue for 4xx. There are a couple Bamboo updates, and the next round of PPC 405 Walnut support.
josh
PATCH 1/6 Fix bus probe on Bamboo board
Commit 804ace8881d21 changed the behavior of how compatible nodes are found. This highlighted a bug on the Bamboo board where it wasn't probing the bus specified in the DTS file. We fix it by being explicit about which bus to probe.
--- arch/powerpc/platforms/44x/bamboo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/44x/bamboo.c +1 -1
@@ -23,7 +23,7 @@#include "44x.h" static struct of_device_id bamboo_of_bus[] = { - { .compatible ="ibm,plb" , }, + { .compatible ="ibm,plb4" , }, { .compatible ="ibm,opb" , }, { .compatible ="ibm,ebc" , }, {},
Re: [patch 1/6] Fix bus probe on Bamboo board
Quoted 6 lines · Josh Boyer
Commit
804ace8881d21changed the behavior of how compatible nodes are found. This highlighted a bug on the Bamboo board where it wasn't probing the bus specified in the DTS file. We fix it by being explicit about which bus to probe.Signed-off-by Josh Boyer <[email protected]>
Quoted 17 lines
--- arch/powerpc/platforms/44x/bamboo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/platforms/44x/bamboo.c +1
-1@@ -23,7 +23,7 @@#include "44x.h" static struct of_device_id bamboo_of_bus[] = { - { .compatible ="ibm,plb" , }, + { .compatible ="ibm,plb4" , }, { .compatible ="ibm,opb" , }, { .compatible ="ibm,ebc" , }, {},
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 2/6 cuimage for Bamboo board
In reply to Josh BoyerAdd a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into ops.h
--- arch/powerpc/boot/44x.h | 2 +- arch/powerpc/boot/Makefile | 5 +++-- arch/powerpc/boot/bamboo.c | 9 ++++++--- arch/powerpc/boot/cuboot-bamboo.c | 30 ++++++++++++++++++++++++++++++ arch/powerpc/boot/treeboot-bamboo.c | 4 +--- 5 files changed, 41 insertions(+), 9 deletions(-)
arch/powerpc/boot/Makefile +3 -2
@@ -48,7 +48,8 @@ src-wlib := string.S crt0.S stdio.c main cpm-serial.c 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 + ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ + cuboot-pq2.c cuboot-bamboo.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -145,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 endif # For 32-bit powermacs, build the COFF and miboot images
arch/powerpc/boot/cuboot-bamboo.c new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Old U-boot compatibility for Ebony +* +* Author: Josh Boyer <[email protected]> +* +* 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); +}
arch/powerpc/boot/44x.h +1 -1
@@ -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_ */
arch/powerpc/boot/bamboo.c +6 -3
@@ -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,16 @@ static void bamboo_fixups(void)ibm440ep_fixup_clocks (sysclk,11059200 );ibm4xx_fixup_memsize ();ibm4xx_quiesce_eth ((u32 *)0xef600e00 , (u32 *)0xef600f00 ); +if (bamboo_mac0 && bamboo_mac1) +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 (); }
arch/powerpc/boot/treeboot-bamboo.c +1 -3
@@ -13,8 +13,6 @@#include "stdio.h" #include "44x.h" -extern char _end[]; -BSS_STACK (4096 );void platform_init (void )
@@ -23,5 +21,5 @@ void platform_init(void)unsigned long avail_ram = end_of_ram - (unsigned long )_end;simple_alloc_init (_end, avail_ram,32 ,64 ); -bamboo_init (); +bamboo_init (NULL ,NULL ); }
Re: [patch 2/6] cuimage for Bamboo board
Quoted 4 lines · Josh Boyer
Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into
ops.hSigned-off-by Josh Boyer <[email protected]>
[snip]
Quoted 13 lines
arch/powerpc/boot/bamboo.c +1
-2@@ -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 ) {
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 37
Quoted 5 lines
arch/powerpc/boot/bamboo.c +2
-0@@ -34,12 +33,16 @@ static void bamboo_fixups(void)ibm440ep_fixup_clocks (sysclk,11059200 );ibm4xx_fixup_memsize ();ibm4xx_quiesce_eth ((u32 *)0xef600e00 , (u32 *)0xef600f00 ); +if (bamboo_mac0 && bamboo_mac1) +dt_fixup_mac_addresses (bamboo_mac0, bamboo_mac1);
Bit ugly that you only set the MAC address for any ethernet if they're supplied for every ethernet.
Quoted 24 lines
arch/powerpc/boot/bamboo.c +3
-1} -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 (); }arch/powerpc/boot/treeboot-bamboo.c +0
-2@@ -13,8 +13,6 @@#include "stdio.h" #include "44x.h" -extern char _end[]; -BSS_STACK (4096 );void platform_init (void )
arch/powerpc/boot/treeboot-bamboo.c void platform_init(void) · line 24
Quoted 5 lines
arch/powerpc/boot/treeboot-bamboo.c +1
-1@@ -23,5 +21,5 @@ void platform_init(void)unsigned long avail_ram = end_of_ram - (unsigned long )_end;simple_alloc_init (_end, avail_ram,32 ,64 ); -bamboo_init (); +bamboo_init (NULL ,NULL );
There must surely be a way to get the MAC addresses out of OpenBIOS...
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
Re: [patch 2/6] cuimage for Bamboo board
Quoted 17 lines · David Gibson
Quoted 4 lines · Josh Boyer
Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into
ops.hSigned-off-by Josh Boyer <[email protected]>[snip]
Quoted 10 lines
arch/powerpc/boot/bamboo.c +1
-2@@ -24,8 +24,7 @@#include "4xx.h" #include "44x.h" -extern char _dtb_start[]; -extern char _dtb_end[]; +static u8 *bamboo_mac0, *bamboo_mac1;
Quoted 11 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 37
Quoted 8 lines
arch/powerpc/boot/bamboo.c +2
-0static void bamboo_fixups (void ) {@@ -34,12 +33,16 @@ static void bamboo_fixups(void)ibm440ep_fixup_clocks (sysclk,11059200 );ibm4xx_fixup_memsize ();ibm4xx_quiesce_eth ((u32 *)0xef600e00 , (u32 *)0xef600f00 ); +if (bamboo_mac0 && bamboo_mac1) +dt_fixup_mac_addresses (bamboo_mac0, bamboo_mac1);Bit ugly that you only set the MAC address for any ethernet if they're supplied for every ethernet.
Good point. Will fix.
Quoted 5 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 39
Quoted 3 lines
arch/powerpc/boot/bamboo.c +1
-1simple_alloc_init (_end, avail_ram,32 ,64 ); -bamboo_init (); +bamboo_init (NULL ,NULL );There must surely be a way to get the MAC addresses out of OpenBIOS...
Probably. I just need to find out where they are stored.
josh
Re: [patch 2/6] cuimage for Bamboo board
Quoted 32 lines · Josh Boyer
Quoted 17 lines · David Gibson
Quoted 4 lines · Josh Boyer
Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into
ops.hSigned-off-by Josh Boyer <[email protected]>[snip]
Quoted 10 lines
arch/powerpc/boot/bamboo.c +1
-2@@ -24,8 +24,7 @@#include "4xx.h" #include "44x.h" -extern char _dtb_start[]; -extern char _dtb_end[]; +static u8 *bamboo_mac0, *bamboo_mac1;Quoted 11 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 37
Quoted 8 lines
arch/powerpc/boot/bamboo.c +2
-0static void bamboo_fixups (void ) {@@ -34,12 +33,16 @@ static void bamboo_fixups(void)ibm440ep_fixup_clocks (sysclk,11059200 );ibm4xx_fixup_memsize ();ibm4xx_quiesce_eth ((u32 *)0xef600e00 , (u32 *)0xef600f00 ); +if (bamboo_mac0 && bamboo_mac1) +dt_fixup_mac_addresses (bamboo_mac0, bamboo_mac1);Bit ugly that you only set the MAC address for any ethernet if they're supplied for every ethernet.
Good point. Will fix.
Quoted 7 lines
Quoted 5 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 39
Quoted 3 lines
arch/powerpc/boot/bamboo.c +1
-1simple_alloc_init (_end, avail_ram,32 ,64 ); -bamboo_init (); +bamboo_init (NULL ,NULL );There must surely be a way to get the MAC addresses out of OpenBIOS...
Probably. I just need to find out where they are stored.
It's not buried somewhere in the arch/ppc/boot code?
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
Re: [patch 2/6] cuimage for Bamboo board
Quoted 39 lines · David Gibson
Quoted 38 lines · Josh Boyer
Quoted 17 lines · David Gibson
Quoted 4 lines · Josh Boyer
Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into
ops.hSigned-off-by Josh Boyer <[email protected]>[snip]
Quoted 10 lines
arch/powerpc/boot/bamboo.c +1
-2@@ -24,8 +24,7 @@#include "4xx.h" #include "44x.h" -extern char _dtb_start[]; -extern char _dtb_end[]; +static u8 *bamboo_mac0, *bamboo_mac1;Quoted 11 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 37
Quoted 8 lines
arch/powerpc/boot/bamboo.c +2
-0static void bamboo_fixups (void ) {@@ -34,12 +33,16 @@ static void bamboo_fixups(void)ibm440ep_fixup_clocks (sysclk,11059200 );ibm4xx_fixup_memsize ();ibm4xx_quiesce_eth ((u32 *)0xef600e00 , (u32 *)0xef600f00 ); +if (bamboo_mac0 && bamboo_mac1) +dt_fixup_mac_addresses (bamboo_mac0, bamboo_mac1);Bit ugly that you only set the MAC address for any ethernet if they're supplied for every ethernet.
Good point. Will fix.
Quoted 5 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 39
Quoted 3 lines
arch/powerpc/boot/bamboo.c +1
-1simple_alloc_init (_end, avail_ram,32 ,64 ); -bamboo_init (); +bamboo_init (NULL ,NULL );There must surely be a way to get the MAC addresses out of OpenBIOS...
Quoted 3 lines
Quoted 1 line
Probably. I just need to find out where they are stored.
It's not buried somewhere in the
arch/ppc/bootcode?
It's not OpenBIOS, it's PIBS. And the arch/ppc port uses __res, which I'd rather avoid. But I did find where it's stored in flash, so I can read it from there. I just need to do a little more work to get it in a manner that can be used.
josh
Re: [patch 2/6] cuimage for Bamboo board
Quoted 40 lines · Josh Boyer
Quoted 39 lines · David Gibson
Quoted 38 lines · Josh Boyer
Quoted 17 lines · David Gibson
Quoted 4 lines · Josh Boyer
Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into
ops.hSigned-off-by Josh Boyer <[email protected]>[snip]
Quoted 10 lines
arch/powerpc/boot/bamboo.c +1
-2@@ -24,8 +24,7 @@#include "4xx.h" #include "44x.h" -extern char _dtb_start[]; -extern char _dtb_end[]; +static u8 *bamboo_mac0, *bamboo_mac1;Quoted 11 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 37
Quoted 8 lines
arch/powerpc/boot/bamboo.c +2
-0static void bamboo_fixups (void ) {@@ -34,12 +33,16 @@ static void bamboo_fixups(void)ibm440ep_fixup_clocks (sysclk,11059200 );ibm4xx_fixup_memsize ();ibm4xx_quiesce_eth ((u32 *)0xef600e00 , (u32 *)0xef600f00 ); +if (bamboo_mac0 && bamboo_mac1) +dt_fixup_mac_addresses (bamboo_mac0, bamboo_mac1);Bit ugly that you only set the MAC address for any ethernet if they're supplied for every ethernet.
Good point. Will fix.
Quoted 5 lines
arch/powerpc/boot/bamboo.c static void bamboo_fixups(void) · line 39
Quoted 3 lines
arch/powerpc/boot/bamboo.c +1
-1simple_alloc_init (_end, avail_ram,32 ,64 ); -bamboo_init (); +bamboo_init (NULL ,NULL );There must surely be a way to get the MAC addresses out of OpenBIOS...
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Probably. I just need to find out where they are stored.
It's not buried somewhere in the
arch/ppc/bootcode?It's not OpenBIOS, it's PIBS. And the
arch/ppcport uses__res, which I'd rather avoid. But I did find where it's stored in flash, so I can read it from there. I just need to do a little more work to get it in a manner that can be used.
Hrm.. is that address actually guaranteed to be stable across PIBS versions? If arch/ppc uses __res, I think we should do that too. It shouldn't be any worse than what we already do fot cuboot.
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
Re: [patch 2/6] cuimage for Bamboo board
Quoted 6 lines · David Gibson
Quoted 6 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
There must surely be a way to get the MAC addresses out of OpenBIOS...
Probably. I just need to find out where they are stored.
It's not buried somewhere in the
arch/ppc/bootcode?
Quoted 8 lines
Quoted 4 lines
It's not OpenBIOS, it's PIBS. And the
arch/ppcport uses__res, which I'd rather avoid. But I did find where it's stored in flash, so I can read it from there. I just need to do a little more work to get it in a manner that can be used.Hrm.. is that address actually guaranteed to be stable across PIBS versions? If
arch/ppcuses__res, I think we should do that too. It shouldn't be any worse than what we already do fot cuboot.
The address should be stable for all versions of PIBS that come on the Bamboo boards, yes. And after looking at it a bit more, the wrapper in arch/ppc for PIBS essentially mocks up __res by reading the values out of flash. So the way I'm doing it is the way it was already done.
josh
PATCH 2/6 cuimage for Bamboo board
Updated patch below. NOTE: This relies on Scott Wood's strtoull patch as PIBS stores the MAC addresses as ASCII strings in flash.
Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into ops.h
--- arch/powerpc/boot/44x.h | 2 +- arch/powerpc/boot/Makefile | 5 +++-- arch/powerpc/boot/bamboo.c | 8 +++++--- arch/powerpc/boot/cuboot-bamboo.c | 30 ++++++++++++++++++++++++++++++ arch/powerpc/boot/treeboot-bamboo.c | 22 +++++++++++++++++++--- 5 files changed, 58 insertions(+), 9 deletions(-)
arch/powerpc/boot/Makefile +3 -2
@@ -48,7 +48,8 @@ src-wlib := string.S crt0.S stdio.c main cpm-serial.c stdlib.c 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 + ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ + cuboot-pq2.c cuboot-bamboo.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -145,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 endif # For 32-bit powermacs, build the COFF and miboot images
arch/powerpc/boot/cuboot-bamboo.c new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Old U-boot compatibility for Ebony +* +* Author: Josh Boyer <[email protected]> +* +* 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); +}
arch/powerpc/boot/44x.h +1 -1
@@ -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_ */
arch/powerpc/boot/bamboo.c +5 -3
@@ -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 (); }
arch/powerpc/boot/treeboot-bamboo.c +19 -3
@@ -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); }
Re: [patch 2/6] cuimage for Bamboo board
Quoted 8 lines · Josh Boyer
Updated patch below. NOTE: This relies on Scott Wood's strtoull patch as PIBS stores the MAC addresses as ASCII strings in flash.
Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted linker declarations that have been moved into
ops.hSigned-off-by Josh Boyer <[email protected]>
Except..
[snip]
arch/powerpc/boot/treeboot-bamboo.c
Quoted 2 lines
arch/powerpc/boot/treeboot-bamboo.c +0
-0
It's not the fault of this patch, but since bamboo actually boots from PIBS, not OpenBIOS, it probably shouldn't be lumped in with the treeboot stuff. PIBS should be able to load ELF images directly, rather than using the silly treeboot header, for one thing.
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
Re: [patch 2/6] cuimage for Bamboo board
In reply to Josh BoyerQuoted 12 lines · Josh Boyer
Quoted 11 lines · David Gibson
Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
There must surely be a way to get the MAC addresses out of OpenBIOS...
Probably. I just need to find out where they are stored.
It's not buried somewhere in the
arch/ppc/bootcode?It's not OpenBIOS, it's PIBS. And the
arch/ppcport uses__res, which I'd rather avoid. But I did find where it's stored in flash, so I can read it from there. I just need to do a little more work to get it in a manner that can be used.
Quoted 8 lines
Quoted 3 lines
Hrm.. is that address actually guaranteed to be stable across PIBS versions? If
arch/ppcuses__res, I think we should do that too. It shouldn't be any worse than what we already do fot cuboot.The address should be stable for all versions of PIBS that come on the Bamboo boards, yes. And after looking at it a bit more, the wrapper in
arch/ppcfor PIBS essentially mocks up__resby reading the values out of flash. So the way I'm doing it is the way it was already done.
Ah, ok. Fine then.
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/6 Walnut DTS
In reply to Josh BoyerDevice tree source file for the PPC405 Walnut evaluation board.
--- arch/powerpc/boot/dts/walnut.dts | 183 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+)
arch/powerpc/boot/dts/walnut.dts new file +183 -0
@@ -0,0 +1,183 @@ +/* + * Device Tree Source for IBM Walnut + * + * Copyright 2007 IBM Corp. + * Josh Boyer <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,walnut"; + compatible = "ibm,walnut"; + dcr-parent = <&/cpus/PowerPC,405GP@0>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,405GP@0 { + device_type = "cpu"; + reg = <0>; + clock-frequency = <bebc200>; /* Filled in by zImage */ + timebase-frequency = <0>; /* Filled in by zImage */ + i-cache-line-size = <20>; + d-cache-line-size = <20>; + i-cache-size = <4000>; + d-cache-size = <4000>; + dcr-controller; + dcr-access-method = "native"; + }; + }; + + memory { + device_type = "memory"; + reg = <0 0>; /* Filled in by zImage */ + }; + + UIC0: interrupt-controller { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <0>; + dcr-reg = <0c0 9>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + }; + + plb { + compatible = "ibm,plb3"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clock-frequency = <0>; /* Filled in by zImage */ + + SDRAM0: memory-controller { + compatible = "ibm,sdram-405gp"; + dcr-reg = <010 2>; + }; + + MAL: mcmal { + compatible = "ibm,mcmal-405gp", "ibm,mcmal"; + dcr-reg = <180 62>; + num-tx-chans = <2>; + num-rx-chans = <1>; + interrupt-parent = <&UIC0>; + interrupts = <a 4 b 4 c 4 d 4 e 4>; + }; + + POB0: opb { + compatible = "ibm,opb"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 ef600000 a00000>; + dcr-reg = <0a0 5>; + clock-frequency = <0>; /* Filled in by zImage */ + + UART0: serial@300 { + device_type = "serial"; + compatible = "ns16550"; + reg = <300 8>; + virtual-reg = <ef600300>; + clock-frequency = <0>; /* Filled in by zImage */ + current-speed = <2580>; + interrupt-parent = <&UIC0>; + interrupts = <0 4>; + }; + + UART1: serial@400 { + device_type = "serial"; + compatible = "ns16550"; + reg = <400 8>; + virtual-reg = <ef600400>; + clock-frequency = <0>; /* Filled in by zImage */ + current-speed = <2580>; + interrupt-parent = <&UIC0>; + interrupts = <1 4>; + }; + + IIC: i2c@500 { + compatible = "ibm,iic-405gp", "ibm,iic"; + reg = <500 11>; + interrupt-parent = <&UIC0>; + interrupts = <2 4>; + }; + + GPIO: gpio@700 { + compatible = "ibm,gpio-405gp"; + reg = <700 20>; + }; + + EMAC: ethernet@800 { + linux,network-index = <0>; + device_type = "network"; + compatible = "ibm,emac-405gp", "ibm,emac"; + interrupt-parent = <&UIC0>; + interrupts = <9 4 f 4>; + reg = <800 70>; + mal-device = <&MAL>; + mal-tx-channel = <0 1>; + mal-rx-channel = <0>; + cell-index = <0>; + max-frame-size = <5dc>; + rx-fifo-size = <1000>; + tx-fifo-size = <800>; + phy-mode = "rmii"; + phy-map = <00000001>; + }; + + }; + + EBC0: ebc { + compatible = "ibm,ebc-405gp", "ibm,ebc"; + dcr-reg = <012 2>; + #address-cells = <2>; + #size-cells = <1>; + clock-frequency = <0>; /* Filled in by zImage */ + + sram@0,0 { + reg = <0 0 80000>; + }; + + flash@0,80000 { + device_type = "rom"; + compatible = "direct-mapped"; + probe-type = "JEDEC"; + bank-width = <1>; + partitions = <0 80000>; + partition-names = "OpenBIOS"; + reg = <0 80000 80000>; + }; + + ds1743@1,0 { + /* NVRAM and RTC */ + compatible = "ds1743"; + reg = <1 0 2000>; + }; + + keyboard@2,0 { + compatible = "intel,82C42PC"; + reg = <2 0 2>; + }; + + ir@3,0 { + compatible = "ti,TIR2000PAG"; + reg = <3 0 10>; + }; + + fpga@7,0 { + compatible = "Walnut-FPGA"; + reg = <7 0 10>; + virtual-reg = <f0300005>; + }; + }; + }; + + chosen { + linux,stdout-path = "/plb/opb/serial@300"; + }; +};
Re: [patch 3/6] Walnut DTS
Quoted 75 lines · Josh Boyer
Device tree source file for the PPC405 Walnut evaluation board.
Signed-off-by Josh Boyer <[email protected]>--- arch/powerpc/boot/dts/walnut.dts | 183 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+)arch/powerpc/boot/dts/walnut.dts new file +64
-0@@ -0,0 +1,183 @@ +/* + * Device Tree Source for IBM Walnut + * + * Copyright 2007 IBM Corp. + * Josh Boyer <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,walnut"; + compatible = "ibm,walnut"; + dcr-parent = <&/cpus/PowerPC,405GP@0>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,405GP@0 { + device_type = "cpu"; + reg = <0>; + clock-frequency = <bebc200>; /* Filled in by zImage */ + timebase-frequency = <0>; /* Filled in by zImage */ + i-cache-line-size = <20>; + d-cache-line-size = <20>; + i-cache-size = <4000>; + d-cache-size = <4000>; + dcr-controller; + dcr-access-method = "native"; + }; + }; + + memory { + device_type = "memory"; + reg = <0 0>; /* Filled in by zImage */ + }; + + UIC0: interrupt-controller { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <0>; + dcr-reg = <0c0 9>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + }; + + plb { + compatible = "ibm,plb3"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clock-frequency = <0>; /* Filled in by zImage */ + + SDRAM0: memory-controller { + compatible = "ibm,sdram-405gp"; + dcr-reg = <010 2>; + }; + + MAL: mcmal {
arch/powerpc/boot/dts/walnut.dts line 74
Quoted 10 lines
arch/powerpc/boot/dts/walnut.dts new file +10
-0+ compatible = "ibm,mcmal-405gp", "ibm,mcmal"; + dcr-reg = <180 62>; + num-tx-chans = <2>; + num-rx-chans = <1>; + interrupt-parent = <&UIC0>; + interrupts = <a 4 b 4 c 4 d 4 e 4>; + }; + + POB0: opb { + compatible = "ibm,opb";
Need an opb-405gp here, too.
arch/powerpc/boot/dts/walnut.dts line 77
Quoted 3 lines
arch/powerpc/boot/dts/walnut.dts new file +3
-0+ #address-cells = <1>; + #size-cells = <1>; + ranges = <0 ef600000 a00000>;
Hrm... something we ought to clarify is the interpretation of the POB0_BEAR register with respect to the bridge's ranges property. For 440 I think the BEAR will need to be interpreted as an OPB address, rather than a PLB address, but I'm not sure if that will work here with the limited ranges property you have.
Quoted 107 lines
arch/powerpc/boot/dts/walnut.dts new file +106
-0+ dcr-reg = <0a0 5>; + clock-frequency = <0>; /* Filled in by zImage */ + + UART0: serial@300 { + device_type = "serial"; + compatible = "ns16550"; + reg = <300 8>; + virtual-reg = <ef600300>; + clock-frequency = <0>; /* Filled in by zImage */ + current-speed = <2580>; + interrupt-parent = <&UIC0>; + interrupts = <0 4>; + }; + + UART1: serial@400 { + device_type = "serial"; + compatible = "ns16550"; + reg = <400 8>; + virtual-reg = <ef600400>; + clock-frequency = <0>; /* Filled in by zImage */ + current-speed = <2580>; + interrupt-parent = <&UIC0>; + interrupts = <1 4>; + }; + + IIC: i2c@500 { + compatible = "ibm,iic-405gp", "ibm,iic"; + reg = <500 11>; + interrupt-parent = <&UIC0>; + interrupts = <2 4>; + }; + + GPIO: gpio@700 { + compatible = "ibm,gpio-405gp"; + reg = <700 20>; + }; + + EMAC: ethernet@800 { + linux,network-index = <0>; + device_type = "network"; + compatible = "ibm,emac-405gp", "ibm,emac"; + interrupt-parent = <&UIC0>; + interrupts = <9 4 f 4>; + reg = <800 70>; + mal-device = <&MAL>; + mal-tx-channel = <0 1>; + mal-rx-channel = <0>; + cell-index = <0>; + max-frame-size = <5dc>; + rx-fifo-size = <1000>; + tx-fifo-size = <800>; + phy-mode = "rmii"; + phy-map = <00000001>; + }; + + }; + + EBC0: ebc { + compatible = "ibm,ebc-405gp", "ibm,ebc"; + dcr-reg = <012 2>; + #address-cells = <2>; + #size-cells = <1>; + clock-frequency = <0>; /* Filled in by zImage */ + + sram@0,0 { + reg = <0 0 80000>; + }; + + flash@0,80000 { + device_type = "rom"; + compatible = "direct-mapped"; + probe-type = "JEDEC"; + bank-width = <1>; + partitions = <0 80000>; + partition-names = "OpenBIOS"; + reg = <0 80000 80000>; + }; + + ds1743@1,0 { + /* NVRAM and RTC */ + compatible = "ds1743"; + reg = <1 0 2000>; + }; + + keyboard@2,0 { + compatible = "intel,82C42PC"; + reg = <2 0 2>; + }; + + ir@3,0 { + compatible = "ti,TIR2000PAG"; + reg = <3 0 10>; + }; + + fpga@7,0 { + compatible = "Walnut-FPGA"; + reg = <7 0 10>; + virtual-reg = <f0300005>; + }; + }; + }; + + chosen { + linux,stdout-path = "/plb/opb/serial@300"; + }; +};
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
Re: [patch 3/6] Walnut DTS
Quoted 80 lines · David Gibson
Quoted 79 lines · Josh Boyer
Device tree source file for the PPC405 Walnut evaluation board.
Signed-off-by Josh Boyer <[email protected]>--- arch/powerpc/boot/dts/walnut.dts | 183 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+)arch/powerpc/boot/dts/walnut.dts new file +68
-0@@ -0,0 +1,183 @@ +/* + * Device Tree Source for IBM Walnut + * + * Copyright 2007 IBM Corp. + * Josh Boyer <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,walnut"; + compatible = "ibm,walnut"; + dcr-parent = <&/cpus/PowerPC,405GP@0>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,405GP@0 { + device_type = "cpu"; + reg = <0>; + clock-frequency = <bebc200>; /* Filled in by zImage */ + timebase-frequency = <0>; /* Filled in by zImage */ + i-cache-line-size = <20>; + d-cache-line-size = <20>; + i-cache-size = <4000>; + d-cache-size = <4000>; + dcr-controller; + dcr-access-method = "native"; + }; + }; + + memory { + device_type = "memory"; + reg = <0 0>; /* Filled in by zImage */ + }; + + UIC0: interrupt-controller { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <0>; + dcr-reg = <0c0 9>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + }; + + plb { + compatible = "ibm,plb3"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clock-frequency = <0>; /* Filled in by zImage */ + + SDRAM0: memory-controller { + compatible = "ibm,sdram-405gp"; + dcr-reg = <010 2>; + }; + + MAL: mcmal { + compatible = "ibm,mcmal-405gp", "ibm,mcmal"; + dcr-reg = <180 62>; + num-tx-chans = <2>; + num-rx-chans = <1>;
Quoted 8 lines
arch/powerpc/boot/dts/walnut.dts line 74
Quoted 6 lines
arch/powerpc/boot/dts/walnut.dts new file +6
-0+ interrupt-parent = <&UIC0>; + interrupts = <a 4 b 4 c 4 d 4 e 4>; + }; + + POB0: opb { + compatible = "ibm,opb";Need an opb-405gp here, too.
Yep.
Quoted 9 lines
arch/powerpc/boot/dts/walnut.dts line 77
Quoted 3 lines
arch/powerpc/boot/dts/walnut.dts new file +3
-0+ #address-cells = <1>; + #size-cells = <1>; + ranges = <0 ef600000 a00000>;Hrm... something we ought to clarify is the interpretation of the
POB0_BEARregister with respect to the bridge's ranges property. For 440 I think the BEAR will need to be interpreted as an OPB address, rather than a PLB address, but I'm not sure if that will work here with the limited ranges property you have.
Ok, I'll look at this.
josh
Re: [patch 3/6] Walnut DTS
Quoted 90 lines · On Sun, 02 Sep 2007 08:59:44 -0500 Josh Boyer <[email protected]>…
Quoted 80 lines · David Gibson
Quoted 79 lines · Josh Boyer
Device tree source file for the PPC405 Walnut evaluation board.
Signed-off-by Josh Boyer <[email protected]>--- arch/powerpc/boot/dts/walnut.dts | 183 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+)arch/powerpc/boot/dts/walnut.dts new file +68
-0@@ -0,0 +1,183 @@ +/* + * Device Tree Source for IBM Walnut + * + * Copyright 2007 IBM Corp. + * Josh Boyer <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,walnut"; + compatible = "ibm,walnut"; + dcr-parent = <&/cpus/PowerPC,405GP@0>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,405GP@0 { + device_type = "cpu"; + reg = <0>; + clock-frequency = <bebc200>; /* Filled in by zImage */ + timebase-frequency = <0>; /* Filled in by zImage */ + i-cache-line-size = <20>; + d-cache-line-size = <20>; + i-cache-size = <4000>; + d-cache-size = <4000>; + dcr-controller; + dcr-access-method = "native"; + }; + }; + + memory { + device_type = "memory"; + reg = <0 0>; /* Filled in by zImage */ + }; + + UIC0: interrupt-controller { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <0>; + dcr-reg = <0c0 9>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + }; + + plb { + compatible = "ibm,plb3"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clock-frequency = <0>; /* Filled in by zImage */ + + SDRAM0: memory-controller { + compatible = "ibm,sdram-405gp"; + dcr-reg = <010 2>; + }; + + MAL: mcmal { + compatible = "ibm,mcmal-405gp", "ibm,mcmal"; + dcr-reg = <180 62>; + num-tx-chans = <2>; + num-rx-chans = <1>;Quoted 8 lines
arch/powerpc/boot/dts/walnut.dts line 74
Quoted 6 lines
arch/powerpc/boot/dts/walnut.dts new file +6
-0+ interrupt-parent = <&UIC0>; + interrupts = <a 4 b 4 c 4 d 4 e 4>; + }; + + POB0: opb { + compatible = "ibm,opb";Need an opb-405gp here, too.
Quoted 1 line
Yep.
Fixed.
Quoted 11 lines
Quoted 9 lines
arch/powerpc/boot/dts/walnut.dts line 77
Quoted 3 lines
arch/powerpc/boot/dts/walnut.dts new file +3
-0+ #address-cells = <1>; + #size-cells = <1>; + ranges = <0 ef600000 a00000>;Hrm... something we ought to clarify is the interpretation of the
POB0_BEARregister with respect to the bridge's ranges property. For 440 I think the BEAR will need to be interpreted as an OPB address, rather than a PLB address, but I'm not sure if that will work here with the limited ranges property you have.Ok, I'll look at this.
The BEAR will still be interpreted as a PLB address here as far as I can see. The ranges spans the entire OPB space. Am I missing something?
josh
Re: [patch 3/6] Walnut DTS
Quoted 2 lines · Josh Boyer
On Sun, 02 Sep 2007 08:59:44 -0500
Josh Boyer <[email protected]> wrote:
[snip]
Quoted 19 lines
Quoted 6 lines
Quoted 4 lines
arch/powerpc/boot/dts/walnut.dts line 74
Quoted 2 lines
arch/powerpc/boot/dts/walnut.dts new file +2
-0+ POB0: opb { + compatible = "ibm,opb";Need an opb-405gp here, too.
Yep.
Fixed.
Quoted 10 lines
Quoted 9 lines
arch/powerpc/boot/dts/walnut.dts line 77
Quoted 3 lines
arch/powerpc/boot/dts/walnut.dts new file +3
-0+ #address-cells = <1>; + #size-cells = <1>; + ranges = <0 ef600000 a00000>;Hrm... something we ought to clarify is the interpretation of the
POB0_BEARregister with respect to the bridge's ranges property. For 440 I think the BEAR will need to be interpreted as an OPB address, rather than a PLB address, but I'm not sure if that will work here with the limited ranges property you have.
Quoted 5 lines
Quoted 1 line
Ok, I'll look at this.
The BEAR will still be interpreted as a PLB address here as far as I can see. The ranges spans the entire OPB space. Am I missing something?
Ah, sorry, my mistake. I thought the BEAR register would encode an OPB address rather than a PLB address (and thus, be only 32-bits wide on 440). In fact it appears it does encode a PLB address (and is split into BEARH and BEARL registers on 440).
Hrm.. I'm still slightly uneasy though. In my Ebony device tree, the POB's ranges exists to embed the 32-bit OPB space into the 64-bit PLB space by tacking on a 0x1 in bits 32:35. In your 405gp ranges, you're describing just the address range used by OPB peripherals (0xef600000-0xf0000000) as residing at address 0 in OPB-space.
Since the ranges will still generate the right physical addresses, I guess it doesn't matter. But I'm not sure it meets the principle of least surprise - since I think the documentation generally talks as though addresses on the 405 OPB bus are identical to addreses on the PLB.
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
Re: [patch 3/6] Walnut DTS
Quoted 25 lines · David Gibson
Quoted 2 lines · Josh Boyer
On Sun, 02 Sep 2007 08:59:44 -0500
Josh Boyer <[email protected]> wrote:[snip]
Quoted 21 lines
Quoted 6 lines
Quoted 4 lines
arch/powerpc/boot/dts/walnut.dts line 74
Quoted 2 lines
arch/powerpc/boot/dts/walnut.dts new file +2
-0+ POB0: opb { + compatible = "ibm,opb";Need an opb-405gp here, too.
Yep.
Fixed.
Quoted 11 lines
Quoted 9 lines
arch/powerpc/boot/dts/walnut.dts line 77
Quoted 3 lines
arch/powerpc/boot/dts/walnut.dts new file +3
-0+ #address-cells = <1>; + #size-cells = <1>; + ranges = <0 ef600000 a00000>;Hrm... something we ought to clarify is the interpretation of the
POB0_BEARregister with respect to the bridge's ranges property. For 440 I think the BEAR will need to be interpreted as an OPB address, rather than a PLB address, but I'm not sure if that will work here with the limited ranges property you have.Ok, I'll look at this.
Quoted 8 lines
Quoted 3 lines
The BEAR will still be interpreted as a PLB address here as far as I can see. The ranges spans the entire OPB space. Am I missing something?
Ah, sorry, my mistake. I thought the BEAR register would encode an OPB address rather than a PLB address (and thus, be only 32-bits wide on 440). In fact it appears it does encode a PLB address (and is split into BEARH and BEARL registers on 440).
Right.
Quoted 11 lines
Hrm.. I'm still slightly uneasy though. In my Ebony device tree, the POB's ranges exists to embed the 32-bit OPB space into the 64-bit PLB space by tacking on a
0x1in bits 32:35. In your 405gp ranges, you're describing just the address range used by OPB peripherals (0xef600000-0xf0000000) as residing at address 0 in OPB-space.Since the ranges will still generate the right physical addresses, I guess it doesn't matter. But I'm not sure it meets the principle of least surprise - since I think the documentation generally talks as though addresses on the 405 OPB bus are identical to addreses on the PLB.
I don't care either way. If I remember correctly, this way of doing it came out of a discussion with Segher.
josh
Re: [patch 3/6] Walnut DTS
Quoted 6 lines
Quoted 6 lines
Hrm.. I'm still slightly uneasy though. In my Ebony device tree, the POB's ranges exists to embed the 32-bit OPB space into the 64-bit PLB space by tacking on a
0x1in bits 32:35. In your 405gp ranges, you're describing just the address range used by OPB peripherals (0xef600000-0xf0000000) as residing at address 0 in OPB-space.
Quoted 8 lines
Quoted 5 lines
Since the ranges will still generate the right physical addresses, I guess it doesn't matter. But I'm not sure it meets the principle of least surprise - since I think the documentation generally talks as though addresses on the 405 OPB bus are identical to addreses on the PLB.
I don't care either way. If I remember correctly, this way of doing it came out of a discussion with Segher.
I don't think I ever said that this is a better way of doing things -- then again, I change my mind now and then.
Someone needs to write down a proposed device binding for these busses, and then we can really discuss things ;-)
Segher
PATCH 3/6 Walnut DTS
Updated DTS below
Device tree source file for the PPC405 Walnut evaluation board.
--- arch/powerpc/boot/dts/walnut.dts | 183 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+)
arch/powerpc/boot/dts/walnut.dts new file +183 -0
@@ -0,0 +1,183 @@ +/* + * Device Tree Source for IBM Walnut + * + * Copyright 2007 IBM Corp. + * Josh Boyer <[email protected]> + * + * This file is licensed under the terms of the GNU General Public + * License version 2. This program is licensed "as is" without + * any warranty of any kind, whether express or implied. + */ + +/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,walnut"; + compatible = "ibm,walnut"; + dcr-parent = <&/cpus/PowerPC,405GP@0>; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + PowerPC,405GP@0 { + device_type = "cpu"; + reg = <0>; + clock-frequency = <bebc200>; /* Filled in by zImage */ + timebase-frequency = <0>; /* Filled in by zImage */ + i-cache-line-size = <20>; + d-cache-line-size = <20>; + i-cache-size = <4000>; + d-cache-size = <4000>; + dcr-controller; + dcr-access-method = "native"; + }; + }; + + memory { + device_type = "memory"; + reg = <0 0>; /* Filled in by zImage */ + }; + + UIC0: interrupt-controller { + compatible = "ibm,uic"; + interrupt-controller; + cell-index = <0>; + dcr-reg = <0c0 9>; + #address-cells = <0>; + #size-cells = <0>; + #interrupt-cells = <2>; + }; + + plb { + compatible = "ibm,plb3"; + #address-cells = <1>; + #size-cells = <1>; + ranges; + clock-frequency = <0>; /* Filled in by zImage */ + + SDRAM0: memory-controller { + compatible = "ibm,sdram-405gp"; + dcr-reg = <010 2>; + }; + + MAL: mcmal { + compatible = "ibm,mcmal-405gp", "ibm,mcmal"; + dcr-reg = <180 62>; + num-tx-chans = <2>; + num-rx-chans = <1>; + interrupt-parent = <&UIC0>; + interrupts = <a 4 b 4 c 4 d 4 e 4>; + }; + + POB0: opb { + compatible = "ibm,opb-405gp", "ibm,opb"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <ef600000 ef600000 a00000>; + dcr-reg = <0a0 5>; + clock-frequency = <0>; /* Filled in by zImage */ + + UART0: serial@ef600300 { + device_type = "serial"; + compatible = "ns16550"; + reg = <ef600300 8>; + virtual-reg = <ef600300>; + clock-frequency = <0>; /* Filled in by zImage */ + current-speed = <2580>; + interrupt-parent = <&UIC0>; + interrupts = <0 4>; + }; + + UART1: serial@ef600400 { + device_type = "serial"; + compatible = "ns16550"; + reg = <ef600400 8>; + virtual-reg = <ef600400>; + clock-frequency = <0>; /* Filled in by zImage */ + current-speed = <2580>; + interrupt-parent = <&UIC0>; + interrupts = <1 4>; + }; + + IIC: i2c@ef600500 { + compatible = "ibm,iic-405gp", "ibm,iic"; + reg = <ef600500 11>; + interrupt-parent = <&UIC0>; + interrupts = <2 4>; + }; + + GPIO: gpio@ef600700 { + compatible = "ibm,gpio-405gp"; + reg = <ef600700 20>; + }; + + EMAC: ethernet@ef600800 { + linux,network-index = <0>; + device_type = "network"; + compatible = "ibm,emac-405gp", "ibm,emac"; + interrupt-parent = <&UIC0>; + interrupts = <9 4 f 4>; + reg = <ef600800 70>; + mal-device = <&MAL>; + mal-tx-channel = <0 1>; + mal-rx-channel = <0>; + cell-index = <0>; + max-frame-size = <5dc>; + rx-fifo-size = <1000>; + tx-fifo-size = <800>; + phy-mode = "rmii"; + phy-map = <00000001>; + }; + + }; + + EBC0: ebc { + compatible = "ibm,ebc-405gp", "ibm,ebc"; + dcr-reg = <012 2>; + #address-cells = <2>; + #size-cells = <1>; + clock-frequency = <0>; /* Filled in by zImage */ + + sram@0,0 { + reg = <0 0 80000>; + }; + + flash@0,80000 { + device_type = "rom"; + compatible = "direct-mapped"; + probe-type = "JEDEC"; + bank-width = <1>; + partitions = <0 80000>; + partition-names = "OpenBIOS"; + reg = <0 80000 80000>; + }; + + ds1743@1,0 { + /* NVRAM and RTC */ + compatible = "ds1743"; + reg = <1 0 2000>; + }; + + keyboard@2,0 { + compatible = "intel,82C42PC"; + reg = <2 0 2>; + }; + + ir@3,0 { + compatible = "ti,TIR2000PAG"; + reg = <3 0 10>; + }; + + fpga@7,0 { + compatible = "Walnut-FPGA"; + reg = <7 0 10>; + virtual-reg = <f0300005>; + }; + }; + }; + + chosen { + linux,stdout-path = "/plb/opb/serial@ef600300"; + }; +};
Re: [patch 3/6] Walnut DTS
Quoted 5 lines · Josh Boyer
Updated DTS below
Device tree source file for the PPC405 Walnut evaluation board.
Signed-off-by Josh Boyer <[email protected]>
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 4/6 Walnut defconfig
In reply to Josh BoyerWalnut board defconfig
--- arch/powerpc/configs/walnut_defconfig | 698 ++++++++++++++++++++++++++++++++++ 1 file changed, 698 insertions(+)
arch/powerpc/configs/walnut_defconfig new file +698 -0
@@ -0,0 +1,698 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.23-rc4 +# Tue Aug 28 09:29:22 2007 +# +# CONFIG_PPC64 is not set + +# +# Processor support +# +# CONFIG_6xx is not set +# CONFIG_PPC_85xx is not set +# CONFIG_PPC_8xx is not set +CONFIG_40x=y +# CONFIG_44x is not set +# CONFIG_E200 is not set +CONFIG_4xx=y +# CONFIG_PPC_MM_SLICES is not set +CONFIG_NOT_COHERENT_CACHE=y +CONFIG_PPC32=y +CONFIG_PPC_MERGE=y +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_IRQ_PER_CPU=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_ARCH_HAS_ILOG2_U32=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +# CONFIG_ARCH_NO_VIRT_TO_BUS is not set +CONFIG_PPC=y +CONFIG_EARLY_PRINTK=y +CONFIG_GENERIC_NVRAM=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_ARCH_MAY_HAVE_PC_FDC=y +CONFIG_PPC_OF=y +CONFIG_OF=y +# CONFIG_PPC_UDBG_16550 is not set +# CONFIG_GENERIC_TBSYNC is not set +CONFIG_AUDIT_ARCH=y +CONFIG_GENERIC_BUG=y +# CONFIG_DEFAULT_UIMAGE is not set +CONFIG_PPC_DCR_NATIVE=y +# CONFIG_PPC_DCR_MMIO is not set +CONFIG_PPC_DCR=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_USER_NS is not set +# CONFIG_AUDIT is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_SYSFS_DEPRECATED=y +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_ANON_INODES=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_KMOD=y +CONFIG_BLOCK=y +CONFIG_LBD=y +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_LSF is not set +# CONFIG_BLK_DEV_BSG is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_DEFAULT_AS=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" + +# +# Platform support +# +# CONFIG_PPC_MPC52xx is not set +# CONFIG_PPC_MPC5200 is not set +# CONFIG_PPC_CELL is not set +# CONFIG_PPC_CELL_NATIVE is not set +# CONFIG_PQ2ADS is not set +CONFIG_WALNUT=y +CONFIG_405GP=y +CONFIG_IBM405_ERR77=y +CONFIG_IBM405_ERR51=y +# CONFIG_MPIC is not set +# CONFIG_MPIC_WEIRD is not set +# CONFIG_PPC_I8259 is not set +# CONFIG_PPC_RTAS is not set +# CONFIG_MMIO_NVRAM is not set +# CONFIG_PPC_MPC106 is not set +# CONFIG_PPC_970_NAP is not set +# CONFIG_PPC_INDIRECT_IO is not set +# 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 +# +# CONFIG_HIGHMEM is not set +# CONFIG_HZ_100 is not set +CONFIG_HZ_250=y +# CONFIG_HZ_300 is not set +# CONFIG_HZ_1000 is not set +CONFIG_HZ=250 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_MATH_EMULATION is not set +CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_SPARSEMEM_STATIC is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_RESOURCES_64BIT=y +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_PROC_DEVICETREE=y +# CONFIG_CMDLINE_BOOL is not set +# CONFIG_PM is not set +CONFIG_SECCOMP=y +CONFIG_WANT_DEVICE_TREE=y +CONFIG_DEVICE_TREE="walnut.dts" +CONFIG_ISA_DMA_API=y + +# +# Bus options +# +CONFIG_ZONE_DMA=y +# CONFIG_PCI is not set +# CONFIG_PCI_DOMAINS is not set +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set + +# +# PCCARD (PCMCIA/CardBus) support +# +# CONFIG_PCCARD is not set + +# +# Advanced setup +# +# CONFIG_ADVANCED_OPTIONS is not set + +# +# Default settings for advanced configuration options are used +# +CONFIG_HIGHMEM_START=0xfe000000 +CONFIG_LOWMEM_SIZE=0x30000000 +CONFIG_KERNEL_START=0xc0000000 +CONFIG_TASK_SIZE=0x80000000 +CONFIG_CONSISTENT_START=0xff100000 +CONFIG_CONSISTENT_SIZE=0x00200000 +CONFIG_BOOT_LOAD=0x00400000 + +# +# Networking +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set + +# +# Wireless +# +# CONFIG_CFG80211 is not set +# CONFIG_WIRELESS_EXT is not set +# CONFIG_MAC80211 is not set +# CONFIG_IEEE80211 is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +CONFIG_CONNECTOR=y +CONFIG_PROC_EVENTS=y +# CONFIG_MTD is not set +CONFIG_OF_DEVICE=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=35000 +CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_XILINX_SYSACE is not set +CONFIG_MISC_DEVICES=y +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +# CONFIG_MACINTOSH_DRIVERS is not set +CONFIG_NETDEVICES=y +# CONFIG_NETDEVICES_MULTIQUEUE is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_NET_ETHERNET is not set +CONFIG_NETDEV_1000=y +CONFIG_NETDEV_10000=y + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +# CONFIG_WLAN_80211 is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +# CONFIG_INPUT is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +# CONFIG_VT is not set +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +# CONFIG_SERIAL_8250_DETECT_IRQ is not set +# CONFIG_SERIAL_8250_RSA is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_UARTLITE is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_UNIX98_PTYS=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_IPMI_HANDLER is not set +# CONFIG_WATCHDOG is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_NVRAM is not set +# CONFIG_GEN_RTC is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_I2C is not set + +# +# SPI support +# +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set + +# +# Multifunction device drivers +# +# CONFIG_MFD_SM501 is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_DVB_CORE is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set +# CONFIG_VGASTATE is not set +CONFIG_VIDEO_OUTPUT_CONTROL=m +# CONFIG_FB is not set +# CONFIG_FB_IBM_GXT4500 is not set + +# +# Sound +# +# CONFIG_SOUND is not set +CONFIG_USB_SUPPORT=y +# CONFIG_USB_ARCH_HAS_HCD is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set + +# +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' +# + +# +# USB Gadget Support +# +# CONFIG_USB_GADGET is not set +# CONFIG_MMC is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_EDAC is not set +# CONFIG_RTC_CLASS is not set + +# +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set + +# +# DMA Clients +# + +# +# DMA Devices +# + +# +# Userspace I/O +# +# CONFIG_UIO is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +# CONFIG_EXT3_FS is not set +# CONFIG_EXT4DEV_FS is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +CONFIG_DNOTIFY=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_MSDOS_FS is not set +# CONFIG_VFAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y +# CONFIG_CONFIGFS_FS is not set + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_CRAMFS=y +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NFSD is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_SUNRPC_BIND34 is not set +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y + +# +# Native Language Support +# +# CONFIG_NLS is not set + +# +# Distributed Lock Manager +# +# CONFIG_DLM is not set +# CONFIG_UCC_SLOW is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_PLIST=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y + +# +# Instrumentation Support +# +# CONFIG_PROFILING is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_MAGIC_SYSRQ=y +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_DETECT_SOFTLOCKUP=y +CONFIG_SCHED_DEBUG=y +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_LIST is not set +CONFIG_FORCED_INLINING=y +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_STACKOVERFLOW is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_PAGEALLOC is not set +# CONFIG_DEBUGGER is not set +# CONFIG_BDI_SWITCH is not set +# CONFIG_PPC_EARLY_DEBUG is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +CONFIG_CRYPTO=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_MANAGER=y +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_WP512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_GF128MUL is not set +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_PCBC=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_TWOFISH is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_TEST is not set +CONFIG_CRYPTO_HW=y
PATCH 5/6 Walnut board support
In reply to Josh BoyerBoard support for the PPC405 Walnut evaluation board
--- arch/powerpc/platforms/40x/Kconfig | 14 +++---- arch/powerpc/platforms/40x/Makefile | 2 - arch/powerpc/platforms/40x/walnut.c | 68 ++++++++++++++++++++++++++++++++++++ arch/powerpc/platforms/Kconfig | 2 - arch/powerpc/platforms/Makefile | 2 - 5 files changed, 78 insertions(+), 10 deletions(-)
arch/powerpc/platforms/40x/Makefile +1 -1
@@ -1 +1 @@ -# empty makefile so make clean works +obj-$(CONFIG_WALNUT) += walnut.o
arch/powerpc/platforms/40x/walnut.c new file +68 -0
68 lines not on this page · raw message
arch/powerpc/platforms/40x/Kconfig +7 -7
@@ -53,13 +53,13 @@ # help # This option enables support for the IBM PPC405GPr evaluation board. -#config WALNUT -# bool "Walnut" -# depends on 40x -# default y -# select 405GP -# help -# This option enables support for the IBM PPC405GP evaluation board. +config WALNUT + bool "Walnut" + depends on 40x + default y + select 405GP + help + This option enables support for the IBM PPC405GP evaluation board. #config XILINX_ML300 # bool "Xilinx-ML300"
arch/powerpc/platforms/Kconfig +1 -1
@@ -59,7 +59,7 @@ source "arch/powerpc/platforms/85xx/Kcon source "arch/powerpc/platforms/86xx/Kconfig" source "arch/powerpc/platforms/embedded6xx/Kconfig" source "arch/powerpc/platforms/44x/Kconfig" -#source "arch/powerpc/platforms/4xx/Kconfig +source "arch/powerpc/platforms/40x/Kconfig" config PPC_NATIVE bool
arch/powerpc/platforms/Makefile +1 -1
@@ -9,7 +9,7 @@ obj-$(CONFIG_PPC_PMAC) += powermac/ endif endif obj-$(CONFIG_PPC_CHRP) += chrp/ -#obj-$(CONFIG_4xx) += 4xx/ +obj-$(CONFIG_40x) += 40x/ obj-$(CONFIG_44x) += 44x/ obj-$(CONFIG_PPC_MPC52xx) += 52xx/ obj-$(CONFIG_PPC_8xx) += 8xx/
Re: [patch 5/6] Walnut board support
Quoted 3 lines · Josh Boyer
Board support for the PPC405 Walnut evaluation board
Signed-off-by Josh Boyer <[email protected]>
[snip]
Quoted 10 lines
arch/powerpc/platforms/40x/Kconfig +0
-4@@ -53,13 +53,13 @@ # help # This option enables support for the IBM PPC405GPr evaluation board. -#config WALNUT -# bool "Walnut" -# depends on 40x -# default y
arch/powerpc/platforms/40x/Kconfig line 62
Quoted 10 lines
arch/powerpc/platforms/40x/Kconfig +7
-3-# select 405GP -# help -# This option enables support for the IBM PPC405GP evaluation board. +config WALNUT + bool "Walnut" + depends on 40x + default y + select 405GP + help + This option enables support for the IBM PPC405GP evaluation board.
Surely this needs WANT_DEVICE_TREE, too.
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
Re: [patch 5/6] Walnut board support
Quoted 12 lines · David Gibson
Quoted 3 lines · Josh Boyer
Board support for the PPC405 Walnut evaluation board
Signed-off-by Josh Boyer <[email protected]>[snip]
Quoted 6 lines
arch/powerpc/platforms/40x/Kconfig +0
-0@@ -53,13 +53,13 @@ # help # This option enables support for the IBM PPC405GPr evaluation board.
Quoted 16 lines
Quoted 4 lines
arch/powerpc/platforms/40x/Kconfig +0
-4-#config WALNUT -# bool "Walnut" -# depends on 40x -# default yarch/powerpc/platforms/40x/Kconfig line 62
Quoted 10 lines
arch/powerpc/platforms/40x/Kconfig +7
-3-# select 405GP -# help -# This option enables support for the IBM PPC405GP evaluation board. +config WALNUT + bool "Walnut" + depends on 40x + default y + select 405GP + help + This option enables support for the IBM PPC405GP evaluation board.Surely this needs
WANT_DEVICE_TREE, too.
Yes, will be fixed.
josh
Re: [patch 5/6] Walnut board support
Quoted 30 lines · On Sun, 02 Sep 2007 08:59:06 -0500 Josh Boyer <[email protected]>…
Quoted 12 lines · David Gibson
Quoted 3 lines · Josh Boyer
Board support for the PPC405 Walnut evaluation board
Signed-off-by Josh Boyer <[email protected]>[snip]
Quoted 6 lines
arch/powerpc/platforms/40x/Kconfig +0
-0@@ -53,13 +53,13 @@ # help # This option enables support for the IBM PPC405GPr evaluation board.Quoted 16 lines
Quoted 4 lines
arch/powerpc/platforms/40x/Kconfig +0
-4-#config WALNUT -# bool "Walnut" -# depends on 40x -# default yarch/powerpc/platforms/40x/Kconfig line 62
Quoted 10 lines
arch/powerpc/platforms/40x/Kconfig +7
-3-# select 405GP -# help -# This option enables support for the IBM PPC405GP evaluation board. +config WALNUT + bool "Walnut" + depends on 40x + default y + select 405GP + help + This option enables support for the IBM PPC405GP evaluation board.Surely this needs
WANT_DEVICE_TREE, too.
Quoted 1 line
Yes, will be fixed.
Er, actually no it won't. It doesn't need to be selected here, as 40x in arch/powerpc/platforms/Kconfig.cputype already selects WANT_DEVICE_TREE. Same thing that ebony and bamboo do for 44x.
josh
Re: [patch 5/6] Walnut board support
Quoted 33 lines · Josh Boyer
Quoted 30 lines · On Sun, 02 Sep 2007 08:59:06 -0500 Josh Boyer <[email protected]>…
Quoted 28 lines · David Gibson
Quoted 3 lines · Josh Boyer
Board support for the PPC405 Walnut evaluation board
Signed-off-by Josh Boyer <[email protected]>[snip]
Quoted 10 lines
arch/powerpc/platforms/40x/Kconfig +0
-4@@ -53,13 +53,13 @@ # help # This option enables support for the IBM PPC405GPr evaluation board. -#config WALNUT -# bool "Walnut" -# depends on 40x -# default yarch/powerpc/platforms/40x/Kconfig line 62
Quoted 10 lines
arch/powerpc/platforms/40x/Kconfig +7
-3-# select 405GP -# help -# This option enables support for the IBM PPC405GP evaluation board. +config WALNUT + bool "Walnut" + depends on 40x + default y + select 405GP + help + This option enables support for the IBM PPC405GP evaluation board.Surely this needs
WANT_DEVICE_TREE, too.
Quoted 5 lines
Quoted 1 line
Yes, will be fixed.
Er, actually no it won't. It doesn't need to be selected here, as 40x in
arch/powerpc/platforms/Kconfig.cputypealready selectsWANT_DEVICE_TREE. Same thing that ebony and bamboo do for 44x.
Oh, yes, so it does, sorry. Though we may need to change that if anyone goes and puts a real OF implementation on some 44x board.
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
Re: [patch 5/6] Walnut board support
In reply to Josh BoyerQuoted 3 lines · Josh Boyer
Board support for the PPC405 Walnut evaluation board
Signed-off-by Josh Boyer <[email protected]>
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 6/6 Walnut zImage wrapper
In reply to Josh BoyerAdd zImage wrapper for walnut board
--- arch/powerpc/boot/Makefile | 3 arch/powerpc/boot/treeboot-walnut.c | 133 ++++++++++++++++++++++++++++++++++++ 2 files changed, 135 insertions(+), 1 deletion(-)
arch/powerpc/boot/Makefile +2 -1
@@ -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-bamboo.c + cuboot-pq2.c cuboot-bamboo.c treeboot-walnut.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -147,6 +147,7 @@ image-$(CONFIG_PPC_83xx) += cuImage.83x image-$(CONFIG_PPC_85xx) += cuImage.85xx image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo +image-$(CONFIG_WALNUT) += treeImage.walnut endif # For 32-bit powermacs, build the COFF and miboot images
arch/powerpc/boot/treeboot-walnut.c new file +133 -0
133 lines not on this page · raw message
Re: [patch 6/6] Walnut zImage wrapper
Quoted 3 lines · Josh Boyer
Add zImage wrapper for walnut board
Signed-off-by Josh Boyer <[email protected]>
[snip]
Quoted 18 lines
arch/powerpc/boot/treeboot-walnut.c new file +15
-0@@ -0,0 +1,133 @@ +/* +* Old U-boot compatibility for Walnut +* +* Author: Josh Boyer <[email protected]> +* +* Copyright 2007 IBM Corporation +* Based on cuboot-83xx.c, which is: +* Copyright (c) 2007 Freescale Semiconductor, Inc. +* +* 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"
arch/powerpc/boot/treeboot-walnut.c line 25
Quoted 10 lines
arch/powerpc/boot/treeboot-walnut.c new file +10
-0+#include "stdio.h" +#include "dcr.h" +#include "4xx.h" +#include "io.h" + +BSS_STACK (4096 ); + +void ibm405gp_fixup_clocks (unsigned int sysclk,unsigned int ser_clk) +{ +u32 pllmr =mfdcr (0xb0 );
Please add #defines for the DCR numbers, rather than using literals.
Quoted 109 lines
arch/powerpc/boot/treeboot-walnut.c new file +108
-0+u32 cpc0_cr0 =mfdcr (0xb1 ); +u32 cpc0_cr1 =mfdcr (0xb2 ); +u32 cpu, plb, opb, ebc, tb, uart0, uart1, m; +u32 fwdv, fbdv, cbdv, opdv, epdv, udiv; + + fwdv = (8 - ((pllmr &0xe0000000 ) >>29 )); + fbdv = (pllmr &0x1e000000 ) >>25 ; + cbdv = ((pllmr &0x00060000 ) >>17 ) +1 ; + opdv = ((pllmr &0x00018000 ) >>15 ) +1 ; + epdv = ((pllmr &0x00001800 ) >>13 ) +2 ; + udiv = ((cpc0_cr0 &0x3e ) >>1 ) +1 ; + + m = fwdv * fbdv * cbdv; + + cpu = sysclk * m / fwdv; + plb = cpu / cbdv; + opb = plb / opdv; + ebc = plb / epdv; + +if (cpc0_cr0 &0x80 ) { +/* uart0 uses the external clock */ + uart0 = ser_clk; + }else { + uart0 = cpu / udiv; + } + +if (cpc0_cr0 &0x40 ) { +/* uart1 uses the external clock */ + uart1 = ser_clk; + }else { + uart1 = cpu / udiv; + } + +/* setup the timebase clock to tick at the cpu frequency */ + cpc0_cr1 = cpc0_cr1 & ~0x00800000 ; +mtdcr (0xb2 , cpc0_cr1); + tb = cpu; + +dt_fixup_cpu_clocks (cpu, tb,0 ); +dt_fixup_clock ("/plb" , plb); +dt_fixup_clock ("/plb/opb" , opb); +dt_fixup_clock ("/plb/ebc" , ebc); +dt_fixup_clock ("/plb/opb/serial@300" , uart0); +dt_fixup_clock ("/plb/opb/serial@400" , uart1); +} + +static void walnut_flashsel_fixup (void ) +{ +void *devp, *sram; +u32 reg_flash[3 ] = {0x0 ,0x0 ,0x80000 }; +u32 reg_sram[3 ] = {0x0 ,0x0 ,0x80000 }; +u8 *fpga; +u8 fpga_brds1 =0x0 ; + + devp =finddevice ("/plb/ebc/fpga" ); +if (!devp) +fatal ("Couldn't locate FPGA node\n\r" ); + +if (getprop (devp,"virtual-reg" , &fpga,sizeof (fpga)) !=sizeof (fpga)) +fatal ("no virtual-reg property\n\r" ); + + fpga_brds1 =in_8 (fpga); + +printf ("FPGA_BRDS1: %08x\n" , fpga_brds1); + + devp =finddevice ("/plb/ebc/flash" ); +if (!devp) +fatal ("Couldn't locate flash node\n\r" ); + +if (getprop (devp,"reg" , reg_flash,sizeof (reg_flash)) !=sizeof (reg_flash)) +fatal ("flash reg property has unexpected size\n\r" ); + + sram =finddevice ("/plb/ebc/sram" ); +if (!sram) +fatal ("Couldn't locate sram node\n\r" ); + +if (getprop (sram,"reg" , reg_sram,sizeof (reg_sram)) !=sizeof (reg_sram)) +fatal ("sram reg property has unexpected size\n\r" ); + +if (fpga_brds1 &0x1 ) { + reg_flash[1 ] ^=0x80000 ; + reg_sram[1 ] ^=0x80000 ; + } + +setprop (devp,"reg" , reg_flash,sizeof (reg_flash)); +setprop (sram,"reg" , reg_sram,sizeof (reg_sram)); +} + +static void walnut_fixups (void ) +{ +ibm4xx_fixup_memsize (); +ibm405gp_fixup_clocks (33330000 ,0xa8c000 ); +ibm4xx_quiesce_eth ((u32 *)0xef600800 ,NULL ); +ibm4xx_fixup_ebc_ranges ("/plb/ebc" ); +walnut_flashsel_fixup (); +} + +void platform_init (void ) +{ +unsigned long end_of_ram =0x2000000 ; +unsigned long avail_ram = end_of_ram - (unsigned long ) _end; + +simple_alloc_init (_end, avail_ram,32 ,32 ); + platform_ops.fixups = walnut_fixups; + platform_ops.exit = ibm40x_dbcr_reset; +ft_init (_dtb_start, _dtb_end - _dtb_start,32 ); +serial_console_init (); +}
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
Re: [patch 6/6] Walnut zImage wrapper
Quoted 28 lines · David Gibson
Quoted 3 lines · Josh Boyer
Add zImage wrapper for walnut board
Signed-off-by Josh Boyer <[email protected]>[snip]
Quoted 22 lines
arch/powerpc/boot/treeboot-walnut.c new file +19
-0@@ -0,0 +1,133 @@ +/* +* Old U-boot compatibility for Walnut +* +* Author: Josh Boyer <[email protected]> +* +* Copyright 2007 IBM Corporation +* Based on cuboot-83xx.c, which is: +* Copyright (c) 2007 Freescale Semiconductor, Inc. +* +* 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 "dcr.h" +#include "4xx.h" +#include "io.h"
Quoted 8 lines
arch/powerpc/boot/treeboot-walnut.c line 25
Quoted 6 lines
arch/powerpc/boot/treeboot-walnut.c new file +6
-0+ +BSS_STACK (4096 ); + +void ibm405gp_fixup_clocks (unsigned int sysclk,unsigned int ser_clk) +{ +u32 pllmr =mfdcr (0xb0 );Please add #defines for the DCR numbers, rather than using literals.
Oops. Meant to do that cleanup before I sent out this round. Will be fixed.
josh
PATCH 6/6 Walnut zImage wrapper
Updated patch below
Add zImage wrapper for walnut board
--- arch/powerpc/boot/Makefile | 3 arch/powerpc/boot/dcr.h | 5 + arch/powerpc/boot/treeboot-walnut.c | 131 ++++++++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+), 1 deletion(-)
arch/powerpc/boot/Makefile +2 -1
@@ -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-bamboo.c + cuboot-pq2.c cuboot-bamboo.c treeboot-walnut.c src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -147,6 +147,7 @@ image-$(CONFIG_PPC_83xx) += cuImage.83x image-$(CONFIG_PPC_85xx) += cuImage.85xx image-$(CONFIG_EBONY) += treeImage.ebony cuImage.ebony image-$(CONFIG_BAMBOO) += treeImage.bamboo cuImage.bamboo +image-$(CONFIG_WALNUT) += treeImage.walnut endif # For 32-bit powermacs, build the COFF and miboot images
arch/powerpc/boot/treeboot-walnut.c new file +131 -0
131 lines not on this page · raw message
arch/powerpc/boot/dcr.h +5 -0
@@ -134,4 +134,9 @@ static const unsigned long sdram_bxcr[]#define CPR0_SCPID 0x120#define CPR0_PLLC0 0x40 +/* 405GP Clocking/Power Management/Chip Control regs */ +#define DCRN_CPC0_PLLMR 0xb0 +#define DCRN_405_CPC0_CR0 0xb1 +#define DCRN_405_CPC0_CR1 0xb2 +#endif /* _PPC_BOOT_DCR_H_ */
Re: [patch 6/6] Walnut zImage wrapper
Quoted 5 lines · Josh Boyer
Updated patch below
Add zImage wrapper for walnut board
Signed-off-by Josh Boyer <[email protected]>
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
Re: [patch 6/6] Walnut zImage wrapper
In reply to Josh BoyerQuoted 15 lines · Josh Boyer
Updated patch below
Add zImage wrapper for walnut board
Signed-off-by Josh Boyer <[email protected]>--- arch/powerpc/boot/Makefile | 3 arch/powerpc/boot/dcr.h | 5 + arch/powerpc/boot/treeboot-walnut.c | 131 ++++++++++++++++++++++++++++++++++++ 3 files changed, 138 insertions(+), 1 deletion(-)
arch/powerpc/boot/Makefile src-wlib := string.S crt0.S stdio.c main · line 52
Quoted 5 lines
arch/powerpc/boot/Makefile +1
-1@@ -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-bamboo.c + cuboot-pq2.c cuboot-bamboo.c treeboot-walnut.c
[deletions]
The addition of treeboot-walnut.c breaks compilation of Linux-2.6 for the lite5200 using the ppc_6xx toolchain of the ELDK 4.1:
MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x14): Section mismatch: reference to .init.text:prom_init (between '__start' and '__after_mmu_off')
WARNING: vmlinux.o(.text+0x28): Section mismatch: reference to .init.text:early_init (between '__start' and '__after_mmu_off')
WARNING: vmlinux.o(.text+0x340c): Section mismatch: reference to .init.text:machine_init (between 'start_here' and 'set_context')
WARNING: vmlinux.o(.text+0x3414): Section mismatch: reference to .init.text:MMU_init (between 'start_here' and 'set_context')
WARNING: vmlinux.o(.text+0x343e): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')
WARNING: vmlinux.o(.text+0x3442): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')
GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD vmlinux SYSMAP System.map BOOTAS arch/powerpc/boot/string.o BOOTAS arch/powerpc/boot/crt0.o BOOTCC arch/powerpc/boot/stdio.o BOOTCC arch/powerpc/boot/main.o BOOTCC arch/powerpc/boot/flatdevtree.o BOOTCC arch/powerpc/boot/flatdevtree_misc.o BOOTCC arch/powerpc/boot/ns16550.o BOOTCC arch/powerpc/boot/serial.o BOOTCC arch/powerpc/boot/simple_alloc.o BOOTAS arch/powerpc/boot/div64.o BOOTAS arch/powerpc/boot/util.o BOOTCC arch/powerpc/boot/gunzip_util.o BOOTCC arch/powerpc/boot/elf_util.o BOOTCC arch/powerpc/boot/inffast.o BOOTCC arch/powerpc/boot/inflate.o BOOTCC arch/powerpc/boot/inftrees.o BOOTCC arch/powerpc/boot/devtree.o BOOTCC arch/powerpc/boot/oflib.o BOOTCC arch/powerpc/boot/ofconsole.o BOOTCC arch/powerpc/boot/4xx.o BOOTCC arch/powerpc/boot/ebony.o BOOTCC arch/powerpc/boot/mv64x60.o BOOTCC arch/powerpc/boot/mpsc.o BOOTCC arch/powerpc/boot/mv64x60_i2c.o BOOTCC arch/powerpc/boot/cuboot.o BOOTCC arch/powerpc/boot/bamboo.o BOOTAR arch/powerpc/boot/wrapper.a BOOTCC arch/powerpc/boot/of.o BOOTCC arch/powerpc/boot/cuboot-83xx.o BOOTCC arch/powerpc/boot/cuboot-85xx.o BOOTCC arch/powerpc/boot/holly.o BOOTCC arch/powerpc/boot/cuboot-ebony.o BOOTCC arch/powerpc/boot/treeboot-ebony.o BOOTCC arch/powerpc/boot/prpmc2800.o BOOTAS arch/powerpc/boot/ps3-head.o BOOTAS arch/powerpc/boot/ps3-hvcall.o BOOTCC arch/powerpc/boot/ps3.o BOOTCC arch/powerpc/boot/treeboot-bamboo.o BOOTCC arch/powerpc/boot/cuboot-sequoia.o BOOTCC arch/powerpc/boot/treeboot-walnut.o
{standard input}: Assembler messages:
{standard input}:184: Error: Unrecognized opcode: mfdcr' {standard input}:185: Error: Unrecognized opcode: mfdcr' {standard input}:186: Error: Unrecognized opcode: mfdcr' {standard input}:217: Error: Unrecognized opcode: mtdcr' make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 1
make: *** [uImage] Error 2
It looks like the ppc_6xx toolchain does not know the opcode above. I wonder why files for other PowerPC sub-archs like 4xx are compiled with the wrong compiler. Have I missed something?
And the WARNING above on "Section mismatch" looks strange as well (still present in 2.6.23-rc7).
Thanks for help.
Wolfgang.
Re: [patch 6/6] Walnut zImage wrapper
Quoted 72 lines · On Mon, 24 Sep 2007 09:49:33 +0200 Wolfgang Grandegger <[email protected]>…
The addition of
treeboot-walnut.cbreaks compilation of Linux-2.6 for the lite5200 using theppc_6xxtoolchain of the ELDK 4.1:MODPOST vmlinux.o
WARNING:vmlinux.o(.text+0x14): Section mismatch: reference to .init.text:prom_init (between '__start' and '__after_mmu_off')
WARNING:vmlinux.o(.text+0x28): Section mismatch: reference to .init.text:early_init (between '__start' and '__after_mmu_off')
WARNING:vmlinux.o(.text+0x340c): Section mismatch: reference to .init.text:machine_init (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x3414): Section mismatch: reference to .init.text:MMU_init (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x343e): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x3442): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD vmlinux SYSMAP System.map BOOTAS arch/powerpc/boot/string.o BOOTAS arch/powerpc/boot/crt0.o BOOTCC arch/powerpc/boot/stdio.o BOOTCC arch/powerpc/boot/main.o BOOTCC arch/powerpc/boot/flatdevtree.o BOOTCC arch/powerpc/boot/flatdevtree_misc.o BOOTCC arch/powerpc/boot/ns16550.o BOOTCC arch/powerpc/boot/serial.o BOOTCC arch/powerpc/boot/simple_alloc.o BOOTAS arch/powerpc/boot/div64.o BOOTAS arch/powerpc/boot/util.o BOOTCC arch/powerpc/boot/gunzip_util.o BOOTCC arch/powerpc/boot/elf_util.o BOOTCC arch/powerpc/boot/inffast.o BOOTCC arch/powerpc/boot/inflate.o BOOTCC arch/powerpc/boot/inftrees.o BOOTCC arch/powerpc/boot/devtree.o BOOTCC arch/powerpc/boot/oflib.o BOOTCC arch/powerpc/boot/ofconsole.o BOOTCC arch/powerpc/boot/4xx.o BOOTCC arch/powerpc/boot/ebony.o BOOTCC arch/powerpc/boot/mv64x60.o BOOTCC arch/powerpc/boot/mpsc.o BOOTCC arch/powerpc/boot/mv64x60_i2c.o BOOTCC arch/powerpc/boot/cuboot.o BOOTCC arch/powerpc/boot/bamboo.o BOOTAR arch/powerpc/boot/wrapper.a BOOTCC arch/powerpc/boot/of.o BOOTCC arch/powerpc/boot/cuboot-83xx.o BOOTCC arch/powerpc/boot/cuboot-85xx.o BOOTCC arch/powerpc/boot/holly.o BOOTCC arch/powerpc/boot/cuboot-ebony.o BOOTCC arch/powerpc/boot/treeboot-ebony.o BOOTCC arch/powerpc/boot/prpmc2800.o BOOTAS arch/powerpc/boot/ps3-head.o BOOTAS arch/powerpc/boot/ps3-hvcall.o BOOTCC arch/powerpc/boot/ps3.o BOOTCC arch/powerpc/boot/treeboot-bamboo.o BOOTCC arch/powerpc/boot/cuboot-sequoia.o BOOTCC arch/powerpc/boot/treeboot-walnut.o{standard input}: Assembler messages:
{standard input}:184: Error: Unrecognized opcode:mfdcr' {standard input}:185: Error: Unrecognized opcode:mfdcr' {standard input}:186: Error: Unrecognized opcode:mfdcr' {standard input}:217: Error: Unrecognized opcode:mtdcr' make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 1
make: *** [uImage] Error 2
Quoted 3 lines
It looks like the
ppc_6xxtoolchain does not know the opcode above. I wonder why files for other PowerPC sub-archs like 4xx are compiled with the wrong compiler. Have I missed something?
No, you haven't missed anything. I need a one line patch to fix it. Could you try the patch below to make sure it works for you?
Quoted 2 lines
And the WARNING above on "Section mismatch" looks strange as well (still present in 2.6.23-rc7).
Those warnings should be gone with Paul's latest tree. (They will remain for 2.6.23.)
josh
Pass the correct -mcpu option for treeboot-walnut.o to avoid unrecognized opcodes.
arch/powerpc/boot/Makefile +1 -0
@@ -33,6 +33,7 @@ BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) $(obj)/4xx.o: BOOTCFLAGS += -mcpu=440 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 +$(obj)/treeboot-walnut.o: BOOTFLAGS += -mcpu=405 zlib := inffast.c inflate.c inftrees.c zlibheader := inffast.h inffixed.h inflate.h inftrees.h infutil.h
Re: [patch 6/6] Walnut zImage wrapper
Quoted 66 lines · Josh Boyer
Quoted 64 lines · On Mon, 24 Sep 2007 09:49:33 +0200 Wolfgang Grandegger <[email protected]>…
The addition of
treeboot-walnut.cbreaks compilation of Linux-2.6 for the lite5200 using theppc_6xxtoolchain of the ELDK 4.1:MODPOST vmlinux.o
WARNING:vmlinux.o(.text+0x14): Section mismatch: reference to .init.text:prom_init (between '__start' and '__after_mmu_off')
WARNING:vmlinux.o(.text+0x28): Section mismatch: reference to .init.text:early_init (between '__start' and '__after_mmu_off')
WARNING:vmlinux.o(.text+0x340c): Section mismatch: reference to .init.text:machine_init (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x3414): Section mismatch: reference to .init.text:MMU_init (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x343e): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x3442): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD vmlinux SYSMAP System.map BOOTAS arch/powerpc/boot/string.o BOOTAS arch/powerpc/boot/crt0.o BOOTCC arch/powerpc/boot/stdio.o BOOTCC arch/powerpc/boot/main.o BOOTCC arch/powerpc/boot/flatdevtree.o BOOTCC arch/powerpc/boot/flatdevtree_misc.o BOOTCC arch/powerpc/boot/ns16550.o BOOTCC arch/powerpc/boot/serial.o BOOTCC arch/powerpc/boot/simple_alloc.o BOOTAS arch/powerpc/boot/div64.o BOOTAS arch/powerpc/boot/util.o BOOTCC arch/powerpc/boot/gunzip_util.o BOOTCC arch/powerpc/boot/elf_util.o BOOTCC arch/powerpc/boot/inffast.o BOOTCC arch/powerpc/boot/inflate.o BOOTCC arch/powerpc/boot/inftrees.o BOOTCC arch/powerpc/boot/devtree.o BOOTCC arch/powerpc/boot/oflib.o BOOTCC arch/powerpc/boot/ofconsole.o BOOTCC arch/powerpc/boot/4xx.o BOOTCC arch/powerpc/boot/ebony.o BOOTCC arch/powerpc/boot/mv64x60.o BOOTCC arch/powerpc/boot/mpsc.o BOOTCC arch/powerpc/boot/mv64x60_i2c.o BOOTCC arch/powerpc/boot/cuboot.o BOOTCC arch/powerpc/boot/bamboo.o BOOTAR arch/powerpc/boot/wrapper.a BOOTCC arch/powerpc/boot/of.o BOOTCC arch/powerpc/boot/cuboot-83xx.o BOOTCC arch/powerpc/boot/cuboot-85xx.o BOOTCC arch/powerpc/boot/holly.o BOOTCC arch/powerpc/boot/cuboot-ebony.o BOOTCC arch/powerpc/boot/treeboot-ebony.o BOOTCC arch/powerpc/boot/prpmc2800.o BOOTAS arch/powerpc/boot/ps3-head.o BOOTAS arch/powerpc/boot/ps3-hvcall.o BOOTCC arch/powerpc/boot/ps3.o BOOTCC arch/powerpc/boot/treeboot-bamboo.o BOOTCC arch/powerpc/boot/cuboot-sequoia.o BOOTCC arch/powerpc/boot/treeboot-walnut.o{standard input}: Assembler messages:
{standard input}:184: Error: Unrecognized opcode:mfdcr' {standard input}:185: Error: Unrecognized opcode:mfdcr' {standard input}:186: Error: Unrecognized opcode:mfdcr' {standard input}:217: Error: Unrecognized opcode:mtdcr' make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 1
make: *** [uImage] Error 2
Quoted 4 lines
Quoted 1 line
It looks like the
ppc_6xxtoolchain does not know the opcode above. I wonder why files for other PowerPC sub-archs like 4xx are compiled with the wrong compiler. Have I missed something?No, you haven't missed anything. I need a one line patch to fix it. Could you try the patch below to make sure it works for you?
It works for me with one typo corrected (see below).
Quoted 5 lines
Quoted 2 lines
And the WARNING above on "Section mismatch" looks strange as well (still present in 2.6.23-rc7).
Those warnings should be gone with Paul's latest tree. (They will remain for 2.6.23.)
OK.
Quoted 10 lines
Pass the correct -mcpu option for treeboot-walnut.o to avoid unrecognized opcodes.
Signed-off-by Josh Boyer <[email protected]>arch/powerpc/boot/Makefile +0
-0
arch/powerpc/boot/Makefile BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) · line 36
Quoted 4 lines
arch/powerpc/boot/Makefile +1
-0@@ -33,6 +33,7 @@ BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) $(obj)/4xx.o: BOOTCFLAGS += -mcpu=440 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440 +$(obj)/treeboot-walnut.o: BOOTFLAGS += -mcpu=405
^^^^^^^^^ typo, should be BOOTCFLAGS
Thanks.
Wolfgang.
Re: [patch 6/6] Walnut zImage wrapper
Quoted 74 lines · On Mon, 24 Sep 2007 14:20:36 +0200 Wolfgang Grandegger <[email protected]>…
Quoted 73 lines · Josh Boyer
Quoted 71 lines · On Mon, 24 Sep 2007 09:49:33 +0200 Wolfgang Grandegger <[email protected]>…
The addition of
treeboot-walnut.cbreaks compilation of Linux-2.6 for the lite5200 using theppc_6xxtoolchain of the ELDK 4.1:MODPOST vmlinux.o
WARNING:vmlinux.o(.text+0x14): Section mismatch: reference to .init.text:prom_init (between '__start' and '__after_mmu_off')
WARNING:vmlinux.o(.text+0x28): Section mismatch: reference to .init.text:early_init (between '__start' and '__after_mmu_off')
WARNING:vmlinux.o(.text+0x340c): Section mismatch: reference to .init.text:machine_init (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x3414): Section mismatch: reference to .init.text:MMU_init (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x343e): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')
WARNING:vmlinux.o(.text+0x3442): Section mismatch: reference to .init.text:start_kernel (between 'start_here' and 'set_context')GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD vmlinux SYSMAP System.map BOOTAS arch/powerpc/boot/string.o BOOTAS arch/powerpc/boot/crt0.o BOOTCC arch/powerpc/boot/stdio.o BOOTCC arch/powerpc/boot/main.o BOOTCC arch/powerpc/boot/flatdevtree.o BOOTCC arch/powerpc/boot/flatdevtree_misc.o BOOTCC arch/powerpc/boot/ns16550.o BOOTCC arch/powerpc/boot/serial.o BOOTCC arch/powerpc/boot/simple_alloc.o BOOTAS arch/powerpc/boot/div64.o BOOTAS arch/powerpc/boot/util.o BOOTCC arch/powerpc/boot/gunzip_util.o BOOTCC arch/powerpc/boot/elf_util.o BOOTCC arch/powerpc/boot/inffast.o BOOTCC arch/powerpc/boot/inflate.o BOOTCC arch/powerpc/boot/inftrees.o BOOTCC arch/powerpc/boot/devtree.o BOOTCC arch/powerpc/boot/oflib.o BOOTCC arch/powerpc/boot/ofconsole.o BOOTCC arch/powerpc/boot/4xx.o BOOTCC arch/powerpc/boot/ebony.o BOOTCC arch/powerpc/boot/mv64x60.o BOOTCC arch/powerpc/boot/mpsc.o BOOTCC arch/powerpc/boot/mv64x60_i2c.o BOOTCC arch/powerpc/boot/cuboot.o BOOTCC arch/powerpc/boot/bamboo.o BOOTAR arch/powerpc/boot/wrapper.a BOOTCC arch/powerpc/boot/of.o BOOTCC arch/powerpc/boot/cuboot-83xx.o BOOTCC arch/powerpc/boot/cuboot-85xx.o BOOTCC arch/powerpc/boot/holly.o BOOTCC arch/powerpc/boot/cuboot-ebony.o BOOTCC arch/powerpc/boot/treeboot-ebony.o BOOTCC arch/powerpc/boot/prpmc2800.o BOOTAS arch/powerpc/boot/ps3-head.o BOOTAS arch/powerpc/boot/ps3-hvcall.o BOOTCC arch/powerpc/boot/ps3.o BOOTCC arch/powerpc/boot/treeboot-bamboo.o BOOTCC arch/powerpc/boot/cuboot-sequoia.o BOOTCC arch/powerpc/boot/treeboot-walnut.o{standard input}: Assembler messages:
{standard input}:184: Error: Unrecognized opcode:mfdcr' {standard input}:185: Error: Unrecognized opcode:mfdcr' {standard input}:186: Error: Unrecognized opcode:mfdcr' {standard input}:217: Error: Unrecognized opcode:mtdcr' make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 1
make: *** [uImage] Error 2
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
It looks like the
ppc_6xxtoolchain does not know the opcode above. I wonder why files for other PowerPC sub-archs like 4xx are compiled with the wrong compiler. Have I missed something?No, you haven't missed anything. I need a one line patch to fix it. Could you try the patch below to make sure it works for you?
It works for me with one typo corrected (see below).
Ah, yes. That's what I get for coding before coffee.
Thanks Wolfgang.
josh