Skip to contentSkip to conversation

Another patchset for STx AMC8548

U-Boot New oakad at yahoo.com 2 participants 8 messages Aug 7, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

I created a common vendor directory for STx, factored out law.c and ddr.c files, have not touched the tlb.c ones (for now) and added my AMC8548 config.

#1 lore raw

PATCH 1/4 stx: create common vendor/board hierarchy for STx boards

From: Alex Dubov <[email protected]>

Move files belonging to the STx boards into common vendor directory and update the Makefile to reflect this.

---
 Makefile                                |    6 +++---
 board/{ => stx}/stxgp3/Makefile         |    0 
 board/{ => stx}/stxgp3/config.mk        |    0 
 board/{ => stx}/stxgp3/ddr.c            |    0 
 board/{ => stx}/stxgp3/flash.c          |    0 
 board/{ => stx}/stxgp3/law.c            |    0 
 board/{ => stx}/stxgp3/stxgp3.c         |    0 
 board/{ => stx}/stxgp3/tlb.c            |    0 
 board/{ => stx}/stxgp3/u-boot.lds       |    0 
 board/{ => stx}/stxssa/Makefile         |    0 
 board/{ => stx}/stxssa/config.mk        |    0 
 board/{ => stx}/stxssa/ddr.c            |    0 
 board/{ => stx}/stxssa/law.c            |    0 
 board/{ => stx}/stxssa/stxssa.c         |    0 
 board/{ => stx}/stxssa/tlb.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 
 21 files changed, 3 insertions(+), 3 deletions(-)
 rename board/{ => stx}/stxgp3/Makefile (100%)
 rename board/{ => stx}/stxgp3/config.mk (100%)
 rename board/{ => stx}/stxgp3/ddr.c (100%)
 rename board/{ => stx}/stxgp3/flash.c (100%)
 rename board/{ => stx}/stxgp3/law.c (100%)
 rename board/{ => stx}/stxgp3/stxgp3.c (100%)
 rename board/{ => stx}/stxgp3/tlb.c (100%)
 rename board/{ => stx}/stxgp3/u-boot.lds (100%)
 rename board/{ => stx}/stxssa/Makefile (100%)
 rename board/{ => stx}/stxssa/config.mk (100%)
 rename board/{ => stx}/stxssa/ddr.c (100%)
 rename board/{ => stx}/stxssa/law.c (100%)
 rename board/{ => stx}/stxssa/stxssa.c (100%)
 rename board/{ => stx}/stxssa/tlb.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%)
