Skip to contentSkip to conversation

powerpc/p3060: Add SoC related support for P3060 platform

PATCH New Kumar Gala 2 participants 3 messages Sep 14, 2011 – Sep 15, 2011

Subsystems (2)
lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 powerpc/p3060: Add SoC related support for P3060 platform

From: Shengzhou Liu <[email protected]>

Add P3060 SoC specific information:cores setup, LIODN setup, etc

The P3060 SoC combines six e500mc Power Architecture processor cores with high-performance datapath acceleration architecture(DPAA), CoreNet fabric infrastructure, as well as network and peripheral interfaces.

---
 arch/powerpc/cpu/mpc85xx/Makefile             |    3 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |    9 ++
 arch/powerpc/cpu/mpc85xx/p3060_ids.c          |  113 ++++++++++++++++++++
 arch/powerpc/cpu/mpc85xx/p3060_serdes.c       |  138 +++++++++++++++++++++++++
 arch/powerpc/cpu/mpc8xxx/cpu.c                |    2 +
 arch/powerpc/include/asm/config_mpc85xx.h     |   15 +++
 arch/powerpc/include/asm/immap_85xx.h         |   12 ++-
 arch/powerpc/include/asm/processor.h          |    2 +
 drivers/net/fm/Makefile                       |    1 +
 drivers/net/fm/p3060.c                        |  109 +++++++++++++++++++
 10 files changed, 403 insertions(+), 1 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc85xx/p3060_ids.c
 create mode 100644 arch/powerpc/cpu/mpc85xx/p3060_serdes.c
 create mode 100644 drivers/net/fm/p3060.c
arch/powerpc/cpu/mpc85xx/Makefile +3 -0
index d6ec611..baf27e6 100644
@@ -67,6 +67,7 @@ COBJS-$(CONFIG_P2020)	+= ddr-gen3.o
 COBJS-$(CONFIG_PPC_P2040)	+= ddr-gen3.o
 COBJS-$(CONFIG_PPC_P2041)	+= ddr-gen3.o
 COBJS-$(CONFIG_PPC_P3041)	+= ddr-gen3.o
+COBJS-$(CONFIG_PPC_P3060)	+= ddr-gen3.o
 COBJS-$(CONFIG_PPC_P4080)	+= ddr-gen3.o
 COBJS-$(CONFIG_PPC_P5020)	+= ddr-gen3.o
 
@@ -81,6 +82,7 @@ COBJS-$(CONFIG_SYS_DPAA_QBMAN) += portals.o
 COBJS-$(CONFIG_PPC_P2040) += p2041_ids.o
 COBJS-$(CONFIG_PPC_P2041) += p2041_ids.o
 COBJS-$(CONFIG_PPC_P3041) += p3041_ids.o
+COBJS-$(CONFIG_PPC_P3060) += p3060_ids.o
 COBJS-$(CONFIG_PPC_P4080) += p4080_ids.o
 COBJS-$(CONFIG_PPC_P5020) += p5020_ids.o
 
@@ -116,6 +118,7 @@ COBJS-$(CONFIG_P2020)	+= p2020_serdes.o
 COBJS-$(CONFIG_PPC_P2040) += p2041_serdes.o
 COBJS-$(CONFIG_PPC_P2041) += p2041_serdes.o
 COBJS-$(CONFIG_PPC_P3041) += p3041_serdes.o
+COBJS-$(CONFIG_PPC_P3060) += p3060_serdes.o
 COBJS-$(CONFIG_PPC_P4080) += p4080_serdes.o
 COBJS-$(CONFIG_PPC_P5020) += p5020_serdes.o
 
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +9 -0
index 4307a4c..07e58ed 100644
@@ -482,6 +482,13 @@ static void wait_for_rstdone(unsigned int bank)
 		printf("SERDES: timeout resetting bank %u\n", bank + 1);
 }
 
+
+void __soc_serdes_init(void)
+{
+	/* Allow for SoC-specific initialization in <SOC>_serdes.c  */
+};
+void soc_serdes_init(void) __attribute__((weak, alias("__soc_serdes_init")));
+
 void fsl_serdes_init(void)
 {
 	ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
@@ -570,6 +577,8 @@ void fsl_serdes_init(void)
 		}
 	}
 
