Re: [U-Boot] [PATCH 4/6] [v2] powerpc/85xx: Add P5040 processor support

2012-10-03 Thread Timur Tabi
Kim Phillips wrote:
  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

 same comment as I made before - make this marketing text relevant to
 u-boot, e.g., list what devices this patch supports.

I guess we'll have to agree to disagree.  I always put information like
this when adding new soc/board support.

 +SET_SEC_DECO_LIODN_ENTRY(0, 97, 98),
 +SET_SEC_DECO_LIODN_ENTRY(1, 99, 100),
 +};

 NACK - the SEC in the p5040 has four DECOs, not two.

I should have the proper LIODN information later today.

-- 
Timur Tabi
Linux kernel developer at Freescale

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/6] [v2] powerpc/85xx: Add P5040 processor support

2012-10-01 Thread Timur Tabi
Add 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

Signed-off-by: Timur Tabi ti...@freescale.com
---

The LIODNs for the SEC's DECOs are apparently wrong, but the correct
values are not available.  They will be fixed later.

 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 |   28 +
 arch/powerpc/include/asm/immap_85xx.h |   15 +++
 arch/powerpc/include/asm/processor.h  |2 +
 10 files changed, 375 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc85xx/p5040_ids.c
 create mode 100644 arch/powerpc/cpu/mpc85xx/p5040_serdes.c

diff --git a/arch/powerpc/cpu/mpc85xx/Makefile 
b/arch/powerpc/cpu/mpc85xx/Makefile
index 33e93c8..aad50f3 100644
--- a/arch/powerpc/cpu/mpc85xx/Makefile
+++ b/arch/powerpc/cpu/mpc85xx/Makefile
@@ -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
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c 
b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index 2a68060..e6b1b1b 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -92,10 +92,17 @@ static const struct {
{ 17, 163, FSL_SRDS_BANK_2 },
{ 18, 164, FSL_SRDS_BANK_2 },
{ 19, 165, FSL_SRDS_BANK_2 },
+#ifdef CONFIG_PPC_P4080
{ 20, 170, FSL_SRDS_BANK_3 },
{ 21, 171, FSL_SRDS_BANK_3 },
{ 22, 172, FSL_SRDS_BANK_3 },
{ 23, 173, FSL_SRDS_BANK_3 },
+#else
+   { 20, 166, FSL_SRDS_BANK_3 },
+   { 21, 167, FSL_SRDS_BANK_3 },
+   { 22, 168, FSL_SRDS_BANK_3 },
+   { 23, 169, FSL_SRDS_BANK_3 },
+#endif
 };
 
 int serdes_get_lane_idx(int lane)
@@ -493,6 +500,9 @@ void fsl_serdes_init(void)
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
int cfg;
serdes_corenet_t *srds_regs;
+#ifdef CONFIG_PPC_P5040
+   serdes_corenet_t *srds2_regs;
+#endif
int lane, bank, idx;
int have_bank[SRDS_MAX_BANK] = {};
 #ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8
@@ -574,6 +584,34 @@ void fsl_serdes_init(void)
}
}
 
+#ifdef CONFIG_PPC_P5040
+   /*
+

Re: [U-Boot] [PATCH 4/6] [v2] powerpc/85xx: Add P5040 processor support

2012-10-01 Thread Kim Phillips
On Mon, 1 Oct 2012 09:06:41 -0500
Timur Tabi ti...@freescale.com wrote:

 Add 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

same comment as I made before - make this marketing text relevant to
u-boot, e.g., list what devices this patch supports.

 +struct liodn_id_table sec_liodn_tbl[] = {
 + SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
 + 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),
 +};

NACK - the SEC in the p5040 has four DECOs, not two.

Kim

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot