Added preliminary support for Netstal HCU4 board
Subsystems (2)
PATCH 1/1 Added preliminary support for Netstal HCU4 board
Adds preliminary support for a HCU4 PPC405GPr based board from Netstal Maschinen AG.
For the last 3 years I have been the only user running Linux on this board, but it served me well as testbed for the xenomai realtime extension to the Linux kernel.
Patch against the git://www.denx.de/git/linux-2.6-denx.git
--- arch/powerpc/boot/dts/hcu4.dts | 175 ++++++ arch/powerpc/configs/40x/hcu4_defconfig | 929 +++++++++++++++++++++++++++++++ arch/powerpc/platforms/40x/Kconfig | 8 + arch/powerpc/platforms/40x/Makefile | 1 + arch/powerpc/platforms/40x/hcu4.c | 61 ++ arch/ppc/platforms/4xx/hcu4.h | 43 ++ include/asm-ppc/ibm4xx.h | 4 + 7 files changed, 1221 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/boot/dts/hcu4.dts create mode 100644 arch/powerpc/configs/40x/hcu4_defconfig create mode 100644 arch/powerpc/platforms/40x/hcu4.c create mode 100644 arch/ppc/platforms/4xx/hcu4.h
arch/powerpc/boot/dts/hcu4.dts new file +175 -0
@@ -0,0 +1,175 @@ +/* + * Device Tree Source for Netstal Maschinen HCU4 + * based on the IBM Walnut + * + * Copyright 2008 + * Niklaus Giger <[email protected]> + * + * 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,hcu4"; + compatible = "ibm,hcu4"; + dcr-parent = <&/cpus/cpu@0>; + + aliases { + ethernet0 = &EMAC; + serial0 = &UART0; + }; + + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + model = "PowerPC,405GPr"; + 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 = <1>; + num-rx-chans = <1>; + interrupt-parent = <&UIC0>; + interrupts = < + b 4 /* TXEOB */ + c 4 /* RXEOB */ + a 4 /* SERR */ + d 4 /* TXDE */ + e 4 /* RXDE */>; + }; + + 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>; + }; + + 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 { + device_type = "network"; + compatible = "ibm,emac-405gp", "ibm,emac"; + interrupt-parent = <&UIC0>; + interrupts = < + f 4 /* Ethernet */ + 9 4 /* Ethernet Wake Up */>; + local-mac-address = [000000000000]; /* Filled in by zImage */ + reg = <ef600800 70>; + mal-device = <&MAL>; + mal-tx-channel = <0>; + 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>; + /* The ranges property is supplied by the bootwrapper + * and is based on the firmware's configuration of the + * EBC bridge + */ + clock-frequency = <0>; /* Filled in by zImage */ + + sram@0,0 { + reg = <0 0 80000>; + }; + + flash@0,80000 { + compatible = "jedec-flash"; + bank-width = <1>; + reg = <0 80000 80000>; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "OpenBIOS"; + reg = <0 80000>; + read-only; + }; + }; + + }; + }; + + chosen { + linux,stdout-path = "/plb/opb/serial@ef600300"; + }; +};
(quoted diff) +0 -0
b/arch/powerpc/configs/40x/hcu4_defconfig
new file mode 100644
index 0000000..682fce0
arch/powerpc/configs/40x/hcu4_defconfig new file +929 -0
929 lines not on this page · raw message
(quoted diff) +0 -0
b/arch/powerpc/platforms/40x/Kconfig
index a9260e2..3bf4eb5 100644
arch/powerpc/platforms/40x/Kconfig +8 -0
@@ -23,6 +23,14 @@ config EP405 help This option enables support for the EP405/EP405PC boards. +config HCU4 + bool "Hcu4" + depends on 40x + default y + select 405GPr + help + This option enables support for the Nestal Maschinen HCU4 board. + config KILAUEA bool "Kilauea" depends on 40x
(quoted diff) +0 -0
b/arch/powerpc/platforms/40x/Makefile
index 5d53107..43d1ed7 100644
arch/powerpc/platforms/40x/Makefile +1 -0
@@ -1,4 +1,5 @@ obj-$(CONFIG_KILAUEA) += kilauea.o +obj-$(CONFIG_HCU4) += hcu4.o obj-$(CONFIG_MAKALU) += makalu.o obj-$(CONFIG_WALNUT) += walnut.o obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD) += virtex.o
(quoted diff) +0 -0
b/arch/powerpc/platforms/40x/hcu4.c
new file mode 100644
index 0000000..af147f0
arch/powerpc/platforms/40x/hcu4.c new file +61 -0
61 lines not on this page · raw message
arch/ppc/platforms/4xx/hcu4.h new file +43 -0
43 lines not on this page · raw message
include/asm-ppc/ibm4xx.h +4 -0
@@ -35,6 +35,10 @@#include <platforms/4xx/ep405.h> #endif +#if defined(CONFIG_HCU4 ) +#include <platforms/4xx/hcu4.h> +#endif +#if defined(CONFIG_KILAUEA )#include <platforms/4xx/kilauea.h> #endif
Signature · 1 line
1.6.0.1
Quoted 6 lines · Niklaus Giger
Adds preliminary support for a HCU4 PPC405GPr based board from Netstal Maschinen AG.
For the last 3 years I have been the only user running Linux on this board, but it served me well as testbed for the xenomai realtime extension to the Linux kernel.
Overall, really nice for a first submission.
Quoted 1 line
Patch against the
git://www.denx.de/git/linux-2.6-denx.git
Can you rebase against:
git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git next
?
arch/powerpc/boot/dts/hcu4.dts line 3
Quoted 9 lines
arch/powerpc/boot/dts/hcu4.dts new file +3
-0@@ -0,0 +1,175 @@ +/* + * Device Tree Source for Netstal Maschinen HCU4 + * based on the IBM Walnut
<snip>
We want dts-v1 files in the kernel now. It's a much cleaner represenation. See the DTS files in the git repo I pointed to above for examples. I think there are conversion scripts as well.
arch/powerpc/boot/dts/hcu4.dts line 20
Quoted 5 lines
arch/powerpc/boot/dts/hcu4.dts new file +5
-0+/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,hcu4"; + compatible = "ibm,hcu4";
These shouldn't be "ibm,hcu4". IBM didn't make these boards. Instead, you should make them "<company>,<board>", where <company> is the company that made them (often the stock ticker is used), and <board> is obviously hcu4 in this case.
Quoted 6 lines
arch/powerpc/boot/dts/hcu4.dts new file +6
-0+ dcr-parent = <&/cpus/cpu@0>; + + aliases { + ethernet0 = &EMAC; + serial0 = &UART0; + };
arch/powerpc/boot/dts/hcu4.dts line 36
Quoted 10 lines
arch/powerpc/boot/dts/hcu4.dts new file +10
-0+ + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + model = "PowerPC,405GPr"; + reg = <0>; + clock-frequency = <bebc200>; /* Filled in by zImage */
Still filled in, or is the comment bogus now?
<snip>
Quoted 6 lines
arch/powerpc/platforms/40x/Kconfig +0
-0
arch/powerpc/platforms/40x/Kconfig config EP405 · line 30
Quoted 8 lines
arch/powerpc/platforms/40x/Kconfig +5
-0@@ -23,6 +23,14 @@ config EP405 help This option enables support for the EP405/EP405PC boards. +config HCU4 + bool "Hcu4" + depends on 40x + default y + select 405GPr
I think this should have been:
select 405GPR
<snip>
arch/ppc/platforms/4xx/hcu4.h
Quoted 5 lines
arch/ppc/platforms/4xx/hcu4.h new file +0
-0
arch/ppc doesn't exist anymore. You can drop this file entirely.
<snip>
include/asm-ppc/ibm4xx.h
Quoted 4 lines
include/asm-ppc/ibm4xx.h +0
-0
Same comment as above.
josh
Am Mittwoch 01 Oktober 2008 20.08:35 schrieb Josh Boyer:
Quoted 9 lines · Niklaus Giger
Quoted 6 lines
Adds preliminary support for a HCU4 PPC405GPr based board from Netstal Maschinen AG.
For the last 3 years I have been the only user running Linux on this board, but it served me well as testbed for the xenomai realtime extension to the Linux kernel.
Overall, really nice for a first submission.
One never has a second chance to make a first imrpession.
It was easy to make the needed changes (except changing ibm -> amcc, see below). The dtc does the conversion from the old to the new format dts-v1 without a hitch. Calling "dtc -I dts -O dts hcu5.dts.old >hcu5.dts.new"l
My board is now in even better shape than before as I discovered that in my dts I even wrongly overwrote a the speed variable for the early boot messages. Thanks a lot for suggestion!
Quoted 10 lines
arch/powerpc/boot/dts/hcu4.dts line 20
Quoted 5 lines
arch/powerpc/boot/dts/hcu4.dts new file +5
-0+/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,hcu4"; + compatible = "ibm,hcu4";These shouldn't be "ibm,hcu4". IBM didn't make these boards. Instead, you should make them "<company>,<board>", where <company> is the company that made them (often the stock ticker is used), and <board> is obviously hcu4 in this case.
Can you explain this a little bit more to me. When we started to fabricate our boards we got the chips (or were it only the even older PPC403?) from IBM. If I just replace in this dts file "ibm" by "amcc" my board does not boot anymore. But if you give me a hint where and what I have to replace. I would volunteer to clean it up (if it not too much work) a little bit.
I cannot test on all boards but I have a walnut, yosemite and sequoia board at hand. Therefore I would be more confident to limit the cleanup to these boards. (But only after my vacation, e.g. after the 20 of october).
Would you accept in the mean time a patch which still refers to "ibm,uic"?
Best regards
Niklaus
Quoted 31 lines · On Thu, 2 Oct 2008 00:14:19 +0200 Niklaus Giger <[email protected]>…
Am Mittwoch 01 Oktober 2008 20.08:35 schrieb Josh Boyer:
Quoted 9 lines · Niklaus Giger
Quoted 6 lines
Adds preliminary support for a HCU4 PPC405GPr based board from Netstal Maschinen AG.
For the last 3 years I have been the only user running Linux on this board, but it served me well as testbed for the xenomai realtime extension to the Linux kernel.
Overall, really nice for a first submission.
One never has a second chance to make a first imrpession.
It was easy to make the needed changes (except changing ibm -> amcc, see below). The dtc does the conversion from the old to the new format dts-v1 without a hitch. Calling "dtc -I dts -O dts hcu5.dts.old >hcu5.dts.new"l
My board is now in even better shape than before as I discovered that in my dts I even wrongly overwrote a the speed variable for the early boot messages. Thanks a lot for suggestion!
Quoted 10 lines
arch/powerpc/boot/dts/hcu4.dts line 20
Quoted 5 lines
arch/powerpc/boot/dts/hcu4.dts new file +5
-0+/ { + #address-cells = <1>; + #size-cells = <1>; + model = "ibm,hcu4"; + compatible = "ibm,hcu4";These shouldn't be "ibm,hcu4". IBM didn't make these boards. Instead, you should make them "<company>,<board>", where <company> is the company that made them (often the stock ticker is used), and <board> is obviously hcu4 in this case.
Quoted 5 lines
Can you explain this a little bit more to me. When we started to fabricate our boards we got the chips (or were it only the even older PPC403?) from IBM. If I just replace in this dts file "ibm" by "amcc" my board does not boot anymore. But if you give me a hint where and what I have to replace. I would volunteer to clean it up (if it not too much work) a little bit.
No no. I don't mean throughout the DTS file. I just mean in the top level model and compatible properties. Those properties apply to the overall board. The CPU an ASCIs (EMAC, serial, etc) in the DTS are most certainly from IBM, but your company actually manufactures the board.
So the top should be something like:
model = "netstal,hcu4";
compatible = "netstal,hcu4";
Everything else in the DTS looked fine in this regard as it is.
You will have to change your hcu4.c file to have:
if (!of_flat_dt_is-compatible(root, "netstal,hcu4")) return 0;
and then it should be ok.
josh
Quoted 9 lines · Niklaus Giger
Am Mittwoch 01 Oktober 2008 20.08:35 schrieb Josh Boyer:
Quoted 8 lines · Niklaus Giger
Quoted 6 lines
Adds preliminary support for a HCU4 PPC405GPr based board from Netstal Maschinen AG.
For the last 3 years I have been the only user running Linux on this board, but it served me well as testbed for the xenomai realtime extension to the Linux kernel.
Quoted 6 lines
Quoted 1 line
Overall, really nice for a first submission.
One never has a second chance to make a first imrpession.
It was easy to make the needed changes (except changing ibm -> amcc, see below). The dtc does the conversion from the old to the new format dts-v1 without a hitch. Calling "dtc -I dts -O dts hcu5.dts.old >hcu5.dts.new"l
That will work, but will lose comments, references, and other formatting, because it essentially compiles then decompiles the tree. You probably don't want to do that. There's also an explicit conversion program, convert-dtsv0, which will preserve that not-significant-to-output, but useful for the reader information.
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
Hi David
Am Donnerstag 02 Oktober 2008 02.52:08 schrieb David Gibson:
Quoted 5 lines
That will work, but will lose comments, references, and other formatting, because it essentially compiles then decompiles the tree. You probably don't want to do that. =A0There's also an explicit conversion program, convert-dtsv0, which will preserve that not-significant-to-output, but useful for the reader information.
Thanks for providing me the hint. Using it, would surely have been easier= =20
than adding manually the comment again. However I using the search=20 "dtc dts-v1 syntax conversion script" didn't give me any hint and even in t= he=20
the current http://www.jdl.com/software/dtc.git I find no word in the=20 Documentation about convert-dtsv0.
Neither does it get installed when calling make install.
Therefore I would suggest you to add a small remark like this:
convert-dtsv0 is a small utility program which converts (DTS) Device Tree Source from the obsolete version 0 to version 1. Version 1 DTS files are marked by line "/dts-v1/;" at the top of the file.
Best regards
Niklaus
Quoted 9 lines · Niklaus Giger
Hi David
Am Donnerstag 02 Oktober 2008 02.52:08 schrieb David Gibson:
Quoted 5 lines
That will work, but will lose comments, references, and other formatting, because it essentially compiles then decompiles the tree. You probably don't want to do that. There's also an explicit conversion program, convert-dtsv0, which will preserve that not-significant-to-output, but useful for the reader information.
Quoted 7 lines
Thanks for providing me the hint. Using it, would surely have been easier than adding manually the comment again. However I using the search "dtc dts-v1 syntax conversion script" didn't give me any hint and even in the the current http://www.jdl.com/software/dtc.git I find no word in the Documentation about convert-dtsv0.
Neither does it get installed when calling make install.
Ah, yes, that's a bug.
Quoted 5 lines
Therefore I would suggest you to add a small remark like this:
convert-dtsv0 is a small utility program which converts (DTS) Device Tree Source from the obsolete version 0 to version 1. Version 1 DTS files are marked by line "/dts-v1/;" at the top of the file.
Add this remark where, though?
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
Am Donnerstag 02 Oktober 2008 08.41:56 schrieb David Gibson:
Quoted 12 lines · Niklaus Giger
Quoted 11 lines
Hi David
Am Donnerstag 02 Oktober 2008 02.52:08 schrieb David Gibson:
Quoted 5 lines
That will work, but will lose comments, references, and other formatting, because it essentially compiles then decompiles the tree. You probably don't want to do that. =A0There's also an explicit conversion program, convert-dtsv0, which will preserve that not-significant-to-output, but useful for the reader information.
Thanks for providing me the hint. Using it, would surely have been easier than adding manually the comment again. However I using the sear=
ch
Quoted 1 line
Quoted 1 line
"dtc dts-v1 syntax conversion script" didn't give me any hint and even =
in
Quoted 7 lines
Quoted 4 lines
the the current http://www.jdl.com/software/dtc.git I find no word in the Documentation about convert-dtsv0.
Neither does it get installed when calling make install.
Ah, yes, that's a bug.
Quoted 7 lines
Quoted 5 lines
Therefore I would suggest you to add a small remark like this:
convert-dtsv0 is a small utility program which converts (DTS) Device Tree Source from the obsolete version 0 to version 1. Version 1 DTS files are marked by line "/dts-v1/;" at the top of the file.
Add this remark where, though?
Add a small chapter IV Utilities in your Documentation/manual.txt.
And if the http://www.jdl.com/git_repos/ would work again, I think the spid= ers=20
would pick it up from there.
Best regards
Niklaus
Quoted 6 lines · Niklaus Giger
Quoted 5 lines
Quoted 3 lines
convert-dtsv0 is a small utility program which converts (DTS) Device Tree Source from the obsolete version 0 to version 1. Version 1 DTS files are marked by line "/dts-v1/;" at the top of the file.
Add this remark where, though?
Add a small chapter IV Utilities in your
Documentation/manual.txt.
Patches welcome, of course. :-)
Quoted 2 lines
And if the http://www.jdl.com/git_repos/ would work again, I think the spiders would pick it up from there.
I fetched http://www.jdl.com/software/dtc.git through my firewall at work just this morning. What problem are you seeing? Are you unable to clonegit://git.jdl.com/software/dtc/git ?
jdl
Am Donnerstag 02 Oktober 2008 21.37:00 schrieb Jon Loeliger:
Quoted 14 lines · Niklaus Giger
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
convert-dtsv0 is a small utility program which converts (DTS) Device Tree Source from the obsolete version 0 to version 1. Version 1 DTS files are marked by line "/dts-v1/;" at the top of the file.
Add this remark where, though?
Add a small chapter IV Utilities in your
Documentation/manual.txt.Patches welcome, of course. :-)
Quoted 2 lines
And if the http://www.jdl.com/git_repos/ would work again, I think the spiders would pick it up from there.
Quoted 6 lines
I fetched http://www.jdl.com/software/dtc.git through my firewall at work just this morning. What problem are you seeing? Are you unable to clone
git://git.jdl.com/software/dtc/git?jdl
git pull worked perfectly. But in Documentation/manual.txt you promise:
Quoted 3 lines
-- The gitweb interface is:
http://www.jdl.com/git_repos/
And this link does not work.
Best regards.
Niklaus
Quoted 5 lines · Niklaus Giger
git pull worked perfectly. But in
Documentation/manual.txtyou promise:Quoted 3 lines
-- The gitweb interface is:
http://www.jdl.com/git_repos/And this link does not work.
Gah. Thanks.
jdl