+	soc_serdes_init();
+
 #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8
 	/*
 	 * Bank two uses the clock from bank three, so if bank two is enabled,
arch/powerpc/cpu/mpc85xx/p3060_ids.c new file +113 -0

113 lines not on this page · raw message

arch/powerpc/cpu/mpc85xx/p3060_serdes.c new file +138 -0

138 lines not on this page · raw message

arch/powerpc/cpu/mpc8xxx/cpu.c +2 -0
index c80567a..0365ca8 100644
@@ -103,6 +103,8 @@ struct cpu_type cpu_type_list [] = {
 	CPU_TYPE_ENTRY(P2041, P2041_E, 4),
 	CPU_TYPE_ENTRY(P3041, P3041, 4),
 	CPU_TYPE_ENTRY(P3041, P3041_E, 4),
+	CPU_TYPE_ENTRY_MASK(P3060, P3060, 6, 0xf3),
+	CPU_TYPE_ENTRY_MASK(P3060, P3060_E, 6, 0xf3),
 	CPU_TYPE_ENTRY(P4040, P4040, 4),
 	CPU_TYPE_ENTRY(P4040, P4040_E, 4),
 	CPU_TYPE_ENTRY(P4080, P4080, 8),
arch/powerpc/include/asm/config_mpc85xx.h +15 -0
index 69a791b..33b3713 100644
@@ -355,6 +355,21 @@
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_SYS_FSL_ERRATUM_USB138
 
+#elif defined(CONFIG_PPC_P3060)
+#define CONFIG_MAX_CPUS			8
+#define CONFIG_SYS_FSL_NUM_CC_PLLS	4
+#define CONFIG_SYS_FSL_NUM_LAWS		32
+#define CONFIG_SYS_FSL_SEC_COMPAT	4
+#define CONFIG_SYS_NUM_FMAN		2
+#define CONFIG_SYS_NUM_FM1_DTSEC	4
+#define CONFIG_SYS_NUM_FM2_DTSEC	4
+#define CONFIG_NUM_DDR_CONTROLLERS	1
+#define CONFIG_SYS_FM_MURAM_SIZE	0x28000
+#define CONFIG_SYS_FSL_TBCLK_DIV	16
+#define CONFIG_SYS_FSL_PCIE_COMPAT	"fsl,qoriq-pcie-v2.2"
+#define CONFIG_SYS_CCSRBAR_DEFAULT	0xfe000000
+#define CONFIG_SYS_FSL_ERRATUM_DDR_A003
+
 #elif defined(CONFIG_PPC_P4040)
 #define CONFIG_MAX_CPUS			4
 #define CONFIG_SYS_FSL_NUM_CC_PLLS	4
arch/powerpc/include/asm/immap_85xx.h +11 -1
index 4aa8dcc..f32132e 100644
@@ -1701,7 +1701,7 @@ typedef struct ccsr_gur {
 #define FSL_CORENET_RCWSR8_HOST_AGT_B1		0x00e00000
 #define FSL_CORENET_RCWSR8_HOST_AGT_B2		0x00100000
 #define FSL_CORENET_RCWSR11_EC1			0x00c00000 /* bits 360..361 */
-#if defined(CONFIG_PPC_P4080)
+#if defined(CONFIG_PPC_P4080) || defined(CONFIG_PPC_P3060)
 #define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC1		0x00000000
 #define FSL_CORENET_RCWSR11_EC1_FM1_USB1		0x00800000
 #define FSL_CORENET_RCWSR11_EC2			0x001c0000 /* bits 363..365 */