Makefile +3 -3
index 54c0b67..89b2854 100644
@@ -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/stxgp3/Makefile renamed from board/stxgp3/Makefile +0 -0
similarity index 100%
rename from board/stxgp3/Makefile
rename to board/stx/stxgp3/Makefile
board/stx/stxgp3/config.mk renamed from board/stxgp3/config.mk +0 -0
similarity index 100%
rename from board/stxgp3/config.mk
rename to board/stx/stxgp3/config.mk
board/stx/stxgp3/ddr.c renamed from board/stxgp3/ddr.c +0 -0
similarity index 100%
rename from board/stxgp3/ddr.c
rename to board/stx/stxgp3/ddr.c
board/stx/stxgp3/flash.c renamed from board/stxgp3/flash.c +0 -0
similarity index 100%
rename from board/stxgp3/flash.c
rename to board/stx/stxgp3/flash.c
board/stx/stxgp3/law.c renamed from board/stxgp3/law.c +0 -0
similarity index 100%
rename from board/stxgp3/law.c
rename to board/stx/stxgp3/law.c
board/stx/stxgp3/stxgp3.c renamed from board/stxgp3/stxgp3.c +0 -0
similarity index 100%
rename from board/stxgp3/stxgp3.c
rename to board/stx/stxgp3/stxgp3.c
board/stx/stxgp3/tlb.c renamed from board/stxgp3/tlb.c +0 -0
similarity index 100%
rename from board/stxgp3/tlb.c
rename to board/stx/stxgp3/tlb.c
board/stx/stxgp3/u-boot.lds renamed from board/stxgp3/u-boot.lds +0 -0
similarity index 100%
rename from board/stxgp3/u-boot.lds
rename to board/stx/stxgp3/u-boot.lds
board/stx/stxssa/Makefile renamed from board/stxssa/Makefile +0 -0
similarity index 100%
rename from board/stxssa/Makefile
rename to board/stx/stxssa/Makefile
board/stx/stxssa/config.mk renamed from board/stxssa/config.mk +0 -0
similarity index 100%
rename from board/stxssa/config.mk
rename to board/stx/stxssa/config.mk
board/stx/stxssa/ddr.c renamed from board/stxssa/ddr.c +0 -0
similarity index 100%
rename from board/stxssa/ddr.c
rename to board/stx/stxssa/ddr.c
board/stx/stxssa/law.c renamed from board/stxssa/law.c +0 -0
similarity index 100%
rename from board/stxssa/law.c
rename to board/stx/stxssa/law.c
board/stx/stxssa/stxssa.c renamed from board/stxssa/stxssa.c +0 -0
similarity index 100%
rename from board/stxssa/stxssa.c
rename to board/stx/stxssa/stxssa.c
board/stx/stxssa/tlb.c renamed from board/stxssa/tlb.c +0 -0
similarity index 100%
rename from board/stxssa/tlb.c
rename to board/stx/stxssa/tlb.c
board/stx/stxssa/u-boot.lds renamed from board/stxssa/u-boot.lds +0 -0
similarity index 100%
rename from board/stxssa/u-boot.lds
rename to board/stx/stxssa/u-boot.lds
board/stx/stxxtc/Makefile renamed from board/stxxtc/Makefile +0 -0
similarity index 100%
rename from board/stxxtc/Makefile
rename to board/stx/stxxtc/Makefile
board/stx/stxxtc/config.mk renamed from board/stxxtc/config.mk +0 -0
similarity index 100%
rename from board/stxxtc/config.mk
rename to board/stx/stxxtc/config.mk
board/stx/stxxtc/stxxtc.c renamed from board/stxxtc/stxxtc.c +0 -0
similarity index 100%
rename from board/stxxtc/stxxtc.c
rename to board/stx/stxxtc/stxxtc.c
board/stx/stxxtc/u-boot.lds renamed from board/stxxtc/u-boot.lds +0 -0
similarity index 100%
rename from board/stxxtc/u-boot.lds
rename to board/stx/stxxtc/u-boot.lds
board/stx/stxxtc/u-boot.lds.debug renamed from board/stxxtc/u-boot.lds.debug +0 -0
similarity index 100%
rename from board/stxxtc/u-boot.lds.debug
rename to board/stx/stxxtc/u-boot.lds.debug
Signature · 1 line
1.5.6.4
#2 lore raw

PATCH 2/4 stx: factor out LAW settings common for all STx boards

From: Alex Dubov <[email protected]>

All STx boards follow common convention for LAW region assignment.

---
 board/stx/common/Makefile          |   54 +++++++++++++++++++++++++++++++++
 board/stx/{stxssa => common}/law.c |   22 ++++++++-----
 board/stx/stxgp3/Makefile          |    1 -
 board/stx/stxgp3/law.c             |   58 ------------------------------------
 board/stx/stxssa/Makefile          |    1 -
 include/configs/stxgp3.h           |    3 +-
 6 files changed, 69 insertions(+), 70 deletions(-)
 create mode 100644 board/stx/common/Makefile
 rename board/stx/{stxssa => common}/law.c (81%)
 delete mode 100644 board/stx/stxgp3/law.c
