Add support for the MPC8349E-mITX
PATCH 2/2 Add support for the MPC8349E-mITX
From: Timur Tabi <[email protected]>
PREREQUISITE PATCHES:
* This patch can only be applied after the following patches have been applied:
1) DNX#2006090742000024 "Add support for multiple I2C buses"
2) DNX#2006090742000033 "Multi-bus I2C implementation of MPC834x"
3) DNX#2006091242000041 "Additional MPC8349 support for multibus i2c"
4) DNX#2006091242000078 "Add support for variable flash memory sizes on 83xx systems"
5) DNX#2006091242000069 "Add support for Errata DDR6 on MPC 834x systems"
CHANGELOG:
* Add support for the Freescale MPC8349E-mITX reference design platform. The second TSEC (Vitesse 7385 switch) is not supported at this time.
--- CREDITS | 5 MAINTAINERS | 4 MAKEALL | 2 Makefile | 3 README | 4 cpu/mpc83xx/cpu.c | 81 ++++- cpu/mpc83xx/cpu_init.c | 31 ++ cpu/mpc83xx/i2c.c | 2 cpu/mpc83xx/spd_sdram.c | 21 + drivers/tsec.c | 4 include/asm-ppc/immap_83xx.h | 16 + include/configs/MPC8349ITX.h | 753 ++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 918 insertions(+), 8 deletions(-)
CREDITS +5 -0
@@ -461,3 +461,8 @@ N: James MacAulay E: james.macaulay at amirix.com D: Suppport for Amirix AP1000 W: www.amirix.com + +N: Timur Tabi +E: timur at freescale.com +D: Support for MPC8349E-mITX +W: www.freescale.com
MAINTAINERS +4 -0
@@ -337,6 +337,10 @@ John Zhan <[email protected]> svm_sc8xx MPC8xx +Timur Tabi <[email protected]> + + MPC8349E-mITX MPC8349 + ------------------------------------------------------------------------- Unknown / orphaned boards:
MAKEALL +1 -1
@@ -130,7 +130,7 @@ ## MPC83xx Systems (includes 8349, etc.) ######################################################################### LIST_83xx=" \ - TQM834x MPC8349EMDS \ + TQM834x MPC8349EMDS MPC8349ITX \ "
Makefile +3 -0
@@ -1557,6 +1557,9 @@ TQM834x_config: unconfig MPC8349EMDS_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc83xx mpc8349emds +MPC8349ITX_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc83xx mpc8349itx + ######################################################################### ## MPC85xx Systems #########################################################################
README +4 -0
@@ -2226,6 +2226,10 @@ Low Level (hardware related) configurati If SPD EEPROM is on an I2C bus other than the first one, specify here. Note that the value must resolve to something your driver can deal with. +- CFG_83XX_DDR_USES_CS0 + Only for 83xx systems. If specified, then DDR should be configured + using CS0 and CS1 instead of CS2 and CS3. + - CONFIG_ETHER_ON_FEC[12] Define to enable FEC[12] on a 8xx series processor.
cpu/mpc83xx/cpu.c +78 -3
96 lines not on this page · raw message
cpu/mpc83xx/cpu_init.c +31 -0
@@ -46,6 +46,37 @@ void cpu_init_f (volatile immap_t * im)/* Clear initial global data */ memset ((void *) gd,0 ,sizeof (gd_t)); +/* system performance tweaking */ + +#ifdef CFG_ACR_PIPE_DEP +/* Arbiter pipeline depth */ + im->arbiter.acr = (im->arbiter.acr & ~ACR_PIPE_DEP ) | (3 <<ACR_PIPE_DEP_SHIFT ); +#endif + +#ifdef CFG_SPCR_TSEC1EP +/* TSEC1 Emergency priority */ + im->sysconf.spcr = (im->sysconf.spcr & ~SPCR_TSEC1EP ) | (3 <<SPCR_TSEC1EP_SHIFT ); +#endif + +#ifdef CFG_SPCR_TSEC2EP +/* TSEC2 Emergency priority */ + im->sysconf.spcr = (im->sysconf.spcr & ~SPCR_TSEC2EP ) | (3 <<SPCR_TSEC2EP_SHIFT ); +#endif + +#ifdef CFG_SCCR_TSEC1CM +/* TSEC1 clock mode */ + im->clk.sccr = (im->clk.sccr & ~SCCR_TSEC1CM ) | (1 <<SCCR_TSEC1CM_SHIFT ); +#endif +#ifdef CFG_SCCR_TSEC2CM +/* TSEC2 & I2C1 clock mode */ + im->clk.sccr = (im->clk.sccr & ~SCCR_TSEC2CM ) | (1 <<SCCR_TSEC2CM_SHIFT ); +#endif + +#ifdef CFG_ACR_RPTCNT +/* Arbiter repeat count */ + im->arbiter.acr = ((im->arbiter.acr & ~(ACR_RPTCNT )) | (3 <<ACR_RPTCNT_SHIFT )); +#endif +/* RSR - Reset Status Register - clear all status (4.6.1.3) */ gd->reset_status = im->reset.rsr; im->reset.rsr = ~(RSR_RES );
cpu/mpc83xx/i2c.c +1 -1
@@ -89,7 +89,7 @@ static int set_speed(int speed) }else { -printf ("Max I2C bus speed %d not supported\n" , gd->i2c_clk); +debug ("Max I2C bus speed %d not supported\n" , gd->i2c_clk);return -1 ; }
cpu/mpc83xx/spd_sdram.c +21 -0
@@ -133,6 +133,26 @@ #endifreturn 0 ; } +#ifdef CFG_83XX_DDR_USES_CS0 + ddr->csbnds[0 ].csbnds = (banksize (spd.row_dens) >>24 ) -1 ; + ddr->cs_config[0 ] = (1 <<31 + | (spd.nrow_addr -12 ) <<8 + | (spd.ncol_addr -8 ) ); +debug ("\n" ); +debug ("cs0_bnds = 0x%08x\n" ,ddr->csbnds[0 ].csbnds); +debug ("cs0_config = 0x%08x\n" ,ddr->cs_config[0 ]); + +if (spd.nrows ==2 ) { + ddr->csbnds[1 ].csbnds = ( (banksize (spd.row_dens) >>8 ) + | ((banksize (spd.row_dens) >>23 ) -1 ) ); + ddr->cs_config[1 ] = (1 <<31 + | (spd.nrow_addr-12 ) <<8 + | (spd.ncol_addr-8 ) ); +debug ("cs1_bnds = 0x%08x\n" ,ddr->csbnds[1 ].csbnds); +debug ("cs1_config = 0x%08x\n" ,ddr->cs_config[1 ]); + } + +#else ddr->csbnds[2 ].csbnds = (banksize (spd.row_dens) >>24 ) -1 ; ddr->cs_config[2 ] = (1 <<31 | (spd.nrow_addr - 12) << 8
@@ -150,6 +170,7 @@ #endifdebug ("cs3_bnds = 0x%08x\n" ,ddr->csbnds[3 ].csbnds); debug("cs3_config = 0x%08x\n",ddr->cs_config[3]); } +#endif if (spd.mem_type !=0x07 ) {puts ("No DDR module found!\n" );
drivers/tsec.c +1 -3
@@ -993,10 +993,8 @@ struct phy_info phy_info_dp83865 = { };struct phy_info *phy_info[] = { -#if 0 - &phy_info_cis8201, -#endif &phy_info_cis8204, + &phy_info_cis8201, &phy_info_M88E1011S, &phy_info_M88E1111S, &phy_info_dm9161,
include/asm-ppc/immap_83xx.h +16 -0
@@ -57,15 +57,25 @@ #define SPRIDR_REVID 0x0000FFFFu8 res5[0x04 ];u32 spcr;/* System Priority Configuration Register */ #define SPCR_PCIHPE 0x10000000/* PCI Highest Priority Enable. */ +#define SPCR_PCIHPE_SHIFT (31-3)#define SPCR_PCIPR 0x03000000/* PCI bridge system bus request priority. */ +#define SPCR_PCIPR_SHIFT (31-7)#define SPCR_TBEN 0x00400000/* E300 PowerPC core time base unit enable. */ +#define SPCR_TBEN_SHIFT (31-9)#define SPCR_COREPR 0x00300000/* E300 PowerPC Core system bus request priority. */ +#define SPCR_COREPR_SHIFT (31-11)#define SPCR_TSEC1DP 0x00003000/* TSEC1 data priority. */ +#define SPCR_TSEC1DP_SHIFT (31-19)#define SPCR_TSEC1BDP 0x00000C00/* TSEC1 buffer descriptor priority. */ +#define SPCR_TSEC1BDP_SHIFT (31-21)#define SPCR_TSEC1EP 0x00000300/* TSEC1 emergency priority. */ +#define SPCR_TSEC1EP_SHIFT (31-23)#define SPCR_TSEC2DP 0x00000030/* TSEC2 data priority. */ +#define SPCR_TSEC2DP_SHIFT (31-27)#define SPCR_TSEC2BDP 0x0000000C/* TSEC2 buffer descriptor priority. */ +#define SPCR_TSEC2BDP_SHIFT (31-29)#define SPCR_TSEC2EP 0x00000003/* TSEC2 emergency priority. */ +#define SPCR_TSEC2EP_SHIFT (31-31)#define SPCR_RES ~(SPCR_PCIHPE | SPCR_PCIPR | SPCR_TBEN | SPCR_COREPR \ | SPCR_TSEC1DP | SPCR_TSEC1BDP | SPCR_TSEC1EP \ | SPCR_TSEC2DP | SPCR_TSEC2BDP | SPCR_TSEC2EP)
@@ -370,11 +380,17 @@ #define SERCR_RES ~(SERCR_MCPR) typedef struct arbiter8349 { u32 acr; /* Arbiter Configuration Register */ #define ACR_COREDIS 0x10000000 /* Core disable. */ +#define ACR_COREDIS_SHIFT (31-7) #define ACR_PIPE_DEP 0x00070000 /* Pipeline depth (number of outstanding transactions). */ +#define ACR_PIPE_DEP_SHIFT (31-15) #define ACR_PCI_RPTCNT 0x00007000 /* PCI repeat count. */ +#define ACR_PCI_RPTCNT_SHIFT (31-19) #define ACR_RPTCNT 0x00000700 /* Repeat count. */ +#define ACR_RPTCNT_SHIFT (31-23) #define ACR_APARK 0x00000030 /* Address parking. */ +#define ACR_APARK_SHIFT (31-27) #define ACR_PARKM 0x0000000F /* Parking master. */ +#define ACR_PARKM_SHIFT (31-31) #define ACR_RES ~(ACR_COREDIS|ACR_PIPE_DEP|ACR_PCI_RPTCNT|ACR_RPTCNT|ACR_APARK|ACR_PARKM) u32 atr; /* Arbiter Timers Register */ #define ATR_DTO 0x00FF0000 /* Data time out. */
include/configs/MPC8349ITX.h new file +753 -0
753 lines not on this page · raw message
Signature · 1 line
1.4.2