powerpc/85xx: add support for the Freescale P5040DS Superhydra reference board
PATCH v4 1/1 powerpc/85xx: add support for the Freescale P5040DS Superhydra reference board
The P5040DS reference board (a.k.a "Superhydra") is an enhanced version of P3041DS/P5020DS ("Hydra") reference board.
Signed-off-by Timur Tabi <[email protected]>
Signed-off-by Shaohui Xie <[email protected]>
--- 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 ++ 10 files changed, 916 insertions(+), 7 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
board/freescale/common/Makefile +2 -0
@@ -53,6 +53,7 @@ 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 COBJS-$(CONFIG_VSC_CROSSBAR) += vsc3316_3308.o # deal with common files for P-series corenet based devices
@@ -60,6 +61,7 @@ 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
@@ -834,6 +834,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
@@ -44,6 +44,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 COBJS-$(CONFIG_PPC_T4240) += t4240.o COBJS-$(CONFIG_PPC_B4860) += b4860.o endif
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 +*/ + +/* +* P5040 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