board/stx/common/Makefile new file +54 -0
new file mode 100644
index 0000000..73c6e46
@@ -0,0 +1,54 @@
+#
+# (C) Copyright 2006
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)board/$(VENDOR)/common)
+endif
+
+LIB	= $(obj)lib$(VENDOR).a
+
+COBJS-${CONFIG_MPC85xx} += law.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS-y))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+	rm -f $(SOBJS) $(OBJS)
+
+distclean:	clean
+	rm -f $(LIB) core *.bak $(obj).depend
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/stx/common/law.c renamed from board/stx/stxssa/law.c +13 -9
similarity index 81%
rename from board/stx/stxssa/law.c
rename to board/stx/common/law.c
index 55dde66..4c2f97a 100644
@@ -33,28 +33,32 @@
  * 0x0000_0000     0x7fff_ffff     DDR                     2G
  * 0x8000_0000     0x9fff_ffff     PCI1 MEM                512M
  * 0xa000_0000     0xbfff_ffff     PCI2 MEM                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/stxgp3/Makefile +0 -1
index 5a68f11..0aae375 100644
@@ -26,7 +26,6 @@ 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
board/stx/stxgp3/law.c deleted +0 -58

58 lines not on this page · raw message

board/stx/stxssa/Makefile +0 -1
index 9ab41ec..432d4b4 100644
@@ -26,7 +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
 
include/configs/stxgp3.h +2 -1
index 0424e29..7954d8f 100644
@@ -76,7 +76,8 @@
  * This address, however, is used to configure a 256M local bus
  * window that includes the Config latch below.
  */
-#define CONFIG_SYS_LBC_SDRAM_BASE      0xf0000000      /* Localbus SDRAM */
+#define CONFIG_SYS_LBC_OPTION_BASE 0xf0000000
+#define CONFIG_SYS_LBC_SDRAM_BASE  CONFIG_SYS_LBC_OPTION_BASE /* Localbus SDRAM */
 #define CONFIG_SYS_LBC_SDRAM_SIZE	256		/* LBC SDRAM is 64MB	*/
 
 #define CONFIG_SYS_FLASH_BASE        0xff000000      /* start of FLASH 16M    */
Signature · 1 line
1.5.6.4
#3 lore raw

PATCH 3/4 stx: factor out common DIMM enumeration code

From: Alex Dubov <[email protected]>

Board specific ddr options are moved to the main board configuration file. Common DIMM enumeration code is factored out.

---
 board/stx/common/Makefile |    1 +
 board/stx/common/ddr.c    |   43 +++++++++++++++++++++++++
 board/stx/stxgp3/Makefile |    1 -
 board/stx/stxgp3/ddr.c    |   76 ---------------------------------------------
 board/stx/stxgp3/stxgp3.c |   33 +++++++++++++++++++
 board/stx/stxssa/Makefile |    1 -
 board/stx/stxssa/ddr.c    |   76 ---------------------------------------------
 board/stx/stxssa/stxssa.c |   33 +++++++++++++++++++
 8 files changed, 110 insertions(+), 154 deletions(-)
 create mode 100644 board/stx/common/ddr.c
 delete mode 100644 board/stx/stxgp3/ddr.c
 delete mode 100644 board/stx/stxssa/ddr.c
board/stx/common/Makefile +1 -0
index 73c6e46..b80570c 100644
@@ -30,6 +30,7 @@ endif
 LIB	= $(obj)lib$(VENDOR).a
 
 COBJS-${CONFIG_MPC85xx} += law.o
+COBJS-${CONFIG_MPC85xx} += ddr.o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS-y))
board/stx/common/ddr.c new file +43 -0

43 lines not on this page · raw message

board/stx/stxgp3/Makefile +0 -1
index 0aae375..528fa2a 100644
@@ -28,7 +28,6 @@ LIB	= $(obj)lib$(BOARD).a
 COBJS-y	+= $(BOARD).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/ddr.c deleted +0 -76

76 lines not on this page · raw message

board/stx/stxgp3/stxgp3.c +33 -0
index 3804fe0..3f626c1 100644
@@ -35,6 +35,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
 #include <ioports.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
@@ -307,6 +308,38 @@ initdram (int board_type)
 	return dram_size;
 }
 
