powerpc/p4080: Add support for initializing SERDES
PATCH 1/4 powerpc/p4080: Add support for initializing SERDES
Add support for initializing the SERDES blocks on CoreNet style QoriQ devices and the p4080 specific SERDES tables to know which actual componetns are enabled.
Additionally, split out the Frame Manger (FMAN) into its specific ethernet ports instead of gross level of the full FMAN.
--- arch/powerpc/cpu/mpc85xx/Makefile | 2 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 212 +++++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h | 40 +++++ arch/powerpc/cpu/mpc85xx/p4080_serdes.c | 94 +++++++++++ arch/powerpc/include/asm/fsl_serdes.h | 11 +- 5 files changed, 357 insertions(+), 2 deletions(-) create mode 100644 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c create mode 100644 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h create mode 100644 arch/powerpc/cpu/mpc85xx/p4080_serdes.c
arch/powerpc/cpu/mpc85xx/Makefile +2 -0
@@ -76,6 +76,8 @@ COBJS-$(CONFIG_PPC_P4080) += p4080_ids.o COBJS-$(CONFIG_QE) += qe_io.o COBJS-$(CONFIG_CPM2) += serial_scc.o +COBJS-$(CONFIG_FSL_CORENET) += fsl_corenet_serdes.o +COBJS-$(CONFIG_PPC_P4080) += p4080_serdes.o COBJS = $(COBJS-y) COBJS += cpu.o
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c new file +212 -0
212 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright 2009-2010 Freescale Semiconductor, Inc. +* +* Author: Roy Zang <[email protected]> +* +* 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 +*/ + +#ifndef __FSL_CORENET_SERDES_H +#define __FSL_CORENET_SERDES_H + +#define SRDS_MAX_LANES 18 +#define SRDS_MAX_BANK 3 + +enum srds_bank { +FSL_SRDS_BANK_1 =0 , +FSL_SRDS_BANK_2 =1 , +FSL_SRDS_BANK_3 =2 , +}; + +int is_serdes_prtcl_valid (u32 prtcl); +int serdes_get_lane_idx (int lane); +int serdes_get_bank (int lane); +int serdes_lane_enabled (int lane); +enum srds_prtcl serdes_get_prtcl (int cfg,int lane); + +#endif /* __FSL_CORENET_SERDES_H */
arch/powerpc/cpu/mpc85xx/p4080_serdes.c new file +94 -0
94 lines not on this page · raw message
arch/powerpc/include/asm/fsl_serdes.h +9 -2
@@ -32,8 +32,15 @@ enum srds_prtcl {SATA2 ,SRIO1 ,SRIO2 , -SGMII_FM1 , -SGMII_FM2 , +SGMII_FM1_DTSEC1 , +SGMII_FM1_DTSEC2 , +SGMII_FM1_DTSEC3 , +SGMII_FM1_DTSEC4 , +SGMII_FM1_DTSEC5 , +SGMII_FM2_DTSEC1 , +SGMII_FM2_DTSEC2 , +SGMII_FM2_DTSEC3 , +SGMII_FM2_DTSEC4 ,SGMII_TSEC1 ,SGMII_TSEC2 , SGMII_TSEC3,
Signature · 1 line
1.6.0.6
Kumar Gala
AppliedPATCH 1/4 powerpc/p4080: Add support for initializing SERDES
Quoted 17 lines · Kumar Gala
Add support for initializing the SERDES blocks on CoreNet style QoriQ devices and the p4080 specific SERDES tables to know which actual componetns are enabled.
Additionally, split out the Frame Manger (FMAN) into its specific ethernet ports instead of gross level of the full FMAN.
Signed-off-by Li Yang <[email protected]>Signed-off-by Roy Zang <[email protected]>Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/cpu/mpc85xx/Makefile | 2 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 212 +++++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h | 40 +++++ arch/powerpc/cpu/mpc85xx/p4080_serdes.c | 94 +++++++++++ arch/powerpc/include/asm/fsl_serdes.h | 11 +- 5 files changed, 357 insertions(+), 2 deletions(-)
Quoted 3 lines
create mode 100644
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.ccreate mode 100644arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.hcreate mode 100644arch/powerpc/cpu/mpc85xx/p4080_serdes.c
applied to 85xx
- k
PATCH 2/4 powerpc/p4080: Add workaround for errata SERDES8
In reply to Kumar Gala--- arch/powerpc/cpu/mpc85xx/cmd_errata.c | 4 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 283 +++++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h | 4 + arch/powerpc/cpu/mpc85xx/p4080_serdes.c | 4 + 4 files changed, 295 insertions(+), 0 deletions(-)
arch/powerpc/cpu/mpc85xx/cmd_errata.c +4 -0
@@ -41,6 +41,10 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) }#endif +#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8 ) +puts ("Work-around for Erratum SERDES8 enabled\n" ); +#endif +return 0 ; }
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c +283 -0
339 lines not on this page · raw message
arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h +4 -0
@@ -37,4 +37,8 @@ int serdes_get_bank(int lane);int serdes_lane_enabled (int lane);enum srds_prtcl serdes_get_prtcl (int cfg,int lane); +#ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 +extern uint16_t srds_lpd_b[SRDS_MAX_BANK ]; +#endif +#endif /* __FSL_CORENET_SERDES_H */
arch/powerpc/cpu/mpc85xx/p4080_serdes.c +4 -0
@@ -71,6 +71,10 @@ static u8 serdes_cfg_tbl[][SRDS_MAX_LANES] = { XAUI_FM1, XAUI_FM1, XAUI_FM1, XAUI_FM1}, }; +#ifdef CONFIG_SYS_P4080_ERRATUM_SERDES8 +uint16_t srds_lpd_b[SRDS_MAX_BANK ]; +#endif +enum srds_prtcl serdes_get_prtcl (int cfg,int lane) {if (!serdes_lane_enabled (lane))
Signature · 1 line
1.6.0.6
Kumar Gala
AppliedPATCH 2/4 powerpc/p4080: Add workaround for errata SERDES8
Quoted 10 lines · Kumar Gala
Signed-off-by Scott Wood <[email protected]>Signed-off-by Emil Medve <[email protected]>Signed-off-by Ed Swarthout <[email protected]>Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/cpu/mpc85xx/cmd_errata.c | 4 + arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c | 283 +++++++++++++++++++++++++ arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.h | 4 + arch/powerpc/cpu/mpc85xx/p4080_serdes.c | 4 + 4 files changed, 295 insertions(+), 0 deletions(-)
applied to 85xx
- k
PATCH 3/4 powerpc/p4080: Add workaround for erratum CPU22
In reply to Kumar Gala--- arch/powerpc/cpu/mpc85xx/cmd_errata.c | 4 +++- arch/powerpc/cpu/mpc85xx/cpu_init.c | 7 +++++++ arch/powerpc/cpu/mpc85xx/release.S | 6 ++++++ arch/powerpc/include/asm/processor.h | 1 + 4 files changed, 17 insertions(+), 1 deletions(-)
arch/powerpc/cpu/mpc85xx/cmd_errata.c +3 -1
@@ -44,7 +44,9 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])#if defined(CONFIG_SYS_P4080_ERRATUM_SERDES8 )puts ("Work-around for Erratum SERDES8 enabled\n" );#endif - +#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22 ) +puts ("Work-around for Erratum CPU22 enabled\n" ); +#endif return 0 ; }
arch/powerpc/cpu/mpc85xx/cpu_init.c +7 -0
@@ -32,6 +32,7 @@#include <ioports.h> #include <sata.h> #include <asm/io.h> +#include <asm/cache.h> #include <asm/mmu.h> #include <asm/fsl_law.h> #include <asm/fsl_serdes.h>
@@ -245,6 +246,12 @@ int cpu_init_r(void)volatile fsl_lbc_t *lbc =LBC_BASE_ADDR ;#endif +#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22 ) +flush_dcache (); +mtspr (L1CSR2 , (mfspr (L1CSR2 ) |L1CSR2_DCWS )); +sync (); +#endif +puts ("L2: " );#if defined(CONFIG_L2_CACHE )
arch/powerpc/cpu/mpc85xx/release.S +6 -0
@@ -136,6 +136,12 @@ __secondary_start_page: mtspr L1CSR2,r8 #endif +#if defined(CONFIG_SYS_P4080_ERRATUM_CPU22) + mfspr r8,L1CSR2 + oris r8,r8,(L1CSR2_DCWS)@h + mtspr L1CSR2,r8 +#endif + #ifdef CONFIG_BACKSIDE_L2_CACHE /* Enable/invalidate the L2 cache */ msync
arch/powerpc/include/asm/processor.h +1 -0
@@ -495,6 +495,7 @@#define L1CSR1_ICFI 0x00000002/* Instruction Cache Flash Invalidate */ #define L1CSR1_ICE 0x00000001/* Instruction Cache Enable */ #define SPRN_L1CSR2 0x25e/* L1 Data Cache Control and Status Register 2 */ +#define L1CSR2_DCWS 0x40000000/* Data Cache Write Shadow */ #define SPRN_L2CSR0 0x3f9/* L2 Data Cache Control and Status Register 0 */ #define L2CSR0_L2E 0x80000000/* L2 Cache Enable */ #define L2CSR0_L2PE 0x40000000/* L2 Cache Parity/ECC Enable */
Signature · 1 line
1.6.0.6
Kumar Gala
AppliedPATCH 3/4 powerpc/p4080: Add workaround for erratum CPU22
Quoted 7 lines · Kumar Gala
Signed-off-by Kumar Gala <[email protected]>---
arch/powerpc/cpu/mpc85xx/cmd_errata.c | 4 +++- arch/powerpc/cpu/mpc85xx/cpu_init.c | 7 +++++++ arch/powerpc/cpu/mpc85xx/release.S | 6 ++++++ arch/powerpc/include/asm/processor.h | 1 + 4 files changed, 17 insertions(+), 1 deletions(-)
applied to 85xx
- k
PATCH 4/4 powerpc/p4080: Add support for the P4080DS board
In reply to Kumar GalaAdd support for the P4080DS board, with the following features:
* 36-bit only
* Boots from NOR flash
* FMAN drivers NOT supported
* SPD & fixed sdram DDR
--- MAKEALL | 1 + board/freescale/common/Makefile | 1 + board/freescale/corenet_ds/Makefile | 55 +++ board/freescale/corenet_ds/config.mk | 30 ++ board/freescale/corenet_ds/corenet_ds.c | 365 +++++++++++++++++ board/freescale/corenet_ds/ddr.c | 176 ++++++++ board/freescale/corenet_ds/law.c | 40 ++ board/freescale/corenet_ds/pci.c | 127 ++++++ board/freescale/corenet_ds/tlb.c | 104 +++++ boards.cfg | 1 + include/configs/P4080DS.h | 36 ++ include/configs/corenet_ds.h | 673 +++++++++++++++++++++++++++++++ 12 files changed, 1609 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/Makefile create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/corenet_ds.c create mode 100644 board/freescale/corenet_ds/ddr.c create mode 100644 board/freescale/corenet_ds/law.c create mode 100644 board/freescale/corenet_ds/pci.c create mode 100644 board/freescale/corenet_ds/tlb.c create mode 100644 include/configs/P4080DS.h create mode 100644 include/configs/corenet_ds.h
MAKEALL +1 -0
@@ -427,6 +427,7 @@ LIST_85xx=" \ P2020RDB_NAND \ P2020RDB_SDCARD \ P2020RDB_SPIFLASH \ + P4080DS \ PM854 \ PM856 \ sbc8540 \
board/freescale/common/Makefile +1 -0
@@ -46,6 +46,7 @@ COBJS-$(CONFIG_MPC8536DS) += ics307_clk.o COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o COBJS-$(CONFIG_P1022DS) += ics307_clk.o COBJS-$(CONFIG_P2020DS) += ics307_clk.o +COBJS-$(CONFIG_P4080DS) += ics307_clk.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y))
board/freescale/corenet_ds/Makefile new file +55 -0
55 lines not on this page · raw message
board/freescale/corenet_ds/config.mk new file +30 -0
@@ -0,0 +1,30 @@ +# +# Copyright 2007-2009 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 +# + +# +# P4080DS board +# +ifndef TEXT_BASE +TEXT_BASE = 0xeff80000 +endif + +RESET_VECTOR_ADDRESS = 0xeffffffc
board/freescale/corenet_ds/corenet_ds.c new file +365 -0
365 lines not on this page · raw message
board/freescale/corenet_ds/ddr.c new file +176 -0
176 lines not on this page · raw message
board/freescale/corenet_ds/law.c new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright 2008-2010 Freescale Semiconductor, Inc. +* +* (C) Copyright 2000 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de. +* +* 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 +*/ + +#include <common.h> +#include <asm/fsl_law.h> +#include <asm/mmu.h> + +struct law_entry law_table[] = { +SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_BMAN_MEM_PHYS ,LAW_SIZE_2M ,LAW_TRGT_IF_BMAN ), +SET_LAW (CONFIG_SYS_QMAN_MEM_PHYS ,LAW_SIZE_2M ,LAW_TRGT_IF_QMAN ), +SET_LAW (PIXIS_BASE_PHYS ,LAW_SIZE_4K ,LAW_TRGT_IF_LBC ), +#ifdef CONFIG_SYS_DCSRBAR_PHYS +SET_LAW (CONFIG_SYS_DCSRBAR_PHYS ,LAW_SIZE_4M ,LAW_TRGT_IF_DCSR ), +#endif +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/corenet_ds/pci.c new file +127 -0
127 lines not on this page · raw message
board/freescale/corenet_ds/tlb.c new file +104 -0
104 lines not on this page · raw message
boards.cfg +1 -0
@@ -340,6 +340,7 @@ MPC8540ADS powerpc mpc85xx mpc8540ads freescale MPC8544DS powerpc mpc85xx mpc8544ds freescale MPC8560ADS powerpc mpc85xx mpc8560ads freescale MPC8568MDS powerpc mpc85xx mpc8568mds freescale +P4080DS powerpc mpc85xx corenet_ds freescale XPEDITE5200 powerpc mpc85xx xpedite5200 xes XPEDITE5370 powerpc mpc85xx xpedite5370 xes P1022DS powerpc mpc85xx p1022ds freescale
include/configs/P4080DS.h new file +36 -0
@@ -0,0 +1,36 @@ +/* +* Copyright 2009-2010 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 +*/ + +/* +* P4080 DS board configuration file +* +*/ +#define CONFIG_P4080DS +#define CONFIG_PHYS_64BIT +#define CONFIG_PPC_P4080 +#define CONFIG_SYS_NUM_FMAN 2 +#define CONFIG_NUM_DDR_CONTROLLERS 2 + +#define CONFIG_SYS_P4080_ERRATUM_CPU22 +#define CONFIG_SYS_P4080_ERRATUM_SERDES8 + +#include "corenet_ds.h"
include/configs/corenet_ds.h new file +673 -0
673 lines not on this page · raw message
Signature · 1 line
1.6.0.6
PATCH 4/4 powerpc/p4080: Add support for the P4080DS board
Hi Kumar,
That's great to see official 4080 board support! I had a few comments below. I haven't dug into the 4080 much, so take them with a grain of salt.
<snip>
board/freescale/corenet_ds/corenet_ds.c line 67
Quoted 3 lines
board/freescale/corenet_ds/corenet_ds.c new file +3
-0+#ifdef CONFIG_PHYS_64BIT +puts ("36-bit Addressing\n" ); +#endif
Any chance CONFIG_ENABLE_36BIT_PHYS could be defined without CONFIG_PHYS_64BIT, or vice-versa? Or any reason to not use CONFIG_ENABLE_36BIT_PHYS above?
board/freescale/corenet_ds/corenet_ds.c line 80
Quoted 12 lines
board/freescale/corenet_ds/corenet_ds.c new file +12
-0+/* Display the actual SERDES reference clocks as configured by the +* dip switches on the board. Note that the SWx registers could +* technically be set to force the reference clocks to match the +* values that the SERDES expects (or vice versa). For now, however, +* we just display both values and hope the user notices when they +* don't match. +*/ +puts ("SERDES Reference Clocks: " ); + 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" );
Could you use serdes_clock_to_string() above? It'd make the values above a little less magical and be portable to other boards that don't use the PIXIS FPGA.
Quoted 10 lines
board/freescale/corenet_ds/corenet_ds.c new file +10
-0+ +#ifdef CONFIG_ECC_INIT_VIA_DDRCONTROLLER +/* +* Poll until memory is initialized. 512 Meg at 400MHz might hit this +* 200 times or so. +*/ +while ((ddr->sdram_cfg_2 &16 ) !=0 ) { +debug ("sdram_cfg2 = 0x%08x\n" , ddr->sdram_cfg_2); +udelay (1000 ); + }
board/freescale/corenet_ds/corenet_ds.c line 287
Quoted 10 lines
board/freescale/corenet_ds/corenet_ds.c new file +10
-0+ asm("sync; isync" ); +udelay (500 ); + +while ((ddr2->sdram_cfg_2 &16 ) !=0 ) { +debug ("sdram_cfg2 = 0x%08x\n" , ddr2->sdram_cfg_2); +udelay (1000 ); + } + asm("sync; isync" ); +udelay (500 ); +#endif
Use in_be32()'s above? And change 16 to 0x10, or add a D_INIT define?
Quoted 6 lines
board/freescale/corenet_ds/corenet_ds.c new file +6
-0+phys_size_t initdram (int board_type) +{ +phys_size_t dram_size; + +puts ("Initializing....\n" ); +
board/freescale/corenet_ds/corenet_ds.c line 314
Quoted 10 lines
board/freescale/corenet_ds/corenet_ds.c new file +10
-0+#ifdef CONFIG_DDR_SPD + dram_size =fsl_ddr_sdram (); +#else + dram_size =fixed_sdram (); +#endif +setup_ddr_tlbs (dram_size /0x100000 ); + +puts (" DDR: " ); +return dram_size; +}
Should the puts("DDR:") be removed? With it I'd think the output would
be "DRAM: DDR: (DDR3, 64-bit...)". Ie the DDR is a bit redundant
and the spaces a bit excessive.
board/freescale/corenet_ds/corenet_ds.c line 321
Quoted 6 lines
board/freescale/corenet_ds/corenet_ds.c new file +6
-0+#ifdef CONFIG_MP +void board_lmb_reserve (struct lmb *lmb) +{ +cpu_mp_lmb_reserve (lmb); +} +#endif
It'd be nice to move the board_lmb_reserve() somewhere common at some point since every board that has CONFIG_MP defined currently uses the same chunk of code. Or maybe remove board_lmb_reserve() and have its callees call cpu_mp_lmb_reserve().
Quoted 67 lines
board/freescale/corenet_ds/tlb.c new file +67
-0+#include <common.h> +#include <asm/mmu.h> + +struct fsl_e_tlb_entry tlb_table[] = { +/* TLB 0 - for temp stack in cache */ +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR ,CONFIG_SYS_INIT_RAM_ADDR_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +4 *1024 ,CONFIG_SYS_INIT_RAM_ADDR_PHYS +4 *1024 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +8 *1024 ,CONFIG_SYS_INIT_RAM_ADDR_PHYS +8 *1024 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +12 *1024 ,CONFIG_SYS_INIT_RAM_ADDR_PHYS +12 *1024 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), + +SET_TLB_ENTRY (0 ,PIXIS_BASE ,PIXIS_BASE_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), + +/* TLB 1 */ +/* *I*** - Covers boot page */ +SET_TLB_ENTRY (1 ,0xfffff000 ,0xfffff000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,0 ,BOOKE_PAGESZ_4K ,1 ), + +/* *I*G* - CCSRBAR */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_CCSRBAR ,CONFIG_SYS_CCSRBAR_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,1 ,BOOKE_PAGESZ_16M ,1 ), + +/* *I*G* - Flash, localbus */ +/* This will be changed to *I*G* after relocation to RAM. */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_FLASH_BASE ,CONFIG_SYS_FLASH_BASE_PHYS , +MAS3_SX |MAS3_SR ,MAS2_W |MAS2_G , +0 ,2 ,BOOKE_PAGESZ_256M ,1 ), + +/* *I*G* - PCI */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_MEM_VIRT ,CONFIG_SYS_PCIE1_MEM_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,3 ,BOOKE_PAGESZ_1G ,1 ), + +/* *I*G* - PCI */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_MEM_VIRT +0x40000000 ,CONFIG_SYS_PCIE1_MEM_PHYS +0x40000000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,4 ,BOOKE_PAGESZ_256M ,1 ), + +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_MEM_VIRT +0x50000000 ,CONFIG_SYS_PCIE1_MEM_PHYS +0x50000000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,5 ,BOOKE_PAGESZ_256M ,1 ), + +/* *I*G* - PCI I/O */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_IO_VIRT ,CONFIG_SYS_PCIE1_IO_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,6 ,BOOKE_PAGESZ_256K ,1 ), + +/* Bman/Qman */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_BMAN_MEM_BASE ,CONFIG_SYS_BMAN_MEM_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,9 ,BOOKE_PAGESZ_1M ,1 ), +SET_TLB_ENTRY (1 ,CONFIG_SYS_BMAN_MEM_BASE +0x00100000 ,CONFIG_SYS_BMAN_MEM_PHYS +0x00100000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,10 ,BOOKE_PAGESZ_1M ,1 ), + SET_TLB_ENTRY(1, CONFIG_SYS_QMAN_MEM_BASE, CONFIG_SYS_QMAN_MEM_PHYS, + MAS3_SX|MAS3_SW|MAS3_SR, 0,
board/freescale/corenet_ds/tlb.c line 102
Quoted 10 lines
board/freescale/corenet_ds/tlb.c new file +10
-0+ 0, 11, BOOKE_PAGESZ_1M, 1), + SET_TLB_ENTRY(1, CONFIG_SYS_QMAN_MEM_BASE + 0x00100000, CONFIG_SYS_QMAN_MEM_PHYS + 0x00100000, + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, + 0, 12, BOOKE_PAGESZ_1M, 1), +#ifdef CONFIG_SYS_DCSRBAR_PHYS +SET_TLB_ENTRY (1 ,CONFIG_SYS_DCSRBAR ,CONFIG_SYS_DCSRBAR_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , + 0, 13, BOOKE_PAGESZ_4M, 1), +#endif +};
Lines > 80 chars. What happened to TLBs 7 and 8? It looks like you configure LAWs for the SRIO interfaces, but not TLBs?
boards.cfg MPC8540ADS powerpc mpc85xx mpc8540ads freescale · line 346
Quoted 13 lines
board/freescale/corenet_ds/tlb.c new file +1
-0+int num_tlb_entries =ARRAY_SIZE (tlb_table);boards.cfg +1
-0@@ -340,6 +340,7 @@ MPC8540ADS powerpc mpc85xx mpc8540ads freescale MPC8544DS powerpc mpc85xx mpc8544ds freescale MPC8560ADS powerpc mpc85xx mpc8560ads freescale MPC8568MDS powerpc mpc85xx mpc8568mds freescale +P4080DS powerpc mpc85xx corenet_ds freescale XPEDITE5200 powerpc mpc85xx xpedite5200 xes XPEDITE5370 powerpc mpc85xx xpedite5370 xes P1022DS powerpc mpc85xx p1022ds freescale
How are these boards supposed to be sorted in general? It seems odd not to have the P1022DS and P4080DS next to each other.
boards.cfg
Quoted 5 lines
boards.cfg +5
-0+ +/* + * P4080 DS board configuration file + * + */
Extra line above.
Quoted 1 line
include/configs/corenet_ds.h +0
-0
<snip>
Quoted 4 lines
+/*
+ * P4080 DS board configuration file
+ *
+ */
corenet_ds.h above? And extra line. What's the connection between the corenet_ds and P4080DS and their header files? I had assumed the corenet_ds.h file would contain somewhat generic corenet defines that could be shared between other corenet-based boards, but it seems to contain many board-specific defines.
Best,
Peter
PATCH 4/4 powerpc/p4080: Add support for the P4080DS board
Quoted 7 lines · Peter Tyser
Hi Kumar,
That's great to see official 4080 board support! I had a few comments below. I haven't dug into the 4080 much, so take them with a grain of salt.<snip>
Quoted 7 lines
board/freescale/corenet_ds/corenet_ds.c line 67
Quoted 3 lines
board/freescale/corenet_ds/corenet_ds.c new file +3
-0+#ifdef CONFIG_PHYS_64BIT +puts ("36-bit Addressing\n" ); +#endif Any chance
CONFIG_ENABLE_36BIT_PHYScould be defined withoutCONFIG_PHYS_64BIT, or vice-versa? Or any reason to not useCONFIG_ENABLE_36BIT_PHYSabove?
CONFIG_ENABLE_36BIT_PHYS is just to enable the capability on e500v2 cores. It probably should be renamed at this point.
Quoted 8 lines
Quoted 8 lines
board/freescale/corenet_ds/corenet_ds.c new file +8
-0+/* Display the actual SERDES reference clocks as configured by the +* dip switches on the board. Note that the SWx registers could +* technically be set to force the reference clocks to match the +* values that the SERDES expects (or vice versa). For now, however, +* we just display both values and hope the user notices when they +* don't match. +*/ +puts ("SERDES Reference Clocks: " );
Quoted 8 lines
board/freescale/corenet_ds/corenet_ds.c line 80
Quoted 4 lines
board/freescale/corenet_ds/corenet_ds.c new file +4
-0+ 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" );Could you use
serdes_clock_to_string()above? It'd make the values above a little less magical and be portable to other boards that don't use the PIXIS FPGA.
Dont see the value to convert doubly that way.
Quoted 14 lines
Quoted 14 lines
board/freescale/corenet_ds/corenet_ds.c new file +14
-0+ +#ifdef CONFIG_ECC_INIT_VIA_DDRCONTROLLER +/* +* Poll until memory is initialized. 512 Meg at 400MHz might hit this +* 200 times or so. +*/ +while ((ddr->sdram_cfg_2 &16 ) !=0 ) { +debug ("sdram_cfg2 = 0x%08x\n" , ddr->sdram_cfg_2); +udelay (1000 ); + } + asm("sync; isync" ); +udelay (500 ); + +while ((ddr2->sdram_cfg_2 &16 ) !=0 ) {
Quoted 8 lines
board/freescale/corenet_ds/corenet_ds.c line 287
Quoted 6 lines
board/freescale/corenet_ds/corenet_ds.c new file +6
-0+debug ("sdram_cfg2 = 0x%08x\n" , ddr2->sdram_cfg_2); + udelay(1000); + } + asm("sync; isync" ); +udelay (500 ); +#endif Use in_be32()'s above? And change 16 to
0x10, or add aD_INITdefine?
Going to drop the non-SPD code for now.
Quoted 12 lines
Quoted 12 lines
board/freescale/corenet_ds/corenet_ds.c new file +12
-0+phys_size_t initdram (int board_type) +{ +phys_size_t dram_size; + +puts ("Initializing....\n" ); + +#ifdef CONFIG_DDR_SPD + dram_size =fsl_ddr_sdram (); +#else + dram_size =fixed_sdram (); +#endif +setup_ddr_tlbs (dram_size /0x100000 );
Quoted 8 lines
board/freescale/corenet_ds/corenet_ds.c line 314
Quoted 4 lines
board/freescale/corenet_ds/corenet_ds.c new file +4
-0+ +puts (" DDR: " ); +return dram_size; +}Should the
puts("DDR:")be removed? With it I'd think the output would
be "DRAM: DDR: (DDR3, 64-bit...)". Ie the DDR is a bit redundant
and the spaces a bit excessive.
This is consistent w/every other board port we have right now.
Quoted 11 lines
board/freescale/corenet_ds/corenet_ds.c line 321
Quoted 6 lines
board/freescale/corenet_ds/corenet_ds.c new file +6
-0+#ifdef CONFIG_MP +void board_lmb_reserve (struct lmb *lmb) +{ +cpu_mp_lmb_reserve (lmb); +} +#endif It'd be nice to move the
board_lmb_reserve()somewhere common at some point since every board that hasCONFIG_MPdefined currently uses the same chunk of code. Or maybe removeboard_lmb_reserve()and have its callees callcpu_mp_lmb_reserve().
Going to leave this alone for now. Its an orthogonal cleanup to this board port.
Quoted 73 lines
Quoted 73 lines
board/freescale/corenet_ds/tlb.c new file +72
-0+#include <common.h> +#include <asm/mmu.h> + +struct fsl_e_tlb_entry tlb_table[] = { +/* TLB 0 - for temp stack in cache */ +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR ,CONFIG_SYS_INIT_RAM_ADDR_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +4 *1024 ,CONFIG_SYS_INIT_RAM_ADDR_PHYS +4 *1024 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +8 *1024 ,CONFIG_SYS_INIT_RAM_ADDR_PHYS +8 *1024 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +12 *1024 ,CONFIG_SYS_INIT_RAM_ADDR_PHYS +12 *1024 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), + +SET_TLB_ENTRY (0 ,PIXIS_BASE ,PIXIS_BASE_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,0 ,BOOKE_PAGESZ_4K ,0 ), + +/* TLB 1 */ +/* *I*** - Covers boot page */ +SET_TLB_ENTRY (1 ,0xfffff000 ,0xfffff000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,0 ,BOOKE_PAGESZ_4K ,1 ), + +/* *I*G* - CCSRBAR */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_CCSRBAR ,CONFIG_SYS_CCSRBAR_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,1 ,BOOKE_PAGESZ_16M ,1 ), + +/* *I*G* - Flash, localbus */ +/* This will be changed to *I*G* after relocation to RAM. */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_FLASH_BASE ,CONFIG_SYS_FLASH_BASE_PHYS , +MAS3_SX |MAS3_SR ,MAS2_W |MAS2_G , +0 ,2 ,BOOKE_PAGESZ_256M ,1 ), + +/* *I*G* - PCI */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_MEM_VIRT ,CONFIG_SYS_PCIE1_MEM_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,3 ,BOOKE_PAGESZ_1G ,1 ), + +/* *I*G* - PCI */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_MEM_VIRT +0x40000000 ,CONFIG_SYS_PCIE1_MEM_PHYS +0x40000000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,4 ,BOOKE_PAGESZ_256M ,1 ), + +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_MEM_VIRT +0x50000000 ,CONFIG_SYS_PCIE1_MEM_PHYS +0x50000000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,5 ,BOOKE_PAGESZ_256M ,1 ), + +/* *I*G* - PCI I/O */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_PCIE1_IO_VIRT ,CONFIG_SYS_PCIE1_IO_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,6 ,BOOKE_PAGESZ_256K ,1 ), + +/* Bman/Qman */ +SET_TLB_ENTRY (1 ,CONFIG_SYS_BMAN_MEM_BASE ,CONFIG_SYS_BMAN_MEM_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,9 ,BOOKE_PAGESZ_1M ,1 ), +SET_TLB_ENTRY (1 ,CONFIG_SYS_BMAN_MEM_BASE +0x00100000 ,CONFIG_SYS_BMAN_MEM_PHYS +0x00100000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,10 ,BOOKE_PAGESZ_1M ,1 ), +SET_TLB_ENTRY (1 ,CONFIG_SYS_QMAN_MEM_BASE ,CONFIG_SYS_QMAN_MEM_PHYS , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,11 ,BOOKE_PAGESZ_1M ,1 ), +SET_TLB_ENTRY (1 ,CONFIG_SYS_QMAN_MEM_BASE +0x00100000 ,CONFIG_SYS_QMAN_MEM_PHYS +0x00100000 , +MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , +0 ,12 ,BOOKE_PAGESZ_1M ,1 ), +#ifdef CONFIG_SYS_DCSRBAR_PHYS
Quoted 8 lines
board/freescale/corenet_ds/tlb.c line 102
Quoted 5 lines
board/freescale/corenet_ds/tlb.c new file +5
-0+ SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS, + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, + 0, 13, BOOKE_PAGESZ_4M, 1), +#endif +};Lines > 80 chars. What happened to TLBs 7 and 8? It looks like you configure LAWs for the SRIO interfaces, but not TLBs?
Correct, we dont ever access SRIO space in u-boot and dont have the VA address space left to map it anywhere.
Quoted 17 lines
Quoted 7 lines
board/freescale/corenet_ds/tlb.c new file +1
-0+int num_tlb_entries =ARRAY_SIZE (tlb_table);boards.cfg +0
-0@@ -340,6 +340,7 @@ MPC8540ADS powerpc mpc85xx mpc8540ads freescaleQuoted 7 lines
MPC8544DS powerpc mpc85xx mpc8544ds freescale
MPC8560ADS powerpc mpc85xx mpc8560ads freescale
MPC8568MDS powerpc mpc85xx mpc8568mds freescale
+P4080DS powerpc mpc85xxcorenet_dsfreescale
XPEDITE5200 powerpc mpc85xx xpedite5200 xes
XPEDITE5370 powerpc mpc85xx xpedite5370 xes
P1022DS powerpc mpc85xx p1022ds freescaleHow are these boards supposed to be sorted in general? It seems odd not to have the P1022DS and P4080DS next to each other.
Will fix that, should be sorted by name. I think P1022DS got out of order.
Quoted 18 lines
boards.cfg
Quoted 6 lines
boards.cfg +5
-0+ +/* + * P4080 DS board configuration file + * + */Extra line above.
Quoted 1 line
include/configs/corenet_ds.h +0
-0<snip>
Quoted 4 lines
+/*
+ * P4080 DS board configuration file
+ *
+ */
Quoted 5 lines
corenet_ds.habove? And extra line. What's the connection between thecorenet_dsand P4080DS and their header files? I had assumed thecorenet_ds.hfile would contain somewhat generic corenet defines that could be shared between other corenet-based boards, but it seems to contain many board-specific defines.
corenet_ds is for corenet based platform DS boards. This will include P3041 and P5020 DS boards in the future. Its not about corenet platforms which is a different direction.
- k
PATCH v2 1/1 powerpc/p4080: Add support for the P4080DS board
In reply to Peter TyserAdd support for the P4080DS board, with the following features:
* 36-bit only
* Boots from NOR flash
* FMAN drivers NOT supported
* SPD DDR initialization
---
* Dropped non-SPD ddr setup
* cleaned up some whitespace issues
MAKEALL | 1 + board/freescale/common/Makefile | 1 + board/freescale/corenet_ds/Makefile | 55 +++ board/freescale/corenet_ds/config.mk | 30 ++ board/freescale/corenet_ds/corenet_ds.c | 259 ++++++++++++ board/freescale/corenet_ds/ddr.c | 176 ++++++++ board/freescale/corenet_ds/law.c | 40 ++ board/freescale/corenet_ds/pci.c | 127 ++++++ board/freescale/corenet_ds/tlb.c | 112 +++++ boards.cfg | 1 + include/configs/P4080DS.h | 35 ++ include/configs/corenet_ds.h | 673 +++++++++++++++++++++++++++++++ 12 files changed, 1510 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/Makefile create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/corenet_ds.c create mode 100644 board/freescale/corenet_ds/ddr.c create mode 100644 board/freescale/corenet_ds/law.c create mode 100644 board/freescale/corenet_ds/pci.c create mode 100644 board/freescale/corenet_ds/tlb.c create mode 100644 include/configs/P4080DS.h create mode 100644 include/configs/corenet_ds.h
MAKEALL +1 -0
@@ -428,6 +428,7 @@ LIST_85xx=" \ P2020RDB_NAND \ P2020RDB_SDCARD \ P2020RDB_SPIFLASH \ + P4080DS \ PM854 \ PM856 \ sbc8540 \
board/freescale/common/Makefile +1 -0
@@ -46,6 +46,7 @@ COBJS-$(CONFIG_MPC8536DS) += ics307_clk.o COBJS-$(CONFIG_MPC8572DS) += ics307_clk.o COBJS-$(CONFIG_P1022DS) += ics307_clk.o COBJS-$(CONFIG_P2020DS) += ics307_clk.o +COBJS-$(CONFIG_P4080DS) += ics307_clk.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y))
board/freescale/corenet_ds/Makefile new file +55 -0
55 lines not on this page · raw message
board/freescale/corenet_ds/config.mk new file +30 -0
@@ -0,0 +1,30 @@ +# +# Copyright 2007-2009 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 +# + +# +# P4080DS board +# +ifndef TEXT_BASE +TEXT_BASE = 0xeff80000 +endif + +RESET_VECTOR_ADDRESS = 0xeffffffc
board/freescale/corenet_ds/corenet_ds.c new file +259 -0
259 lines not on this page · raw message
board/freescale/corenet_ds/ddr.c new file +176 -0
176 lines not on this page · raw message
board/freescale/corenet_ds/law.c new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Copyright 2008-2010 Freescale Semiconductor, Inc. +* +* (C) Copyright 2000 +* Wolfgang Denk, DENX Software Engineering, wd at denx.de. +* +* 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 +*/ + +#include <common.h> +#include <asm/fsl_law.h> +#include <asm/mmu.h> + +struct law_entry law_table[] = { +SET_LAW (CONFIG_SYS_FLASH_BASE_PHYS ,LAW_SIZE_256M ,LAW_TRGT_IF_LBC ), +SET_LAW (CONFIG_SYS_BMAN_MEM_PHYS ,LAW_SIZE_2M ,LAW_TRGT_IF_BMAN ), +SET_LAW (CONFIG_SYS_QMAN_MEM_PHYS ,LAW_SIZE_2M ,LAW_TRGT_IF_QMAN ), +SET_LAW (PIXIS_BASE_PHYS ,LAW_SIZE_4K ,LAW_TRGT_IF_LBC ), +#ifdef CONFIG_SYS_DCSRBAR_PHYS +SET_LAW (CONFIG_SYS_DCSRBAR_PHYS ,LAW_SIZE_4M ,LAW_TRGT_IF_DCSR ), +#endif +}; + +int num_law_entries =ARRAY_SIZE (law_table);
board/freescale/corenet_ds/pci.c new file +127 -0
127 lines not on this page · raw message
board/freescale/corenet_ds/tlb.c new file +112 -0
112 lines not on this page · raw message
boards.cfg +1 -0
@@ -343,6 +343,7 @@ MPC8540ADS powerpc mpc85xx mpc8540ads freescale MPC8544DS powerpc mpc85xx mpc8544ds freescale MPC8560ADS powerpc mpc85xx mpc8560ads freescale MPC8568MDS powerpc mpc85xx mpc8568mds freescale +P4080DS powerpc mpc85xx corenet_ds freescale XPEDITE5200 powerpc mpc85xx xpedite5200 xes XPEDITE5370 powerpc mpc85xx xpedite5370 xes P1022DS powerpc mpc85xx p1022ds freescale
include/configs/P4080DS.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* Copyright 2009-2010 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 +*/ + +/* +* P4080 DS board configuration file +*/ +#define CONFIG_P4080DS +#define CONFIG_PHYS_64BIT +#define CONFIG_PPC_P4080 +#define CONFIG_SYS_NUM_FMAN 2 +#define CONFIG_NUM_DDR_CONTROLLERS 2 + +#define CONFIG_SYS_P4080_ERRATUM_CPU22 +#define CONFIG_SYS_P4080_ERRATUM_SERDES8 + +#include "corenet_ds.h"
include/configs/corenet_ds.h new file +673 -0
673 lines not on this page · raw message
Signature · 1 line
1.6.0.6
Kumar Gala
AppliedPATCH v2 1/1 powerpc/p4080: Add support for the P4080DS board
Quoted 38 lines · Kumar Gala
Add support for the P4080DS board, with the following features:
* 36-bit only
* Boots from NOR flash
* FMAN drivers NOT supported
* SPD DDR initializationSigned-off-by Ed Swarthout <[email protected]>Signed-off-by Emil Medve <[email protected]>Signed-off-by Becky Bruce <[email protected]>Signed-off-by Ashish Kalra <[email protected]>Signed-off-by Stuart Yoder <[email protected]>Signed-off-by Dave Liu <[email protected]>Signed-off-by Lan Chunhe-B25806 <[email protected]>Signed-off-by Scott Wood <[email protected]>Signed-off-by Kim Phillips <[email protected]>Signed-off-by Roy Zang <[email protected]>Signed-off-by Timur Tabi <[email protected]>Signed-off-by Andy Fleming <[email protected]>Signed-off-by York Sun <[email protected]>Signed-off-by Kumar Gala <[email protected]>---
* Dropped non-SPD ddr setup
* cleaned up some whitespace issuesMAKEALL | 1 + board/freescale/common/Makefile | 1 + board/freescale/corenet_ds/Makefile | 55 +++ board/freescale/corenet_ds/config.mk | 30 ++ board/freescale/corenet_ds/corenet_ds.c | 259 ++++++++++++ board/freescale/corenet_ds/ddr.c | 176 ++++++++ board/freescale/corenet_ds/law.c | 40 ++ board/freescale/corenet_ds/pci.c | 127 ++++++ board/freescale/corenet_ds/tlb.c | 112 +++++ boards.cfg | 1 + include/configs/P4080DS.h | 35 ++ include/configs/corenet_ds.h | 673 +++++++++++++++++++++++++++++++ 12 files changed, 1510 insertions(+), 0 deletions(-)
Quoted 9 lines
create mode 100644 board/freescale/corenet_ds/Makefile create mode 100644
board/freescale/corenet_ds/config.mkcreate mode 100644board/freescale/corenet_ds/corenet_ds.ccreate mode 100644board/freescale/corenet_ds/ddr.ccreate mode 100644board/freescale/corenet_ds/law.ccreate mode 100644board/freescale/corenet_ds/pci.ccreate mode 100644board/freescale/corenet_ds/tlb.ccreate mode 100644include/configs/P4080DS.hcreate mode 100644include/configs/corenet_ds.h
applied to 85xx
- k
PATCH v2 1/1 powerpc/p4080: Add support for the P4080DS board
In reply to Kumar GalaDear Kumar Gala,
Quoted 39 lines · In message <[email protected]> you…
Add support for the P4080DS board, with the following features:
* 36-bit only
* Boots from NOR flash
* FMAN drivers NOT supported
* SPD DDR initializationSigned-off-by Ed Swarthout <[email protected]>Signed-off-by Emil Medve <[email protected]>Signed-off-by Becky Bruce <[email protected]>Signed-off-by Ashish Kalra <[email protected]>Signed-off-by Stuart Yoder <[email protected]>Signed-off-by Dave Liu <[email protected]>Signed-off-by Lan Chunhe-B25806 <[email protected]>Signed-off-by Scott Wood <[email protected]>Signed-off-by Kim Phillips <[email protected]>Signed-off-by Roy Zang <[email protected]>Signed-off-by Timur Tabi <[email protected]>Signed-off-by Andy Fleming <[email protected]>Signed-off-by York Sun <[email protected]>Signed-off-by Kumar Gala <[email protected]>---
* Dropped non-SPD ddr setup
* cleaned up some whitespace issuesMAKEALL | 1 + board/freescale/common/Makefile | 1 + board/freescale/corenet_ds/Makefile | 55 +++ board/freescale/corenet_ds/config.mk | 30 ++ board/freescale/corenet_ds/corenet_ds.c | 259 ++++++++++++ board/freescale/corenet_ds/ddr.c | 176 ++++++++ board/freescale/corenet_ds/law.c | 40 ++ board/freescale/corenet_ds/pci.c | 127 ++++++ board/freescale/corenet_ds/tlb.c | 112 +++++ boards.cfg | 1 + include/configs/P4080DS.h | 35 ++ include/configs/corenet_ds.h | 673 +++++++++++++++++++++++++++++++ 12 files changed, 1510 insertions(+), 0 deletions(-) create mode 100644 board/freescale/corenet_ds/Makefile
Quoted 8 lines
create mode 100644 board/freescale/corenet_ds/config.mk create mode 100644 board/freescale/corenet_ds/corenet_ds.c create mode 100644 board/freescale/corenet_ds/ddr.c create mode 100644 board/freescale/corenet_ds/law.c create mode 100644 board/freescale/corenet_ds/pci.c create mode 100644 board/freescale/corenet_ds/tlb.c create mode 100644 include/configs/P4080DS.h create mode 100644 include/configs/corenet_ds.h
Entry in MAINTAINERS missing. Please provide incremental patch.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Bureaucracy is the enemy of innovation."
- Mark Shepherd, former President and CEO of Texas Instruments