Skip to contentSkip to conversation

powerpc/85xx: Add support to initialize LIODN registers and portals

PATCH New Kumar Gala 1 participant 2 messages Jul 15, 2010 – Jul 26, 2010 PowerPC

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 powerpc/85xx: Add support to initialize LIODN registers and portals

On the new QorIQ/CoreNet based platforms we need to initialize the "portals" as access into the Data Path subystem as well as Logical IO Device Numbers (LIODN) that are used for the IOMMU (PAMU).

---
 arch/powerpc/cpu/mpc85xx/Makefile      |    6 +
 arch/powerpc/cpu/mpc85xx/fdt.c         |   15 ++
 arch/powerpc/cpu/mpc85xx/liodn.c       |  187 +++++++++++++++++++++++++
 arch/powerpc/cpu/mpc85xx/p4080_ids.c   |  115 +++++++++++++++
 arch/powerpc/cpu/mpc85xx/portals.c     |  238 ++++++++++++++++++++++++++++++++
 arch/powerpc/include/asm/fsl_liodn.h   |  142 +++++++++++++++++++
 arch/powerpc/include/asm/fsl_portals.h |   59 ++++++++
 7 files changed, 762 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc85xx/liodn.c
 create mode 100644 arch/powerpc/cpu/mpc85xx/p4080_ids.c
 create mode 100644 arch/powerpc/cpu/mpc85xx/portals.c
 create mode 100644 arch/powerpc/include/asm/fsl_liodn.h
 create mode 100644 arch/powerpc/include/asm/fsl_portals.h
arch/powerpc/cpu/mpc85xx/Makefile +6 -0
index 4d52ebe..b6456fc 100644
@@ -64,9 +64,15 @@ COBJS-$(CONFIG_PPC_P5020)	+= ddr-gen3.o
 
 COBJS-$(CONFIG_CPM2)	+= ether_fcc.o
 COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(CONFIG_FSL_CORENET) += liodn.o
 COBJS-$(CONFIG_MP)	+= mp.o
 COBJS-$(CONFIG_MPC8536) += mpc8536_serdes.o
 COBJS-$(CONFIG_PCI)	+= pci.o
+COBJS-$(CONFIG_FSL_CORENET) += portals.o
+
+# various SoC specific assignments
+COBJS-$(CONFIG_PPC_P4080) += p4080_ids.o
+
 COBJS-$(CONFIG_QE)	+= qe_io.o
 COBJS-$(CONFIG_CPM2)	+= serial_scc.o
 
arch/powerpc/cpu/mpc85xx/fdt.c +15 -0
index 6c5fb36..8e7b827 100644
@@ -29,6 +29,7 @@
 #include <asm/processor.h>
 #include <linux/ctype.h>
 #include <asm/io.h>
+#include <asm/fsl_portals.h>
 #ifdef CONFIG_FSL_ESDHC
 #include <fsl_esdhc.h>
 #endif
@@ -446,4 +447,18 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 #endif
 
 	ft_fixup_dpaa_clks(blob);
+
+#if defined(CONFIG_SYS_BMAN_MEM_PHYS)
+	fdt_portal(blob, "fsl,bman-portal", "bman-portals",
+			(u64)CONFIG_SYS_BMAN_MEM_PHYS,
+			CONFIG_SYS_BMAN_MEM_SIZE);
+#endif
+
+#if defined(CONFIG_SYS_QMAN_MEM_PHYS)
+	fdt_portal(blob, "fsl,qman-portal", "qman-portals",
+			(u64)CONFIG_SYS_QMAN_MEM_PHYS,
+			CONFIG_SYS_QMAN_MEM_SIZE);
+
+	fdt_fixup_qportals(blob);
+#endif
 }
arch/powerpc/cpu/mpc85xx/liodn.c new file +187 -0

187 lines not on this page · raw message

arch/powerpc/cpu/mpc85xx/p4080_ids.c new file +115 -0

115 lines not on this page · raw message

arch/powerpc/cpu/mpc85xx/portals.c new file +238 -0

238 lines not on this page · raw message

arch/powerpc/include/asm/fsl_liodn.h new file +142 -0

142 lines not on this page · raw message

arch/powerpc/include/asm/fsl_portals.h new file +59 -0

59 lines not on this page · raw message

Signature · 1 line
1.6.0.6
author Applied
#1 lore raw

PATCH 1/1 powerpc/85xx: Add support to initialize LIODN registers and portals

Quoted 17 lines · Kumar Gala

On the new QorIQ/CoreNet based platforms we need to initialize the "portals" as access into the Data Path subystem as well as Logical IO Device Numbers (LIODN) that are used for the IOMMU (PAMU).

---

arch/powerpc/cpu/mpc85xx/Makefile      |    6 +
arch/powerpc/cpu/mpc85xx/fdt.c         |   15 ++
arch/powerpc/cpu/mpc85xx/liodn.c       |  187 +++++++++++++++++++++++++
arch/powerpc/cpu/mpc85xx/p4080_ids.c   |  115 +++++++++++++++
arch/powerpc/cpu/mpc85xx/portals.c     |  238 ++++++++++++++++++++++++++++++++
arch/powerpc/include/asm/fsl_liodn.h   |  142 +++++++++++++++++++
arch/powerpc/include/asm/fsl_portals.h |   59 ++++++++
7 files changed, 762 insertions(+), 0 deletions(-)
Quoted 5 lines

create mode 100644 arch/powerpc/cpu/mpc85xx/liodn.c create mode 100644 arch/powerpc/cpu/mpc85xx/p4080_ids.c create mode 100644 arch/powerpc/cpu/mpc85xx/portals.c create mode 100644 arch/powerpc/include/asm/fsl_liodn.h create mode 100644 arch/powerpc/include/asm/fsl_portals.h

applied to 85xx

- k