+void fsl_ddr_board_options(memctl_options_t *popts, dimm_params_t *pdimm,
+			   unsigned int ctrl_num)
+{
+	/*
+	 * Factors to consider for CPO:
+	 *      - frequency
+	 *      - ddr1 vs. ddr2
+	 */
+	popts->cpo_override = 0;
+
+	/*
+	 * Factors to consider for write data delay:
+	 *      - number of DIMMs
+	 *
+	 * 1 = 1/4 clock delay
+	 * 2 = 1/2 clock delay
+	 * 3 = 3/4 clock delay
+	 * 4 = 1   clock delay
+	 * 5 = 5/4 clock delay
+	 * 6 = 3/2 clock delay
+	 */
+	popts->write_data_delay = 3;
+
+	/* 2T timing enable */
+	popts->twoT_en = 1;
+
+	/*
+	 * Factors to consider for half-strength driver enable:
+	 *      - number of DIMMs installed
+	 */
+	popts->half_strength_driver_enable = 0;
+}
 
 #if defined(CONFIG_SYS_DRAM_TEST)
 int testdram (void)
board/stx/stxssa/Makefile +0 -1
index 432d4b4..d05a72b 100644
@@ -27,7 +27,6 @@ LIB	= $(obj)lib$(BOARD).a
 
 COBJS-y	+= $(BOARD).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/ddr.c deleted +0 -76

76 lines not on this page · raw message

board/stx/stxssa/stxssa.c +33 -0
index 73dddf3..a00087d 100644
@@ -35,6 +35,7 @@
 #include <asm/mmu.h>
 #include <asm/immap_85xx.h>
 #include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
 #include <ioports.h>
 #include <asm/io.h>
 #include <spd_sdram.h>
@@ -324,6 +325,38 @@ initdram (int board_type)
 	return dram_size;
 }
 
+void fsl_ddr_board_options(memctl_options_t *popts, dimm_params_t *pdimm,
+			   unsigned int ctrl_num)
+{
+	/*
+	 * Factors to consider for CPO:
+	 *      - frequency
+	 *      - ddr1 vs. ddr2
+	 */
+	popts->cpo_override = 0;
+
+	/*
+	 * Factors to consider for write data delay:
+	 *      - number of DIMMs
+	 *
+	 * 1 = 1/4 clock delay
+	 * 2 = 1/2 clock delay
+	 * 3 = 3/4 clock delay
+	 * 4 = 1   clock delay
+	 * 5 = 5/4 clock delay
+	 * 6 = 3/2 clock delay
+	 */
+	popts->write_data_delay = 3;
+
+	/* 2T timing enable */
+	popts->twoT_en = 1;
+
+	/*
+	 * Factors to consider for half-strength driver enable:
+	 *      - number of DIMMs installed
+	 */
+	popts->half_strength_driver_enable = 0;
+}
 
 #if defined(CONFIG_SYS_DRAM_TEST)
 int testdram (void)
Signature · 1 line
1.5.6.4
#4 lore raw

PATCH 4/4 stx: add support for STx amc8548 board

From: Alex Dubov <[email protected]>

This board, intended for RapidIO development, has following features:
* RapidIO interface to backplane
* No PCI
* USB controller on LBC (not currently enabled)
* 16MiB Spansion flash
* one soDIMM DDR2 slot

Environment is set to its own, smaller eraseblock near the end of FLASH chip.

---
 MAINTAINERS                       |    4 +
 Makefile                          |    3 +
 board/stx/common/ddr.c            |   11 +-
 board/stx/stxamc8548/Makefile     |   52 ++++++
 board/stx/stxamc8548/config.mk    |   32 ++++
 board/stx/stxamc8548/stxamc8548.c |  215 ++++++++++++++++++++++++
 board/stx/stxamc8548/tlb.c        |   84 +++++++++
 board/stx/stxamc8548/u-boot.lds   |  152 +++++++++++++++++
 include/configs/stxamc8548.h      |  334 +++++++++++++++++++++++++++++++++++++
 9 files changed, 886 insertions(+), 1 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/tlb.c
 create mode 100644 board/stx/stxamc8548/u-boot.lds
 create mode 100644 include/configs/stxamc8548.h
