stx: create common vendor hierarchy for Silicon Turnkey boards
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
From: Alex Dubov <[email protected]>
Move board definition files for STx XTC, GP3 and SSA boards into common subdirectory and factor out common code.
"-mno-spe" flag common to all MPC85xx configurations does not work so change it to "-mspe=no" which does (GCC bug 37759).
---
Makefile | 6 +-
board/{stxgp3 => stx/common}/Makefile | 20 +++--
board/{stxssa => stx/common}/ddr.c | 46 ++++++++---
board/{stxssa => stx/common}/law.c | 30 ++++---
board/{stxssa => stx/common}/tlb.c | 72 ++++++++++-------
board/{ => stx}/stxgp3/Makefile | 3 -
board/{ => stx}/stxgp3/config.mk | 0
board/{ => stx}/stxgp3/flash.c | 0
board/{ => stx}/stxgp3/stxgp3.c | 0
board/{ => stx}/stxgp3/u-boot.lds | 0
board/{ => stx}/stxssa/Makefile | 3 -
board/{ => stx}/stxssa/config.mk | 0
board/{ => stx}/stxssa/stxssa.c | 0
board/{ => stx}/stxssa/u-boot.lds | 0
board/{ => stx}/stxxtc/Makefile | 0
board/{ => stx}/stxxtc/config.mk | 0
board/{ => stx}/stxxtc/stxxtc.c | 0
board/{ => stx}/stxxtc/u-boot.lds | 0
board/{ => stx}/stxxtc/u-boot.lds.debug | 0
board/stxgp3/ddr.c | 76 ------------------
board/stxgp3/law.c | 58 --------------
board/stxgp3/tlb.c | 130 -------------------------------
cpu/mpc85xx/config.mk | 2 +-
include/configs/stxgp3.h | 21 +++--
include/configs/stxssa.h | 28 ++++---
25 files changed, 135 insertions(+), 360 deletions(-)
copy board/{stxgp3 => stx/common}/Makefile (82%)
rename board/{stxssa => stx/common}/ddr.c (57%)
rename board/{stxssa => stx/common}/law.c (74%)
rename board/{stxssa => stx/common}/tlb.c (59%)
rename board/{ => stx}/stxgp3/Makefile (95%)
rename board/{ => stx}/stxgp3/config.mk (100%)
rename board/{ => stx}/stxgp3/flash.c (100%)
rename board/{ => stx}/stxgp3/stxgp3.c (100%)
rename board/{ => stx}/stxgp3/u-boot.lds (100%)
rename board/{ => stx}/stxssa/Makefile (95%)
rename board/{ => stx}/stxssa/config.mk (100%)
rename board/{ => stx}/stxssa/stxssa.c (100%)
rename board/{ => stx}/stxssa/u-boot.lds (100%)
rename board/{ => stx}/stxxtc/Makefile (100%)
rename board/{ => stx}/stxxtc/config.mk (100%)
rename board/{ => stx}/stxxtc/stxxtc.c (100%)
rename board/{ => stx}/stxxtc/u-boot.lds (100%)
rename board/{ => stx}/stxxtc/u-boot.lds.debug (100%)
delete mode 100644 board/stxgp3/ddr.c
delete mode 100644 board/stxgp3/law.c
delete mode 100644 board/stxgp3/tlb.cMakefile +3 -3
@@ -1129,7 +1129,7 @@ SPD823TS_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc8xx spd8xx stxxtc_config: unconfig - @$(MKCONFIG) $(@:_config=) ppc mpc8xx stxxtc + @$(MKCONFIG) $(@:_config=) ppc mpc8xx stxxtc stx svm_sc8xx_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc8xx svm_sc8xx
@@ -2526,7 +2526,7 @@ socrates_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc85xx socrates stxgp3_config: unconfig - @$(MKCONFIG) $(@:_config=) ppc mpc85xx stxgp3 + @$(MKCONFIG) $(@:_config=) ppc mpc85xx stxgp3 stx stxssa_config \ stxssa_4M_config: unconfig
@@ -2535,7 +2535,7 @@ stxssa_4M_config: unconfig echo "#define CONFIG_STXSSA_4M" >>$(obj)include/config.h ; \ $(XECHO) "... with 4 MiB flash memory" ; \ fi - @$(MKCONFIG) -a stxssa ppc mpc85xx stxssa + @$(MKCONFIG) -a stxssa ppc mpc85xx stxssa stx TQM8540_config \ TQM8541_config \
board/stx/common/Makefile renamed from board/stxgp3/Makefile +11 -9
@@ -1,5 +1,5 @@ # -# (C) Copyright 2001-2006 +# (C) Copyright 2006 # Wolfgang Denk, DENX Software Engineering, wd at denx.de. # # See file CREDITS for list of people who contributed to this
@@ -23,23 +23,25 @@ include $(TOPDIR)/config.mk -LIB = $(obj)lib$(BOARD).a +ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)board/$(VENDOR)/common) +endif -COBJS-y += $(BOARD).o -COBJS-y += law.o -COBJS-y += tlb.o -COBJS-y += flash.o -COBJS-$(CONFIG_FSL_DDR1) += ddr.o +LIB = $(obj)lib$(VENDOR).a + +COBJS-${CONFIG_MPC85xx} += ddr.o +COBJS-${CONFIG_MPC85xx} += law.o +COBJS-${CONFIG_MPC85xx} += tlb.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y)) SOBJS := $(addprefix $(obj),$(SOBJS)) -$(LIB): $(obj).depend $(OBJS) $(SOBJS) +$(LIB): $(obj).depend $(OBJS) $(AR) $(ARFLAGS) $@ $(OBJS) clean: - rm -f $(OBJS) $(SOBJS) + rm -f $(SOBJS) $(OBJS) distclean: clean rm -f $(LIB) core *.bak $(obj).depend
board/stx/common/ddr.c renamed from board/stxssa/ddr.c +33 -13
80 lines not on this page · raw message
board/stx/common/law.c renamed from board/stxssa/law.c +17 -13
@@ -1,9 +1,9 @@/* -* Copyright 2008 Freescale Semiconductor, Inc. -* * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd at denx.de. * +* Copyright 2009 Alex Dubov <[email protected]> +* * See file CREDITS for list of people who contributed to this * project. *
@@ -31,30 +31,34 @@* LAW(Local Access Window) configuration: * * 0x0000_0000 0x7fff_ffff DDR 2G -* 0x8000_0000 0x9fff_ffff PCI1 MEM 512M -* 0xa000_0000 0xbfff_ffff PCI2 MEM 512M +* 0x8000_0000 0x9fff_ffff PCI1 512M +* 0xa000_0000 0xbfff_ffff PCI2 512M +* 0xc000_0000 0xdfff_ffff RapidIO 512M * 0xe000_0000 0xe000_ffff CCSR 1M * 0xe200_0000 0xe2ff_ffff PCI1 IO 16M * 0xe300_0000 0xe3ff_ffff PCI2 IO 16M -* 0xf000_0000 0xfaff_ffff Local bus 128M -* 0xfb00_0000 0xfb00_ffff Config Latch 64K -* 0xfc00_0000 0xffff_ffff FLASH (boot bank) 64M +* 0xf000_0000 0xffff_ffff LBC options + FLASH 256M * * Notes: * CCSRBAR and L2-as-SRAM don't need a configured Local Access Window. * If flash is 8M at default position (last 8M), no LAW needed. +* +* LAW 0 is reserved for boot mapping */ struct law_entry law_table[] = { -#ifndef CONFIG_SPD_EEPROM -SET_LAW (CONFIG_SYS_DDR_SDRAM_BASE ,LAW_SIZE_128M ,LAW_TRGT_IF_DDR ), +#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),#endif -SET_LAW (CONFIG_SYS_PCI1_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_PCI_1 ), +#ifdef CONFIG_SYS_PCI2_MEM_PHYS SET_LAW(CONFIG_SYS_PCI2_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCI_2), -SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI_1 ), SET_LAW(CONFIG_SYS_PCI2_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI_2), -/* Map the whole localbus, including flash and reset latch. */ - SET_LAW(CONFIG_SYS_LBC_OPTION_BASE, LAWAR_SIZE_256M, LAW_TRGT_IF_LBC), +#endif +#ifdef CONFIG_SYS_RIO_MEM_PHYS +SET_LAW (CONFIG_SYS_RIO_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_RIO ), +#endif +SET_LAW (CONFIG_SYS_LBC_OPTION_BASE ,LAWAR_SIZE_256M ,LAW_TRGT_IF_LBC ) };int num_law_entries =ARRAY_SIZE (law_table);
board/stx/common/tlb.c renamed from board/stxssa/tlb.c +43 -29
128 lines not on this page · raw message
board/stx/stxgp3/Makefile renamed from board/stxgp3/Makefile +0 -3
@@ -26,10 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a COBJS-y += $(BOARD).o -COBJS-y += law.o -COBJS-y += tlb.o COBJS-y += flash.o -COBJS-$(CONFIG_FSL_DDR1) += ddr.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y))
board/stx/stxgp3/config.mk renamed from board/stxgp3/config.mk +0 -0
board/stx/stxgp3/flash.c renamed from board/stxgp3/flash.c +0 -0
board/stx/stxgp3/stxgp3.c renamed from board/stxgp3/stxgp3.c +0 -0
board/stx/stxgp3/u-boot.lds renamed from board/stxgp3/u-boot.lds +0 -0
board/stx/stxssa/Makefile renamed from board/stxssa/Makefile +0 -3
@@ -26,9 +26,6 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a COBJS-y += $(BOARD).o -COBJS-y += law.o -COBJS-y += tlb.o -COBJS-$(CONFIG_FSL_DDR1) += ddr.o SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y))
board/stx/stxssa/config.mk renamed from board/stxssa/config.mk +0 -0
board/stx/stxssa/stxssa.c renamed from board/stxssa/stxssa.c +0 -0
board/stx/stxssa/u-boot.lds renamed from board/stxssa/u-boot.lds +0 -0
board/stx/stxxtc/Makefile renamed from board/stxxtc/Makefile +0 -0
board/stx/stxxtc/config.mk renamed from board/stxxtc/config.mk +0 -0
board/stx/stxxtc/stxxtc.c renamed from board/stxxtc/stxxtc.c +0 -0
board/stx/stxxtc/u-boot.lds renamed from board/stxxtc/u-boot.lds +0 -0
board/stx/stxxtc/u-boot.lds.debug renamed from board/stxxtc/u-boot.lds.debug +0 -0
board/stxgp3/ddr.c deleted +0 -76
76 lines not on this page · raw message
board/stxgp3/law.c deleted +0 -58
58 lines not on this page · raw message
board/stxgp3/tlb.c deleted +0 -130
130 lines not on this page · raw message
cpu/mpc85xx/config.mk +1 -1
@@ -25,4 +25,4 @@ PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 \ -Wa,-me500 -msoft-float -mno-string -PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe) +PLATFORM_CPPFLAGS +=$(call cc-option,-mspe=no)
include/configs/stxgp3.h +12 -9
@@ -78,6 +78,7 @@*/ #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000/* Localbus SDRAM */ #define CONFIG_SYS_LBC_SDRAM_SIZE 256/* LBC SDRAM is 64MB */ +#define CONFIG_SYS_LBC_OPTION_BASE 0xf0000000#define CONFIG_SYS_FLASH_BASE 0xff000000/* start of FLASH 16M */ #define CONFIG_SYS_BR0_PRELIM 0xff001801/* port size 32bit */
@@ -195,18 +196,20 @@/* RapdIO Map configuration, mapped 1:1. */ -#define CONFIG_SYS_RIO_MEM_BASE 0xc0000000 -#define CONFIG_SYS_RIO_MEM_PHYS CONFIG_SYS_RIO_MEM_BASE -#define CONFIG_SYS_RIO_MEM_SIZE 0x200000000/* 512 M */ +#define CONFIG_SYS_RIO_MEM_BASE 0xc0000000 +#define CONFIG_SYS_RIO_MEM_PHYS CONFIG_SYS_RIO_MEM_BASE +#define CONFIG_SYS_RIO_MEM_VIRT CONFIG_SYS_RIO_MEM_BASE +#define CONFIG_SYS_RIO_MEM_SIZE 0x200000000/* 512 M */ /* Standard 8560 PCI addressing, mapped 1:1. */ -#define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 -#define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE -#define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000/* 512M */ -#define CONFIG_SYS_PCI1_IO_BASE 0xe2000000 -#define CONFIG_SYS_PCI1_IO_PHYS CONFIG_SYS_PCI1_IO_BASE -#define CONFIG_SYS_PCI1_IO_SIZE 0x01000000/* 16 M */ +#define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 +#define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE +#define CONFIG_SYS_PCI1_MEM_VIRT CONFIG_SYS_PCI1_MEM_BASE +#define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000/* 512M */ +#define CONFIG_SYS_PCI1_IO_BASE 0xe2000000 +#define CONFIG_SYS_PCI1_IO_PHYS CONFIG_SYS_PCI1_IO_BASE +#define CONFIG_SYS_PCI1_IO_SIZE 0x01000000/* 16 M */ #if defined(CONFIG_PCI )/* PCI Ethernet card */
include/configs/stxssa.h +15 -13
@@ -220,19 +220,21 @@* Standard 8555 PCI mapping. * Addresses are mapped 1-1. */ -#define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 -#define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE -#define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000/* 512M */ -#define CONFIG_SYS_PCI1_IO_BASE 0x00000000 -#define CONFIG_SYS_PCI1_IO_PHYS 0xe2000000 -#define CONFIG_SYS_PCI1_IO_SIZE 0x01000000/* 16M */ - -#define CONFIG_SYS_PCI2_MEM_BASE 0xa0000000 -#define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE -#define CONFIG_SYS_PCI2_MEM_SIZE 0x20000000/* 512M */ -#define CONFIG_SYS_PCI2_IO_BASE 0x00000000 -#define CONFIG_SYS_PCI2_IO_PHYS 0xe3000000 -#define CONFIG_SYS_PCI2_IO_SIZE 0x01000000/* 16M */ +#define CONFIG_SYS_PCI1_MEM_BASE 0x80000000 +#define CONFIG_SYS_PCI1_MEM_PHYS CONFIG_SYS_PCI1_MEM_BASE +#define CONFIG_SYS_PCI1_MEM_VIRT CONFIG_SYS_PCI1_MEM_BASE +#define CONFIG_SYS_PCI1_MEM_SIZE 0x20000000/* 512M */ +#define CONFIG_SYS_PCI1_IO_BASE 0x00000000 +#define CONFIG_SYS_PCI1_IO_PHYS 0xe2000000 +#define CONFIG_SYS_PCI1_IO_SIZE 0x01000000/* 16M */ + +#define CONFIG_SYS_PCI2_MEM_BASE 0xa0000000 +#define CONFIG_SYS_PCI2_MEM_PHYS CONFIG_SYS_PCI2_MEM_BASE +#define CONFIG_SYS_PCI2_MEM_VIRT CONFIG_SYS_PCI2_MEM_BASE +#define CONFIG_SYS_PCI2_MEM_SIZE 0x20000000/* 512M */ +#define CONFIG_SYS_PCI2_IO_BASE 0x00000000 +#define CONFIG_SYS_PCI2_IO_PHYS 0xe3000000 +#define CONFIG_SYS_PCI2_IO_SIZE 0x01000000/* 16M */ #if defined(CONFIG_PCI )/* PCI Ethernet card */ #define CONFIG_MPC85XX_PCI2 1
Signature · 1 line
1.5.6.4
PATCH 1/1 stx: add support for AMC8548 board
From: Alex Dubov <[email protected]>
STx AMC8548 board is an old, AMC form factor, MPC8548 based board intended for RapidIO applications. It features 16MiB NAND flash, one DDR2 soDIMM slot, ethernet on front panel and backplane, RapidIO on backplane, USB controller on local bus (not currently enabled) and no PCI of any kind.
--- Makefile | 3 + board/stx/stxamc8548/Makefile | 51 ++++++ board/stx/stxamc8548/config.mk | 32 ++++ board/stx/stxamc8548/stxamc8548.c | 168 +++++++++++++++++++ board/stx/stxamc8548/u-boot.lds | 143 ++++++++++++++++ include/configs/stxamc8548.h | 332 +++++++++++++++++++++++++++++++++++++ 6 files changed, 729 insertions(+), 0 deletions(-) create mode 100644 board/stx/stxamc8548/Makefile create mode 100644 board/stx/stxamc8548/config.mk create mode 100644 board/stx/stxamc8548/stxamc8548.c create mode 100644 board/stx/stxamc8548/u-boot.lds create mode 100644 include/configs/stxamc8548.h
Makefile +3 -0
@@ -2525,6 +2525,9 @@ sbc8560_66_config: unconfig socrates_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc85xx socrates +stxamc8548_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc85xx stxamc8548 stx + stxgp3_config: unconfig @$(MKCONFIG) $(@:_config=) ppc mpc85xx stxgp3 stx
board/stx/stxamc8548/Makefile new file +51 -0
51 lines not on this page · raw message
board/stx/stxamc8548/config.mk new file +32 -0
@@ -0,0 +1,32 @@ +# +# Copyright 2009 Alex Dubov <[email protected]> +# +# 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 +# + +# +# STx amc8548 board +# +ifndef TEXT_BASE +TEXT_BASE = 0xfffc0000 +endif + +PLATFORM_CPPFLAGS += -DCONFIG_E500=1 +PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1 +PLATFORM_CPPFLAGS += -DCONFIG_MPC8548=1
board/stx/stxamc8548/stxamc8548.c new file +168 -0
168 lines not on this page · raw message
board/stx/stxamc8548/u-boot.lds new file +143 -0
143 lines not on this page · raw message
include/configs/stxamc8548.h new file +332 -0
332 lines not on this page · raw message
Signature · 1 line
1.5.6.4
PATCH 1/1 stxamc8548: make environment use one of the smaller "boot" blocks in flash
From: Alex Dubov <[email protected]>
Put environment into .ppcenv section aligned on a smaller "boot" eraseblock boundary near flash end.
--- board/stx/stxamc8548/u-boot.lds | 11 ++++++++++- include/configs/stxamc8548.h | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-)
board/stx/stxamc8548/u-boot.lds +10 -1
@@ -109,16 +109,25 @@ SECTIONS __ex_table : { *(__ex_table) } __stop___ex_table = .; + .ppcenv ADDR(.text) + 0x38000 : + { + *(.ppcenv) + } + . = ALIGN(256); + __init_begin = .; .text.init : { *(.text.init) } .data.init : { *(.data.init) } + + . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x3f000 : { - cpu/mpc85xx/start.o (.bootpg) + cpu/mpc85xx/start.o (.bootpg) } :text = 0xffff .resetvec ADDR(.text) + 0x3fffc :
include/configs/stxamc8548.h +2 -1
@@ -246,9 +246,10 @@ extern unsigned long get_clock_freq(void);* Environment */ #define CONFIG_ENV_IS_IN_FLASH 1 +#define CONFIG_SYS_USE_PPCENV 1#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + 0x38000)#define CONFIG_ENV_SECT_SIZE 0x4000/* 16K(one sector) for env */ -#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_SIZE 0x4000#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */
Signature · 1 line
1.5.6.4
PATCH 1/1 stxamc8548: make environment use one of the smaller "boot" blocks in flash
Dear oakad at yahoo.com,
Quoted 3 lines · In message <[email protected]> you wrote:
Put environment into .ppcenv section aligned on a smaller "boot" eraseblock boundary near flash end.
Hm... if you change to code to using a smaller boot sector...
include/configs/stxamc8548.h extern unsigned long get_clock_freq(void); · line 252
Quoted 4 lines
#define
CONFIG_ENV_ADDR(CONFIG_SYS_MONITOR_BASE+0x38000)
#defineCONFIG_ENV_SECT_SIZE0x4000/* 16K(one sector) for env */include/configs/stxamc8548.h +1
-1-#define CONFIG_ENV_SIZE 0x2000 +#define CONFIG_ENV_SIZE 0x4000
...should then not be CONFIG_ENV_SECT_SIZE changed to some smaller size, too?
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 How does a project get to be a year late? ... One day at a time.
PATCH 1/1 stxamc8548: make environment use one of the smaller "boot" blocks in flash
Quoted 14 lines
Quoted 3 lines
Put environment into .ppcenv section aligned on a
smaller "boot" eraseblock
Quoted 1 line
boundary near flash end.
Hm... if you change to code to using a smaller boot sector...
Quoted 1 line
? #define
CONFIG_ENV_ADDR? ? ?? (
CONFIG_SYS_MONITOR_BASE+0x38000)Quoted 1 line
? #define
CONFIG_ENV_SECT_SIZE???0x4000???/*
16K(one sector) for env */
Quoted 9 lines
Quoted 1 line
-#define
CONFIG_ENV_SIZE? ? ? ?
0x2000Quoted 1 line
+#define
CONFIG_ENV_SIZE? ? ? ?
0x4000...should then not be
CONFIG_ENV_SECT_SIZEchanged to some smaller
size, too?
The "large" eraseblock size for this flash config is 128k (2x64k). Small one is 16k (2x8k).
PATCH 1/1 stxamc8548: make environment use one of the smaller "boot" blocks in flash
Dear Alex Dubov,
Quoted 12 lines · In message <[email protected]> you wrote:
Quoted 12 lines
Hm... if you change to code to using a smaller boot sector...
Quoted 1 line
? #define
CONFIG_ENV_ADDR? ? ?? (
CONFIG_SYS_MONITOR_BASE+0x38000)Quoted 1 line
? #define
CONFIG_ENV_SECT_SIZE???0x4000???/*
16K(one sector) for env */Quoted 1 line
-#define
CONFIG_ENV_SIZE? ? ? ?
0x2000Quoted 1 line
+#define
CONFIG_ENV_SIZE? ? ? ?
Quoted 8 lines
Quoted 6 lines
0x4000...should then not be
CONFIG_ENV_SECT_SIZEchanged to some smaller
size, too?The "large" eraseblock size for this flash config is 128k (2x64k). Small one is 16k (2x8k).
So the old setting (CONFIG_ENV_SECT_SIZE=0x4000=16K) was plain wrong?
Please merge this fix into your inital patch submission, then.
Best regards,
Wolfgang Denk
Signature · 7 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 Severe culture shock results when experts from another protocol suite [...] try to read OSI documents. The term "osified" is used to refer to such documents. [...] Any relationship to the word "ossified" is purely intentional. - Marshall T. Rose
PATCH 1/1 stx: add support for AMC8548 board
In reply to oakad at yahoo.comDear oakad at yahoo.com,
Quoted 8 lines · In message <[email protected]> you wrote:
From: Alex Dubov <[email protected]>
STx AMC8548 board is an old, AMC form factor, MPC8548 based board intended for RapidIO applications. It features 16MiB NAND flash, one DDR2 soDIMM slot, ethernet on front panel and backplane, RapidIO on backplane, USB controller on local bus (not currently enabled) and no PCI of any kind.
Signed-off-by Alex Dubov <[email protected]>
Quoted 13 lines
--- Makefile | 3 + board/stx/stxamc8548/Makefile | 51 ++++++ board/stx/stxamc8548/config.mk | 32 ++++ board/stx/stxamc8548/stxamc8548.c | 168 +++++++++++++++++++ board/stx/stxamc8548/u-boot.lds | 143 ++++++++++++++++ include/configs/stxamc8548.h | 332 +++++++++++++++++++++++++++++++++++++ 6 files changed, 729 insertions(+), 0 deletions(-) create mode 100644 board/stx/stxamc8548/Makefile create mode 100644 board/stx/stxamc8548/config.mk create mode 100644 board/stx/stxamc8548/stxamc8548.c create mode 100644 board/stx/stxamc8548/u-boot.lds create mode 100644 include/configs/stxamc8548.h
What's the difference between this patch and the previously submitted one:
Subject: [U-Boot] [PATCH 2/2] stx: add support for AMC8548 board
From: Alex Dubov <[email protected]>
Date: Tue, 4 Aug 2009 02:26:49 -0700 (PDT)
?
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 We want to create puppets that pull their own strings. - Ann Marion
PATCH 1/1 stx: add support for AMC8548 board
Quoted 25 lines · Wolfgang Denk
Dear oakad at yahoo.com,
Quoted 8 lines · In message <[email protected]> you wrote:
From: Alex Dubov <[email protected]>
STx AMC8548 board is an old, AMC form factor, MPC8548 based board intended for RapidIO applications. It features 16MiB NAND flash, one DDR2 soDIMM slot, ethernet on front panel and backplane, RapidIO on backplane, USB controller on local bus (not currently enabled) and no PCI of any kind.
Signed-off-by Alex Dubov <[email protected]>Quoted 13 lines
--- Makefile | 3 + board/stx/stxamc8548/Makefile | 51 ++++++ board/stx/stxamc8548/config.mk | 32 ++++ board/stx/stxamc8548/stxamc8548.c | 168 +++++++++++++++++++ board/stx/stxamc8548/u-boot.lds | 143 ++++++++++++++++ include/configs/stxamc8548.h | 332 +++++++++++++++++++++++++++++++++++++ 6 files changed, 729 insertions(+), 0 deletions(-) create mode 100644 board/stx/stxamc8548/Makefile create mode 100644 board/stx/stxamc8548/config.mk create mode 100644 board/stx/stxamc8548/stxamc8548.c create mode 100644 board/stx/stxamc8548/u-boot.lds create mode 100644 include/configs/stxamc8548.h
Quoted 8 lines
What's the difference between this patch and the previously submitted one:
Subject: [U-Boot] [PATCH 2/2] stx: add support for AMC8548 board
From: Alex Dubov <[email protected]>
Date: Tue, 4 Aug 2009 02:26:49 -0700 (PDT)?
It looks like the MAINTAINERS and MAKEALL entries are still missing for this board too FWIW. Hopefully the other feedback has been taken into consideration in this patch?
It'd be nice when you resubmitted patches to include "v2" in the title, eg "[PATCH v2]" and also listed what you've changed in the comments below your signed-off-by. It makes it easier for others to keep track of what the most recent patch is and what has changed between resubmissions.
Best,
Peter
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
In reply to oakad at yahoo.comDear oakad at yahoo.com,
Quoted 9 lines · In message <[email protected]> you wrote:
From: Alex Dubov <[email protected]>
Move board definition files for STx XTC, GP3 and SSA boards into common subdirectory and factor out common code.
"-mno-spe" flag common to all MPC85xx configurations does not work so change it to "-mspe=no" which does (GCC bug 37759).
Signed-off-by Alex Dubov <[email protected]>
...
board/stx/common/Makefile line 3
Quoted 7 lines
board/stx/common/Makefile renamed from board/stxgp3/Makefile +1
-1@@ -1,5 +1,5 @@ # -# (C) Copyright 2001-2006 +# (C) Copyright 2006 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
How comes?
board/stx/common/ddr.c line 6
Quoted 9 lines
board/stx/common/ddr.c renamed from board/stxssa/ddr.c +1
-0@@ -1,5 +1,6 @@/* * Copyright 2008 Freescale Semiconductor, Inc. +* Copyright 2009 Alex Dubov <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License
Please do not add a Copyright for such minor changes. Attribution for your work by the Signed-off-by: messages in the git repository should be sufficient here.
...
board/stx/common/ddr.c void fsl_ddr_board_options(memctl_options_t *popts, · line 62
Quoted 11 lines
board/stx/common/ddr.c renamed from board/stxssa/ddr.c +11
-0+* Factors to consider for clock adjust: +* - number of chips on bus +* - position of slot +* - DDR1 vs. DDR2? +* - ??? +* +* This needs to be determined on a board-by-board basis. +* 0110 3/4 cycle late +* 0111 7/8 cycle late +*/ + popts->clk_adjust =6 ;
If this "needs to be determined on a board-by-board basis" i would expect some CONFIG_SYS_* variable here, which is defined in the respective board config files?
board/stx/common/ddr.c void fsl_ddr_board_options(memctl_options_t *popts, · line 73
Quoted 5 lines
board/stx/common/ddr.c renamed from board/stxssa/ddr.c +4
-0+#if defined(CONFIG_FSL_DDR2 ) + popts->cpo_override =7 ; +#else popts->cpo_override =0 ; +#endif
Ditto - this should go to the respective board config files.
Quoted 8 lines
board/stx/common/law.c renamed from board/stxssa/law.c +0
-0
board/stx/common/law.c line 8
Quoted 10 lines
board/stx/common/law.c renamed from board/stxssa/law.c +2
-2@@ -1,9 +1,9 @@/* -* Copyright 2008 Freescale Semiconductor, Inc. -* * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd at denx.de. * +* Copyright 2009 Alex Dubov <[email protected]> +* * See file CREDITS for list of people who contributed to this * project.
NAK. Never ever delete any Copyrights. And don't add yoru own just for minor changes.
Quoted 6 lines
board/stx/common/law.c renamed from board/stxssa/law.c +0
-2@@ -31,30 +31,34 @@* LAW(Local Access Window) configuration: * * 0x0000_0000 0x7fff_ffff DDR 2G -* 0x8000_0000 0x9fff_ffff PCI1 MEM 512M -* 0xa000_0000 0xbfff_ffff PCI2 MEM 512M
board/stx/common/law.c line 40
Quoted 10 lines
board/stx/common/law.c renamed from board/stxssa/law.c +4
-3+* 0x8000_0000 0x9fff_ffff PCI1 512M +* 0xa000_0000 0xbfff_ffff PCI2 512M +* 0xc000_0000 0xdfff_ffff RapidIO 512M * 0xe000_0000 0xe000_ffff CCSR 1M * 0xe200_0000 0xe2ff_ffff PCI1 IO 16M * 0xe300_0000 0xe3ff_ffff PCI2 IO 16M -* 0xf000_0000 0xfaff_ffff Local bus 128M -* 0xfb00_0000 0xfb00_ffff Config Latch 64K -* 0xfc00_0000 0xffff_ffff FLASH (boot bank) 64M +* 0xf000_0000 0xffff_ffff LBC options + FLASH 256M
Are you sure this is correct?
Quoted 10 lines
board/stx/common/law.c renamed from board/stxssa/law.c +4
-3struct law_entry law_table[] = { -#ifndef CONFIG_SPD_EEPROM - SET_LAW(CONFIG_SYS_DDR_SDRAM_BASE, LAW_SIZE_128M, LAW_TRGT_IF_DDR), +#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),#endif - SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCI_1), +#ifdef CONFIG_SYS_PCI2_MEM_PHYS SET_LAW(CONFIG_SYS_PCI2_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCI_2),
board/stx/common/law.c line 62
Quoted 10 lines
board/stx/common/law.c renamed from board/stxssa/law.c +5
-3-SET_LAW (CONFIG_SYS_PCI1_IO_PHYS ,LAW_SIZE_16M ,LAW_TRGT_IF_PCI_1 ), SET_LAW(CONFIG_SYS_PCI2_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI_2), -/* Map the whole localbus, including flash and reset latch. */ - SET_LAW(CONFIG_SYS_LBC_OPTION_BASE, LAWAR_SIZE_256M, LAW_TRGT_IF_LBC), +#endif +#ifdef CONFIG_SYS_RIO_MEM_PHYS +SET_LAW (CONFIG_SYS_RIO_MEM_PHYS ,LAW_SIZE_512M ,LAW_TRGT_IF_RIO ), +#endif +SET_LAW (CONFIG_SYS_LBC_OPTION_BASE ,LAWAR_SIZE_256M ,LAW_TRGT_IF_LBC ) };
This looks fishy, too.
board/stx/common/tlb.c line 8
Quoted 13 lines
board/stx/common/tlb.c renamed from board/stxssa/tlb.c +2
-2@@ -1,9 +1,9 @@/* -* Copyright 2008 Freescale Semiconductor, Inc. -* * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd at denx.de. * +* Copyright 2009 Alex Dubov <[email protected]> +* * See file CREDITS for list of people who contributed to this * project.
NAK. See above.
Quoted 9 lines
board/stx/common/tlb.c renamed from board/stxssa/tlb.c +2
-1@@ -31,76 +31,90 @@ struct fsl_e_tlb_entry tlb_table[] = {SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR ,CONFIG_SYS_INIT_RAM_ADDR ,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 +4 *1024 , +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +4 *1024 , +CONFIG_SYS_INIT_RAM_ADDR +4 *1024 ,MAS3_SX |MAS3_SW |MAS3_SR ,0 , 0, 0, BOOKE_PAGESZ_4K, 0),
board/stx/common/tlb.c struct fsl_e_tlb_entry tlb_table[] = { · line 45
Quoted 10 lines
board/stx/common/tlb.c renamed from board/stxssa/tlb.c +4
-2-SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +8 *1024 ,CONFIG_SYS_INIT_RAM_ADDR +8 *1024 , +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +8 *1024 , +CONFIG_SYS_INIT_RAM_ADDR +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 +12 *1024 , +SET_TLB_ENTRY (0 ,CONFIG_SYS_INIT_RAM_ADDR +12 *1024 , +CONFIG_SYS_INIT_RAM_ADDR +12 *1024 ,MAS3_SX |MAS3_SW |MAS3_SR ,0 , 0, 0, BOOKE_PAGESZ_4K, 0),
Better split code beautifying into separate patch.
board/stx/common/tlb.c struct fsl_e_tlb_entry tlb_table[] = { · line 51
Quoted 7 lines
board/stx/common/tlb.c renamed from board/stxssa/tlb.c +2
-2/* -* TLB 0: 64M Non-cacheable, guarded -* 0xfc000000 6M4 FLASH +* TLB 0: 256M Non-cacheable, guarded +* 0xf0000000 256M LBC (FLASH included) * Out of reset this entry is only 4K. */
You mean you change the mapping for soem (or all) boards?
Quoted 11 lines
board/stx/common/tlb.c renamed from board/stxssa/tlb.c +4
-4-SET_TLB_ENTRY (1 ,CONFIG_SYS_FLASH_BASE ,CONFIG_SYS_FLASH_BASE , +SET_TLB_ENTRY (1 ,CONFIG_SYS_LBC_OPTION_BASE , +CONFIG_SYS_LBC_OPTION_BASE ,MAS3_SX |MAS3_SW |MAS3_SR ,MAS2_I |MAS2_G , - 0, 0, BOOKE_PAGESZ_64M, 1), + 0, 0, BOOKE_PAGESZ_256M, 1),/* -* TLB 1: 256M Non-cacheable, guarded -* 0x80000000 256M PCI1 MEM First half +* TLB 1: 64M Non-cacheable, guarded
board/stx/common/tlb.c struct fsl_e_tlb_entry tlb_table[] = { · line 66
Quoted 10 lines
board/stx/common/tlb.c renamed from board/stxssa/tlb.c +6
-2+* 0xe000_0000 1M CCSRBAR +* 0xe200_0000 1M PCI1 IO +* 0xe210_0000 1M PCI2 IO +* 0xe300_0000 1M PCIe IO */ -SET_TLB_ENTRY (1 ,CONFIG_SYS_PCI1_MEM_PHYS ,CONFIG_SYS_PCI1_MEM_PHYS , +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_256M, 1), + 0, 1, BOOKE_PAGESZ_64M, 1),
Hm... did you actually test these changes on all 4 boards?
cpu/mpc85xx/config.mk PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi · line 28
Quoted 10 lines
cpu/mpc85xx/config.mk +1
-1@@ -25,4 +25,4 @@ PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 \ -Wa,-me500 -msoft-float -mno-string -PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe) +PLATFORM_CPPFLAGS +=$(call cc-option,-mspe=no)
This is an unrelated change which must be submitted as a separate patch.
Quoted 13 lines
include/configs/stxgp3.h +1
-0@@ -78,6 +78,7 @@*/ #define CONFIG_SYS_LBC_SDRAM_BASE 0xf0000000/* Localbus SDRAM */ #define CONFIG_SYS_LBC_SDRAM_SIZE 256/* LBC SDRAM is 64MB */ +#define CONFIG_SYS_LBC_OPTION_BASE 0xf0000000#define CONFIG_SYS_FLASH_BASE 0xff000000/* start of FLASH 16M */ #define CONFIG_SYS_BR0_PRELIM 0xff001801/* port size 32bit */
include/configs/stxgp3.h line 202
Quoted 10 lines
include/configs/stxgp3.h +4
-3@@ -195,18 +196,20 @@/* RapdIO Map configuration, mapped 1:1. */ -#define CONFIG_SYS_RIO_MEM_BASE 0xc0000000 -#define CONFIG_SYS_RIO_MEM_PHYS CONFIG_SYS_RIO_MEM_BASE -#define CONFIG_SYS_RIO_MEM_SIZE 0x200000000/* 512 M */ +#define CONFIG_SYS_RIO_MEM_BASE 0xc0000000 +#define CONFIG_SYS_RIO_MEM_PHYS CONFIG_SYS_RIO_MEM_BASE +#define CONFIG_SYS_RIO_MEM_VIRT CONFIG_SYS_RIO_MEM_BASE +#define CONFIG_SYS_RIO_MEM_SIZE 0x200000000/* 512 M */
Please submit code cleanup as separate patch(es).
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 All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm place to shift.
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
Quoted 13 lines
Quoted 3 lines
Move board definition files for STx XTC, GP3 and SSA
boards into
Quoted 3 lines
common subdirectory and factor out common code.
"-mno-spe" flag common to all MPC85xx configurations
does not work
Quoted 1 line
so change it to "-mspe=no" which does (GCC bug
37759).
Quoted 2 lines
Signed-off-by Alex Dubov <[email protected]>...
Quoted 9 lines
Quoted 7 lines
board/stx/common/Makefile renamed from board/stxgp3/Makefile +0
-0@@ -1,5 +1,5 @@? #
board/stx/common/Makefile renamed from board/stxgp3/Makefile +1
-1-# (C) Copyright 2001-2006 +# (C) Copyright 2006? # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
How comes?
Git is confused somehow.
I don't see this change in my tree.
Quoted 48 lines
board/stx/common/Makefile line 31
Quoted 3 lines
board/stx/common/Makefile renamed from board/stxgp3/Makefile +0
-0@@ -31,30 +31,34 @@ ???* LAW(Local Access Window)configuration:
Quoted 2 lines
???*
???* 0x0000_0000????0x7fff_ffff?
???DDR? ? ? ? ?
? ? ? ? ???2GQuoted 1 line
- * 0x8000_0000?
???0x9fff_ffff? ???PCI1
MEM? ? ? ? ? ? ? ?
512MQuoted 1 line
- * 0xa000_0000?
???0xbfff_ffff? ???PCI2
MEM? ? ? ? ? ? ? ?
512MQuoted 1 line
+ * 0x8000_0000?
???0x9fff_ffff?
???PCI1? ? ? ? ?
? ? ? ? ? 512MQuoted 1 line
+ * 0xa000_0000?
???0xbfff_ffff?
???PCI2? ? ? ? ?
? ? ? ? ? 512MQuoted 1 line
+ * 0xc000_0000?
???0xdfff_ffff?
???RapidIO? ? ? ? ?
? ? ???512MQuoted 1 line
???* 0xe000_0000?
???0xe000_ffff?
???CCSR? ? ? ? ?
? ? ? ? ? 1MQuoted 1 line
???* 0xe200_0000?
???0xe2ff_ffff? ???PCI1
IO? ? ? ? ? ? ?
???16MQuoted 1 line
???* 0xe300_0000?
???0xe3ff_ffff? ???PCI2
IO? ? ? ? ? ? ?
???16MQuoted 1 line
- * 0xf000_0000?
???0xfaff_ffff? ???Local
bus? ? ? ? ? ?
???128MQuoted 1 line
- * 0xfb00_0000?
???0xfb00_ffff? ???Config
Latch? ? ? ? ? ? 64K
Quoted 8 lines
Quoted 1 line
- * 0xfc00_0000?
???0xffff_ffff? ???FLASH
(boot bank)? ? ???64MQuoted 1 line
+ * 0xf000_0000?
???0xffff_ffff? ???LBC
options + FLASH? ???256MAre you sure this is correct?
Yes, this will cover all three boards affected by the change. They all have their address maps set in similar fashion.
Quoted 31 lines
Quoted 4 lines
? struct
law_entrylaw_table[] = {
-#ifndefCONFIG_SPD_EEPROM
-??? SET_LAW(CONFIG_SYS_DDR_SDRAM_BASE,
LAW_SIZE_128M,LAW_TRGT_IF_DDR),Quoted 2 lines
+#ifdef
CONFIG_SYS_PCI1_MEM_PHYS
+??? SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS,
LAW_SIZE_512M,LAW_TRGT_IF_PCI),Quoted 1 line
+??? SET_LAW(CONFIG_SYS_PCI1_IO_PHYS,
LAW_SIZE_16M,LAW_TRGT_IF_PCI),Quoted 2 lines
? #endif
-??? SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS,
LAW_SIZE_512M,LAW_TRGT_IF_PCI_1),Quoted 2 lines
+#ifdef
CONFIG_SYS_PCI2_MEM_PHYS
? ???
SET_LAW(CONFIG_SYS_PCI2_MEM_PHYS, LAW_SIZE_512M, LAW_TRGT_IF_PCI_2),Quoted 1 line
-??? SET_LAW(CONFIG_SYS_PCI1_IO_PHYS,
LAW_SIZE_16M,LAW_TRGT_IF_PCI_1),Quoted 1 line
? ???
SET_LAW(CONFIG_SYS_PCI2_IO_PHYS, LAW_SIZE_16M, LAW_TRGT_IF_PCI_2),Quoted 1 line
-??? /* Map the whole localbus,
including flash and reset latch. */
Quoted 1 line
-???
SET_LAW(CONFIG_SYS_LBC_OPTION_BASE, LAWAR_SIZE_256M, LAW_TRGT_IF_LBC),board/stx/common/Makefile
Quoted 3 lines
board/stx/common/Makefile renamed from board/stxgp3/Makefile +3
-0+#endif +#ifdef CONFIG_SYS_RIO_MEM_PHYS +??? SET_LAW(CONFIG_SYS_RIO_MEM_PHYS,
LAW_SIZE_512M,LAW_TRGT_IF_RIO),
Quoted 7 lines
Quoted 2 lines
+#endif
+???
SET_LAW(CONFIG_SYS_LBC_OPTION_BASE, LAWAR_SIZE_256M, LAW_TRGT_IF_LBC)Quoted 1 line
? };
This looks fishy, too.
Just look at the respective boards' law.c files before the patch. They all have this entry, either called CONFIG_SYS_LBC_OPTION_BASE or CONFIG_SYS_LBC_SDRAM_BASE.
Quoted 35 lines
board/stx/common/Makefile struct fsl_e_tlb_entry tlb_table[]
Quoted 1 line
board/stx/common/Makefile renamed from board/stxgp3/Makefile +0
-0@@ -31,76 +31,90 @@ struct fsl_e_tlb_entry tlb_table[]= {
board/stx/common/Makefile struct fsl_e_tlb_entry tlb_table[] · line 31
Quoted 1 line
board/stx/common/Makefile renamed from board/stxgp3/Makefile +0
-0? ??? SET_TLB_ENTRY(0,
CONFIG_SYS_INIT_RAM_ADDR,CONFIG_SYS_INIT_RAM_ADDR,Quoted 1 line
? ??? ??? ?
? ? MAS3_SX|MAS3_SW|MAS3_SR, 0,
Quoted 1 line
? ??? ??? ?
? ? 0, 0,
BOOKE_PAGESZ_4K, 0),Quoted 1 line
-??? SET_TLB_ENTRY(0,
CONFIG_SYS_INIT_RAM_ADDR+ 4 * 1024 ,CONFIG_SYS_INIT_RAM_ADDR+ 4 * 1024,Quoted 1 line
+??? SET_TLB_ENTRY(0,
CONFIG_SYS_INIT_RAM_ADDR+ 4 * 1024,Quoted 1 line
+??? ??? ? ?
?
CONFIG_SYS_INIT_RAM_ADDR+ 4 * 1024,Quoted 1 line
? ??? ??? ?
? ? MAS3_SX|MAS3_SW|MAS3_SR, 0,
Quoted 1 line
? ??? ??? ?
? ? 0, 0,
BOOKE_PAGESZ_4K, 0),Quoted 1 line
-??? SET_TLB_ENTRY(0,
CONFIG_SYS_INIT_RAM_ADDR+ 8 * 1024 ,CONFIG_SYS_INIT_RAM_ADDR+ 8 * 1024,Quoted 1 line
+??? SET_TLB_ENTRY(0,
CONFIG_SYS_INIT_RAM_ADDR+ 8 * 1024,Quoted 1 line
+??? ??? ? ?
?
CONFIG_SYS_INIT_RAM_ADDR+ 8 * 1024,Quoted 1 line
? ??? ??? ?
? ? MAS3_SX|MAS3_SW|MAS3_SR, 0,
Quoted 1 line
? ??? ??? ?
? ? 0, 0,
BOOKE_PAGESZ_4K, 0),Quoted 1 line
-??? SET_TLB_ENTRY(0,
CONFIG_SYS_INIT_RAM_ADDR+ 12 * 1024 ,CONFIG_SYS_INIT_RAM_ADDR+ 12 * 1024,Quoted 1 line
+??? SET_TLB_ENTRY(0,
CONFIG_SYS_INIT_RAM_ADDR+ 12 * 1024,
Quoted 8 lines
Quoted 1 line
+??? ??? ? ?
?
CONFIG_SYS_INIT_RAM_ADDR+ 12 * 1024,Quoted 1 line
? ??? ??? ?
? ? MAS3_SX|MAS3_SW|MAS3_SR, 0,
Quoted 1 line
? ??? ??? ?
? ? 0, 0,
BOOKE_PAGESZ_4K, 0),Better split code beautifying into separate patch.
I wrote this file from scratch.
Git is confused here.
There's no separate patch.
Same for the other issues here and below.
Quoted 3 lines
Hm... did you actually test these changes on all 4 boards?
There are no real changes. All three boards have nearly identical configs. stxxtc is only copied around and is not affected by this (no tlbs or law there).
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
Dear Alex Dubov,
Quoted 11 lines · In message <[email protected]> you wrote:
Quoted 10 lines
Quoted 8 lines
board/stx/common/Makefile renamed from board/stxgp3/Makefile +0
-0@@ -1,5 +1,5 @@? #
board/stx/common/Makefile renamed from board/stxgp3/Makefile +1
-1-# (C) Copyright 2001-2006 +# (C) Copyright 2006? # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
How comes?
Quoted 2 lines
Git is confused somehow.
I don't see this change in my tree.
Well, the result looks wrong to me in any case.
...
Quoted 4 lines
Quoted 1 line
Are you sure this is correct?
Yes, this will cover all three boards affected by the change. They all have their address maps set in similar fashion.
Um... but that means you are actually changing the configuration for some (or all?) of them?
How much of this were you able to test?
Quoted 5 lines
Quoted 1 line
This looks fishy, too.
Just look at the respective boards'
law.cfiles before the patch. They all have this entry, either calledCONFIG_SYS_LBC_OPTION_BASEorCONFIG_SYS_LBC_SDRAM_BASE.
I was referring to the whole block of code, not only the last entry.
Quoted 8 lines
Quoted 5 lines
? ? MAS3_SX|MAS3_SW|MAS3_SR, 0,
Quoted 1 line
? ??? ??? ?
? ? 0, 0,
BOOKE_PAGESZ_4K, 0),Better split code beautifying into separate patch.
I wrote this file from scratch.
Git is confused here.
Hm... git notices high similarity of this file with existing code:
rename board/{stxssa => stx/common}/tlb.c (59%)Quoted 2 lines
There's no separate patch.
Same for the other issues here and below.
Maybe should do it as git sees it, then. Don't write new code or change existing one unless necessary.
Quoted 3 lines
Quoted 1 line
Hm... did you actually test these changes on all 4 boards?
There are no real changes. All three boards have nearly identical configs.
Hmm.. PCI initialization and memory map looks a bit different now. Or am I missing something?
Best regards,
Wolfgang Denk
Signature · 7 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 ... The things love can drive a man to -- the ecstasies, the mise- ries, the broken rules, the desperate chances, the glorious failures and the glorious victories. -- McCoy, "Requiem for Methuselah", stardate 5843.7
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
In reply to Wolfgang DenkJust a general observation: if you are not sure that tlb/law files can be safely factored out and most of the ddr.c files are actually board specific overrides (common part being less than 10 lines) why had you requested me to create a common board hierarchy for these STX boards in the first place?
For all I can see, they don't have any common, vendor specific hardware.
I still want my board supported, so I propose you decide how do you want them arranged (vendor/board/ or just board/) and I'll limit my contribution to my board's files exclusively.
After all, I don't work for Silicon Turnkey and it starts taking too much time.
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
Dear Alex Dubov,
Quoted 5 lines · In message <[email protected]> you wrote:
Just a general observation: if you are not sure that tlb/law files can be safely factored out and most of the
ddr.cfiles are actually board specific overrides (common part being less than 10 lines) why had you requested me to create a common board hierarchy for these STX boards in the first place?
I am sure that the tlb/law files can be safely factored out, but that does not mean that you can simply use one of the files and force it
upon the othe rboards. The differences between the boards must obviously been taken care of, for example by using preprocessor
variables (defined in the board config files) to describe the (tiny) differences between the boards.
I don't understand why you claim the ddr.c files were so different:
-> diff board/stxgp3/ddr.c board/stxssa/ddr.c | wc -l 0
As you can see, there is absolutely no difference between the existing ddr.c files - they are absolutely identical.
Quoted 1 line
For all I can see, they don't have any common, vendor specific hardware.
Yet the code looks very much the same, doesn't it?
Quoted 6 lines
I still want my board supported, so I propose you decide how do you want them arranged (vendor/board/ or just board/) and I'll limit my contribution to my board's files exclusively.
After all, I don't work for Silicon Turnkey and it starts taking too much time.
I can understand your position, but I am not going to accept yet another copy of the same files. When the first board gets added, it is often next to impossible to know what is common code and what is board specific. When the second board gets added, it's still difficult to decide if it's just coincidence. But when the third board attempts to add the same stuff again, then the situation is clear. It's unfortunate for you that you are triggering the needed cleanup, but that's how it works. Not only for you, but for all of us.
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
Fools ignore complexity. Pragmatists suffer it. Some can avoid it.
Geniuses remove it.
- Perlis's Programming Proverb #58, SIGPLAN Notices, Sept. 1982PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
Quoted 23 lines
Quoted 3 lines
Just a general observation: if you are not sure that
tlb/law files can be
Quoted 1 line
safely factored out and most of the
ddr.cfiles areactually board specific
Quoted 1 line
overrides (common part being less than 10 lines) why
had you requested me
Quoted 1 line
to create a common board hierarchy for these STX
boards in the first place?
I am sure that the tlb/law files can be safely factored out, but that
does not mean that you can simply use one of the files and? force? it
upon? the? othe? rboards.? The?
differences? between? the boards must obviously been taken care? of,? for?
example? by? using? preprocessor
variables? (defined in the board config files) to describe the (tiny)
differences between the boards.
Quoted 6 lines
I don't understand why you claim the
ddr.cfiles were so different:-> diff
board/stxgp3/ddr.cboard/stxssa/ddr.c| wc -l 0
How exactly I'm related to this particular issue?
My ddr.c is different due to different DDR settings overrides.
Then, there are plenty of nearly identical ddr.c/tlb.c/law.c files in the tree already (~25). Git will derive any such file from any other, because they are essentially the same.
However, the real issue here is whether you prefer a #define sprawl or having a couple of additional short files for each board in question. Until now, as I can see, the second option was preferred.
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
Dear Alex Dubov,
Quoted 4 lines · In message <[email protected]> you wrote:
However, the real issue here is whether you prefer a #define sprawl or having a couple of additional short files for each board in question. Until now, as I can see, the second option was preferred.
I explained this before. If everything goes right (i. e. if reviewers find enough time for a careful review) we will start asking questions when we see a file being added that is the more or less exact copy of an already existent one. When we have already two semi-identical copies and someone attempts to add a third, we can be sure that there is a trend, and we will ask to factor out the common parts.
Your submission triggered such a cleanup. Your patch was the straw that broke the camel's back.
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 I am more bored than you could ever possibly be. Go back to work.
PATCH 1/1 stx: create common vendor hierarchy for Silicon Turnkey boards
In reply to oakad at yahoo.comQuoted 50 lines · oakad at yahoo.com
From: Alex Dubov <[email protected]>
Move board definition files for STx XTC, GP3 and SSA boards into common subdirectory and factor out common code.
"-mno-spe" flag common to all MPC85xx configurations does not work so change it to "-mspe=no" which does (GCC bug 37759).
Signed-off-by Alex Dubov <[email protected]>---
Makefile | 6 +- board/{stxgp3 => stx/common}/Makefile | 20 +++-- board/{stxssa => stx/common}/ddr.c | 46 ++++++++--- board/{stxssa => stx/common}/law.c | 30 ++++--- board/{stxssa => stx/common}/tlb.c | 72 ++++++++++------- board/{ => stx}/stxgp3/Makefile | 3 - board/{ => stx}/stxgp3/config.mk | 0 board/{ => stx}/stxgp3/flash.c | 0 board/{ => stx}/stxgp3/stxgp3.c | 0 board/{ => stx}/stxgp3/u-boot.lds | 0 board/{ => stx}/stxssa/Makefile | 3 - board/{ => stx}/stxssa/config.mk | 0 board/{ => stx}/stxssa/stxssa.c | 0 board/{ => stx}/stxssa/u-boot.lds | 0 board/{ => stx}/stxxtc/Makefile | 0 board/{ => stx}/stxxtc/config.mk | 0 board/{ => stx}/stxxtc/stxxtc.c | 0 board/{ => stx}/stxxtc/u-boot.lds | 0 board/{ => stx}/stxxtc/u-boot.lds.debug | 0 board/stxgp3/ddr.c | 76 ------------------ board/stxgp3/law.c | 58 -------------- board/stxgp3/tlb.c | 130 ------------------------------- cpu/mpc85xx/config.mk | 2 +- include/configs/stxgp3.h | 21 +++-- include/configs/stxssa.h | 28 ++++--- 25 files changed, 135 insertions(+), 360 deletions(-)copy board/{stxgp3 => stx/common}/Makefile (82%) rename board/{stxssa =>
stx/common}/ddr.c(57%) rename board/{stxssa =>stx/common}/law.c(74%) rename board/{stxssa =>stx/common}/tlb.c(59%) rename board/{ => stx}/stxgp3/Makefile (95%) rename board/{ =>stx}/stxgp3/config.mk(100%) rename board/{ =>stx}/stxgp3/flash.c(100%) rename board/{ =>stx}/stxgp3/stxgp3.c(100%) rename board/{ =>stx}/stxgp3/u-boot.lds(100%) rename board/{ => stx}/stxssa/Makefile (95%) rename board/{ =>stx}/stxssa/config.mk(100%) rename board/{ =>stx}/stxssa/stxssa.c(100%) rename board/{ =>stx}/stxssa/u-boot.lds(100%)
Quoted 8 lines
rename board/{ => stx}/stxxtc/Makefile (100%) rename board/{ =>
stx}/stxxtc/config.mk(100%) rename board/{ =>stx}/stxxtc/stxxtc.c(100%) rename board/{ =>stx}/stxxtc/u-boot.lds(100%) rename board/{ => stx}/stxxtc/u-boot.lds.debug (100%) delete mode 100644board/stxgp3/ddr.c
delete mode 100644board/stxgp3/law.c
delete mode 100644board/stxgp3/tlb.c
Can you limit the patch that creates board/stx/ to doing just that and NOTHING else. Leave the other clean up and refactoring for other patches.
- k