Skip to contentSkip to conversation

Support AMCC Yosemite 440EP and Yellowstone 440GR (v3)

PATCH In review John Otken 1 participant 1 message Jan 17, 2006

lore
Share & tools
lore

John Otken

author
#0 lore raw

PATCH 1/3 Support AMCC Yosemite 440EP and Yellowstone 440GR (v3)

This updated patch adds support for AMCC 440EP Yosemite and 440GR Yellowstone evaluation boards.

I tested it against the 2.6.15 kernel on both boards using gcc 4.0.0 (ELDK 4.0).

The Yosemite platform files are based on Wade Farnsworth's Bamboo code. There is only a single board name macro that depends on CONFIG_YOSEMITE vs CONFIG_YELLOWSTONE so I didn't create an otherwise identical yellowstone.c/h.

The defconfig files are in parts 2 and 3.

This patch supersedes "Patch: [PATCH 1/3] Support AMCC Yosemite 440EP and Yellowstone 440GR (v2)" from 9-03:
http://patchwork.ozlabs.org/linuxppc/patch?id=2240

This patch has Stefan Roese's YOSEMITE_PCI_IO_BASE bug fix.

440EP USB support requires Wade Farnsworth's patches:

Sep19 W Farnsworth Add support for the AMCC 440EP to the
PowerPC OHCI USB host driver
Sep19 W Farnsworth Add support for the USB Device interfaces
on the AMCC 440EP
Sep20 W Farnsworth Add support for USB to 440EP platform files
http://patchwork.ozlabs.org/linuxppc//patch?id=2481

Comments are welcome.

arch/ppc/platforms/4xx/Kconfig +21 -4
diff -uprN a/arch/ppc/platforms/4xx/Kconfig c/arch/ppc/platforms/4xx/Kconfig
@@ -94,6 +94,18 @@ config OCOTEA
 	help
 	  This option enables support for the IBM PPC440GX evaluation board.
 
+config YELLOWSTONE
+	bool "Yellowstone"
+	select WANT_EARLY_SERIAL
+	help
+	  This option enables support for the AMCC PPC440GR evaluation board.
+
+config YOSEMITE
+	bool "Yosemite"
+	select WANT_EARLY_SERIAL
+	help
+	  This option enables support for the AMCC PPC440EP evaluation board.
+
 endchoice
 
 config EP405PC
@@ -111,7 +123,7 @@ config NP405H
 
 config 440EP
 	bool
-	depends on BAMBOO
+	depends on BAMBOO || YOSEMITE
 	select PPC_FPU
 	default y
 
@@ -120,6 +132,11 @@ config 440GP
 	depends on EBONY
 	default y
 
+config 440GR
+	bool
+	depends on YELLOWSTONE
+	default y
+
 config 440GX
 	bool
 	depends on OCOTEA
@@ -137,7 +154,7 @@ config 440SPE
 
 config 440
 	bool
-	depends on 440GP || 440SP || 440SPE || 440EP
+	depends on 440GP || 440SP || 440SPE || 440EP || 440GR
 	default y
 
 config 440A
@@ -147,7 +164,7 @@ config 440A
 
 config IBM440EP_ERR42
 	bool
-	depends on 440EP
+	depends on 440EP || 440GR
 	default y
 
 # All 405-based cores up until the 405GPR and 405EP have this errata.
@@ -169,7 +186,7 @@ config BOOKE
 
 config IBM_OCP
 	bool
-	depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
+	depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT || YELLOWSTONE || YOSEMITE
 	default y
 
 config XILINX_OCP
arch/ppc/platforms/4xx/Makefile +3 -0
diff -uprN a/arch/ppc/platforms/4xx/Makefile c/arch/ppc/platforms/4xx/Makefile
@@ -14,12 +14,15 @@ obj-$(CONFIG_REDWOOD_6)		+= redwood6.o
 obj-$(CONFIG_SYCAMORE)		+= sycamore.o
 obj-$(CONFIG_WALNUT)		+= walnut.o
 obj-$(CONFIG_XILINX_ML300)	+= xilinx_ml300.o
