sbc8548 update; remaining bits for 85xx tree.
cover sbc8548 update; remaining bits for 85xx tree.
This is the remaining bits that weren't merged to 85xx, with the the requested fixes of course. Those being:
sbc8548: correct local bus SDRAM size from 64M to 128M
-now uses I/O accesors on BR4/OR4
sbc8548: update PCI/PCI-e support code
-redone to make use of the code de-duplification effort.
sbc8548: allow enabling PCI via a make config option
-uses the "-t" to de-clutter the toplevel Makefile
New patches are as follows:
fsl_pci: create a SET_STD_PCI_INFO() helper wrapper
-I believe this was meant to be created, but wasn't.
sbc8548: use I/O accessors
-uses the I/O accessors through the whole board file.
sbc8548: remove eTSEC3/4 voltage hack
-noticed this while doing above; sbc doesn't need it.
Board still seems happy; I only noticed one cosmetic thing, that the new fsl_pci_init_port() prints "PCIE" always; even when the port is PCI and not PCI-e (see below).
Thanks,
Paul.
U-Boot 2009.08-06732-g70c5c3d (Sep 20 2009 - 20:11:42)
CPU: 8548E, Version: 2.0, (0x80390020)
Core: E500, Version: 2.0, (0x80210020)
Clock Configuration:
CPU0:990 MHz,
CCB:396 MHz,
DDR:198 MHz (396 MT/s data rate), LBC:99 MHz
L1: D-cache 32 kB enabled
I-cache 32 kB enabled
Board: Wind River SBC8548 Rev. 0x2
I2C: ready
DRAM: Initializing
SDRAM: 128 MB
DDR: 256 MB
FLASH: 72 MB
L2: 512 KB enabled PCI host: 64 bit, 66 MHz, sync, arbiter
Scanning PCI bus 00
00 01 8086 1026 0200 00
PCIE1 on bus 00 - 00
PCIE at base address e000a000
Scanning PCI bus 02
02 00 1148 9e00 0200 00
PCIE1 on bus 01 - 02
In: serial Out: serial Err: serial Net: eTSEC0, eTSEC1
=>
PATCH 1/6 fsl_pci: create a SET_STD_PCI_INFO() helper wrapper
Recycle the recently added PCI-e wrapper used to reduce board duplication of code by creating a similar version for plain PCI.
--- include/asm-ppc/fsl_pci.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
include/asm-ppc/fsl_pci.h +12 -0
@@ -173,6 +173,18 @@ struct fsl_pci_info {int fsl_pci_init_port (struct fsl_pci_info *pci_info,struct pci_controller *hose,int busno); +#define SET_STD_PCI_INFO (x, num) \ +{ \ + x.regs = CONFIG_SYS_PCI##num##_ADDR; \ + x.mem_bus = CONFIG_SYS_PCI##num##_MEM_BUS; \ + x.mem_phys = CONFIG_SYS_PCI##num##_MEM_PHYS; \ + x.mem_size = CONFIG_SYS_PCI##num##_MEM_SIZE; \ + x.io_bus = CONFIG_SYS_PCI##num##_IO_BUS; \ + x.io_phys = CONFIG_SYS_PCI##num##_IO_PHYS; \ + x.io_size = CONFIG_SYS_PCI##num##_IO_SIZE; \ + x.pci_num = num; \ +} +#define SET_STD_PCIE_INFO (x, num) \ { \ x.regs = CONFIG_SYS_PCIE##num##_ADDR; \
Signature · 1 line
1.6.4.1
PATCH 2/6 sbc8548: remove eTSEC3/4 voltage hack
With only eTSEC1 and 2 being brought out to RJ-45 connectors, we aren't interested in the eTSEC3/4 voltage hack on this board
--- board/sbc8548/sbc8548.c | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
board/sbc8548/sbc8548.c +0 -6
@@ -52,7 +52,6 @@ int board_early_init_f (void)int checkboard (void ) { -volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);volatile ccsr_local_ecm_t *ecm = (void *)(CONFIG_SYS_MPC85xx_ECM_ADDR);volatile u_char *rev= (void *)CONFIG_SYS_BD_REV ;
@@ -64,11 +63,6 @@ int checkboard (void)*/ local_bus_init (); -/* -* Hack TSEC 3 and 4 IO voltages. -*/ - gur->tsec34ioovcr =0xe7e0 ;/* 1110 0111 1110 0xxx */ - ecm->eedr =0xffffffff ;/* clear ecm errors */ ecm->eeer =0xffffffff ;/* enable ecm errors */ return 0 ;
Signature · 1 line
1.6.4.1
PATCH 3/6 sbc8548: use I/O accessors
Sweep throught the board specific file and replace the various register proddings with the equivalent I/O accessors.
--- board/sbc8548/sbc8548.c | 91 +++++++++++++++++++++++------------------------ 1 files changed, 45 insertions(+), 46 deletions(-)
board/sbc8548/sbc8548.c +45 -46
@@ -56,15 +56,15 @@ int checkboard (void)volatile u_char *rev= (void *)CONFIG_SYS_BD_REV ;printf ("Board: Wind River SBC8548 Rev. 0x%01x\n" , - (*rev) >>4 ); +in_8 (rev) >>4 );/* * Initialize local bus. */ local_bus_init (); - ecm->eedr =0xffffffff ;/* clear ecm errors */ - ecm->eeer =0xffffffff ;/* enable ecm errors */ +out_be32 (&ecm->eedr,0xffffffff );/* clear ecm errors */ +out_be32 (&ecm->eeer,0xffffffff );/* enable ecm errors */ return 0 ; }
@@ -86,7 +86,7 @@ initdram(int board_type)volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR); - gur->ddrdllcr =0x81000000 ; +out_be32 (&gur->ddrdllcr,0x81000000 ); asm("sync;isync;msync" );udelay (200 ); }
@@ -123,24 +123,24 @@ local_bus_init(void)sys_info_t sysinfo;get_sys_info (&sysinfo); - clkdiv = (lbc->lcrr &LCRR_CLKDIV ) *2 ; + clkdiv = (in_be32 (&lbc->lcrr) &LCRR_CLKDIV ) *2 ; lbc_hz = sysinfo.freqSystemBus /1000000 / clkdiv; - gur->lbiuiplldcr1 =0x00078080 ; +out_be32 (&gur->lbiuiplldcr1,0x00078080 );if (clkdiv ==16 ) { - gur->lbiuiplldcr0 =0x7c0f1bf0 ; +out_be32 (&gur->lbiuiplldcr0,0x7c0f1bf0 ); }else if (clkdiv ==8 ) { - gur->lbiuiplldcr0 =0x6c0f1bf0 ; +out_be32 (&gur->lbiuiplldcr0,0x6c0f1bf0 ); }else if (clkdiv ==4 ) { - gur->lbiuiplldcr0 =0x5c0f1bf0 ; +out_be32 (&gur->lbiuiplldcr0,0x5c0f1bf0 ); } - lbc->lcrr |=0x00030000 ; +setbits_be32 (&lbc->lcrr,0x00030000 ); asm("sync;isync;msync" ); - lbc->ltesr =0xffffffff ;/* Clear LBC error interrupts */ - lbc->lteir =0xffffffff ;/* Enable LBC error interrupts */ +out_be32 (&lbc->ltesr,0xffffffff );/* Clear LBC error IRQs */ +out_be32 (&lbc->lteir,0xffffffff );/* Enable LBC error IRQs */ }/*
@@ -163,18 +163,18 @@ sdram_init(void)/* * Setup SDRAM Base and Option Registers */ - lbc->or3 =CONFIG_SYS_OR3_PRELIM ; +out_be32 (&lbc->or3,CONFIG_SYS_OR3_PRELIM ); asm("msync" ); - lbc->br3 =CONFIG_SYS_BR3_PRELIM ; +out_be32 (&lbc->br3,CONFIG_SYS_BR3_PRELIM ); asm("msync" ); - lbc->lbcr =CONFIG_SYS_LBC_LBCR ; +out_be32 (&lbc->lbcr,CONFIG_SYS_LBC_LBCR ); asm("msync" ); - lbc->lsrt =CONFIG_SYS_LBC_LSRT ; - lbc->mrtpr =CONFIG_SYS_LBC_MRTPR ; +out_be32 (&lbc->lsrt,CONFIG_SYS_LBC_LSRT ); +out_be32 (&lbc->mrtpr,CONFIG_SYS_LBC_MRTPR ); asm("msync" );/*
@@ -186,7 +186,7 @@ sdram_init(void)/* * Issue PRECHARGE ALL command. */ - lbc->lsdmr = lsdmr_common |LSDMR_OP_PCHALL ; +out_be32 (&lbc->lsdmr, lsdmr_common |LSDMR_OP_PCHALL ); asm("sync;msync" ); *sdram_addr =0xff ;ppcDcbf ((unsigned long ) sdram_addr);
@@ -196,7 +196,7 @@ sdram_init(void)* Issue 8 AUTO REFRESH commands. */ for (idx =0 ; idx <8 ; idx++) { - lbc->lsdmr = lsdmr_common |LSDMR_OP_ARFRSH ; +out_be32 (&lbc->lsdmr, lsdmr_common |LSDMR_OP_ARFRSH ); asm("sync;msync" ); *sdram_addr =0xff ;ppcDcbf ((unsigned long ) sdram_addr);
@@ -206,7 +206,7 @@ sdram_init(void)/* * Issue 8 MODE-set command. */ - lbc->lsdmr = lsdmr_common |LSDMR_OP_MRW ; +out_be32 (&lbc->lsdmr, lsdmr_common |LSDMR_OP_MRW ); asm("sync;msync" ); *sdram_addr =0xff ;ppcDcbf ((unsigned long ) sdram_addr);
@@ -215,7 +215,7 @@ sdram_init(void)/* * Issue NORMAL OP command. */ - lbc->lsdmr = lsdmr_common |LSDMR_OP_NORMAL ; +out_be32 (&lbc->lsdmr, lsdmr_common |LSDMR_OP_NORMAL ); asm("sync;msync" ); *sdram_addr =0xff ;ppcDcbf ((unsigned long ) sdram_addr);
@@ -263,45 +263,44 @@ testdram(void) }#endif -#if !defined(CONFIG_SPD_EEPROM ) +#if !defined(CONFIG_SPD_EEPROM ) +#define CONFIG_SYS_DDR_CONTROL 0xc300c000/************************************************************************* * fixed_sdram init -- doesn't use serial presence detect. * assumes 256MB DDR2 SDRAM SODIMM, without ECC, running at DDR400 speed. ************************************************************************/ long int fixed_sdram (void ) { -#define CONFIG_SYS_DDR_CONTROL 0xc300c000 -volatile ccsr_ddr_t *ddr = (void *)(CONFIG_SYS_MPC85xx_DDR_ADDR); - ddr->cs0_bnds =0x0000007f ; - ddr->cs1_bnds =0x008000ff ; - ddr->cs2_bnds =0x00000000 ; - ddr->cs3_bnds =0x00000000 ; - ddr->cs0_config =0x80010101 ; - ddr->cs1_config =0x80010101 ; - ddr->cs2_config =0x00000000 ; - ddr->cs3_config =0x00000000 ; - ddr->timing_cfg_3 =0x00000000 ; - ddr->timing_cfg_0 =0x00220802 ; - ddr->timing_cfg_1 =0x38377322 ; - ddr->timing_cfg_2 =0x0fa044C7 ; - ddr->sdram_cfg =0x4300C000 ; - ddr->sdram_cfg_2 =0x24401000 ; - ddr->sdram_mode =0x23C00542 ; - ddr->sdram_mode_2 =0x00000000 ; - ddr->sdram_interval =0x05080100 ; - ddr->sdram_md_cntl =0x00000000 ; - ddr->sdram_data_init =0x00000000 ; - ddr->sdram_clk_cntl =0x03800000 ; +out_be32 (&ddr->cs0_bnds,0x0000007f ); +out_be32 (&ddr->cs1_bnds,0x008000ff ); +out_be32 (&ddr->cs2_bnds,0x00000000 ); +out_be32 (&ddr->cs3_bnds,0x00000000 ); +out_be32 (&ddr->cs0_config,0x80010101 ); +out_be32 (&ddr->cs1_config,0x80010101 ); +out_be32 (&ddr->cs2_config,0x00000000 ); +out_be32 (&ddr->cs3_config,0x00000000 ); +out_be32 (&ddr->timing_cfg_3,0x00000000 ); +out_be32 (&ddr->timing_cfg_0,0x00220802 ); +out_be32 (&ddr->timing_cfg_1,0x38377322 ); +out_be32 (&ddr->timing_cfg_2,0x0fa044C7 ); +out_be32 (&ddr->sdram_cfg,0x4300C000 ); +out_be32 (&ddr->sdram_cfg_2,0x24401000 ); +out_be32 (&ddr->sdram_mode,0x23C00542 ); +out_be32 (&ddr->sdram_mode_2,0x00000000 ); +out_be32 (&ddr->sdram_interval,0x05080100 ); +out_be32 (&ddr->sdram_md_cntl,0x00000000 ); +out_be32 (&ddr->sdram_data_init,0x00000000 ); +out_be32 (&ddr->sdram_clk_cntl,0x03800000 ); asm("sync;isync;msync" );udelay (500 );#if defined (CONFIG_DDR_ECC )/* Enable ECC checking */ - ddr->sdram_cfg = (CONFIG_SYS_DDR_CONTROL |0x20000000 ); +out_be32 (&ddr->sdram_cfg,CONFIG_SYS_DDR_CONTROL |0x20000000 );#else - ddr->sdram_cfg =CONFIG_SYS_DDR_CONTROL ; +out_be32 (&ddr->sdram_cfg,CONFIG_SYS_DDR_CONTROL );#endif return CONFIG_SYS_SDRAM_SIZE *1024 *1024 ;
Signature · 1 line
1.6.4.1
PATCH 4/6 sbc8548: correct local bus SDRAM size from 64M to 128M
The size of the LB SDRAM on this board is 128MB, spanning CS3 and CS4. It was previously only being configured for 64MB on CS3, since that was what the original codebase of the MPC8548CDS had. In addition to setting up BR4/OR4, this also adds the TLB entry for the second half of the SDRAM.
--- board/sbc8548/sbc8548.c | 8 +++++++- board/sbc8548/tlb.c | 22 +++++++++++++++------- include/configs/sbc8548.h | 42 ++++++++++++++++++++++++++++++++++++++---- 3 files changed, 60 insertions(+), 12 deletions(-)
board/sbc8548/sbc8548.c +7 -1
@@ -149,7 +149,7 @@ local_bus_init(void)void sdram_init (void ) { -#if defined(CONFIG_SYS_OR3_PRELIM ) && defined(CONFIG_SYS_BR3_PRELIM ) +#if defined(CONFIG_SYS_LBC_SDRAM_SIZE )uint idx;volatile ccsr_lbc_t *lbc = (void *)(CONFIG_SYS_MPC85xx_LBC_ADDR);
@@ -169,6 +169,12 @@ sdram_init(void)out_be32 (&lbc->br3,CONFIG_SYS_BR3_PRELIM ); asm("msync" ); +out_be32 (&lbc->or4,CONFIG_SYS_OR4_PRELIM ); + asm("msync" ); + +out_be32 (&lbc->br4,CONFIG_SYS_BR4_PRELIM ); + asm("msync" ); +out_be32 (&lbc->lbcr,CONFIG_SYS_LBC_LBCR ); asm("msync" );
board/sbc8548/tlb.c +15 -7
@@ -88,14 +88,22 @@ struct fsl_e_tlb_entry tlb_table[] = {/* * TLB 5: 64M Cacheable, non-guarded -* 0xf0000000 64M LBC SDRAM +* 0xf0000000 64M LBC SDRAM First half */ SET_TLB_ENTRY (1 ,CONFIG_SYS_LBC_SDRAM_BASE ,CONFIG_SYS_LBC_SDRAM_BASE ,MAS3_SX |MAS3_SW |MAS3_SR ,0 ,0 ,5 ,BOOKE_PAGESZ_64M ,1 ),/* -* TLB 6: 16M Cacheable, non-guarded +* TLB 6: 64M Cacheable, non-guarded +* 0xf4000000 64M LBC SDRAM Second half +*/ +SET_TLB_ENTRY (1 ,CONFIG_SYS_LBC_SDRAM_BASE +0x4000000 ,CONFIG_SYS_LBC_SDRAM_BASE +0x4000000 , +MAS3_SX |MAS3_SW |MAS3_SR ,0 , +0 ,6 ,BOOKE_PAGESZ_64M ,1 ), + +/* +* TLB 7: 16M Cacheable, non-guarded * 0xf8000000 1M 7-segment LED display * 0xf8100000 1M User switches * 0xf8300000 1M Board revision
@@ -103,23 +111,23 @@ struct fsl_e_tlb_entry tlb_table[] = {*/ SET_TLB_ENTRY (1 ,CONFIG_SYS_EPLD_BASE ,CONFIG_SYS_EPLD_BASE ,MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , -0 ,6 ,BOOKE_PAGESZ_16M ,1 ), +0 ,7 ,BOOKE_PAGESZ_16M ,1 ),/* -* TLB 7: 4M Non-cacheable, guarded +* TLB 8: 4M Non-cacheable, guarded * 0xfb800000 4M 1st 4MB block of 64MB user FLASH */ SET_TLB_ENTRY (1 ,CONFIG_SYS_ALT_FLASH ,CONFIG_SYS_ALT_FLASH ,MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , -0 ,7 ,BOOKE_PAGESZ_4M ,1 ), +0 ,8 ,BOOKE_PAGESZ_4M ,1 ),/* -* TLB 8: 4M Non-cacheable, guarded +* TLB 9: 4M Non-cacheable, guarded * 0xfbc00000 4M 2nd 4MB block of 64MB user FLASH */ SET_TLB_ENTRY (1 ,CONFIG_SYS_ALT_FLASH +0x400000 ,CONFIG_SYS_ALT_FLASH +0x400000 ,MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , - 0, 8, BOOKE_PAGESZ_4M, 1), + 0, 9, BOOKE_PAGESZ_4M, 1), };
include/configs/sbc8548.h +38 -4
64 lines not on this page · raw message
Signature · 1 line
1.6.4.1
PATCH 5/6 sbc8548: update PCI/PCI-e support code
The PCI/PCI-e support for the sbc8548 was based on an earlier version of what the MPC8548CDS board was using, and in its current state it won't even compile. This re-syncs it to match the latest codebase and makes use of the new shared PCI functions to reduce board duplication.
It borrows from the MPC8568MDS, in that it pulls the PCI-e I/O back to 0xe280_0000 (where PCI2 would be on MPC8548CDS), and similarly it coalesces the PCI and PCI-e mem into one single TLB.
Both PCI-x and PCI-e have been tested with intel e1000 cards under linux (with an accompanying dts change in place)
--- board/sbc8548/law.c | 12 ++++- board/sbc8548/sbc8548.c | 129 ++++++++++++++------------------------------- board/sbc8548/tlb.c | 48 +++++++--------- include/configs/sbc8548.h | 45 ++++++++------- 4 files changed, 94 insertions(+), 140 deletions(-)
board/sbc8548/law.c +10 -2
@@ -32,8 +32,10 @@* * 0x0000_0000 0x0fff_ffff DDR 256M * 0x8000_0000 0x9fff_ffff PCI1 MEM 512M +* 0xa000_0000 0xbfff_ffff PCIe MEM 512M * 0xe000_0000 0xe000_ffff CCSR 1M -* 0xe200_0000 0xe2ff_ffff PCI1 IO 16M +* 0xe200_0000 0xe27f_ffff PCI1 IO 8M +* 0xe280_0000 0xe2ff_ffff PCIe IO 8M * 0xf000_0000 0xf7ff_ffff SDRAM 128M * 0xf8b0_0000 0xf80f_ffff EEPROM 1M * 0xfb80_0000 0xff7f_ffff FLASH (2nd bank) 64M
@@ -48,8 +50,14 @@ struct law_entry law_table[] = {#ifndef CONFIG_SPD_EEPROM SET_LAW(CONFIG_SYS_DDR_SDRAM_BASE, LAW_SIZE_256M, LAW_TRGT_IF_DDR),#endif +#ifdef CONFIG_SYS_PCI1_MEM_PHYS SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCI), -SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI ), + SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_8M, LAW_TRGT_IF_PCI), +#endif +#ifdef CONFIG_SYS_PCIE1_MEM_PHYS +SET_LAW (CONFIG_SYS_PCIE1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCIE_1 ), +SET_LAW (CONFIG_SYS_PCIE1_IO_PHYS ,LAW_SIZE_8M ,LAW_TRGT_IF_PCIE_1 ), +#endif/* LBC window - maps 256M 0xf0000000 -> 0xffffffff */ SET_LAW(CONFIG_SYS_LBC_SDRAM_BASE, LAW_SIZE_256M, LAW_TRGT_IF_LBC), };
board/sbc8548/sbc8548.c +39 -90
164 lines not on this page · raw message
board/sbc8548/tlb.c +21 -27
102 lines not on this page · raw message
include/configs/sbc8548.h +24 -21
69 lines not on this page · raw message
Signature · 1 line
1.6.4.1
PATCH 6/6 sbc8548: allow enabling PCI via a make config option
Prior to this commit, to enable PCI, you had to go manually edit the board config header, and if you had 33MHz PCI, you had to manually change CONFIG_SYS_NS16550_CLK too, which was not real user friendly,
This adds the typical PCI and clock speed make targets to the toplevel Makefile in accordance with what is being done with other boards (i.e. using the "-t" to mkconfig).
--- MAKEALL | 4 ++++ Makefile | 8 ++++++-- include/configs/sbc8548.h | 43 +++++++++++++++++++++++++++++++++---------- 3 files changed, 43 insertions(+), 12 deletions(-)
MAKEALL +4 -0
@@ -399,6 +399,10 @@ LIST_85xx=" \ PM856 \ sbc8540 \ sbc8548 \ + sbc8548_PCI_33 \ + sbc8548_PCI_66 \ + sbc8548_PCI_33_PCIE \ + sbc8548_PCI_66_PCIE \ sbc8560 \ socrates \ stxgp3 \
Makefile +6 -2
@@ -2544,8 +2544,12 @@ sbc8540_66_config: unconfig fi @$(MKCONFIG) -a SBC8540 ppc mpc85xx sbc8560 -sbc8548_config: unconfig - @$(MKCONFIG) $(@:_config=) ppc mpc85xx sbc8548 +sbc8548_config \ +sbc8548_PCI_33_config \ +sbc8548_PCI_66_config \ +sbc8548_PCI_33_PCIE_config \ +sbc8548_PCI_66_PCIE_config: unconfig + @$(MKCONFIG) -t $(@:_config=) sbc8548 ppc mpc85xx sbc8548 sbc8560_config \ sbc8560_33_config \
include/configs/sbc8548.h +33 -10
75 lines not on this page · raw message
Signature · 1 line
1.6.4.1
Kumar Gala
AppliedPATCH 6/6 sbc8548: allow enabling PCI via a make config option
Quoted 9 lines · Paul Gortmaker
Prior to this commit, to enable PCI, you had to go manually edit the board config header, and if you had 33MHz PCI, you had to manually change
CONFIG_SYS_NS16550_CLKtoo, which was not real user friendly,This adds the typical PCI and clock speed make targets to the toplevel
Makefilein accordance with what is being done with other boards (i.e. using the "-t" to mkconfig).
Quoted 7 lines
Signed-off-by Paul Gortmaker <[email protected]>---
MAKEALL | 4 ++++ Makefile | 8 ++++++-- include/configs/sbc8548.h | 43 ++++++++++++++++++++++++++++++++ +---------- 3 files changed, 43 insertions(+), 12 deletions(-)
applied to 85xx.
- k
Kumar Gala
AppliedPATCH 5/6 sbc8548: update PCI/PCI-e support code
In reply to Paul GortmakerQuoted 13 lines · Paul Gortmaker
The PCI/PCI-e support for the sbc8548 was based on an earlier version of what the MPC8548CDS board was using, and in its current state it won't even compile. This re-syncs it to match the latest codebase and makes use of the new shared PCI functions to reduce board duplication.
It borrows from the MPC8568MDS, in that it pulls the PCI-e I/O back to 0xe280_0000 (where PCI2 would be on MPC8548CDS), and similarly it coalesces the PCI and PCI-e mem into one single TLB.
Both PCI-x and PCI-e have been tested with intel e1000 cards under linux (with an accompanying dts change in place)
Quoted 8 lines
Signed-off-by Paul Gortmaker <[email protected]>---
board/sbc8548/law.c| 12 ++++-board/sbc8548/sbc8548.c| 129 ++++++++++++++------------------------------- board/sbc8548/tlb.c | 48 +++++++--------- include/configs/sbc8548.h | 45 ++++++++------- 4 files changed, 94 insertions(+), 140 deletions(-)
applied to 85xx.
- k
Kumar Gala
AppliedPATCH 4/6 sbc8548: correct local bus SDRAM size from 64M to 128M
In reply to Paul GortmakerQuoted 6 lines · Paul Gortmaker
The size of the LB SDRAM on this board is 128MB, spanning CS3 and CS4. It was previously only being configured for 64MB on CS3, since that was what the original codebase of the MPC8548CDS had. In addition to setting up BR4/OR4, this also adds the TLB entry for the second half of the SDRAM.
Quoted 7 lines
Signed-off-by Paul Gortmaker <[email protected]>---
board/sbc8548/sbc8548.c | 8 +++++++- board/sbc8548/tlb.c | 22 +++++++++++++++------- include/configs/sbc8548.h | 42 ++++++++++++++++++++++++++++++++++++ ++---- 3 files changed, 60 insertions(+), 12 deletions(-)
applied to 85xx.
- k
PATCH 4/6 sbc8548: correct local bus SDRAM size from 64M to 128M
In reply to Paul GortmakerDear Paul Gortmaker,
Quoted 7 lines · In message <5ad17f25a126b25be24467d1712d30a775a5b494.1253492532.git.paul.gortma…
The size of the LB SDRAM on this board is 128MB, spanning CS3 and CS4. It was previously only being configured for 64MB on CS3, since that was what the original codebase of the MPC8548CDS had. In addition to setting up BR4/OR4, this also adds the TLB entry for the second half of the SDRAM.
Signed-off-by Paul Gortmaker <[email protected]>
...
board/sbc8548/tlb.c struct fsl_e_tlb_entry tlb_table[] = { · line 101
Quoted 4 lines
board/sbc8548/tlb.c +4
-0+* TLB 6: 64M Cacheable, non-guarded +* 0xf4000000 64M LBC SDRAM Second half +*/ + SET_TLB_ENTRY(1, CONFIG_SYS_LBC_SDRAM_BASE + 0x4000000, CONFIG_SYS_LBC_SDRAM_BASE + 0x4000000,
Line too long.
Best regards,
Wolfgang Denk
Signature · 4 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 Hindsight is an exact science.
PATCH 3/6 sbc8548: use I/O accessors
In reply to Paul Gortmakerboard/sbc8548/sbc8548.c int checkboard (void) · line 68
Quoted 12 lines · Paul Gortmaker
Sweep throught the board specific file and replace the various register proddings with the equivalent I/O accessors.
Signed-off-by Paul Gortmaker <[email protected]>---
board/sbc8548/sbc8548.c +2
-2- ecm->eedr =0xffffffff ;/* clear ecm errors */ - ecm->eeer =0xffffffff ;/* enable ecm errors */ +out_be32 (&ecm->eedr,0xffffffff );/* clear ecm errors */ +out_be32 (&ecm->eeer,0xffffffff );/* enable ecm errors */ return 0 ;
Correct me if I'm wrong, but I thought the general rule was the other way (i.e. the way it alreay was). See for example:
This prevents, for example, accidentally writing words and longs to byte sized registers.
Regards,
G
PATCH 3/6 sbc8548: use I/O accessors
Dear Graeme Russ,
Quoted 9 lines · In message <[email protected]> you…
board/sbc8548/sbc8548.c int checkboard (void) · line 68
Quoted 6 lines
board/sbc8548/sbc8548.c +2
-2- ecm->eedr =0xffffffff ;/* clear ecm errors */ - ecm->eeer =0xffffffff ;/* enable ecm errors */ +out_be32 (&ecm->eedr,0xffffffff );/* clear ecm errors */ +out_be32 (&ecm->eeer,0xffffffff );/* enable ecm errors */ return 0 ;Correct me if I'm wrong, but I thought the general rule was the other way (i.e. the way it alreay was). See for example:
You are wrong. We must use I/O accessors.
Quoted 1 line
Ouch. This patch is clearly bloken. Sorry it escaped my attention.
Using a C structure to describe the hardware is a good thing, but we still must use I/O accessors to access the registers.
This needs to be fixed in your code.
Quoted 2 lines
This prevents, for example, accidentally writing words and longs to byte sized registers.
Right. The I/O accessors still allow for strict type checking.
Best regards,
Wolfgang Denk
Signature · 6 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 "What is wanted is not the will to believe, but the will to find out, which is the exact opposite." - Bertrand Russell, _Sceptical_Essays_, 1928
PATCH 3/6 sbc8548: use I/O accessors
Quoted 10 lines · Wolfgang Denk
Dear Graeme Russ,
Quoted 7 lines · In message <[email protected]> you…
Quoted 6 lines
board/sbc8548/sbc8548.c +2
-2- ecm->eedr =0xffffffff ;/* clear ecm errors */ - ecm->eeer =0xffffffff ;/* enable ecm errors */ +out_be32 (&ecm->eedr,0xffffffff );/* clear ecm errors */ +out_be32 (&ecm->eeer,0xffffffff );/* enable ecm errors */ return 0 ;
Quoted 4 lines
Quoted 2 lines
Correct me if I'm wrong, but I thought the general rule was the other way (i.e. the way it alreay was). See for example:
You are wrong. We must use I/O accessors.
Thanks for the correction :)
Quoted 4 lines
Quoted 2 lines
Ouch. This patch is clearly bloken. Sorry it escaped my attention.
Hence my incorrect assumption ;)
Quoted 5 lines
Using a C structure to describe the hardware is a good thing, but we still must use I/O accessors to access the registers.
This needs to be fixed in your code.
Will do
Quoted 5 lines
Quoted 3 lines
This prevents, for example, accidentally writing words and longs to byte sized registers.
Right. The I/O accessors still allow for strict type checking.
Right, which still makes my patch better than the completely unchecked previous version of the SC520 MMCR accessors
Regards,
G
Kumar Gala
AppliedPATCH 3/6 sbc8548: use I/O accessors
In reply to Paul GortmakerQuoted 8 lines · Paul Gortmaker
Sweep throught the board specific file and replace the various register proddings with the equivalent I/O accessors.
Signed-off-by Paul Gortmaker <[email protected]>---
board/sbc8548/sbc8548.c| 91 ++++++++++++++++++++++
+------------------------1 files changed, 45 insertions(+), 46 deletions(-)
applied to 85xx.
- k
Kumar Gala
AppliedPATCH 2/6 sbc8548: remove eTSEC3/4 voltage hack
In reply to Paul GortmakerQuoted 7 lines · Paul Gortmaker
With only eTSEC1 and 2 being brought out to RJ-45 connectors, we aren't interested in the eTSEC3/4 voltage hack on this board
Signed-off-by Paul Gortmaker <[email protected]>---
board/sbc8548/sbc8548.c| 6 ------1 files changed, 0 insertions(+), 6 deletions(-)
applied to 85xx.
- k
Kumar Gala
AppliedPATCH 1/6 fsl_pci: create a SET_STD_PCI_INFO() helper wrapper
In reply to Paul GortmakerQuoted 7 lines · Paul Gortmaker
Recycle the recently added PCI-e wrapper used to reduce board duplication of code by creating a similar version for plain PCI.
Signed-off-by Paul Gortmaker <[email protected]>---
include/asm-ppc/fsl_pci.h| 12 ++++++++++++1 files changed, 12 insertions(+), 0 deletions(-)
applied to 85xx.
- k