AmigaOne platform patches v2
Hi!
I updated the patches for the AmigaOne platform based on your comments. The following changes were made compared to v1:
setup.c:
- replaced "model" entry in /proc/cpuinfo with a "vendor" entry
- replaced cache flushing code in amigaone_restart() with call to __flush_disable_L1()
- removed feature fixup code in amigaone_probe(): only AmigaOnes with G3 can run an unmodified kernel for now, until the PPC32 startup code is reorganized to do the feature fixup after probe_machine()
amigaone.dts:
- removed nodes for probeable PCI devices
- removed device_type properties that are not used by the kernel
I didn't add an interrupt-map property yet. I would have to make 3 versions of the dts, if this is required.
Thanks!
Gerhard
Signature · 1 line
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
PATCH v2 1/4 Add platform support for AmigaOne
This commit adds the setup code for booting Linux on AmigaOne G3SE (G3 only), AmigaOne XE and uA1 (G3/G4) desktop computers. These boards were sold by Eyetech and are based on MAI Logic's Teron boards and its Articia S northbridge.
The AmigaOne uses U-boot as firmware, which doesn't support a flattened device tree yet. The northbridge has some design flaws, which makes it necessary to use non cacheable memory for DMA operations (CONFIG_NOT_COHERENT_CACHE) and to avoid setting the coherence (M) flag for memory pages.
--- arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/platforms/Makefile | 1 + arch/powerpc/platforms/amigaone/Kconfig | 18 ++++ arch/powerpc/platforms/amigaone/Makefile | 1 + arch/powerpc/platforms/amigaone/setup.c | 161 ++++++++++++++++++++++++++++++ 5 files changed, 182 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/platforms/amigaone/Kconfig create mode 100644 arch/powerpc/platforms/amigaone/Makefile create mode 100644 arch/powerpc/platforms/amigaone/setup.c
arch/powerpc/platforms/Kconfig +1 -0
@@ -28,6 +28,7 @@ source "arch/powerpc/platforms/86xx/Kconfig" source "arch/powerpc/platforms/embedded6xx/Kconfig" source "arch/powerpc/platforms/44x/Kconfig" source "arch/powerpc/platforms/40x/Kconfig" +source "arch/powerpc/platforms/amigaone/Kconfig" config PPC_NATIVE bool
arch/powerpc/platforms/Makefile +1 -0
@@ -19,3 +19,4 @@ obj-$(CONFIG_PPC_PASEMI) += pasemi/ obj-$(CONFIG_PPC_CELL) += cell/ obj-$(CONFIG_PPC_PS3) += ps3/ obj-$(CONFIG_EMBEDDED6xx) += embedded6xx/ +obj-$(CONFIG_AMIGAONE) += amigaone/
arch/powerpc/platforms/amigaone/Kconfig new file +18 -0
@@ -0,0 +1,18 @@ +config AMIGAONE + bool "Eyetech AmigaOne/MAI Teron" + depends on PPC32 && BROKEN_ON_SMP && PPC_MULTIPLATFORM + select PPC_I8259 + select PPC_INDIRECT_PCI + select PPC_UDBG_16550 + select PCI + select NOT_COHERENT_CACHE + select CHECK_CACHE_COHERENCY + select DEFAULT_UIMAGE + select PCSPKR_PLATFORM + help + Select AmigaOne for the following machines: + - AmigaOne SE/Teron CX (G3 only) + - AmigaOne XE/Teron PX + - uA1/Teron mini + More information is available at: + <http://amigaone-linux.sourceforge.net/>.
arch/powerpc/platforms/amigaone/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-y += setup.o
arch/powerpc/platforms/amigaone/setup.c new file +161 -0
161 lines not on this page · raw message
Signature · 5 lines
1.5.3.4 -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
Re: [PATCH v2 1/4] Add platform support for AmigaOne
Quoted 5 lines
+
hose->first_busno=bus_range? bus_range[0] : 0;
+hose->last_busno=bus_range? bus_range[1] :0xff; +
+setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);
Minor in the context of amigaone but still... the above should come from the device-tree... I suppose those are really just IO space addresses cf8 and cfc, in which case, an option is to call that first:
Quoted 3 lines
+ /* Interpret the "ranges" property */
+ /* This also maps the I/O region and sets isa_io/mem_base */
+pci_process_bridge_OF_ranges(hose, dev, 1);
And -then- use hose->io_resource.start + 0xcf8 / 0xcfc, the later can be hard coded as they are pretty standard values.
Ben.
Re: [PATCH v2 1/4] Add platform support for AmigaOne
-------- Original-Nachricht --------
Quoted 6 lines
Datum: Wed, 04 Feb 2009 14:50:07 +1100
Von: Benjamin Herrenschmidt <[email protected]>
An: Gerhard Pircher <[email protected]>
CC: linuxppc-dev list <[email protected]>
Betreff: Re: [PATCH v2 1/4] Add platform support for AmigaOne
Quoted 8 lines
Quoted 4 lines
+
hose->first_busno=bus_range? bus_range[0] : 0;
+hose->last_busno=bus_range? bus_range[1] :0xff; +
+setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);Minor in the context of amigaone but still... the above should come from the device-tree... I suppose those are really just IO space addresses cf8 and cfc, in which case, an option is to call that first:
I agree that these addresses should come from the device-tree, but these two config registers are not located within the normal PCI I/O address space (0xfe000000-0xfec00000).
Maybe I should add a "reg" property to the PHB node, but I don't know if this is the right approach. The OF PCI spec isn't very clear about this. What do you think?
Gerhard
Signature · 1 line
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
Re: [PATCH v2 1/4] Add platform support for AmigaOne
Quoted 6 lines · Gerhard Pircher
I agree that these addresses should come from the device-tree, but these two config registers are not located within the normal PCI I/O address space (0xfe000000-0xfec00000).
Maybe I should add a "reg" property to the PHB node, but I don't know if this is the right approach. The OF PCI spec isn't very clear about this. What do you think?
Yup, "reg" in the PHB is what most machines use for that.
Cheers,
Ben.
Re: [PATCH v2 1/4] Add platform support for AmigaOne
In reply to Benjamin HerrenschmidtQuoted 9 lines · Benjamin Herrenschmidt
Quoted 5 lines
+
hose->first_busno=bus_range? bus_range[0] : 0;
+hose->last_busno=bus_range? bus_range[1] :0xff; +
+setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);Minor in the context of amigaone but still... the above should come from the device-tree... I suppose those are really just IO space addresses cf8 and cfc, in which case, an option is to call that first:
Hmm, the first is feC...,the other one feE..., 2Mbytes apart.
I don't know the hardware but I've never seen something like that. Of course a typo is always a possibility...
Gabriel
Re: [PATCH v2 1/4] Add platform support for AmigaOne
-------- Original-Nachricht --------
Quoted 13 lines
Datum: Wed, 4 Feb 2009 21:59:41 +0100
Von: Gabriel Paubert <[email protected]>
An: Benjamin Herrenschmidt <[email protected]>
CC: Gerhard Pircher <[email protected]>, linuxppc-dev list <[email protected]>
Betreff: Re: [PATCH v2 1/4] Add platform support for AmigaOneQuoted 6 lines · Benjamin Herrenschmidt
Quoted 5 lines
+
hose->first_busno=bus_range? bus_range[0] : 0;
+hose->last_busno=bus_range? bus_range[1] :0xff; +
+setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);
Quoted 8 lines
Quoted 3 lines
Minor in the context of amigaone but still... the above should come from the device-tree... I suppose those are really just IO space addresses cf8 and cfc, in which case, an option is to call that first:
Hmm, the first is feC...,the other one feE..., 2Mbytes apart.
I don't know the hardware but I've never seen something like that. Of course a typo is always a possibility...
The Pegasos 1 uses the same northbridge and chrp_find_bridges() calls setup_indirect_pci() with the same addresses.
Gerhard
Signature · 2 lines
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
Re: [PATCH v2 1/4] Add platform support for AmigaOne
Quoted 19 lines · Gerhard Pircher
-------- Original-Nachricht --------
Quoted 17 lines
Datum: Wed, 4 Feb 2009 21:59:41 +0100
Von: Gabriel Paubert <[email protected]>
An: Benjamin Herrenschmidt <[email protected]>
CC: Gerhard Pircher <[email protected]>, linuxppc-dev list <[email protected]>
Betreff: Re: [PATCH v2 1/4] Add platform support for AmigaOneQuoted 9 lines · Benjamin Herrenschmidt
Quoted 5 lines
+
hose->first_busno=bus_range? bus_range[0] : 0;
+hose->last_busno=bus_range? bus_range[1] :0xff; +
+setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc, 0);Minor in the context of amigaone but still... the above should come from the device-tree... I suppose those are really just IO space addresses cf8 and cfc, in which case, an option is to call that first:
Quoted 6 lines
Quoted 4 lines
Hmm, the first is feC...,the other one feE..., 2Mbytes apart.
I don't know the hardware but I've never seen something like that. Of course a typo is always a possibility...
The Pegasos 1 uses the same northbridge and
chrp_find_bridges()callssetup_indirect_pci()with the same addresses.
As a proud owner, I concur that those numbers are correct...
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
[RFC] Error handling in *_add/find_bridges()
In reply to Benjamin HerrenschmidtHi!
I have a minor question about the error handling in the various *_add/find_bridges functions, which are used to detect and initialize PHBs. AFAIK all of them return an error code that is never checked in
the platform setup code (e.g. when there is no memory for thepci_controller struct).
Shouldn't the kernel panic (BUG();), when it can't initialize the PHB
for whatever reason and the platform depends on a working PCI bus?
Thanks!
regards,
Gerhard
Signature · 2 lines
Jetzt 1 Monat kostenlos! GMX FreeDSL - Telefonanschluss + DSL für nur 17,95 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a