@@ -1709,6 +1709,16 @@ typedef struct ccsr_gur {
 #define FSL_CORENET_RCWSR11_EC2_FM1_DTSEC2		0x00080000
 #define FSL_CORENET_RCWSR11_EC2_USB2			0x00100000
 #endif
+#if defined(CONFIG_PPC_P3060)
+#define FSL_CORENET_RCWSR13_EC1_EXT			0x1c000000
+#define FSL_CORENET_RCWSR13_EC1_EXT_FM1_DTSEC4_RGMII	0x04000000
+#define FSL_CORENET_RCWSR13_EC1_EXT_FM1_DTSEC4_MII	0x08000000
+#define FSL_CORENET_RCWSR13_EC2_EXT			0x01c00000
+#define FSL_CORENET_RCWSR13_EC2_EXT_FM2_DTSEC4_RGMII	0x00400000
+#define FSL_CORENET_RCWSR13_EC2_EXT_FM2_DTSEC4_MII	0x00800000
+#define FSL_CORENET_RCWSR13_EC3				0x00380000
+#define FSL_CORENET_RCWSR13_EC3_FM2_DTSEC4_MII		0x00100000
+#endif
 #if defined(CONFIG_PPC_P2040) || defined(CONFIG_PPC_P2041) \
 	|| defined(CONFIG_PPC_P3041) || defined(CONFIG_PPC_P5020)
 #define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC4_RGMII	0x00000000
arch/powerpc/include/asm/processor.h +2 -0
index 46f9989..1b96b84 100644
@@ -1115,6 +1115,8 @@
 #define SVR_P2041_E	0x821801
 #define SVR_P3041	0x821103
 #define SVR_P3041_E	0x821903
+#define SVR_P3060	0x820002
+#define SVR_P3060_E	0x820802
 #define SVR_P4040	0x820100
 #define SVR_P4040_E	0x820900
 #define SVR_P4080	0x820000
drivers/net/fm/Makefile +1 -0
index 9692575..072b178 100644
@@ -39,6 +39,7 @@ COBJS-$(CONFIG_P1023)	+= p1023.o
 COBJS-$(CONFIG_PPC_P2040) += p5020.o
 COBJS-$(CONFIG_PPC_P2041) += p5020.o
 COBJS-$(CONFIG_PPC_P3041) += p5020.o
+COBJS-$(CONFIG_PPC_P3060) += p3060.o
 COBJS-$(CONFIG_PPC_P4080) += p4080.o
 COBJS-$(CONFIG_PPC_P5020) += p5020.o
 endif
drivers/net/fm/p3060.c new file +109 -0

109 lines not on this page · raw message

Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 powerpc/p3060: Add SoC related support for P3060 platform

Hello Kumar,

Quoted 13 lines

From: Shengzhou Liu <[email protected]>

Add P3060 SoC specific information:cores setup, LIODN setup, etc

The P3060 SoC combines six e500mc Power Architecture processor cores with
high-performance datapath acceleration architecture(DPAA), CoreNet fabric
infrastructure, as well as network and peripheral interfaces.

---

<SNIP>

arch/powerpc/include/asm/config_mpc85xx.h line 359

Quoted 2 lines
arch/powerpc/include/asm/config_mpc85xx.h +2 -0
+#elif defined(CONFIG_PPC_P3060)
+#define CONFIG_MAX_CPUS			8

I admit that I don't know anything about the P3060, but from your commit log above and Freescale standard naming conventions, shouldn't CONFIG_MAX_CPUS be 6?

Thanks,
John

author
#2 lore raw

PATCH 1/1 powerpc/p3060: Add SoC related support for P3060 platform

Quoted 18 lines · John Schmoller

Hello Kumar,

Quoted 13 lines

From: Shengzhou Liu <[email protected]>

Add P3060 SoC specific information:cores setup, LIODN setup, etc

The P3060 SoC combines six e500mc Power Architecture processor cores with
high-performance datapath acceleration architecture(DPAA), CoreNet fabric
infrastructure, as well as network and peripheral interfaces.

---

<SNIP>

Quoted 7 lines

arch/powerpc/include/asm/config_mpc85xx.h line 359

Quoted 2 lines
arch/powerpc/include/asm/config_mpc85xx.h +2 -0
+#elif defined(CONFIG_PPC_P3060)
+#define CONFIG_MAX_CPUS			8

I admit that I don't know anything about the P3060, but from your commit log above and Freescale standard naming conventions, shouldn't CONFIG_MAX_CPUS be 6?

Thanks,
John

I was wondering if this was going to be noticed. I need to add a comment. The MAX_CPUS is the max(ID+1,# of cores). On P3060 the cores are # 0,1, 4, 5, 6, 7.

- k