Skip to contentSkip to conversation

mpc82xx: Embedded Planet EP8248E support

PATCH In review Scott Wood 2 participants 2 messages Jan 11, 2008 – Jan 14, 2008

Subsystems (2)
lore
Share & tools
lore

Scott Wood

author
#0 lore raw

PATCH 2/3 mpc82xx: Embedded Planet EP8248E support

This board is also resold by Freescale under the names "QUICCStart MPC8248 Evaluation System" and "CWH-PPC-8248N-VE".

---
 arch/powerpc/boot/Makefile             |    3 +-
 arch/powerpc/boot/dts/ep8248e.dts      |  205 ++++++++
 arch/powerpc/boot/ep8248e.c            |   55 +++
 arch/powerpc/boot/wrapper              |    2 +-
 arch/powerpc/configs/ep8248e_defconfig |  821 ++++++++++++++++++++++++++++++++
 arch/powerpc/platforms/82xx/Kconfig    |   13 +
 arch/powerpc/platforms/82xx/Makefile   |    1 +
 arch/powerpc/platforms/82xx/ep8248e.c  |  325 +++++++++++++
 include/asm-powerpc/mpc8260.h          |    1 +
 9 files changed, 1424 insertions(+), 2 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/ep8248e.dts
 create mode 100644 arch/powerpc/boot/ep8248e.c
 create mode 100644 arch/powerpc/configs/ep8248e_defconfig
 create mode 100644 arch/powerpc/platforms/82xx/ep8248e.c
arch/powerpc/boot/Makefile +2 -1
index 08bf7aa..fcca455 100644
@@ -62,7 +62,7 @@ src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c holly.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 ep405.c cuboot-taishan.c \
-		cuboot-katmai.c cuboot-rainier.c redboot-8xx.c
+		cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -195,6 +195,7 @@ image-$(CONFIG_PPC_8xx)			+= cuImage.8xx
 image-$(CONFIG_PPC_EP88XC)		+= zImage.ep88xc
 image-$(CONFIG_EP405)			+= zImage.ep405
 image-$(CONFIG_8260)			+= cuImage.pq2
+image-$(CONFIG_EP8248E)			+= zImage.ep8248e
 image-$(CONFIG_PPC_MPC52xx)		+= cuImage.52xx
 image-$(CONFIG_PPC_83xx)		+= cuImage.83xx
 image-$(CONFIG_PPC_85xx)		+= cuImage.85xx
arch/powerpc/boot/dts/ep8248e.dts new file +205 -0

205 lines not on this page · raw message

arch/powerpc/boot/ep8248e.c new file +55 -0

55 lines not on this page · raw message

arch/powerpc/boot/wrapper +1 -1
index a7c4671..763a0c4 100755
@@ -168,7 +168,7 @@ ps3)
     ksection=.kernel:vmlinux.bin
     isection=.kernel:initrd
     ;;
-ep88xc|ep405|redboot*)
+ep88xc|ep405|redboot*|ep8248e)
     platformo="$object/fixed-head.o $object/$platform.o"
     binary=y
     ;;
arch/powerpc/configs/ep8248e_defconfig new file +821 -0

821 lines not on this page · raw message

arch/powerpc/platforms/82xx/Kconfig +13 -0
index 541fbb8..4fad6c7 100644
@@ -26,6 +26,19 @@ config PQ2FADS
 	help
 	  This option enables support for the PQ2FADS board
 
+config EP8248E
+	bool "Embedded Planet EP8248E (a.k.a. CWH-PPC-8248N-VE)"
+	select 8272
+	select 8260
+	select FSL_SOC
+	select PPC_CPM_NEW_BINDING
+	select MDIO_BITBANG
+	help
+	  This enables support for the Embedded Planet EP8248E board.
+
+	  This board is also resold by Freescale as the QUICCStart
+	  MPC8248 Evaluation System and/or the CWH-PPC-8248N-VE.
+
 endchoice
 
 config PQ2ADS
arch/powerpc/platforms/82xx/Makefile +1 -0
index 68c8b0c..6cd5cd5 100644
@@ -5,3 +5,4 @@ obj-$(CONFIG_MPC8272_ADS) += mpc8272_ads.o
 obj-$(CONFIG_CPM2) += pq2.o
 obj-$(CONFIG_PQ2_ADS_PCI_PIC) += pq2ads-pci-pic.o
 obj-$(CONFIG_PQ2FADS) += pq2fads.o
+obj-$(CONFIG_EP8248E) += ep8248e.o
arch/powerpc/platforms/82xx/ep8248e.c new file +325 -0

325 lines not on this page · raw message

include/asm-powerpc/mpc8260.h +1 -0
index e0d4807..03317e1 100644
@@ -8,6 +8,7 @@
 #ifndef __ASM_POWERPC_MPC8260_H__
 #define __ASM_POWERPC_MPC8260_H__
 
+#define MPC82XX_BCR_PLDP 0x00800000 /* Pipeline Maximum Depth */
 
 #ifdef CONFIG_8260
 
Signature · 1 line
1.5.3.8
#1 lore raw

Hi Scott,

Quoted 4 lines · On Fri, 11 Jan 2008 14:07:42 -0600 Scott Wood <[email protected]> wrote:

+++ b/arch/powerpc/platforms/82xx/ep8248e.c

+static struct mdiobb_ops ep8248e_mdio_ops = {

const, please.

Quoted 1 line

+static struct of_platform_driver ep8248e_mdio_driver = {

	.driver = {

arch/powerpc/platforms/82xx/ep8248e.c line 160

Quoted 1 line
arch/powerpc/platforms/82xx/ep8248e.c new file +1 -0
+	.name = "ep8248e-mdio-bitbang",
	},
Quoted 1 line

+static const struct cpm_pin ep8248_pins[] = {

Could be __initdata

arch/powerpc/platforms/82xx/ep8248e.c line 272

Quoted 13 lines
arch/powerpc/platforms/82xx/ep8248e.c new file +12 -0
+static void __init ep8248_setup_arch(void)
+{
 
+	ep8248e_bcsr_node =
+		of_find_compatible_node(NULL, NULL, "fsl,ep8248e-bcsr");
+	if (!ep8248e_bcsr_node) {
+		printk(KERN_ERR "No bcsr in device tree\n");
+		return;
+	}
+
+	ep8248e_bcsr = of_iomap(ep8248e_bcsr_node, 0);
+	if (!ep8248e_bcsr) {
+		printk(KERN_ERR "Cannot map BCSR registers\n");
		of_node_put(ep8248e_bcsr_node);
		ep8248e_bcsr_node = NULL;

arch/powerpc/platforms/82xx/ep8248e.c line 304

Quoted 13 lines
arch/powerpc/platforms/82xx/ep8248e.c new file +12 -0
+		return;
 
+static int __init declare_of_platform_devices(void)
+{
+	if (!machine_is(ep8248))
+		return 0;
+
+	of_platform_bus_probe(NULL, of_bus_ids, NULL);
+	of_register_platform_driver(&ep8248e_mdio_driver);
+
+	return 0;
+}
+device_initcall(declare_of_platform_devices);

machine_device_initcall(ep8248, declare_of_platform_devices); Then remove the machine_is test above.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/