powerpc/mpc85xx: fix Unicode characters in release.S
Subsystems (2)
PATCH 1/7 powerpc/mpc85xx: fix Unicode characters in release.S
Commit 709389b6 unintentionally used the Unicode version of the apostrophy. Replace it with the normal ASCII version.
--- arch/powerpc/cpu/mpc85xx/release.S | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
arch/powerpc/cpu/mpc85xx/release.S +12 -12
@@ -159,20 +159,20 @@ __secondary_start_page: /* * PIR definition for E6500 * 0-17 Reserved (logic 0s) - * 8-19 CHIP_ID, 2?b00 - SoC 1 + * 8-19 CHIP_ID, 2'b00 - SoC 1 * all others - reserved - * 20-24 CLUSTER_ID 5?b00000 - CCM 1 + * 20-24 CLUSTER_ID 5'b00000 - CCM 1 * all others - reserved - * 25-26 CORE_CLUSTER_ID 2?b00 - cluster 1 - * 2?b01 - cluster 2 - * 2?b10 - cluster 3 - * 2?b11 - cluster 4 - * 27-28 CORE_ID 2?b00 - core 0 - * 2?b01 - core 1 - * 2?b10 - core 2 - * 2?b11 - core 3 - * 29-31 THREAD_ID 3?b000 - thread 0 - * 3?b001 - thread 1 + * 25-26 CORE_CLUSTER_ID 2'b00 - cluster 1 + * 2'b01 - cluster 2 + * 2'b10 - cluster 3 + * 2'b11 - cluster 4 + * 27-28 CORE_ID 2'b00 - core 0 + * 2'b01 - core 1 + * 2'b10 - core 2 + * 2'b11 - core 3 + * 29-31 THREAD_ID 3'b000 - thread 0 + * 3'b001 - thread 1 */ rlwinm r4,r0,29,25,31 #elif defined(CONFIG_E500MC)
Signature · 1 line
1.7.3.4
PATCH 2/7 powerpc/85xx: introduce SET_PCI_LIODN_BASE, for setting PCI LIODNs
From: Laurentiu Tudor <[email protected]>
The liodn for the new PCIE controller included in P5040DS is no longer set through a register in the guts register block but with one in the PCIE register block itself. Update the PCIE CCSR structure to add the new liodn register and add a new dedicated SET_PCI_LIODN_BASE macro that puts the liodn in the correct register.
--- arch/powerpc/include/asm/fsl_liodn.h | 5 +++++ arch/powerpc/include/asm/immap_85xx.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletions(-)
arch/powerpc/include/asm/fsl_liodn.h +5 -0
@@ -94,6 +94,11 @@ extern void fdt_fixup_liodn(void *blob); SET_GUTS_LIODN(compat, liodn, pex##pciNum##liodnr,\ CONFIG_SYS_MPC85xx_PCIE##pciNum##_OFFSET) +#define SET_PCI_LIODN_BASE (compat, pciNum, liodn) \ + SET_LIODN_ENTRY_1(compat, liodn,\ + offsetof(ccsr_pcix_t, liodn_base) + CONFIG_SYS_MPC85xx_PCIE##pciNum##_OFFSET,\ + CONFIG_SYS_MPC85xx_PCIE##pciNum##_OFFSET) +/* reg nodes for DMA start @ 0x300 */ #define SET_DMA_LIODN (dmaNum, liodn) \ SET_GUTS_LIODN("fsl,eloplus-dma", liodn, dma##dmaNum##liodnr,\
arch/powerpc/include/asm/immap_85xx.h +3 -1
@@ -296,7 +296,9 @@ typedef struct ccsr_pcix {u32 cfg_addr;/* PCIX Configuration Addr */ u32 cfg_data;/* PCIX Configuration Data */ u32 int_ack;/* PCIX IRQ Acknowledge */ -u8 res1[3060 ]; +u8 res000c[52 ]; +u32 liodn_base;/* PCIX LIODN base register */ +u8 res0044[3004 ];u32 potar0;/* PCIX Outbound Transaction Addr 0 */ u32 potear0;/* PCIX Outbound Translation Extended Addr 0 */ u32 powbar0;/* PCIX Outbound Window Base Addr 0 */
Signature · 1 line
1.7.3.4
PATCH 3/7 powerpc/85xx: define SRIO LIODN functions only if SRIO is defined
In reply to Timur TabiThe P5040 does not have SRIO support, so there are no SRIO LIODNs. Therefore, the functions that set the SRIO LIODNs should not be compiled.
--- arch/powerpc/cpu/mpc85xx/liodn.c | 8 ++++++++ arch/powerpc/include/asm/fsl_liodn.h | 4 +++- 2 files changed, 11 insertions(+), 1 deletions(-)
arch/powerpc/cpu/mpc85xx/liodn.c +8 -0
@@ -40,6 +40,7 @@ int get_dpaa_liodn(enum fsl_dpaa_dev dpaa_dev, u32 *liodns, int liodn_offset)return liodn_bases[dpaa_dev].num_ids; } +#ifdef CONFIG_SYS_SRIO static void set_srio_liodn (struct srio_liodn_id_table *tbl,int size) {int i;
@@ -54,6 +55,7 @@ static void set_srio_liodn(struct srio_liodn_id_table *tbl, int size) } } } +#endif static void set_liodn (struct liodn_id_table *tbl,int size) {
@@ -181,8 +183,10 @@ void set_liodns(void)/* setup general liodn offsets */ set_liodn (liodn_tbl, liodn_tbl_sz); +#ifdef CONFIG_SYS_SRIO /* setup SRIO port liodns */ set_srio_liodn (srio_liodn_tbl, srio_liodn_tbl_sz); +#endif /* setup SEC block liodn bases & offsets if we have one */ if (IS_E_PROCESSOR (get_svr ())) {
@@ -219,6 +223,7 @@ void set_liodns(void)#endif } +#ifdef CONFIG_SYS_SRIO static void fdt_fixup_srio_liodn (void *blob,struct srio_liodn_id_table *tbl) {int i, srio_off;
@@ -247,6 +252,7 @@ static void fdt_fixup_srio_liodn(void *blob, struct srio_liodn_id_table *tbl) } } } +#endif static void fdt_fixup_liodn_tbl (void *blob,struct liodn_id_table *tbl,int sz) {
@@ -277,7 +283,9 @@ static void fdt_fixup_liodn_tbl(void *blob, struct liodn_id_table *tbl, int sz)void fdt_fixup_liodn (void *blob) { +#ifdef CONFIG_SYS_SRIO fdt_fixup_srio_liodn (blob, srio_liodn_tbl); +#endif fdt_fixup_liodn_tbl (blob, liodn_tbl, liodn_tbl_sz);#ifdef CONFIG_SYS_DPAA_FMAN
arch/powerpc/include/asm/fsl_liodn.h +3 -1
@@ -189,11 +189,13 @@ extern void fdt_fixup_liodn(void *blob);extern struct liodn_id_table liodn_tbl[], liodn_bases[], sec_liodn_tbl[];extern struct liodn_id_table raide_liodn_tbl[];extern struct liodn_id_table fman1_liodn_tbl[], fman2_liodn_tbl[]; +#ifdef CONFIG_SYS_SRIO extern struct srio_liodn_id_table srio_liodn_tbl[]; +extern int srio_liodn_tbl_sz; +#endif extern struct liodn_id_table rman_liodn_tbl[];extern int liodn_tbl_sz, sec_liodn_tbl_sz, raide_liodn_tbl_sz;extern int fman1_liodn_tbl_sz, fman2_liodn_tbl_sz; -extern int srio_liodn_tbl_sz;extern int rman_liodn_tbl_sz;#endif
Signature · 1 line
1.7.3.4
PATCH 4/7 powerpc/85xx: move SRIO configuration out of corenet_ds.h
In reply to Timur TabiThe P5040 does not have SRIO, so don't put the SRIO definitions in corenet_ds.h. They belong in the board-specific header files.
--- include/configs/P3041DS.h | 4 ++++ include/configs/P4080DS.h | 4 ++++ include/configs/P5020DS.h | 4 ++++ include/configs/corenet_ds.h | 4 ---- 4 files changed, 12 insertions(+), 4 deletions(-)
include/configs/P3041DS.h +4 -0
@@ -36,6 +36,10 @@#define CONFIG_PCIE4 #define CONFIG_SYS_DPAA_RMAN +#define CONFIG_SYS_SRIO +#define CONFIG_SRIO1 /* SRIO port 1 */ +#define CONFIG_SRIO2 /* SRIO port 2 */ +#define CONFIG_ICS307_REFCLK_HZ 25000000/* ICS307 ref clk freq */ #include "corenet_ds.h"
include/configs/P4080DS.h +4 -0
@@ -33,6 +33,10 @@#define CONFIG_MMC #define CONFIG_PCIE3 +#define CONFIG_SYS_SRIO +#define CONFIG_SRIO1 /* SRIO port 1 */ +#define CONFIG_SRIO2 /* SRIO port 2 */ +#define CONFIG_ICS307_REFCLK_HZ 33333000/* ICS307 ref clk freq */ #include "corenet_ds.h"
include/configs/P5020DS.h +4 -0
@@ -37,6 +37,10 @@#define CONFIG_SYS_FSL_RAID_ENGINE #define CONFIG_SYS_DPAA_RMAN +#define CONFIG_SYS_SRIO +#define CONFIG_SRIO1 /* SRIO port 1 */ +#define CONFIG_SRIO2 /* SRIO port 2 */ +#define CONFIG_ICS307_REFCLK_HZ 25000000/* ICS307 ref clk freq */ #include "corenet_ds.h"
include/configs/corenet_ds.h +0 -4
@@ -76,10 +76,6 @@#define CONFIG_FSL_PCI_INIT /* Use common FSL init code */ #define CONFIG_SYS_PCI_64BIT /* enable 64-bit PCI resources */ -#define CONFIG_SYS_SRIO -#define CONFIG_SRIO1 /* SRIO port 1 */ -#define CONFIG_SRIO2 /* SRIO port 2 */ -#define CONFIG_FSL_LAW /* Use common FSL init code */ #define CONFIG_ENV_OVERWRITE
Signature · 1 line
1.7.3.4
PATCH 5/7 powerpc/p5040ds: add per pci endpoint liodn offset list
In reply to Timur TabiFrom: Laurentiu Tudor <[email protected]>
Add a new device tree property named "fsl,liodn-offset-list" holding a list of per pci endpoint permitted liodn offsets. This property is useful in virtualization scenarios that implement per pci endpoint partitioning.
The final liodn of a partitioned pci endpoint is calculated by the hardware, by adding these offsets to pci controller's base liodn, stored in the "fsl,liodn" property of its node.
The liodn offsets are interleaved to get better cache utilization. As an example, given 3 pci controllers, the following liodns are generated for the pci endpoints:
pci0: 193 256 259 262 265 268 271 274 277
pci1: 194 257 260 263 266 269 272 275 278
pci2: 195 258 261 264 267 270 273 276 279--- arch/powerpc/cpu/mpc85xx/liodn.c | 52 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 52 insertions(+), 0 deletions(-)
arch/powerpc/cpu/mpc85xx/liodn.c +52 -0
@@ -254,6 +254,56 @@ static void fdt_fixup_srio_liodn(void *blob, struct srio_liodn_id_table *tbl) }#endif +#define CONFIG_SYS_MAX_PCI_EPS 8 +#define CONFIG_SYS_PCI_EP_LIODN_START 256 + +static void fdt_fixup_pci_liodn_offsets (void *fdt,const char *compat) +{ +int off, pci_idx =0 , pci_cnt =0 , i, rc; +const uint32_t *base_liodn; +uint32_t liodn_offs[CONFIG_SYS_MAX_PCI_EPS +1 ] = {0 }; + +/* +* Count the number of pci nodes. +* It's needed later when the interleaved liodn offsets are generated. +*/ + off =fdt_node_offset_by_compatible (fdt,-1 , compat); +while (off != -FDT_ERR_NOTFOUND ) { + pci_cnt++; + off =fdt_node_offset_by_compatible (fdt, off, compat); + } + +for (off =fdt_node_offset_by_compatible (fdt,-1 , compat); + off != -FDT_ERR_NOTFOUND ; + off =fdt_node_offset_by_compatible (fdt, off, compat)) { + base_liodn =fdt_getprop (fdt, off,"fsl,liodn" , &rc); +if (!base_liodn) { +char path[64 ]; + +if (fdt_get_path (fdt, off, path,sizeof (path)) <0 ) +strcpy (path,"(unknown)" ); +printf ("WARNING Could not get liodn of node %s: %s\n" , + path,fdt_strerror (rc)); +continue ; + } +for (i =0 ; i <CONFIG_SYS_MAX_PCI_EPS ; i++) + liodn_offs[i +1 ] =CONFIG_SYS_PCI_EP_LIODN_START + + i * pci_cnt + pci_idx - *base_liodn; + rc =fdt_setprop (fdt, off,"fsl,liodn-offset-list" , + liodn_offs,sizeof (liodn_offs)); +if (rc) { +char path[64 ]; + +if (fdt_get_path (fdt, off, path,sizeof (path)) <0 ) +strcpy (path,"(unknown)" ); +printf ("WARNING Unable to set fsl,liodn-offset-list for " +"node %s: %s\n" , path,fdt_strerror (rc)); +continue ; + } + pci_idx++; + } +} +static void fdt_fixup_liodn_tbl (void *blob,struct liodn_id_table *tbl,int sz) {int i;
@@ -303,4 +353,6 @@ void fdt_fixup_liodn(void *blob)#ifdef CONFIG_SYS_DPAA_RMAN fdt_fixup_liodn_tbl (blob, rman_liodn_tbl, rman_liodn_tbl_sz);#endif + +fdt_fixup_pci_liodn_offsets (blob,"fsl,qoriq-pcie-v2.4" ); }
Signature · 1 line
1.7.3.4
PATCH v3 6/7 powerpc/85xx: Add P5040 processor support
In reply to Timur TabiAdd support for the Freescale P5040 SOC, which is similar to the P5020. Features of the P5040 are:
Four P5040 single-threaded e5500 cores built
Up to 2.4 GHz with 64-bit ISA support
Three levels of instruction: user, supervisor, hypervisor
CoreNet platform cache (CPC)
2.0 MB configures as dual 1 MB blocks hierarchical interconnect fabric
Two 64-bit DDR3/3L SDRAM memory controllers with ECC and interleaving
support Up to 1600MT/s
Memory pre-fetch engine
DPAA incorporating acceleration for the following functions
Packet parsing, classification, and distribution (FMAN) Queue management for scheduling, packet sequencing and congestion management (QMAN)
Hardware buffer management for buffer allocation and de-allocation (BMAN)
Cryptography acceleration (SEC 5.2) at up to 40 Gbps SerDes 20 lanes at up to 5 Gbps
Supports SGMII, XAUI, PCIe rev1.1/2.0, SATA Ethernet interfaces Two 10 Gbps Ethernet MACs
Ten 1 Gbps Ethernet MACs
High-speed peripheral interfaces
Two PCI Express 2.0/3.0 controllers
Additional peripheral interfaces
Two serial ATA (SATA 2.0) controllers
Two high-speed USB 2.0 controllers with integrated PHY Enhanced secure digital host controller (SD/MMC/eMMC) Enhanced serial peripheral interface (eSPI)
Two I2C controllers
Four UARTs
Integrated flash controller supporting NAND and NOR flash
DMA
Dual four channel
Support for hardware virtualization and partitioning enforcement
Extra privileged level for hypervisor support
QorIQ Trust Architecture 1.1
Secure boot, secure debug, tamper detection, volatile key storage
--- arch/powerpc/cpu/mpc85xx/Makefile | 3 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 70 +++++++++++++ arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h | 5 + arch/powerpc/cpu/mpc85xx/p5040_ids.c | 131 +++++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/p5040_serdes.c | 117 ++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/speed.c | 2 + arch/powerpc/cpu/mpc8xxx/cpu.c | 2 + arch/powerpc/include/asm/config_mpc85xx.h | 29 ++++++ arch/powerpc/include/asm/immap_85xx.h | 15 +++ arch/powerpc/include/asm/processor.h | 2 + 10 files changed, 376 insertions(+), 0 deletions(-) create mode 100644 arch/powerpc/cpu/mpc85xx/p5040_ids.c create mode 100644 arch/powerpc/cpu/mpc85xx/p5040_serdes.c
arch/powerpc/cpu/mpc85xx/Makefile +3 -0
@@ -66,6 +66,7 @@ COBJS-$(CONFIG_PPC_P2041) += ddr-gen3.o COBJS-$(CONFIG_PPC_P3041) += ddr-gen3.o COBJS-$(CONFIG_PPC_P4080) += ddr-gen3.o COBJS-$(CONFIG_PPC_P5020) += ddr-gen3.o +COBJS-$(CONFIG_PPC_P5040) += ddr-gen3.o COBJS-$(CONFIG_BSC9131) += ddr-gen3.o COBJS-$(CONFIG_CPM2) += ether_fcc.o
@@ -80,6 +81,7 @@ COBJS-$(CONFIG_PPC_P2041) += p2041_ids.o COBJS-$(CONFIG_PPC_P3041) += p3041_ids.o COBJS-$(CONFIG_PPC_P4080) += p4080_ids.o COBJS-$(CONFIG_PPC_P5020) += p5020_ids.o +COBJS-$(CONFIG_PPC_P5040) += p5040_ids.o COBJS-$(CONFIG_QE) += qe_io.o COBJS-$(CONFIG_CPM2) += serial_scc.o
@@ -110,6 +112,7 @@ COBJS-$(CONFIG_PPC_P2041) += p2041_serdes.o COBJS-$(CONFIG_PPC_P3041) += p3041_serdes.o COBJS-$(CONFIG_PPC_P4080) += p4080_serdes.o COBJS-$(CONFIG_PPC_P5020) += p5020_serdes.o +COBJS-$(CONFIG_PPC_P5040) += p5040_serdes.o COBJS = $(COBJS-y) COBJS += cpu.o
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +70 -0
98 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h +5 -0
@@ -22,6 +22,11 @@#ifndef __FSL_CORENET_SERDES_H#define __FSL_CORENET_SERDES_H +/* +* Note: For P5040, the fourth SerDes bank is on SerDes2, but U-boot currently +* only supports one SerDes controller. For now, pretend that we have three +* banks and 18 lanes on the P5040. +*/ #define SRDS_MAX_LANES 18#define SRDS_MAX_BANK 3
arch/powerpc/cpu/mpc85xx/p5040_ids.c new file +131 -0
131 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/p5040_serdes.c new file +117 -0
117 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/speed.c +2 -0
@@ -112,6 +112,8 @@ void get_sys_info (sys_info_t * sysInfo)#define HWA_ASYNC_DIV 0x04000000#if (CONFIG_SYS_FSL_NUM_CC_PLLS ==2 )#define HWA_CC_PLL 1 +#elif (CONFIG_SYS_FSL_NUM_CC_PLLS ==3 ) +#define HWA_CC_PLL 2#elif (CONFIG_SYS_FSL_NUM_CC_PLLS ==4 )#define HWA_CC_PLL 2#else
arch/powerpc/cpu/mpc8xxx/cpu.c +2 -0
@@ -73,6 +73,8 @@ struct cpu_type cpu_type_list [] = {CPU_TYPE_ENTRY (P4080 ,P4080 ,8 ),CPU_TYPE_ENTRY (P5010 ,P5010 ,1 ),CPU_TYPE_ENTRY (P5020 ,P5020 ,2 ), +CPU_TYPE_ENTRY (P5021 ,P5021 ,2 ), +CPU_TYPE_ENTRY (P5040 ,P5040 ,4 ),CPU_TYPE_ENTRY (BSC9130 ,9130 ,1 ),CPU_TYPE_ENTRY (BSC9131 ,9131 ,1 ), #elif defined(CONFIG_MPC86xx)
arch/powerpc/include/asm/config_mpc85xx.h +29 -0
@@ -433,6 +433,35 @@#define CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV 0x10#define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xc0000000 +#elif defined(CONFIG_PPC_P5040 ) +#define CONFIG_SYS_FSL_QORIQ_CHASSIS1 +#define CONFIG_MAX_CPUS 4 +#define CONFIG_SYS_FSL_NUM_CC_PLLS 3 +#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 5 +#define CONFIG_SYS_NUM_FM1_10GEC 1 +#define CONFIG_SYS_NUM_FM2_DTSEC 5 +#define CONFIG_SYS_NUM_FM2_10GEC 1 +#define CONFIG_NUM_DDR_CONTROLLERS 2 +#define CONFIG_SYS_FM_MURAM_SIZE 0x28000 +#define CONFIG_SYS_FSL_TBCLK_DIV 16 +#define CONFIG_SYS_FSL_PCIE_COMPAT "fsl,qoriq-pcie-v2.4" +#define CONFIG_SYS_CCSRBAR_DEFAULT 0xfe000000 +#define CONFIG_SYS_FSL_USB1_PHY_ENABLE +#define CONFIG_SYS_FSL_USB2_PHY_ENABLE +#define CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY +#define CONFIG_SYS_FSL_ERRATUM_ESDHC111 +#define CONFIG_SYS_FSL_ERRATUM_USB138 +#define CONFIG_SYS_FSL_ERRATUM_DDR_A003 +#define CONFIG_SYS_FSL_ERRATUM_DDR_A003474 +#define CONFIG_SYS_FSL_ERRATUM_A004699 +#define CONFIG_SYS_FSL_ELBC_MULTIBIT_ECC +#define CONFIG_SYS_FSL_ERRATUM_A004510 +#define CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV 0x10 +#define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xf0000000 +#elif defined(CONFIG_BSC9131 )#define CONFIG_MAX_CPUS 1#define CONFIG_FSL_SDHC_V2_3
arch/powerpc/include/asm/immap_85xx.h +15 -0
@@ -1761,6 +1761,7 @@ typedef struct ccsr_gur {#define FSL_CORENET_RCWSR5_DDR_SYNC 0x00000080#define FSL_CORENET_RCWSR5_DDR_SYNC_SHIFT 7#define FSL_CORENET_RCWSR5_SRDS_EN 0x00002000 +#define FSL_CORENET_RCWSR5_SRDS2_EN 0x00001000#define FSL_CORENET_RCWSR6_BOOT_LOC 0x0f800000#define FSL_CORENET_RCWSRn_SRDS_LPD_B2 0x3c000000/* bits 162..165 */ #define FSL_CORENET_RCWSRn_SRDS_LPD_B3 0x003c0000/* bits 170..173 */
@@ -1786,6 +1787,15 @@ typedef struct ccsr_gur {#define FSL_CORENET_RCWSR11_EC2_FM1_DTSEC5_MII 0x00100000#define FSL_CORENET_RCWSR11_EC2_FM1_DTSEC5_NONE 0x00180000#endif +#if defined(CONFIG_PPC_P5040 ) +#define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC5_RGMII 0x00000000 +#define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC5_MII 0x00800000 +#define FSL_CORENET_RCWSR11_EC1_FM1_DTSEC5_NONE 0x00c00000 +#define FSL_CORENET_RCWSR11_EC2 0x00180000/* bits 363..364 */ +#define FSL_CORENET_RCWSR11_EC2_FM2_DTSEC5_RGMII 0x00000000 +#define FSL_CORENET_RCWSR11_EC2_FM2_DTSEC5_MII 0x00100000 +#define FSL_CORENET_RCWSR11_EC2_FM2_DTSEC5_NONE 0x00180000 +#endif u8 res18[192 ];u32 scratchrw[4 ];/* Scratch Read/Write */ u8 res19[240 ];
@@ -2395,6 +2405,7 @@ typedef struct serdes_corenet {#define SRDS_RSTCTL_SDPD 0x00000020u32 pllcr0;/* PLL Control Register 0 */ #define SRDS_PLLCR0_RFCK_SEL_MASK 0x30000000 +#define SRDS_PLLCR0_PVCOCNT_EN 0x02000000#define SRDS_PLLCR0_RFCK_SEL_100 0x00000000#define SRDS_PLLCR0_RFCK_SEL_125 0x10000000#define SRDS_PLLCR0_RFCK_SEL_156_25 0x20000000
@@ -2423,6 +2434,7 @@ typedef struct serdes_corenet {u32 gcr0;/* General Control Register 0 */ #define SRDS_GCR0_RRST 0x00400000#define SRDS_GCR0_1STLANE 0x00010000 +#define SRDS_GCR0_UOTHL 0x00100000u32 gcr1;/* General Control Register 1 */ #define SRDS_GCR1_REIDL_CTL_MASK 0x001f0000#define SRDS_GCR1_REIDL_CTL_PCIE 0x00100000
@@ -2627,6 +2639,7 @@ struct ccsr_rman {#define CONFIG_SYS_FSL_CORENET_CLK_OFFSET 0xE1000#define CONFIG_SYS_FSL_CORENET_RCPM_OFFSET 0xE2000#define CONFIG_SYS_FSL_CORENET_SERDES_OFFSET 0xEA000 +#define CONFIG_SYS_FSL_CORENET_SERDES2_OFFSET 0xEB000#define CONFIG_SYS_FSL_CPC_OFFSET 0x10000#define CONFIG_SYS_MPC85xx_DMA1_OFFSET 0x100000#define CONFIG_SYS_MPC85xx_DMA2_OFFSET 0x101000
@@ -2777,6 +2790,8 @@ struct ccsr_rman { (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_SERDES2_OFFSET)#define CONFIG_SYS_FSL_CORENET_SERDES_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_FSL_CORENET_SERDES_OFFSET) +#define CONFIG_SYS_FSL_CORENET_SERDES2_ADDR \ + (CONFIG_SYS_IMMR + CONFIG_SYS_FSL_CORENET_SERDES2_OFFSET)#define CONFIG_SYS_MPC85xx_USB_ADDR \ (CONFIG_SYS_IMMR + CONFIG_SYS_MPC85xx_USB_OFFSET)#define CONFIG_SYS_MPC85xx_USB1_PHY_ADDR \
arch/powerpc/include/asm/processor.h +2 -0
@@ -1095,6 +1095,8 @@#define SVR_P4080 0x820000#define SVR_P5010 0x822100#define SVR_P5020 0x822000 +#define SVR_P5021 0X820500 +#define SVR_P5040 0x820400#define SVR_8610 0x80A000#define SVR_8641 0x809000
Signature · 1 line
1.7.3.4
PATCH v3 7/7 powerpc/85xx: add support for the Freescale P5040DS Superhydra reference board
In reply to Timur TabiThe P5040DS reference board (a.k.a "Superhydra") is an enhanced version of P3041DS/P5020DS ("Hydra") reference board.
--- arch/powerpc/cpu/mpc85xx/p5040_ids.c | 66 ++-- board/freescale/common/Makefile | 2 + board/freescale/common/ngpixis.h | 2 +- board/freescale/corenet_ds/Makefile | 2 + board/freescale/corenet_ds/corenet_ds.c | 22 +- board/freescale/corenet_ds/eth_superhydra.c | 722 +++++++++++++++++++++++++++ board/freescale/corenet_ds/p5040ds_ddr.c | 18 + boards.cfg | 1 + drivers/net/fm/Makefile | 1 + drivers/net/fm/p5040.c | 113 +++++ include/configs/P5040DS.h | 40 ++ 11 files changed, 947 insertions(+), 42 deletions(-) create mode 100644 board/freescale/corenet_ds/eth_superhydra.c create mode 100644 board/freescale/corenet_ds/p5040ds_ddr.c create mode 100644 drivers/net/fm/p5040.c create mode 100644 include/configs/P5040DS.h
arch/powerpc/cpu/mpc85xx/p5040_ids.c +31 -35
@@ -35,17 +35,11 @@ struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {SET_QP_INFO (11 ,12 ,6 ,1 ),SET_QP_INFO (13 ,14 ,7 ,2 ),SET_QP_INFO (15 ,16 ,8 ,3 ), -SET_QP_INFO (17 ,18 ,9 ,0 ), - SET_QP_INFO(19, 20, 10, 0), +SET_QP_INFO (17 ,18 ,9 ,0 ),/* for now, set sdest to 0 */ + SET_QP_INFO(19, 20, 10, 0), /* for now, set sdest to 0 */ };#endif -struct srio_liodn_id_table srio_liodn_tbl[] = { -SET_SRIO_LIODN_2 (1 ,199 ,200 ), -SET_SRIO_LIODN_2 (2 ,201 ,202 ), -}; -int srio_liodn_tbl_sz =ARRAY_SIZE (srio_liodn_tbl); - struct liodn_id_table liodn_tbl[] = {#ifdef CONFIG_SYS_DPAA_QBMAN SET_QMAN_LIODN(31),
@@ -54,40 +48,40 @@ struct liodn_id_table liodn_tbl[] = {SET_SDHC_LIODN (1 ,64 ), -SET_USB_LIODN (1 ,"fsl-usb2-mph" ,125 ), -SET_USB_LIODN (2 ,"fsl-usb2-dr" ,126 ), +SET_USB_LIODN (1 ,"fsl-usb2-mph" ,93 ), +SET_USB_LIODN (2 ,"fsl-usb2-dr" ,94 ), -SET_SATA_LIODN (1 ,127 ), -SET_SATA_LIODN (2 ,128 ), +SET_SATA_LIODN (1 ,95 ), +SET_SATA_LIODN (2 ,96 ), -SET_PCI_LIODN_BASE (CONFIG_SYS_FSL_PCIE_COMPAT ,1 ,193 ), -SET_PCI_LIODN_BASE (CONFIG_SYS_FSL_PCIE_COMPAT ,2 ,194 ), -SET_PCI_LIODN_BASE (CONFIG_SYS_FSL_PCIE_COMPAT ,3 ,195 ), +SET_PCI_LIODN_BASE (CONFIG_SYS_FSL_PCIE_COMPAT ,1 ,195 ), +SET_PCI_LIODN_BASE (CONFIG_SYS_FSL_PCIE_COMPAT ,2 ,196 ), +SET_PCI_LIODN_BASE (CONFIG_SYS_FSL_PCIE_COMPAT ,3 ,197 ), -SET_DMA_LIODN (1 ,197 ), - SET_DMA_LIODN(2, 198), +SET_DMA_LIODN (1 ,193 ), + SET_DMA_LIODN(2, 194), };int liodn_tbl_sz =ARRAY_SIZE (liodn_tbl);#ifdef CONFIG_SYS_DPAA_FMAN struct liodn_id_table fman1_liodn_tbl[] = { -SET_FMAN_RX_1G_LIODN (1 ,0 ,10 ), -SET_FMAN_RX_1G_LIODN (1 ,1 ,11 ), -SET_FMAN_RX_1G_LIODN (1 ,2 ,12 ), -SET_FMAN_RX_1G_LIODN (1 ,3 ,13 ), -SET_FMAN_RX_1G_LIODN (1 ,4 ,14 ), -SET_FMAN_RX_10G_LIODN (1 ,0 ,15 ), +SET_FMAN_RX_1G_LIODN (1 ,0 ,6 ), +SET_FMAN_RX_1G_LIODN (1 ,1 ,7 ), +SET_FMAN_RX_1G_LIODN (1 ,2 ,8 ), +SET_FMAN_RX_1G_LIODN (1 ,3 ,9 ), +SET_FMAN_RX_1G_LIODN (1 ,4 ,10 ), +SET_FMAN_RX_10G_LIODN (1 ,0 ,11 ), };int fman1_liodn_tbl_sz =ARRAY_SIZE (fman1_liodn_tbl);#if (CONFIG_SYS_NUM_FMAN ==2 )struct liodn_id_table fman2_liodn_tbl[] = { -SET_FMAN_RX_1G_LIODN (2 ,0 ,16 ), -SET_FMAN_RX_1G_LIODN (2 ,1 ,17 ), -SET_FMAN_RX_1G_LIODN (2 ,2 ,18 ), -SET_FMAN_RX_1G_LIODN (2 ,3 ,19 ), -SET_FMAN_RX_1G_LIODN (2 ,4 ,20 ), -SET_FMAN_RX_10G_LIODN (2 ,0 ,21 ), +SET_FMAN_RX_1G_LIODN (2 ,0 ,12 ), +SET_FMAN_RX_1G_LIODN (2 ,1 ,13 ), +SET_FMAN_RX_1G_LIODN (2 ,2 ,14 ), +SET_FMAN_RX_1G_LIODN (2 ,3 ,15 ), +SET_FMAN_RX_1G_LIODN (2 ,4 ,16 ), +SET_FMAN_RX_10G_LIODN (2 ,0 ,17 ), };int fman2_liodn_tbl_sz =ARRAY_SIZE (fman2_liodn_tbl);#endif
@@ -98,12 +92,14 @@ struct liodn_id_table sec_liodn_tbl[] = {SET_SEC_JR_LIODN_ENTRY (1 ,131 ,132 ),SET_SEC_JR_LIODN_ENTRY (2 ,133 ,134 ),SET_SEC_JR_LIODN_ENTRY (3 ,135 ,136 ), -SET_SEC_RTIC_LIODN_ENTRY (a,154 ), -SET_SEC_RTIC_LIODN_ENTRY (b,155 ), -SET_SEC_RTIC_LIODN_ENTRY (c,156 ), -SET_SEC_RTIC_LIODN_ENTRY (d,157 ), -SET_SEC_DECO_LIODN_ENTRY (0 ,97 ,98 ), - SET_SEC_DECO_LIODN_ENTRY(1, 99, 100), +SET_SEC_RTIC_LIODN_ENTRY (a,89 ), +SET_SEC_RTIC_LIODN_ENTRY (b,90 ), +SET_SEC_RTIC_LIODN_ENTRY (c,91 ), +SET_SEC_RTIC_LIODN_ENTRY (d,92 ), +SET_SEC_DECO_LIODN_ENTRY (0 ,139 ,140 ), +SET_SEC_DECO_LIODN_ENTRY (1 ,141 ,142 ), +SET_SEC_DECO_LIODN_ENTRY (2 ,143 ,144 ), + SET_SEC_DECO_LIODN_ENTRY(3, 145, 146), };int sec_liodn_tbl_sz =ARRAY_SIZE (sec_liodn_tbl);
board/freescale/common/Makefile +2 -0
@@ -53,12 +53,14 @@ COBJS-$(CONFIG_P2020DS) += ics307_clk.o COBJS-$(CONFIG_P3041DS) += ics307_clk.o COBJS-$(CONFIG_P4080DS) += ics307_clk.o COBJS-$(CONFIG_P5020DS) += ics307_clk.o +COBJS-$(CONFIG_P5040DS) += ics307_clk.o # deal with common files for P-series corenet based devices SUBLIB-$(CONFIG_P2041RDB) += p_corenet/libp_corenet.o SUBLIB-$(CONFIG_P3041DS) += p_corenet/libp_corenet.o SUBLIB-$(CONFIG_P4080DS) += p_corenet/libp_corenet.o SUBLIB-$(CONFIG_P5020DS) += p_corenet/libp_corenet.o +SUBLIB-$(CONFIG_P5040DS) += p_corenet/libp_corenet.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y))
board/freescale/common/ngpixis.h +1 -1
@@ -45,7 +45,7 @@ typedef struct ngpixis {struct {u8 sw;u8 en; - } s[8 ]; + } s[9 ];/* s[0]..s[7] is SW1..SW8, and s[8] is SW11 */ } __attribute__ ((packed)) ngpixis_t;/* Pointer to the PIXIS register set */
board/freescale/corenet_ds/Makefile +2 -0
@@ -31,9 +31,11 @@ COBJS-y += ddr.o COBJS-$(CONFIG_P3041DS) += eth_hydra.o COBJS-$(CONFIG_P4080DS) += eth_p4080.o COBJS-$(CONFIG_P5020DS) += eth_hydra.o +COBJS-$(CONFIG_P5040DS) += eth_superhydra.o COBJS-$(CONFIG_P3041DS) += p3041ds_ddr.o COBJS-$(CONFIG_P4080DS) += p4080ds_ddr.o COBJS-$(CONFIG_P5020DS) += p5020ds_ddr.o +COBJS-$(CONFIG_P5040DS) += p5040ds_ddr.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y))
board/freescale/corenet_ds/corenet_ds.c +16 -6
@@ -45,6 +45,7 @@ int checkboard (void)struct cpu_type *cpu = gd->cpu;ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;unsigned int i; +static const char *const freq[] = {"100" ,"125" ,"156.25" ,"212.5" };printf ("Board: %sDS, " , cpu->name); printf("Sys ID: 0x%02x, Sys Ver: 0x%02x, FPGA Ver: 0x%02x, ",
@@ -83,20 +84,28 @@ int checkboard (void)* don't match. */ puts ("SERDES Reference Clocks: " ); -#if defined(CONFIG_P3041DS ) || defined(CONFIG_P5020DS ) +#if defined(CONFIG_P3041DS ) || defined(CONFIG_P5020DS ) \ + || defined(CONFIG_P5040DS ) sw =in_8 (&PIXIS_SW (5 ));for (i =0 ; i <3 ; i++) { -static const char *freq[] = {"100" ,"125" ,"156.25" ,"212.5" };unsigned int clock = (sw >> (6 - (2 * i))) &3 ;printf ("Bank%u=%sMhz " , i+1 , freq[clock]); } +#ifdef CONFIG_P5040DS +/* On P5040DS, SW11[7:8] determines the Bank 4 frequency */ + sw =in_8 (&PIXIS_SW (9 )); +printf ("Bank4=%sMhz " , freq[sw &3 ]); +#endif puts ("\n" );#else sw =in_8 (&PIXIS_SW (3 )); -printf ("Bank1=%uMHz " , (sw &0x40 ) ?125 :100 ); -printf ("Bank2=%sMHz " , (sw &0x20 ) ?"156.25" :"125" ); -printf ("Bank3=%sMHz\n" , (sw &0x10 ) ?"156.25" :"125" ); +/* SW3[2]: 0 = 100 Mhz, 1 = 125 MHz */ +/* SW3[3]: 0 = 125 Mhz, 1 = 156.25 MHz */ +/* SW3[4]: 0 = 125 Mhz, 1 = 156.25 MHz */ +printf ("Bank1=%sMHz " , freq[!!(sw &0x40 )]); +printf ("Bank2=%sMHz " , freq[1 + !!(sw &0x20 )]); +printf ("Bank3=%sMHz\n" , freq[1 + !!(sw &0x10 )]);#endif return 0 ;
@@ -168,7 +177,8 @@ int misc_init_r(void)unsigned int i;u8 sw; -#if defined(CONFIG_P3041DS ) || defined(CONFIG_P5020DS ) +#if defined(CONFIG_P3041DS ) || defined(CONFIG_P5020DS ) \ + || defined(CONFIG_P5040DS ) sw =in_8 (&PIXIS_SW (5 ));for (i =0 ; i <3 ; i++) {unsigned int clock = (sw >> (6 - (2 * i))) &3 ;
board/freescale/corenet_ds/eth_superhydra.c new file +722 -0
722 lines not on this page · raw message
board/freescale/corenet_ds/p5040ds_ddr.c new file +18 -0
@@ -0,0 +1,18 @@ +/* +* Copyright 2009-2010 Freescale Semiconductor, Inc. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* Version 2 as published by the Free Software Foundation. +*/ + +#include <common.h> +#include <asm/fsl_ddr_sdram.h> + +fixed_ddr_parm_t fixed_ddr_parm_0[] = { + {0 ,0 ,NULL } +}; + +fixed_ddr_parm_t fixed_ddr_parm_1[] = { + {0 ,0 ,NULL } +};
boards.cfg +1 -0
@@ -805,6 +805,7 @@ P5020DS_SDCARD powerpc mpc85xx corenet_ds freescale P5020DS_SECURE_BOOT powerpc mpc85xx corenet_ds freescale - P5020DS:SECURE_BOOT P5020DS_SPIFLASH powerpc mpc85xx corenet_ds freescale - P5020DS:RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000 P5020DS_SRIO_PCIE_BOOT powerpc mpc85xx corenet_ds freescale - P5020DS:SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF80000 +P5040DS powerpc mpc85xx corenet_ds freescale BSC9131RDB_SPIFLASH powerpc mpc85xx bsc9131rdb freescale - BSC9131RDB:BSC9131RDB,SPIFLASH stxgp3 powerpc mpc85xx stxgp3 stx stxssa powerpc mpc85xx stxssa stx - stxssa
drivers/net/fm/Makefile +1 -0
@@ -40,6 +40,7 @@ COBJS-$(CONFIG_PPC_P2041) += p5020.o COBJS-$(CONFIG_PPC_P3041) += p5020.o COBJS-$(CONFIG_PPC_P4080) += p4080.o COBJS-$(CONFIG_PPC_P5020) += p5020.o +COBJS-$(CONFIG_PPC_P5040) += p5040.o endif COBJS := $(COBJS-y)
drivers/net/fm/p5040.c new file +113 -0
113 lines not on this page · raw message
include/configs/P5040DS.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright 2009-2011 Freescale Semiconductor, Inc. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +/* +* P5020 DS board configuration file +* +*/ +#define CONFIG_P5040DS +#define CONFIG_PHYS_64BIT +#define CONFIG_PPC_P5040 + +#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */ + +#define CONFIG_MMC +#define CONFIG_NAND_FSL_ELBC +#define CONFIG_PCIE3 +#define CONFIG_SYS_FSL_RAID_ENGINE + +#define CONFIG_ICS307_REFCLK_HZ 25000000/* ICS307 ref clk freq */ + +#include "corenet_ds.h"
Signature · 1 line
1.7.3.4