ppc4xx: Add GDsys CompactCenter board support.
PATCH 1/1 ppc4xx: Add GDsys CompactCenter board support.
Board support for the Guntermann & Drunck CompactCenter and DevCon-Center.
Based on the AMCC Canyonlands board support by Stefan Roese.
--- MAINTAINERS | 2 + MAKEALL | 2 + Makefile | 8 + board/gdsys/compactcenter/Makefile | 52 ++++ board/gdsys/compactcenter/bootstrap.c | 196 +++++++++++++ board/gdsys/compactcenter/compactcenter.c | 326 ++++++++++++++++++++++ board/gdsys/compactcenter/config.mk | 41 +++ board/gdsys/compactcenter/init.S | 87 ++++++ board/gdsys/compactcenter/u-boot.lds | 144 ++++++++++ include/configs/compactcenter.h | 425 +++++++++++++++++++++++++++++ 10 files changed, 1283 insertions(+), 0 deletions(-) create mode 100644 board/gdsys/compactcenter/Makefile create mode 100644 board/gdsys/compactcenter/bootstrap.c create mode 100644 board/gdsys/compactcenter/compactcenter.c create mode 100644 board/gdsys/compactcenter/config.mk create mode 100644 board/gdsys/compactcenter/init.S create mode 100644 board/gdsys/compactcenter/u-boot.lds create mode 100644 include/configs/compactcenter.h
MAINTAINERS +2 -0
@@ -135,6 +135,8 @@ Jon Diekema <[email protected]> Dirk Eibach <[email protected]> + compactcenter PPC460EX + devconcenter PPC460EX gdppc440etx PPC440EP/GR neo PPC405EP
MAKEALL +2 -0
@@ -183,6 +183,7 @@ LIST_4xx=" \ canyonlands \ canyonlands_nand \ CMS700 \ + compactcenter \ CPCI2DP \ CPCI405 \ CPCI4052 \
@@ -193,6 +194,7 @@ LIST_4xx=" \ csb272 \ csb472 \ DASA_SIM \ + devconcenter \ DP405 \ DU405 \ DU440 \
Makefile +8 -0
@@ -1299,6 +1299,14 @@ CATcenter_33_config: unconfig CMS700_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx cms700 esd +# Compact-Center & DevCon-Center use different U-Boot images +compactcenter_config \ +devconcenter_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \ + tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h + @$(MKCONFIG) -n $@ -a compactcenter ppc ppc4xx compactcenter gdsys + CPCI2DP_config: unconfig @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd
board/gdsys/compactcenter/Makefile new file +52 -0
52 lines not on this page · raw message
board/gdsys/compactcenter/bootstrap.c new file +196 -0
196 lines not on this page · raw message
board/gdsys/compactcenter/compactcenter.c new file +326 -0
326 lines not on this page · raw message
board/gdsys/compactcenter/config.mk new file +41 -0
41 lines not on this page · raw message
board/gdsys/compactcenter/init.S new file +87 -0
87 lines not on this page · raw message
board/gdsys/compactcenter/u-boot.lds new file +144 -0
144 lines not on this page · raw message
include/configs/compactcenter.h new file +425 -0
425 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH 1/1 ppc4xx: Add GDsys CompactCenter board support.
Dear Dirk Eibach,
Quoted 5 lines · In message <[email protected]> you wrote:
Board support for the Guntermann & Drunck CompactCenter and DevCon-Center.
Based on the AMCC Canyonlands board support by Stefan Roese.Signed-off-by Dirk Eibach <[email protected]>
...
Quoted 5 lines
board/gdsys/compactcenter/bootstrap.c new file +0
-0
...
board/gdsys/compactcenter/bootstrap.c line 86
Quoted 12 lines
board/gdsys/compactcenter/bootstrap.c new file +12
-0+/* +* Bytes 5,6,8,9,11 change for NAND boot +*/ +#if 0 +/* +* Values for 512 page size NAND chips, not used anymore, just +* keep them here for reference +*/ +static u8 nand_boot[] = { +0x90 ,0x01 ,0xa0 ,0x68 ,0x58 +}; +#else
Please do not add dead code.
Quoted 10 lines
board/gdsys/compactcenter/bootstrap.c new file +10
-0+/* +* Values for 2k page size NAND chips +*/ +static u8 nand_boot[] = { +0x90 ,0x01 ,0xa0 ,0xe8 ,0x58 +}; +#endif + +static int do_bootstrap (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +{
...
board/gdsys/compactcenter/bootstrap.c line 116
Quoted 5 lines
board/gdsys/compactcenter/bootstrap.c new file +5
-0+/* set the nand flag based on provided input */ +if ((strcmp (argv[1 ],"nand" ) ==0 )) + b_nand =1 ; +else + b_nand =0 ;
Consider changing this into:
if ((strcmp(argv[1], "nand") == 0)) b_nand = NAND_COMPATIBLE; else b_nand = NOR_COMPATIBLE;
(and probably chose a diferent name for the variable then).
Then you could simplify this into:
Quoted 9 lines
board/gdsys/compactcenter/bootstrap.c new file +9
-0+printf ("Available configurations: \n\n" ); + +if (b_nand) { +for (x =0 , y =0 ; boot_configs[x][0 ] !=0 ; x++) { +/* filter on nand compatible */ +if (boot_configs[x][0 ] &NAND_COMPATIBLE ) { +printf (" %d - %s\n" , (y+1 ), config_labels[x]); + y++; + }
board/gdsys/compactcenter/bootstrap.c line 136
Quoted 10 lines
board/gdsys/compactcenter/bootstrap.c new file +10
-0+ } + }else { +for (x =0 , y =0 ; boot_configs[x][0 ] !=0 ; x++) { +/* filter on nor compatible */ +if (boot_configs[x][0 ] &NOR_COMPATIBLE ) { +printf (" %d - %s\n" , (y+1 ), config_labels[x]); + y++; + } + } + }
for (x = 0, y = 0; boot_configs[x][0] != 0; x++) {
if (boot_configs[x][0] & b_nand) {
printf(" %d - %s\n", (y+1), config_labels[x]);
y++;
}
}Quoted 7 lines
board/gdsys/compactcenter/bootstrap.c new file +7
-0+for (x =0 ; boot_configs[x][0 ] !=0 ; x++) { +if (b_nand) { +if (boot_configs[x][0 ] &NAND_COMPATIBLE ) { +if (y >0 ) + y--; +else if (y <1 ) +break ;
board/gdsys/compactcenter/bootstrap.c line 169
Quoted 10 lines
board/gdsys/compactcenter/bootstrap.c new file +10
-0+ } + }else { +if (boot_configs[x][0 ] &NOR_COMPATIBLE ) { +if (y >0 ) + y--; +else if (y <1 ) +break ; + } + } + }
Ditto here.
Quoted 5 lines
board/gdsys/compactcenter/init.S new file +0
-0
...
board/gdsys/compactcenter/init.S line 53
Quoted 9 lines
board/gdsys/compactcenter/init.S new file +9
-0+tlbtab: + tlbtab_start + + /* + * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to + * use the speed up boot process. It is patched after relocation to + * enable SA_I + */ + tlbentry(CONFIG_SYS_BOOT_BASE_ADDR, SZ_16M, CONFIG_SYS_BOOT_BASE_ADDR, 4, AC_R|AC_W|AC_X|SA_G) /* TLB 0 */
Line way too long.
board/gdsys/compactcenter/init.S line 63
Quoted 9 lines
board/gdsys/compactcenter/init.S new file +9
-0+ /* + * TLB entries for SDRAM are not needed on this platform. + * They are dynamically generated in the SPD DDR(2) detection + * routine. + */ + +#ifdef CONFIG_SYS_INIT_RAM_DCACHE + /* TLB-entry for init-ram in dcache (SA_I must be turned off!) */ + tlbentry(CONFIG_SYS_INIT_RAM_ADDR, SZ_4K, CONFIG_SYS_INIT_RAM_ADDR, 0, AC_R|AC_W|AC_X|SA_G)
Ditto. Please fix everywhere.
Quoted 5 lines
include/configs/compactcenter.h new file +0
-0
...
include/configs/compactcenter.h line 66
Quoted 5 lines
include/configs/compactcenter.h new file +5
-0+/*----------------------------------------------------------------------- +* Base addresses -- Note these are effective addresses where the +* actual resources get mapped (not physical addresses) +*----------------------------------------------------------------------*/ +#define CONFIG_SYS_PCI_MEMBASE 0x80000000/* mapped PCI memory */
More too long lines in this file.
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 Everyting looks interesting until you do it. Then you find it's just another job. - Terry Pratchett, _Moving Pictures_