MAINTAINERS +4 -0
index 620604c..b5931a4 100644
@@ -292,6 +292,10 @@ Dan Malek <[email protected]>
 	stxssa		MPC85xx
 	stxxtc		MPC8xx
 
+Alex Dubov <[email protected]>
+
+	stxamc8548	MPC85xx
+
 Eran Man <[email protected]>
 
 	EVB64260_750CX	MPC750CX
Makefile +3 -0
index 89b2854..8639eb7 100644
@@ -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/common/ddr.c +10 -1
index 401f632..e4a2b5e 100644
@@ -12,12 +12,21 @@
 #include <asm/fsl_ddr_sdram.h>
 #include <asm/fsl_ddr_dimm_params.h>
 
+#if defined(CONFIG_FSL_DDR2)
+static void
+get_spd(ddr2_spd_eeprom_t *spd, unsigned char i2c_address)
+{
+	i2c_read(i2c_address, 0, 1, (uchar *)spd, sizeof(ddr2_spd_eeprom_t));
+}
+#elif defined(CONFIG_FSL_DDR1)
 static void
 get_spd(ddr1_spd_eeprom_t *spd, unsigned char i2c_address)
 {
 	i2c_read(i2c_address, 0, 1, (uchar *)spd, sizeof(ddr1_spd_eeprom_t));
 }
-
+#else
+#error DDR type is not defined
+#endif
 
 unsigned int
 fsl_ddr_get_mem_data_rate(void)
board/stx/stxamc8548/Makefile new file +52 -0

52 lines not on this page · raw message

board/stx/stxamc8548/config.mk new file +32 -0
new file mode 100644
index 0000000..923828b
@@ -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 +215 -0

215 lines not on this page · raw message

board/stx/stxamc8548/tlb.c new file +84 -0

84 lines not on this page · raw message

board/stx/stxamc8548/u-boot.lds new file +152 -0

152 lines not on this page · raw message

include/configs/stxamc8548.h new file +334 -0

334 lines not on this page · raw message

Signature · 1 line
1.5.6.4
#5 lore raw

PATCH 4/4 stx: add support for STx amc8548 board

Quoted 26 lines · oakad at yahoo.com

From: Alex Dubov <[email protected]>

This board, intended for RapidIO development, has following features:
* RapidIO interface to backplane
* No PCI
* USB controller on LBC (not currently enabled)
* 16MiB Spansion flash
* one soDIMM DDR2 slot

Environment is set to its own, smaller eraseblock near the end of FLASH
chip.

---

MAINTAINERS                       |    4 +
Makefile                          |    3 +
board/stx/common/ddr.c            |   11 +-
board/stx/stxamc8548/Makefile     |   52 ++++++
board/stx/stxamc8548/config.mk    |   32 ++++
board/stx/stxamc8548/stxamc8548.c |  215 ++++++++++++++++++++++++
board/stx/stxamc8548/tlb.c        |   84 +++++++++
board/stx/stxamc8548/u-boot.lds   |  152 +++++++++++++++++
include/configs/stxamc8548.h      |  334 ++++++++++++++++++++++++++++ 
+++++++++
9 files changed, 886 insertions(+), 1 deletions(-)
Quoted 6 lines

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/tlb.c create mode 100644 board/stx/stxamc8548/u-boot.lds create mode 100644 include/configs/stxamc8548.h

Please add the new board to MAKEALL.

Quoted 29 lines
board/stx/stxamc8548/ renamed from board/stx/stxamc8548/config.mk +0 -0

config.mk
new file mode 100644
index 0000000..923828b

board/stx/stxamc8548/config.mk new file +22 -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
+#
+

board/stx/stxamc8548/config.mk line 32

