Skip to contentSkip to conversation

EP405 boards support for arch/powerpc

PATCH In review Benjamin Herrenschmidt 1 participant 1 message Dec 13, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 8/20 EP405 boards support for arch/powerpc

Brings EP405 support to arch/powerpc. The IRQ routing for the CPLD comes from a device-tree property, PCI is working to the point where I can see the video card, USB device, and south bridge.

This should work with both EP405 and EP405PC.

I've not totally figured out how IRQs are wired on this hardware though, thus at this stage, expect only USB interrupts working, pretty much the same as what arch/ppc did.

Also, the flash, nvram, rtc and temp control still have to be wired.

---

Note about IRQ routing: The doc is very obscure in that area.

I _think_ the SB interrupt on the CPLD is actually the Windond's 8259 output and the NB interrupt is the PCI_A...PCI_D mux in there (which can be implemented as a cascaded controller) but I haven't sorted that out yet. If anybody from Embedded Planet is around, I could use some advice there.

If my deductions are correct, then we would need to wire up the 8259 driver to SB, which should be trivial provided I stick the windbond bridge in the device-tree, or at least part of it, and probably implement a cascaded controller for the PCI IRQ A...D mux thingy, which should also be trivial.

Note also that it tends to lockup during the transition from the boot wrapper to the kernel, before udbg is started. I didn't have a RiscWatch at hand so I haven't yet been able to track that down. It's random though, quite weird. Maybe some stale TLB entries or cache content that isn't cleared properly...

 arch/powerpc/boot/4xx.c              |   55 +-
 arch/powerpc/boot/4xx.h              |    1 
 arch/powerpc/boot/Makefile           |    3 
 arch/powerpc/boot/dts/ep405.dts      |  221 ++++++++
 arch/powerpc/boot/ep405.c            |   74 ++
 arch/powerpc/boot/treeboot-walnut.c  |   49 -
 arch/powerpc/boot/wrapper            |    2 
 arch/powerpc/configs/ep405_defconfig |  951 +++++++++++++++++++++++++++++++++++
 arch/powerpc/platforms/40x/Kconfig   |   21 
 arch/powerpc/platforms/40x/Makefile  |    1 
 arch/powerpc/platforms/40x/ep405.c   |  124 ++++
 11 files changed, 1436 insertions(+), 66 deletions(-)
arch/powerpc/boot/Makefile +2 -1
@@ -58,7 +58,7 @@ src-plat := of.c cuboot-52xx.c cuboot-83
 		cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
 		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
 		cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c cuboot-bamboo.c \
-		fixed-head.S ep88xc.c cuboot-hpc2.c
+		fixed-head.S ep88xc.c cuboot-hpc2.c ep405.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -154,6 +154,7 @@ image-$(CONFIG_DEFAULT_UIMAGE)		+= uImag
 ifneq ($(CONFIG_DEVICE_TREE),"")
 image-$(CONFIG_PPC_8xx)			+= cuImage.8xx
 image-$(CONFIG_PPC_EP88XC)		+= zImage.ep88xc
+image-$(CONFIG_EP405)			+= zImage.ep405
 image-$(CONFIG_8260)			+= cuImage.pq2
 image-$(CONFIG_PPC_MPC52xx)		+= cuImage.52xx
 image-$(CONFIG_PPC_83xx)		+= cuImage.83xx
arch/powerpc/boot/ep405.c new file +74 -0

74 lines not on this page · raw message

arch/powerpc/boot/dts/ep405.dts new file +221 -0

221 lines not on this page · raw message

arch/powerpc/boot/4xx.c +54 -1

70 lines not on this page · raw message

arch/powerpc/boot/treeboot-walnut.c +0 -49

55 lines not on this page · raw message

arch/powerpc/platforms/40x/Kconfig +7 -14
Index: linux-merge/arch/powerpc/platforms/40x/Kconfig
===================================================================
@@ -14,20 +14,13 @@
 #	help
 #	  This option enables support for the CPCI405 board.
 
-#config EP405
-#	bool "EP405/EP405PC"
-#	depends on 40x
-#	default n
-#	select 405GP
-#	help
-#	  This option enables support for the EP405/EP405PC boards.
-
-#config EP405PC
-#	bool "EP405PC Support"
-#	depends on EP405
-#	default y
-#	help
-#	  This option enables support for the extra features of the EP405PC board.
+config EP405
+	bool "EP405/EP405PC"
+	depends on 40x
+	default n
+	select 405GP
+	help
+	  This option enables support for the EP405/EP405PC boards.
 
 config KILAUEA
 	bool "Kilauea"
arch/powerpc/platforms/40x/Makefile +1 -0
Index: linux-merge/arch/powerpc/platforms/40x/Makefile
===================================================================
@@ -1,3 +1,4 @@
 obj-$(CONFIG_KILAUEA)				+= kilauea.o
 obj-$(CONFIG_WALNUT)				+= walnut.o
 obj-$(CONFIG_XILINX_VIRTEX_GENERIC_BOARD)	+= virtex.o
+obj-$(CONFIG_EP405)				+= ep405.o
arch/powerpc/platforms/40x/ep405.c new file +124 -0

124 lines not on this page · raw message

arch/powerpc/boot/4xx.h +1 -0
Index: linux-merge/arch/powerpc/boot/4xx.h
===================================================================
@@ -18,5 +18,6 @@ void ibm40x_dbcr_reset(void);
 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
 void ibm4xx_fixup_ebc_ranges(const char *ebc);
 void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk);
+void ibm405gp_fixup_clocks(unsigned int sysclk, unsigned int ser_clk);
 
 #endif /* _POWERPC_BOOT_4XX_H_ */
arch/powerpc/boot/wrapper +1 -1
Index: linux-merge/arch/powerpc/boot/wrapper
===================================================================
@@ -168,7 +168,7 @@ ps3)
     ksection=.kernel:vmlinux.bin
     isection=.kernel:initrd
     ;;
-ep88xc)
+ep88xc|ep405)
     platformo="$object/fixed-head.o $object/$platform.o"
     binary=y
     ;;
arch/powerpc/configs/ep405_defconfig new file +951 -0

951 lines not on this page · raw message