+obj-$(CONFIG_YELLOWSTONE)	+= yosemite.o
+obj-$(CONFIG_YOSEMITE)		+= yosemite.o
 
 obj-$(CONFIG_405GP)		+= ibm405gp.o
 obj-$(CONFIG_REDWOOD_5)		+= ibmstb4.o
 obj-$(CONFIG_NP405H)		+= ibmnp405h.o
 obj-$(CONFIG_REDWOOD_6)		+= ibmstbx25.o
 obj-$(CONFIG_440EP)		+= ibm440ep.o
+obj-$(CONFIG_440GR)		+= ibm440ep.o
 obj-$(CONFIG_440GP)		+= ibm440gp.o
 obj-$(CONFIG_440GX)		+= ibm440gx.o
 obj-$(CONFIG_440SP)		+= ibm440sp.o
arch/ppc/platforms/4xx/yosemite.c +351 -0

351 lines not on this page · raw message

arch/ppc/platforms/4xx/yosemite.h +86 -0

86 lines not on this page · raw message

arch/ppc/syslib/ibm440gx_common.c +2 -2
diff -uprN a/arch/ppc/syslib/ibm440gx_common.c c/arch/ppc/syslib/ibm440gx_common.c
@@ -34,7 +34,7 @@ void __init ibm440gx_get_clocks(struct i
 	u32 plld  = CPR_READ(DCRN_CPR_PLLD);
 	u32 uart0 = SDR_READ(DCRN_SDR_UART0);
 	u32 uart1 = SDR_READ(DCRN_SDR_UART1);
-#ifdef CONFIG_440EP
+#if defined(CONFIG_440EP) || defined(CONFIG_440GR)
 	u32 uart2 = SDR_READ(DCRN_SDR_UART2);
 	u32 uart3 = SDR_READ(DCRN_SDR_UART3);
 #endif
@@ -100,7 +100,7 @@ bypass:
 		p->uart1 = ser_clk;
 	else
 		p->uart1 = p->plb / __fix_zero(uart1 & 0xff, 256);
-#ifdef CONFIG_440EP
+#if defined(CONFIG_440EP) || defined(CONFIG_440GR)
 	if (uart2 & 0x00800000)
 		p->uart2 = ser_clk;
 	else
arch/ppc/syslib/ibm44x_common.h +1 -1
diff -uprN a/arch/ppc/syslib/ibm44x_common.h c/arch/ppc/syslib/ibm44x_common.h
@@ -29,7 +29,7 @@ struct ibm44x_clocks {
 	unsigned int ebc;	/* PerClk */
 	unsigned int uart0;
 	unsigned int uart1;
-#ifdef CONFIG_440EP
+#if defined(CONFIG_440EP) || defined(CONFIG_440GR)
 	unsigned int uart2;
 	unsigned int uart3;
 #endif
arch/ppc/syslib/Makefile +3 -0
diff -uprN a/arch/ppc/syslib/Makefile c/arch/ppc/syslib/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_PPC_OCP)		+= ocp.o
 obj-$(CONFIG_IBM_OCP)		+= ibm_ocp.o
 obj-$(CONFIG_44x)		+= ibm44x_common.o
 obj-$(CONFIG_440EP)		+= ibm440gx_common.o
+obj-$(CONFIG_440GR)		+= ibm440gx_common.o
 obj-$(CONFIG_440GP)		+= ibm440gp_common.o
 obj-$(CONFIG_440GX)		+= ibm440gx_common.o
 obj-$(CONFIG_440SP)		+= ibm440gx_common.o ibm440sp_common.o
@@ -74,6 +75,8 @@ obj-$(CONFIG_SANDPOINT)		+= pci_auto.o t
 obj-$(CONFIG_SBC82xx)		+= todc_time.o
 obj-$(CONFIG_SPRUCE)		+= cpc700_pic.o pci_auto.o \
 				   todc_time.o
+obj-$(CONFIG_YELLOWSTONE)	+= pci_auto.o
+obj-$(CONFIG_YOSEMITE)		+= pci_auto.o
 obj-$(CONFIG_8260)		+= m8260_setup.o pq2_devices.o pq2_sys.o \
 				   ppc_sys.o
 obj-$(CONFIG_PCI_8260)		+= m82xx_pci.o pci_auto.o
include/asm-ppc/ibm44x.h +5 -5
diff -uprN a/include/asm-ppc/ibm44x.h c/include/asm-ppc/ibm44x.h
@@ -44,7 +44,7 @@
 #elif defined(CONFIG_440SPE)
 #define UART0_PHYS_ERPN		4
 #define UART0_PHYS_IO_BASE	0xf0000200
-#elif defined(CONFIG_440EP)
+#elif defined(CONFIG_440EP) || defined(CONFIG_440GR)
 #define UART0_PHYS_IO_BASE	0xe0000000
 #else
 #define UART0_PHYS_ERPN		1
@@ -69,7 +69,7 @@
 #define	PPC44x_PCICFG_PAGE	0x0000000c00000000ULL
 #define	PPC44x_PCIIO_PAGE	PPC44x_PCICFG_PAGE
 #define	PPC44x_PCIMEM_PAGE	0x0000000d00000000ULL
-#elif defined(CONFIG_440EP)
+#elif defined(CONFIG_440EP) || defined(CONFIG_440GR)
 #define PPC44x_IO_PAGE		0x0000000000000000ULL
 #define PPC44x_PCICFG_PAGE	0x0000000000000000ULL
 #define PPC44x_PCIIO_PAGE	PPC44x_PCICFG_PAGE
@@ -95,7 +95,7 @@
 #define PPC44x_PCI2CFG_HI	0x2ec00007UL
 #define PPC44x_PCIMEM_LO	0x80000000UL
 #define PPC44x_PCIMEM_HI	0xdfffffffUL
-#elif defined(CONFIG_440EP)
+#elif defined(CONFIG_440EP) || defined(CONFIG_440GR)
 #define PPC44x_IO_LO		0xef500000UL
 #define PPC44x_IO_HI		0xefffffffUL
 #define PPC44x_PCI0CFG_LO	0xeec00000UL
@@ -179,7 +179,7 @@
 #define DCRN_SDR_UART0		0x0120
 #define DCRN_SDR_UART1		0x0121
 
-#ifdef CONFIG_440EP
+#if defined(CONFIG_440EP) || defined(CONFIG_440GR)
 #define DCRN_SDR_UART2		0x0122
 #define DCRN_SDR_UART3		0x0123
 #define DCRN_SDR_CUST0		0x4000
@@ -202,7 +202,7 @@
 #define DCRNCAP_DMA_SG		1	/* have DMA scatter/gather capability */
 #define DCRN_MAL_BASE		0x180
 
-#ifdef CONFIG_440EP
+#if defined(CONFIG_440EP) || defined(CONFIG_440GR)
 #define DCRN_DMA2P40_BASE	0x300
 #define DCRN_DMA2P41_BASE	0x308
 #define DCRN_DMA2P42_BASE	0x310
include/asm-ppc/ibm4xx.h +4 -0
diff -uprN a/include/asm-ppc/ibm4xx.h c/include/asm-ppc/ibm4xx.h
@@ -105,6 +105,10 @@ void ppc4xx_init(unsigned long r3, unsig
 #include <platforms/4xx/ocotea.h>
 #endif
 
+#if defined(CONFIG_YELLOWSTONE) || defined(CONFIG_YOSEMITE)
+#include <platforms/4xx/yosemite.h>
+#endif
+
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_40x
 /*