Quoted 10 lines
board/stx/stxamc8548/config.mk new file +10 -0
+#
+# 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

these PLATFORM_CPPFLAGS are not needed, please don't add them.

#6 lore raw

PATCH 3/4 stx: factor out common DIMM enumeration code

In reply to oakad at yahoo.com
Quoted 30 lines · oakad at yahoo.com

From: Alex Dubov <[email protected]>

Board specific ddr options are moved to the main board configuration file.
Common DIMM enumeration code is factored out.

---

board/stx/common/Makefile |    1 +
board/stx/common/ddr.c    |   43 +++++++++++++++++++++++++
board/stx/stxgp3/Makefile |    1 -
board/stx/stxgp3/ddr.c    |   76  
---------------------------------------------
board/stx/stxgp3/stxgp3.c |   33 +++++++++++++++++++
board/stx/stxssa/Makefile |    1 -
board/stx/stxssa/ddr.c    |   76  
---------------------------------------------
board/stx/stxssa/stxssa.c |   33 +++++++++++++++++++
8 files changed, 110 insertions(+), 154 deletions(-)

create mode 100644 board/stx/common/ddr.c
delete mode 100644 board/stx/stxgp3/ddr.c
delete mode 100644 board/stx/stxssa/ddr.c

board/stx/common/Makefile +0 -0
index 73c6e46..b80570c 100644
@@ -30,6 +30,7 @@ endif

LIB = $(obj)lib$(VENDOR).a

Quoted 2 lines

COBJS-${CONFIG_MPC85xx} += law.o
+COBJS-${CONFIG_MPC85xx} += ddr.o

keep this in alphabetic order

Quoted 6 lines

SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS-y))

board/stx/common/ddr.c new file +0 -0
new file mode 100644
index 0000000..401f632
Applied
#7 lore raw

PATCH 1/4 stx: create common vendor/board hierarchy for STx boards

In reply to oakad at yahoo.com
Quoted 42 lines · oakad at yahoo.com

From: Alex Dubov <[email protected]>

Move files belonging to the STx boards into common vendor directory and
update the Makefile to reflect this.

---

Makefile                                |    6 +++---
board/{ => stx}/stxgp3/Makefile         |    0
board/{ => stx}/stxgp3/config.mk        |    0
board/{ => stx}/stxgp3/ddr.c            |    0
board/{ => stx}/stxgp3/flash.c          |    0
board/{ => stx}/stxgp3/law.c            |    0
board/{ => stx}/stxgp3/stxgp3.c         |    0
board/{ => stx}/stxgp3/tlb.c            |    0
board/{ => stx}/stxgp3/u-boot.lds       |    0
board/{ => stx}/stxssa/Makefile         |    0
board/{ => stx}/stxssa/config.mk        |    0
board/{ => stx}/stxssa/ddr.c            |    0
board/{ => stx}/stxssa/law.c            |    0
board/{ => stx}/stxssa/stxssa.c         |    0
board/{ => stx}/stxssa/tlb.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
21 files changed, 3 insertions(+), 3 deletions(-)

rename board/{ => stx}/stxgp3/Makefile (100%) rename board/{ => stx}/stxgp3/config.mk (100%) rename board/{ => stx}/stxgp3/ddr.c (100%) rename board/{ => stx}/stxgp3/flash.c (100%) rename board/{ => stx}/stxgp3/law.c (100%) rename board/{ => stx}/stxgp3/stxgp3.c (100%) rename board/{ => stx}/stxgp3/tlb.c (100%) rename board/{ => stx}/stxgp3/u-boot.lds (100%) rename board/{ => stx}/stxssa/Makefile (100%) rename board/{ => stx}/stxssa/config.mk (100%) rename board/{ => stx}/stxssa/ddr.c (100%) rename board/{ => stx}/stxssa/law.c (100%)

Quoted 8 lines

rename board/{ => stx}/stxssa/stxssa.c (100%) rename board/{ => stx}/stxssa/tlb.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%)

applied to 85xx next.

- k