]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
authorTom Rini <trini@ti.com>
Mon, 25 Nov 2013 15:42:13 +0000 (10:42 -0500)
committerTom Rini <trini@ti.com>
Mon, 25 Nov 2013 15:42:13 +0000 (10:42 -0500)
293 files changed:
MAKEALL
Makefile
README
api/Makefile
arch/arm/cpu/armv7/omap-common/clocks-common.c
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
arch/arm/cpu/armv7/omap3/board.c
arch/arm/cpu/armv7/omap3/clock.c
arch/arm/cpu/armv7/rmobile/Makefile
arch/arm/include/asm/arch-am33xx/i2c.h
arch/blackfin/cpu/os_log.c
arch/blackfin/include/asm/blackfin_local.h
arch/microblaze/cpu/u-boot.lds
arch/mips/include/asm/malta.h
arch/powerpc/cpu/Makefile [new file with mode: 0644]
arch/powerpc/cpu/mpc512x/Makefile
arch/powerpc/cpu/mpc824x/.gitignore [deleted file]
arch/powerpc/cpu/mpc824x/Makefile
arch/powerpc/cpu/mpc83xx/Makefile
arch/powerpc/cpu/mpc85xx/Makefile
arch/powerpc/cpu/mpc85xx/fdt.c
arch/powerpc/cpu/mpc85xx/liodn.c
arch/powerpc/cpu/mpc85xx/t4240_ids.c
arch/powerpc/cpu/mpc8xxx/Makefile
arch/powerpc/include/asm/config_mpc85xx.h
arch/powerpc/include/asm/immap_83xx.h
arch/powerpc/include/asm/immap_85xx.h
arch/sparc/cpu/leon3/start.S
board/LEOX/elpt860/u-boot.lds
board/LaCie/edminiv2/Makefile
board/LaCie/net2big_v2/Makefile
board/LaCie/netspace_v2/Makefile
board/LaCie/wireless_space/Makefile
board/Marvell/db64360/Makefile
board/Marvell/db64460/Makefile
board/actux1/u-boot.lds
board/actux2/u-boot.lds
board/actux3/u-boot.lds
board/altera/nios2-generic/Makefile
board/altera/nios2-generic/config.mk
board/avionic-design/medcom-wide/Makefile
board/avionic-design/plutux/Makefile
board/avionic-design/tec/Makefile
board/cogent/config.mk [deleted file]
board/cogent/dipsw.c
board/cogent/flash.c
board/cogent/lcd.c
board/cogent/mb.c
board/cogent/serial.c
board/compal/paz00/Makefile
board/compulab/cm_t35/cm_t35.c
board/compulab/common/Makefile
board/compulab/common/eeprom.h
board/compulab/trimslice/Makefile
board/davinci/da8xxevm/u-boot-spl-hawk.lds
board/dvlhost/u-boot.lds
board/emk/top5200/Makefile
board/emk/top860/Makefile
board/esd/adciop/Makefile
board/esd/apc405/Makefile
board/esd/ar405/Makefile
board/esd/ash405/Makefile
board/esd/cms700/Makefile
board/esd/cpci2dp/Makefile
board/esd/cpci405/Makefile
board/esd/cpci5200/Makefile
board/esd/cpci750/Makefile
board/esd/cpciiser4/Makefile
board/esd/dasa_sim/Makefile
board/esd/dp405/Makefile
board/esd/du405/Makefile
board/esd/hh405/Makefile
board/esd/hub405/Makefile
board/esd/ocrtc/Makefile
board/esd/pci405/Makefile
board/esd/pf5200/Makefile
board/esd/plu405/Makefile
board/esd/pmc405/Makefile
board/esd/pmc405de/Makefile
board/esd/pmc440/Makefile
board/esd/voh405/Makefile
board/esd/vom405/Makefile
board/esd/wuh405/Makefile
board/esteem192e/u-boot.lds
board/freescale/m52277evb/config.mk [deleted file]
board/freescale/m52277evb/u-boot.lds
board/freescale/m5235evb/config.mk [deleted file]
board/freescale/m53017evb/u-boot.lds
board/freescale/m54451evb/config.mk [deleted file]
board/freescale/m54455evb/config.mk [deleted file]
board/freescale/mx31ads/u-boot.lds
board/freescale/p1010rdb/README.P1010RDB-PA [moved from board/freescale/p1010rdb/README with 97% similarity]
board/freescale/p1010rdb/README.P1010RDB-PB [new file with mode: 0644]
board/freescale/t1040qds/Makefile
board/freescale/t1040qds/t1040_pbi.cfg [new file with mode: 0644]
board/freescale/t1040qds/t1040_rcw.cfg [new file with mode: 0644]
board/freescale/t104xrdb/Makefile [new file with mode: 0644]
board/freescale/t104xrdb/README [new file with mode: 0644]
board/freescale/t104xrdb/ddr.c [new file with mode: 0644]
board/freescale/t104xrdb/ddr.h [new file with mode: 0644]
board/freescale/t104xrdb/law.c [new file with mode: 0644]
board/freescale/t104xrdb/pci.c [new file with mode: 0644]
board/freescale/t104xrdb/t104xrdb.c [new file with mode: 0644]
board/freescale/t104xrdb/t104xrdb.h [new file with mode: 0644]
board/freescale/t104xrdb/tlb.c [new file with mode: 0644]
board/gaisler/gr_cpci_ax2000/config.mk
board/gaisler/gr_ep2s60/config.mk
board/gaisler/gr_xc3s_1500/config.mk
board/gaisler/grsim/config.mk
board/gaisler/grsim_leon2/config.mk
board/genietv/u-boot.lds
board/h2200/Makefile
board/hermes/u-boot.lds
board/keymile/km82xx/Makefile
board/keymile/km83xx/Makefile
board/keymile/km_arm/Makefile
board/keymile/kmp204x/Makefile
board/kmc/kzm9g/kzm9g.c
board/kup/kup4k/Makefile
board/kup/kup4x/Makefile
board/logicpd/am3517evm/am3517evm.c
board/matrix_vision/mvsmr/u-boot.lds
board/mpl/mip405/Makefile
board/mpl/pati/Makefile
board/mpl/pip405/Makefile
board/mpl/vcma9/Makefile
board/mvblue/u-boot.lds
board/nvidia/beaver/Makefile
board/nvidia/ventana/Makefile
board/overo/overo.c
board/phytec/pcm051/board.c
board/prodrive/p3mx/Makefile
board/psyent/pci5441/Makefile
board/psyent/pci5441/config.mk
board/psyent/pk1c20/Makefile
board/psyent/pk1c20/config.mk
board/rbc823/u-boot.lds
board/renesas/ecovec/ecovec.c
board/sandburst/karef/Makefile
board/sandburst/metrobox/Makefile
board/siemens/common/board.c
board/siemens/dxr2/Makefile
board/siemens/pxm2/Makefile
board/siemens/rut/Makefile
board/spd8xx/u-boot.lds
board/svm_sc8xx/u-boot.lds
board/ti/am335x/board.c
board/ti/am335x/u-boot.lds
board/ti/am3517crane/am3517crane.c
board/ti/beagle/Makefile
board/ti/evm/evm.c
board/toradex/colibri_t20_iris/Makefile
board/tqc/tqm5200/Makefile
board/tqc/tqm8260/Makefile
board/tqc/tqm8272/Makefile
board/tqc/tqm8xx/u-boot.lds
board/vpac270/u-boot-spl.lds
board/xilinx/ppc405-generic/Makefile
board/xilinx/ppc440-generic/Makefile
boards.cfg
common/Makefile
common/cmd_eeprom.c
common/hash.c
config.mk
doc/README.p1010rdb [deleted file]
doc/README.scrapyard
drivers/Makefile
drivers/bios_emulator/Makefile
drivers/fpga/Makefile
drivers/i2c/Makefile
drivers/i2c/designware_i2c.c
drivers/i2c/mxs_i2c.c
drivers/i2c/omap1510_i2c.c [deleted file]
drivers/i2c/omap24xx_i2c.c
drivers/i2c/sh_i2c.c
drivers/i2c/zynq_i2c.c
drivers/misc/gpio_led.c
drivers/net/fm/Makefile
drivers/net/npe/Makefile
drivers/qe/Makefile
drivers/tpm/Makefile
drivers/tpm/tis_i2c.c [deleted file]
examples/api/Makefile
examples/standalone/Makefile
examples/standalone/eepro100_eeprom.c [deleted file]
fs/Makefile
fs/cbfs/Makefile
fs/cramfs/Makefile
fs/ext4/Makefile
fs/fdos/Makefile
fs/jffs2/Makefile
fs/reiserfs/Makefile
fs/sandbox/Makefile
fs/ubifs/Makefile
fs/yaffs2/Makefile
fs/zfs/Makefile
include/configs/T1040QDS.h
include/configs/T1040RDB.h [new file with mode: 0644]
include/configs/T1042RDB_PI.h [new file with mode: 0644]
include/configs/am335x_evm.h
include/configs/am3517_crane.h
include/configs/am3517_evm.h
include/configs/bct-brettl2.h
include/configs/bf533-stamp.h
include/configs/bf537-pnav.h
include/configs/bf537-stamp.h
include/configs/bf538f-ezkit.h
include/configs/cm-bf537e.h
include/configs/cm-bf537u.h
include/configs/cm_t35.h
include/configs/devkit8000.h
include/configs/dig297.h
include/configs/dnp5370.h
include/configs/ecovec.h
include/configs/highbank.h
include/configs/ibf-dsp561.h
include/configs/kzm9g.h
include/configs/malta.h
include/configs/mcx.h
include/configs/mx51_efikamx.h
include/configs/nokia_rx51.h
include/configs/omap3_beagle.h
include/configs/omap3_evm_common.h
include/configs/omap3_igep00x0.h
include/configs/omap3_logic.h
include/configs/omap3_mvblx.h
include/configs/omap3_overo.h
include/configs/omap3_pandora.h
include/configs/omap3_sdp3430.h
include/configs/omap3_zoom1.h
include/configs/omap3_zoom2.h
include/configs/origen.h
include/configs/pcm051.h
include/configs/siemens-am33x-common.h
include/configs/smdkv310.h
include/configs/snowball.h
include/configs/socfpga_cyclone5.h
include/configs/spieval.h [deleted file]
include/configs/tam3517-common.h
include/configs/tcm-bf537.h
include/configs/ti_armv7_common.h
include/configs/tricorder.h
include/configs/u8500_href.h
include/configs/zynq.h
lib/Makefile
lib/lzma/Makefile
lib/lzo/Makefile
lib/rsa/Makefile
lib/zlib/Makefile
nand_spl/board/amcc/acadia/Makefile
nand_spl/board/amcc/bamboo/Makefile
nand_spl/board/amcc/canyonlands/Makefile
nand_spl/board/amcc/kilauea/Makefile
nand_spl/board/amcc/sequoia/Makefile
nand_spl/board/freescale/mpc8315erdb/Makefile
nand_spl/board/freescale/mpc8536ds/Makefile
nand_spl/board/freescale/mpc8569mds/Makefile
nand_spl/board/freescale/mpc8572ds/Makefile
nand_spl/board/freescale/p1023rds/Makefile
nand_spl/board/freescale/p1_p2_rdb/Makefile
nand_spl/board/sheldon/simpc8313/Makefile
post/board/lwmon/Makefile
post/board/lwmon5/Makefile
post/board/netta/Makefile
post/board/pdm360ng/Makefile
post/cpu/mpc83xx/Makefile
post/cpu/mpc8xx/Makefile
post/cpu/ppc4xx/Makefile
post/drivers/Makefile
post/lib_powerpc/Makefile
post/lib_powerpc/fpu/Makefile
scripts/Makefile.build
spl/Makefile
tools/buildman/README
tools/buildman/board.py
tools/gdb/Makefile
tools/imls/Makefile [deleted file]
tools/imls/README [deleted file]
tools/imls/imls.c [deleted file]
tools/patman/README
tools/patman/commit.py
tools/patman/patchstream.py
tools/updater/Makefile [deleted file]
tools/updater/cmd_flash.c [deleted file]
tools/updater/ctype.c [deleted file]
tools/updater/dummy.c [deleted file]
tools/updater/flash.c [deleted file]
tools/updater/flash_hw.c [deleted file]
tools/updater/junk [deleted file]
tools/updater/ppcstring.S [deleted file]
tools/updater/string.c [deleted file]
tools/updater/update.c [deleted file]
tools/updater/utils.c [deleted file]

diff --git a/MAKEALL b/MAKEALL
index 80cd4f83e9bda5583b5522120c39e2fd52dbf86d..a74f0fcead8771bf3bb8210273a280fe00f6203e 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -18,6 +18,7 @@ usage()
          -c CPU,    --cpu CPU         Build all boards with cpu CPU
          -v VENDOR, --vendor VENDOR   Build all boards with vendor VENDOR
          -s SOC,    --soc SOC         Build all boards with soc SOC
+         -b BOARD,  --board BOARD     Build all boards with board name BOARD
          -l,        --list            List all targets to be built
          -m,        --maintainers     List all targets and maintainer email
          -M,        --mails           List all targets and all affilated emails
@@ -59,8 +60,8 @@ usage()
        exit ${ret}
 }
 
-SHORT_OPTS="ha:c:v:s:lmMCnr"
-LONG_OPTS="help,arch:,cpu:,vendor:,soc:,list,maintainers,mails,check,continue,rebuild-errors"
+SHORT_OPTS="ha:c:v:s:b:lmMCnr"
+LONG_OPTS="help,arch:,cpu:,vendor:,soc:,board:,list,maintainers,mails,check,continue,rebuild-errors"
 
 # Option processing based on util-linux-2.13/getopt-parse.bash
 
@@ -121,6 +122,17 @@ while true ; do
                fi
                SELECTED='y'
                shift 2 ;;
+       -b|--board)
+               # echo "Option BOARD: argument \`$2'"
+               if [ "$opt_b" ] ; then
+                       opt_b="${opt_b%)} || \$6 == \"$2\" || \$7 == \"$2\")"
+               else
+                       # We need to check the 7th field too
+                       # for boards whose 6th field is "-"
+                       opt_b="(\$6 == \"$2\" || \$7 == \"$2\")"
+               fi
+               SELECTED='y'
+               shift 2 ;;
        -C|--check)
                CHECK='C=1'
                shift ;;
@@ -158,6 +170,7 @@ FILTER="\$1 !~ /^#/"
 [ "$opt_c" ] && FILTER="${FILTER} && $opt_c"
 [ "$opt_s" ] && FILTER="${FILTER} && $opt_s"
 [ "$opt_v" ] && FILTER="${FILTER} && $opt_v"
+[ "$opt_b" ] && FILTER="${FILTER} && $opt_b"
 
 if [ "$SELECTED" ] ; then
        SELECTED=$(awk '('"$FILTER"') { print $7 }' boards.cfg)
index 1f499c5ec877173aaeec70263860a3cca89b43ea..52133a54345eb3829351aa92f294290e89b7a39a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -65,11 +65,9 @@ endif
 # the object files are placed in the source directory.
 #
 
-ifdef O
 ifeq ("$(origin O)", "command line")
 BUILD_DIR := $(O)
 endif
-endif
 
 # Call a source code checker (by default, "sparse") as part of the
 # C compilation.
@@ -138,7 +136,6 @@ unexport CDPATH
 # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC
 # is "yes"), so compile examples after U-Boot is compiled.
 SUBDIR_TOOLS = tools
-SUBDIR_EXAMPLES = examples/standalone examples/api
 SUBDIRS = $(SUBDIR_TOOLS)
 
 .PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE)
@@ -152,8 +149,10 @@ all:
 sinclude $(obj)include/autoconf.mk.dep
 sinclude $(obj)include/autoconf.mk
 
+SUBDIR_EXAMPLES-y := examples/standalone
+SUBDIR_EXAMPLES-$(CONFIG_API) += examples/api
 ifndef CONFIG_SANDBOX
-SUBDIRS += $(SUBDIR_EXAMPLES)
+SUBDIRS += $(SUBDIR_EXAMPLES-y)
 endif
 
 # load ARCH, BOARD, and CPU configuration
@@ -231,87 +230,66 @@ OBJS := $(addprefix $(obj),$(OBJS))
 
 HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile),y,n)
 
-LIBS-y += lib/libgeneric.o
-LIBS-y += lib/rsa/librsa.o
-LIBS-y += lib/lzma/liblzma.o
-LIBS-y += lib/lzo/liblzo.o
-LIBS-y += lib/zlib/libz.o
-LIBS-$(CONFIG_TIZEN) += lib/tizen/libtizen.o
-LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o
-LIBS-y += $(CPUDIR)/lib$(CPU).o
+LIBS-y += lib/
+LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
+LIBS-y += $(CPUDIR)/
 ifdef SOC
-LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
-endif
-ifeq ($(CPU),ixp)
-LIBS-y += drivers/net/npe/libnpe.o
-endif
-LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o
-LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
-LIBS-y += fs/libfs.o \
-       fs/fat/libfat.o
-LIBS-y += net/libnet.o
-LIBS-y += disk/libdisk.o
-LIBS-y += drivers/libdrivers.o
-LIBS-y += drivers/dma/libdma.o
-LIBS-y += drivers/gpio/libgpio.o
-LIBS-y += drivers/i2c/libi2c.o
-LIBS-y += drivers/input/libinput.o
-LIBS-y += drivers/mmc/libmmc.o
-LIBS-y += drivers/mtd/libmtd.o
-LIBS-y += drivers/mtd/nand/libnand.o
-LIBS-y += drivers/mtd/onenand/libonenand.o
-LIBS-y += drivers/mtd/ubi/libubi.o
-LIBS-y += drivers/mtd/spi/libspi_flash.o
-LIBS-y += drivers/net/libnet.o
-LIBS-y += drivers/net/phy/libphy.o
-LIBS-y += drivers/pci/libpci.o
-LIBS-y += drivers/power/libpower.o \
-       drivers/power/fuel_gauge/libfuel_gauge.o \
-       drivers/power/mfd/libmfd.o \
-       drivers/power/pmic/libpmic.o \
-       drivers/power/battery/libbattery.o
-LIBS-y += drivers/spi/libspi.o
-ifeq ($(CPU),mpc83xx)
-LIBS-y += drivers/qe/libqe.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
-ifeq ($(CPU),mpc85xx)
-LIBS-y += drivers/qe/libqe.o
-LIBS-y += drivers/net/fm/libfm.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
-ifeq ($(CPU),mpc86xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
-LIBS-y += drivers/serial/libserial.o
-LIBS-y += drivers/usb/eth/libusb_eth.o
-LIBS-y += drivers/usb/gadget/libusb_gadget.o
-LIBS-y += drivers/usb/host/libusb_host.o
-LIBS-y += drivers/usb/musb/libusb_musb.o
-LIBS-y += drivers/usb/musb-new/libusb_musb-new.o
-LIBS-y += drivers/usb/phy/libusb_phy.o
-LIBS-y += drivers/usb/ulpi/libusb_ulpi.o
-LIBS-y += common/libcommon.o
-LIBS-y += lib/libfdt/libfdt.o
-LIBS-y += api/libapi.o
-LIBS-y += post/libpost.o
-LIBS-y += test/libtest.o
+LIBS-y += $(CPUDIR)/$(SOC)/
+endif
+LIBS-$(CONFIG_IXP4XX_NPE) += drivers/net/npe/
+LIBS-$(CONFIG_OF_EMBED) += dts/
+LIBS-y += arch/$(ARCH)/lib/
+LIBS-y += fs/
+LIBS-y += net/
+LIBS-y += disk/
+LIBS-y += drivers/
+LIBS-y += drivers/dma/
+LIBS-y += drivers/gpio/
+LIBS-y += drivers/i2c/
+LIBS-y += drivers/input/
+LIBS-y += drivers/mmc/
+LIBS-y += drivers/mtd/
+LIBS-y += drivers/mtd/nand/
+LIBS-y += drivers/mtd/onenand/
+LIBS-y += drivers/mtd/ubi/
+LIBS-y += drivers/mtd/spi/
+LIBS-y += drivers/net/
+LIBS-y += drivers/net/phy/
+LIBS-y += drivers/pci/
+LIBS-y += drivers/power/ \
+       drivers/power/fuel_gauge/ \
+       drivers/power/mfd/ \
+       drivers/power/pmic/ \
+       drivers/power/battery/
+LIBS-y += drivers/spi/
+LIBS-$(CONFIG_FMAN_ENET) += drivers/net/fm/
+LIBS-y += drivers/serial/
+LIBS-y += drivers/usb/eth/
+LIBS-y += drivers/usb/gadget/
+LIBS-y += drivers/usb/host/
+LIBS-y += drivers/usb/musb/
+LIBS-y += drivers/usb/musb-new/
+LIBS-y += drivers/usb/phy/
+LIBS-y += drivers/usb/ulpi/
+LIBS-y += common/
+LIBS-y += lib/libfdt/
+LIBS-$(CONFIG_API) += api/
+LIBS-y += post/
+LIBS-y += test/
 
 ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610))
-LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
+LIBS-y += arch/$(ARCH)/imx-common/
 endif
 
-LIBS-$(CONFIG_ARM) += arch/arm/cpu/libcpu.o
+LIBS-$(CONFIG_ARM) += arch/arm/cpu/
+LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/
+
+LIBS-y += board/$(BOARDDIR)/
 
+LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y))
 LIBS := $(addprefix $(obj),$(sort $(LIBS-y)))
 .PHONY : $(LIBS)
 
-LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o
-LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
-
 # Add GCC lib
 ifdef USE_PRIVATE_LIBGCC
 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
@@ -335,7 +313,7 @@ LDPPFLAGS += \
          sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
 
 __OBJS := $(subst $(obj),,$(OBJS))
-__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
+__LIBS := $(subst $(obj),,$(LIBS))
 
 #########################################################################
 #########################################################################
@@ -380,7 +358,7 @@ endif
 
 build := -f $(TOPDIR)/scripts/Makefile.build -C
 
-all:           $(ALL-y) $(SUBDIR_EXAMPLES)
+all:           $(ALL-y) $(SUBDIR_EXAMPLES-y)
 
 $(obj)u-boot.dtb:      checkdtc $(obj)u-boot
                $(MAKE) $(build) dts binary
@@ -549,7 +527,7 @@ GEN_UBOOT = \
 endif
 
 $(obj)u-boot:  depend \
-               $(SUBDIR_TOOLS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
+               $(SUBDIR_TOOLS) $(OBJS) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds
                $(GEN_UBOOT)
 ifeq ($(CONFIG_KALLSYMS),y)
                smap=`$(call SYSTEM_MAP,$(obj)u-boot) | \
@@ -564,16 +542,11 @@ $(OBJS):
 
 $(LIBS):       depend $(SUBDIR_TOOLS)
                $(MAKE) $(build) $(dir $(subst $(obj),,$@))
-               mv $(dir $@)built-in.o $@
-
-$(LIBBOARD):   depend $(LIBS)
-               $(MAKE) $(build) $(dir $(subst $(obj),,$@))
-               mv $(dir $@)built-in.o $@
 
 $(SUBDIRS):    depend
                $(MAKE) -C $@ all
 
-$(SUBDIR_EXAMPLES): $(obj)u-boot
+$(SUBDIR_EXAMPLES-y): $(obj)u-boot
 
 $(LDSCRIPT):   depend
                $(MAKE) -C $(dir $@) $(notdir $@)
@@ -593,9 +566,6 @@ $(obj)spl/u-boot-spl.bin:   $(SUBDIR_TOOLS) depend
 $(obj)tpl/u-boot-tpl.bin:      $(SUBDIR_TOOLS) depend
                $(MAKE) -C spl all CONFIG_TPL_BUILD=y
 
-updater:
-               $(MAKE) -C tools/updater all
-
 # Explicitly make _depend in subdirs containing multiple targets to prevent
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:    $(TIMESTAMP_FILE) $(VERSION_FILE) \
@@ -634,7 +604,7 @@ SYSTEM_MAP = \
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
                LC_ALL=C sort
 $(obj)System.map:      $(obj)u-boot
-               @$(call SYSTEM_MAP,$<) > $(obj)System.map
+               @$(call SYSTEM_MAP,$<) > $@
 
 checkthumb:
        @if test $(call cc-version) -lt 0404; then \
@@ -738,7 +708,7 @@ else        # !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
 $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \
 $(filter-out tools,$(SUBDIRS)) \
-updater depend dep tags ctags etags cscope $(obj)System.map:
+depend dep tags ctags etags cscope $(obj)System.map:
        @echo "System not configured - see README" >&2
        @ exit 1
 
@@ -806,12 +776,6 @@ sinclude $(obj).boards.depend
 $(obj).boards.depend:  boards.cfg
        @awk '(NF && $$1 !~ /^#/) { print $$7 ": " $$7 "_config; $$(MAKE)" }' $< > $@
 
-#
-# Functions to generate common board directory names
-#
-lcname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\L\1/')
-ucname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/')
-
 #########################################################################
 #########################################################################
 
@@ -888,8 +852,6 @@ clobber:    tidy
        @rm -f $(obj)MLO MLO.byteswap
        @rm -f $(obj)SPL
        @rm -f $(obj)tools/xway-swap-bytes
-       @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
-       @rm -f $(obj)arch/powerpc/cpu/mpc83xx/ddr-gen?.c
        @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm
        @rm -fr $(obj)include/generated
        @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f
diff --git a/README b/README
index a70475fb05f024e1b580317c0e8723ad4a574c73..5def773ff5aeb73c4e70f83cbbcd6897c4a07cea 100644 (file)
--- a/README
+++ b/README
@@ -1963,6 +1963,21 @@ CBFS (Coreboot Filesystem) support
                kernel). Defining CONFIG_STATUS_LED enables this
                feature in U-Boot.
 
+               Additional options:
+
+               CONFIG_GPIO_LED
+               The status LED can be connected to a GPIO pin.
+               In such cases, the gpio_led driver can be used as a
+               status LED backend implementation. Define CONFIG_GPIO_LED
+               to include the gpio_led driver in the U-Boot binary.
+
+               CONFIG_GPIO_LED_INVERTED_TABLE
+               Some GPIO connected LEDs may have inverted polarity in which
+               case the GPIO high value corresponds to LED off state and
+               GPIO low value corresponds to LED on state.
+               In such cases CONFIG_GPIO_LED_INVERTED_TABLE may be defined
+               with a list of GPIO LEDs that have inverted polarity.
+
 - CAN Support: CONFIG_CAN_DRIVER
 
                Defining CONFIG_CAN_DRIVER enables CAN driver support
@@ -2040,6 +2055,42 @@ CBFS (Coreboot Filesystem) support
                  - CONFIG_SYS_RCAR_I2C3_SPEED for for the speed channel 3
                  - CONFIF_SYS_RCAR_I2C_NUM_CONTROLLERS for number of i2c buses
 
+               - drivers/i2c/sh_i2c.c:
+                 - activate this driver with CONFIG_SYS_I2C_SH
+                 - This driver adds from 2 to 5 i2c buses
+
+                 - CONFIG_SYS_I2C_SH_BASE0 for setting the register channel 0
+                 - CONFIG_SYS_I2C_SH_SPEED0 for for the speed channel 0
+                 - CONFIG_SYS_I2C_SH_BASE1 for setting the register channel 1
+                 - CONFIG_SYS_I2C_SH_SPEED1 for for the speed channel 1
+                 - CONFIG_SYS_I2C_SH_BASE2 for setting the register channel 2
+                 - CONFIG_SYS_I2C_SH_SPEED2 for for the speed channel 2
+                 - CONFIG_SYS_I2C_SH_BASE3 for setting the register channel 3
+                 - CONFIG_SYS_I2C_SH_SPEED3 for for the speed channel 3
+                 - CONFIG_SYS_I2C_SH_BASE4 for setting the register channel 4
+                 - CONFIG_SYS_I2C_SH_SPEED4 for for the speed channel 4
+                 - CONFIG_SYS_I2C_SH_BASE5 for setting the register channel 5
+                 - CONFIG_SYS_I2C_SH_SPEED5 for for the speed channel 5
+                 - CONFIF_SYS_I2C_SH_NUM_CONTROLLERS for nummber of i2c buses
+
+               - drivers/i2c/omap24xx_i2c.c
+                 - activate this driver with CONFIG_SYS_I2C_OMAP24XX
+                 - CONFIG_SYS_OMAP24_I2C_SPEED speed channel 0
+                 - CONFIG_SYS_OMAP24_I2C_SLAVE slave addr channel 0
+                 - CONFIG_SYS_OMAP24_I2C_SPEED1 speed channel 1
+                 - CONFIG_SYS_OMAP24_I2C_SLAVE1 slave addr channel 1
+                 - CONFIG_SYS_OMAP24_I2C_SPEED2 speed channel 2
+                 - CONFIG_SYS_OMAP24_I2C_SLAVE2 slave addr channel 2
+                 - CONFIG_SYS_OMAP24_I2C_SPEED3 speed channel 3
+                 - CONFIG_SYS_OMAP24_I2C_SLAVE3 slave addr channel 3
+                 - CONFIG_SYS_OMAP24_I2C_SPEED4 speed channel 4
+                 - CONFIG_SYS_OMAP24_I2C_SLAVE4 slave addr channel 4
+
+               - drivers/i2c/zynq_i2c.c
+                 - activate this driver with CONFIG_SYS_I2C_ZYNQ
+                 - set CONFIG_SYS_I2C_ZYNQ_SPEED for speed setting
+                 - set CONFIG_SYS_I2C_ZYNQ_SLAVE for slave addr
+
                additional defines:
 
                CONFIG_SYS_NUM_I2C_BUSES
index fb130ffe8b918d6878e903a624c59fc11349e0d9..3c095eedb60df0d341c6eb4c72707f549b12139a 100644 (file)
@@ -4,5 +4,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_API) += api.o api_display.o api_net.o api_storage.o \
-                      api_platform-$(ARCH).o
+obj-y += api.o api_display.o api_net.o api_storage.o
+obj-$(CONFIG_ARM) += api_platform-arm.o
+obj-$(CONFIG_PPC) += api_platform-powerpc.o
index bb77b5ca3e9af876f8e6f70e412a3b831dadc3c7..dfa3760dfc59b3da88f26868d7e81418a887e5fc 100644 (file)
@@ -779,7 +779,8 @@ void gpi2c_init(void)
        static int gpi2c = 1;
 
        if (gpi2c) {
-               i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+               i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED,
+                        CONFIG_SYS_OMAP24_I2C_SLAVE);
                gpi2c = 0;
        }
 }
index 5e93b343e63cbf11497affbd2d0dd13c7b805f3c..02aa1297338661f009bebd01dbff690c6daff155 100644 (file)
@@ -32,6 +32,11 @@ SECTIONS
        . = ALIGN(4);
        .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
 
+       . = ALIGN(4);
+       .u_boot_list : {
+               KEEP(*(SORT(.u_boot_list*_i2c_*)));
+       } >.sram
+
        . = ALIGN(4);
        __image_copy_end = .;
        _end = .;
index 7d1f8d9d2c33758d6bdb3b9232dad562ff605248..29228160c32a6c6a79ec6b464e44e3f1424ff705 100644 (file)
@@ -98,7 +98,7 @@ void spl_board_init(void)
        gpmc_init();
 #endif
 #ifdef CONFIG_SPL_I2C_SUPPORT
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 #endif
 }
 #endif /* CONFIG_SPL_BUILD */
index 9f989ff860e7f6e63acf9236fce81a7174c7bfcc..14fc7e8e810157810b37d2c65820c5cb5464ccd1 100644 (file)
@@ -708,7 +708,7 @@ void per_clocks_enable(void)
        sr32(&prcm_base->iclken_per, 17, 1, 1);
 #endif
 
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+#ifdef CONFIG_SYS_I2C_OMAP34XX
        /* Turn on all 3 I2C clocks */
        sr32(&prcm_base->fclken1_core, 15, 3, 0x7);
        sr32(&prcm_base->iclken1_core, 15, 3, 0x7);     /* I2C1,2,3 = on */
index 8f4cf3a19569718b37a6bf4cfb431aedce7cc69a..5e296c4208729cd10c49c594c354d9bc5ff44ba7 100644 (file)
@@ -15,10 +15,4 @@ obj-$(CONFIG_R8A7740) += cpu_info-r8a7740.o
 obj-$(CONFIG_R8A7740) += pfc-r8a7740.o
 obj-$(CONFIG_SH73A0) += cpu_info-sh73a0.o
 obj-$(CONFIG_SH73A0) += pfc-sh73a0.o
-obj-$(CONFIG_TMU_TIMER) += sh_timer.o
-
-SRCS += $(obj)sh_timer.c
-# from arch/sh/lib/ directory
-$(obj)sh_timer.c:
-       @rm -f $(obj)sh_timer.c
-       ln -s $(SRCTREE)/arch/sh/lib/time.c $(obj)sh_timer.c
+obj-$(CONFIG_TMU_TIMER) += ../../../../sh/lib/time.o
index 8bfa53f41b80ec68a3a0700fc6f585e295acf3ff..8642c8f8722acfc22eee7f6d88e2313810c404ce 100644 (file)
@@ -4,8 +4,8 @@
  *
  * SPDX-License-Identifier:    GPL-2.0+
  */
-#ifndef _I2C_H_
-#define _I2C_H_
+#ifndef _I2C_AM33XX_H_
+#define _I2C_AM33XX_H_
 
 #define  I2C_BASE1             0x44E0B000
 #define  I2C_BASE2             0x4802A000
@@ -62,4 +62,4 @@ struct i2c {
 #define I2C_IP_CLK                     48000000
 #define I2C_INTERNAL_SAMPLING_CLK      12000000
 
-#endif /* _I2C_H_ */
+#endif /* _I2C_AM33XX_H_ */
index e1c8e2948dede6feeb6c7dd7cc73f5e46a1ac808..2092d9e3b6efa559f0af463b29f0ce78f4e760ad 100644 (file)
 #define OS_LOG_MAGIC_ADDR  ((unsigned long *)0x4f0)
 #define OS_LOG_PTR_ADDR    ((char **)0x4f4)
 
-bool bfin_os_log_check(void)
+int bfin_os_log_check(void)
 {
        if (*OS_LOG_MAGIC_ADDR != OS_LOG_MAGIC)
-               return false;
+               return 0;
        *OS_LOG_MAGIC_ADDR = 0;
-       return true;
+       return 1;
 }
 
 void bfin_os_log_dump(void)
index ab31dcb815130181fc8f3cf09c09cbbc3049e106..8ea8cde691af46d3dac02ab3cdf79c0e137ec9c8 100644 (file)
@@ -51,7 +51,7 @@ extern u_long get_dclk(void);
 
 # define bfin_revid() (bfin_read_CHIPID() >> 28)
 
-extern bool bfin_os_log_check(void);
+extern int bfin_os_log_check(void);
 extern void bfin_os_log_dump(void);
 
 extern void blackfin_icache_flush_range(const void *, const void *);
index 3e6204de32ea451edeee58d3588665c799d127e7..fdad20753d3244ad10ac7a7ae8513cc2bc0b7bdf 100644 (file)
@@ -30,7 +30,7 @@ SECTIONS
        {
                __data_start = .;
 #ifdef CONFIG_OF_EMBED
-               dts/libdts.o (.data)
+               dts/built-in.o (.data)
 #endif
                *(.data)
                __data_end = .;
index 9b1100bc4950807065c51c19cecacb47d4e767bf..bd9043d51cdf49b09a99b2d4cf71912933040e82 100644 (file)
@@ -44,7 +44,7 @@
 #define MALTA_RESET_BASE               0x1f000500
 #define GORESET                                0x42
 
-#define MALTA_FLASH_BASE               0x1fc00000
+#define MALTA_FLASH_BASE               0x1e000000
 
 #define MALTA_REVISION                 0x1fc00010
 #define MALTA_REVISION_CORID_SHF       10
diff --git a/arch/powerpc/cpu/Makefile b/arch/powerpc/cpu/Makefile
new file mode 100644 (file)
index 0000000..d630abe
--- /dev/null
@@ -0,0 +1,3 @@
+ifneq ($(filter mpc83xx mpc85xx mpc86xx,$(CPU)),)
+obj-y += mpc8xxx/
+endif
index f770350dc2819e71b0875aa0d243757c99c4a8fe..a4934ef78a0f27de04d756e516512c5ca2cdb561 100644 (file)
@@ -4,8 +4,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(OBJTREE)/board/freescale/common)
-
 extra-y        = start.o
 obj-y  := cpu.o
 obj-y  += traps.o
diff --git a/arch/powerpc/cpu/mpc824x/.gitignore b/arch/powerpc/cpu/mpc824x/.gitignore
deleted file mode 100644 (file)
index 2d79931..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/bedbug_603e.c
index 67b0d1713c3a5b818e7f657ce4b2d8cbcc5acd0c..2c8be9257124373b653af254c7d7622c03a50c9a 100644 (file)
@@ -5,15 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)drivers/epic $(obj)drivers/i2c)
-endif
-
 extra-y        = start.o
 obj-y  = traps.o cpu.o cpu_init.o interrupts.o speed.o \
          drivers/epic/epic1.o drivers/i2c/i2c.o pci.o
-obj-y += bedbug_603e.o
-
-SRCS += $(obj)bedbug_603e.c
-$(obj)bedbug_603e.c:
-       ln -sf $(src)../mpc8260/bedbug_603e.c $(obj)bedbug_603e.c
+obj-y += ../mpc8260/bedbug_603e.o
index b7142f0dffd3465c2bbf4d72d91a7426b79ff9b1..d3f700147837aebb6cf5ededc0f8e9a6b3a281ca 100644 (file)
@@ -39,20 +39,10 @@ obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-y += cache.o
 
 ifdef CONFIG_FSL_DDR2
-obj-$(CONFIG_MPC8349) += ddr-gen2.o
-SRCS += $(obj)ddr-gen2.c
+obj-$(CONFIG_MPC8349) += ../mpc85xx/ddr-gen2.o
 else
 obj-y += spd_sdram.o
 endif
 obj-$(CONFIG_FSL_DDR2) += law.o
 
 endif # not minimal
-
-$(obj)ddr-gen1.c:
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/ddr-gen1.c $(obj)ddr-gen1.c
-
-$(obj)ddr-gen2.c:
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/ddr-gen2.c $(obj)ddr-gen2.c
-
-$(obj)ddr-gen3.c:
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/ddr-gen3.c $(obj)ddr-gen3.c
index 50ddb5040eb2ec058b381a7e92080291b344bc76..a34014f305f633954e9a5fac337e77e8084737cb 100644 (file)
@@ -70,6 +70,9 @@ obj-$(CONFIG_PPC_B4860)       += ddr-gen3.o
 obj-$(CONFIG_BSC9131)          += ddr-gen3.o
 obj-$(CONFIG_BSC9132)          += ddr-gen3.o
 obj-$(CONFIG_PPC_T1040)        += ddr-gen3.o
+obj-$(CONFIG_PPC_T1042)        += ddr-gen3.o
+obj-$(CONFIG_PPC_T1020)        += ddr-gen3.o
+obj-$(CONFIG_PPC_T1022)        += ddr-gen3.o
 
 obj-$(CONFIG_CPM2)     += ether_fcc.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
@@ -89,6 +92,10 @@ obj-$(CONFIG_PPC_T4160) += t4240_ids.o
 obj-$(CONFIG_PPC_B4420) += b4860_ids.o
 obj-$(CONFIG_PPC_B4860) += b4860_ids.o
 obj-$(CONFIG_PPC_T1040) += t1040_ids.o
+obj-$(CONFIG_PPC_T1042)        += t1040_ids.o
+obj-$(CONFIG_PPC_T1020)        += t1040_ids.o
+obj-$(CONFIG_PPC_T1022)        += t1040_ids.o
+
 
 obj-$(CONFIG_QE)       += qe_io.o
 obj-$(CONFIG_CPM2)     += serial_scc.o
@@ -128,6 +135,9 @@ obj-$(CONFIG_PPC_B4420) += b4860_serdes.o
 obj-$(CONFIG_PPC_B4860) += b4860_serdes.o
 obj-$(CONFIG_BSC9132) += bsc9132_serdes.o
 obj-$(CONFIG_PPC_T1040) += t1040_serdes.o
+obj-$(CONFIG_PPC_T1042)        += t1040_serdes.o
+obj-$(CONFIG_PPC_T1020)        += t1040_serdes.o
+obj-$(CONFIG_PPC_T1022)        += t1040_serdes.o
 
 obj-y  += cpu.o
 obj-y  += cpu_init.o
index 2ccd9c7b95b5c7eddf7088068ace5b5bad2f6893..33bc900167518264f847113d22f3e888dbb7ea29 100644 (file)
@@ -586,6 +586,7 @@ void ft_cpu_setup(void *blob, bd_t *bd)
 {
        int off;
        int val;
+       int len;
        sys_info_t sysinfo;
 
        /* delete crypto node if not on an E-processor */
@@ -615,8 +616,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)
        get_sys_info(&sysinfo);
        off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
        while (off != -FDT_ERR_NOTFOUND) {
-               u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0);
-               val = cpu_to_fdt32(sysinfo.freq_processor[*reg]);
+               u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", &len);
+               val = cpu_to_fdt32(sysinfo.freq_processor[(*reg) / (len / 4)]);
                fdt_setprop(blob, off, "clock-frequency", &val, 4);
                off = fdt_node_offset_by_prop_value(blob, off, "device_type",
                                                        "cpu", 4);
index 4b00da9f75a874e3ddcc51db2f5599c32e256814..19e130e87f1986f01e46c4609997def84da433b1 100644 (file)
@@ -239,9 +239,9 @@ static void fdt_fixup_srio_liodn(void *blob, struct srio_liodn_id_table *tbl)
 #endif
 
 #define CONFIG_SYS_MAX_PCI_EPS         8
-#define CONFIG_SYS_PCI_EP_LIODN_START  256
 
-static void fdt_fixup_pci_liodn_offsets(void *fdt, const char *compat)
+static void fdt_fixup_pci_liodn_offsets(void *fdt, const char *compat,
+                                       int ep_liodn_start)
 {
        int off, pci_idx = 0, pci_cnt = 0, i, rc;
        const uint32_t *base_liodn;
@@ -271,7 +271,7 @@ static void fdt_fixup_pci_liodn_offsets(void *fdt, const char *compat)
                        continue;
                }
                for (i = 0; i < CONFIG_SYS_MAX_PCI_EPS; i++)
-                       liodn_offs[i + 1] = CONFIG_SYS_PCI_EP_LIODN_START +
+                       liodn_offs[i + 1] = ep_liodn_start +
                                        i * pci_cnt + pci_idx - *base_liodn;
                rc = fdt_setprop(fdt, off, "fsl,liodn-offset-list",
                                 liodn_offs, sizeof(liodn_offs));
@@ -338,5 +338,22 @@ void fdt_fixup_liodn(void *blob)
        fdt_fixup_liodn_tbl(blob, rman_liodn_tbl, rman_liodn_tbl_sz);
 #endif
 
-       fdt_fixup_pci_liodn_offsets(blob, "fsl,qoriq-pcie-v2.4");
+       ccsr_pcix_t *pcix = (ccsr_pcix_t *)CONFIG_SYS_PCIE1_ADDR;
+       int pci_ver = pcix->ipver1 & 0xffff, liodn_base = 0;
+
+       if (pci_ver >= 0x0204) {
+               if (pci_ver >= 0x0300)
+                       liodn_base = 1024;
+               else
+                       liodn_base = 256;
+       }
+
+       if (liodn_base) {
+               char compat[32];
+
+               sprintf(compat, "fsl,qoriq-pcie-v%d.%d",
+                       (pci_ver & 0xff00) >> 8, pci_ver & 0xff);
+               fdt_fixup_pci_liodn_offsets(blob, compat, liodn_base);
+               fdt_fixup_pci_liodn_offsets(blob, "fsl,qoriq-pcie", liodn_base);
+       }
 }
index 54c1cfd2c10cf5fe2e413a9e2c55f8c009d88cde..f18131513468cf5ff925ab4da5d00d5651927e85 100644 (file)
@@ -86,10 +86,10 @@ struct liodn_id_table liodn_tbl[] = {
        SET_SATA_LIODN(1, 555),
        SET_SATA_LIODN(2, 556),
 
-       SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148),
-       SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 228),
-       SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 308),
-       SET_PCI_LIODN(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 388),
+       SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148),
+       SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 228),
+       SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 308),
+       SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 4, 388),
 
        SET_DMA_LIODN(1, 147),
        SET_DMA_LIODN(2, 227),
index 395fed16b6f1ee080fbc0d773a817f302229f375..1d083bf35488ad343c48dc1f6562c1a2b906f0f9 100644 (file)
@@ -31,3 +31,9 @@ obj-$(CONFIG_SYS_SRIO) += srio.o
 obj-$(CONFIG_FSL_LAW) += law.o
 
 endif
+
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += ddr/
+else
+obj-y += ddr/
+endif
index 4cc12ee70fff4b83defe1eabe92069dd4a41b9fb..d4cd27dd00811b9607bd2e0b8de925c8b687575d 100644 (file)
 #define CONFIG_NUM_DDR_CONTROLLERS     1
 #endif
 
-#elif defined(CONFIG_PPC_T1040)
+#elif defined(CONFIG_PPC_T1040) || defined(CONFIG_PPC_T1042) ||\
+defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022)
 #define CONFIG_E5500
 #define CONFIG_FSL_CORENET             /* Freescale CoreNet platform */
 #define CONFIG_SYS_FSL_QORIQ_CHASSIS2  /* Freescale Chassis generation 2 */
index 3c86ff66fdc7183a4f2118fd680ec5e088a48c7a..289f7cac52b4dc5d89181531f550696703571de2 100644 (file)
@@ -763,6 +763,7 @@ typedef struct immap {
        u8                      res7[0xC0000];
 } immap_t;
 
+#ifndef        CONFIG_MPC834x
 #ifdef CONFIG_HAS_FSL_MPH_USB
 #define CONFIG_SYS_MPC83xx_USB1_OFFSET  0x22000        /* use the MPH controller */
 #define CONFIG_SYS_MPC83xx_USB2_OFFSET 0
@@ -770,6 +771,10 @@ typedef struct immap {
 #define CONFIG_SYS_MPC83xx_USB1_OFFSET 0
 #define CONFIG_SYS_MPC83xx_USB2_OFFSET  0x23000        /* use the DR controller */
 #endif
+#else
+#define CONFIG_SYS_MPC83xx_USB1_OFFSET 0x22000
+#define CONFIG_SYS_MPC83xx_USB2_OFFSET  0x23000
+#endif
 
 #elif defined(CONFIG_MPC8313)
 typedef struct immap {
index 060e0d769be81176ac45d431da1049cf81f339c6..631261857e1299333f517c6369135b24098fd99d 100644 (file)
@@ -282,7 +282,9 @@ typedef struct ccsr_pcix {
        u32     int_ack;        /* PCIX IRQ Acknowledge */
        u8      res000c[52];
        u32     liodn_base;     /* PCIX LIODN base register */
-       u8      res0044[3004];
+       u8      res0044[2996];
+       u32     ipver1;         /* PCIX IP block revision register 1 */
+       u32     ipver2;         /* PCIX IP block revision register 2 */
        u32     potar0;         /* PCIX Outbound Transaction Addr 0 */
        u32     potear0;        /* PCIX Outbound Translation Extended Addr 0 */
        u32     powbar0;        /* PCIX Outbound Window Base Addr 0 */
@@ -1847,7 +1849,8 @@ typedef struct ccsr_gur {
 #define FSL_CORENET2_RCWSR4_SRDS2_PRTCL        0x00ff0000
 #define FSL_CORENET2_RCWSR4_SRDS2_PRTCL_SHIFT  16
 #define FSL_CORENET_RCWSR6_BOOT_LOC    0x0f800000
-#elif defined(CONFIG_PPC_T1040)
+#elif defined(CONFIG_PPC_T1040) || defined(CONFIG_PPC_T1042) ||\
+defined(CONFIG_PPC_T1020) || defined(CONFIG_PPC_T1022)
 #define FSL_CORENET2_RCWSR4_SRDS1_PRTCL        0xff000000
 #define FSL_CORENET2_RCWSR4_SRDS1_PRTCL_SHIFT  24
 #define FSL_CORENET2_RCWSR4_SRDS2_PRTCL        0x00fe0000
index bbc1b3476c78a46d5d5a4df14a9d190ee0d35bf0..cf897f6877726e6f2d17ba4330b071529f72bf7c 100644 (file)
@@ -1,33 +1,41 @@
-#include <config.h>
-
-TRAP ta 0; nop; nop; nop;
-
-/* Software trap. Treat as BAD_TRAP for the time being... */
-#define SOFT_TRAP TRAP(_hwerr)
-
-#define PSR_INIT   0x1FC0      /* Disable traps, set s and ps */
-#define WIM_INIT   2
-
-/* All traps low-level code here must end with this macro. */
-#define RESTORE_ALL b ret_trap_entry; clr %l6;
-
-#define WRITE_PAUSE nop;nop;nop
-
-WINDOWSIZE = (16 * 4)
-ARGPUSHSIZE = (6 * 4)
-ARGPUSH = (WINDOWSIZE + 4)
-MINFRAME = (WINDOWSIZE + ARGPUSHSIZE + 4)
-
-/* Number of register windows */
-#ifndef CONFIG_SYS_SPARC_NWINDOWS
-#error Must define number of SPARC register windows, default is 8
-#endif
-
-#define STACK_ALIGN    8
-#define SA(X)  (((X)+(STACK_ALIGN-1)) & ~(STACK_ALIGN-1))
+/* This is where the SPARC/LEON3 starts
+ * Copyright (C) 2007,
+ * Daniel Hellstrom, daniel@gaisler.com
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
 
-       .section ".start", "ax"
-       .globl  _starttate */
+#include <asm-offsets.h>
+#include <config.h>
+#include <asm/asmmacro.h>
+#include <asm/winmacro.h>
+#include <asm/psr.h>
+#include <asm/stack.h>
+#include <asm/leon.h>
+#include <version.h>
+
+/* Entry for traps which jump to a programmer-specified trap handler.  */
+#define TRAPR(H)  \
+       wr      %g0, 0xfe0, %psr; \
+       mov     %g0, %tbr; \
+       ba      (H); \
+       mov     %g0, %wim;
+
+#define TRAP(H) \
+       mov     %psr, %l0; \
+       ba      (H); \
+       nop; nop;
+
+#define TRAPI(ilevel) \
+       mov     ilevel, %l7; \
+       mov     %psr, %l0; \
+       b       _irq_entry; \
+       mov     %wim, %l3
+
+/* Unexcpected trap will halt the processor by forcing it to error state */
 #undef BAD_TRAP
 #define BAD_TRAP ta 0; nop; nop; nop;
 
index b30b667eb9035b752174d9360cb836a9882956c1..c5e57ec03b7cb3b2a03ed90e81fe1ccf59fdc990 100644 (file)
@@ -30,10 +30,10 @@ SECTIONS
 
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-    common/libcommon.o                 (.text*)
-    arch/powerpc/cpu/mpc8xx/libmpc8xx.o        (.text*)
-    board/LEOX/elpt860/libelpt860.o    (.text*)
-    arch/powerpc/lib/libpowerpc.o      (.text*)
+    common/built-in.o                  (.text*)
+    arch/powerpc/cpu/mpc8xx/built-in.o (.text*)
+    board/LEOX/elpt860/built-in.o      (.text*)
+    arch/powerpc/lib/built-in.o                (.text*)
 
     . = env_offset;
     common/env_embedded.o              (.text*)
index 7ca06f5a79ba167e2fba99371353a889ed3d08ec..035f6865d96a860fbca7348b6108f450f8b9b712 100644 (file)
@@ -9,8 +9,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := edminiv2.o ../common/common.o
index 4fa08c51386c8382b8df4181a7a536a92b2ac39e..f3074af25646adbf534dc858300221756a90f1c4 100644 (file)
@@ -9,10 +9,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := net2big_v2.o ../common/common.o
 ifneq ($(and $(CONFIG_KIRKWOOD_GPIO),$(CONFIG_NET2BIG_V2)),)
 obj-y  += ../common/cpld-gpio-bus.o
index e5357e4bc3fbb6bc0232b804ac73d34ff7919433..47778d84725cbb6c243e4c28873a84a546be542f 100644 (file)
@@ -9,8 +9,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := netspace_v2.o ../common/common.o
index 11c535e99ac6f92d13358493f13e1ce4510ab033..90a84f489262b19bec4f96a8c04fdcec7739bfeb 100644 (file)
@@ -9,8 +9,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := wireless_space.o ../common/common.o
index aad4776b8853173533c6699057e9b8f4d5475a8e..aefe0a789afaee3a9ed161097245344358d1fa2d 100644 (file)
@@ -8,10 +8,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = db64360.o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
          mv_eth.o ../common/ns16550.o mpsc.o ../common/i2c.o \
          sdram_init.o ../common/intel_flash.o ../common/misc.o
index ea9e57086e020dad50447c767c02a7ad80fb9f50..a970f9afde1418bd9efb212adae9952a67ce078f 100644 (file)
@@ -8,10 +8,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  += db64460.o ../common/flash.o ../common/serial.o ../common/memory.o pci.o \
          mv_eth.o ../common/ns16550.o mpsc.o ../common/i2c.o \
          sdram_init.o ../common/intel_flash.o ../common/misc.o
index a656fa99d1612340750e78ee8e65f2f05a9a3ffe..b0f09f592e26ae873d87a5da48d5b4e03fbb779f 100644 (file)
@@ -16,10 +16,10 @@ SECTIONS
        .text : {
                *(.__image_copy_start)
                arch/arm/cpu/ixp/start.o(.text*)
-               net/libnet.o(.text*)
-               board/actux1/libactux1.o(.text*)
-               arch/arm/cpu/ixp/libixp.o(.text*)
-               drivers/input/libinput.o(.text*)
+               net/built-in.o(.text*)
+               board/actux1/built-in.o(.text*)
+               arch/arm/cpu/ixp/built-in.o(.text*)
+               drivers/input/built-in.o(.text*)
 
                . = env_offset;
                common/env_embedded.o(.ppcenv)
index 7a1717640abda142b6796cd71eac23fc7624a6b1..d84934e1f8581af38f9959bb9b944fba52b736da 100644 (file)
@@ -16,10 +16,10 @@ SECTIONS
        .text : {
                *(.__image_copy_start)
                arch/arm/cpu/ixp/start.o(.text*)
-               net/libnet.o(.text*)
-               board/actux2/libactux2.o(.text*)
-               arch/arm/cpu/ixp/libixp.o(.text*)
-               drivers/input/libinput.o(.text*)
+               net/built-in.o(.text*)
+               board/actux2/built-in.o(.text*)
+               arch/arm/cpu/ixp/built-in.o(.text*)
+               drivers/input/built-in.o(.text*)
 
                . = env_offset;
                common/env_embedded.o(.ppcenv)
index aadfdd2f57034578f49c6482312b45b204619e98..30c204b646786a29569ef7ba3d3ae09b87ad863f 100644 (file)
@@ -16,10 +16,10 @@ SECTIONS
        .text : {
                *(.__image_copy_start)
                arch/arm/cpu/ixp/start.o(.text*)
-               net/libnet.o(.text*)
-               board/actux3/libactux3.o(.text*)
-               arch/arm/cpu/ixp/libixp.o(.text*)
-               drivers/input/libinput.o(.text*)
+               net/built-in.o(.text*)
+               board/actux3/built-in.o(.text*)
+               arch/arm/cpu/ixp/built-in.o(.text*)
+               drivers/input/built-in.o(.text*)
 
                . = env_offset;
                common/env_embedded.o(.ppcenv)
index 84c7bff80f7995e13940c16398c1bd47ca441c53..84690fe04d764768cb57f3ccf48cabec0cc41baa 100644 (file)
@@ -6,10 +6,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := nios2-generic.o
 obj-$(CONFIG_CMD_IDE) += ../common/cfide.o
 obj-$(CONFIG_EPLED) += ../common/epled.o
index f9f317c4401bcad3986421051233c7355f016be4..a67352519579e9203cdf5c6ea3cd3faa5435741c 100644 (file)
@@ -5,11 +5,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# we get text_base from board config header, so do not use this
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
-PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/$(VENDOR)/include
 
 ifeq ($(debug),1)
 PLATFORM_CPPFLAGS += -DDEBUG
index 6c4ab643efc7a23e6d2e0c835b82bbdce27e5eaa..87e19123b0427f9cf8abf92bf3e7b7401a9de2fe 100644 (file)
@@ -7,8 +7,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(obj)../common $(obj)../../nvidia/common)
-
 obj-y  := ../common/tamonten.o
 
 include ../../nvidia/common/common.mk
index 6c4ab643efc7a23e6d2e0c835b82bbdce27e5eaa..87e19123b0427f9cf8abf92bf3e7b7401a9de2fe 100644 (file)
@@ -7,8 +7,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(obj)../common $(obj)../../nvidia/common)
-
 obj-y  := ../common/tamonten.o
 
 include ../../nvidia/common/common.mk
index 6c4ab643efc7a23e6d2e0c835b82bbdce27e5eaa..87e19123b0427f9cf8abf92bf3e7b7401a9de2fe 100644 (file)
@@ -7,8 +7,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(obj)../common $(obj)../../nvidia/common)
-
 obj-y  := ../common/tamonten.o
 
 include ../../nvidia/common/common.mk
diff --git a/board/cogent/config.mk b/board/cogent/config.mk
deleted file mode 100644 (file)
index 1452d46..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# (C) Copyright 2000
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-#
-# Cogent Modular Architecture
-#
-
-PLATFORM_CPPFLAGS += -I$(TOPDIR)
index d2027c975899440e0982f1fd28ac1a723713c850..ecfbc25981949ff86602e5ab9752241114b5b5f6 100644 (file)
@@ -1,5 +1,5 @@
 #include <common.h>
-#include <board/cogent/dipsw.h>
+#include "dipsw.h"
 
 unsigned char
 dipsw_raw(void)
index d4ae4d0a3ccfdbe023f922f9abfd426e090cd116..1da8f10a1f955b370851f49eabd4151d45fec489 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include <common.h>
-#include <board/cogent/flash.h>
+#include "flash.h"
 #include <linux/compiler.h>
 
 flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */
index 76f5ad103fa1b6f24742cf5866291ef6a02da7c7..8e90f9853a1a9ec903bc346a3ef3e77abd70df57 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <common.h>
 #include <stdarg.h>
-#include <board/cogent/lcd.h>
+#include "lcd.h"
 
 static char lines[2][LCD_LINE_LENGTH+1];
 static int curline;
index 603f1235a425cfa08387125cd29091d1efc60272..3eea47d3e83a7b8487115232a5ba16931f1da9b6 100644 (file)
@@ -6,11 +6,11 @@
  */
 
 #include <common.h>
-#include <board/cogent/dipsw.h>
-#include <board/cogent/lcd.h>
-#include <board/cogent/rtc.h>
-#include <board/cogent/par.h>
-#include <board/cogent/pci.h>
+#include "dipsw.h"
+#include "lcd.h"
+#include "rtc.h"
+#include "par.h"
+#include "pci.h"
 
 /* ------------------------------------------------------------------------- */
 
index 20631d162dd72ea5b623495927d2d31fc01dbfa9..f0d6b22cfd9138d95d69e6f6db052aeb4c393ae5 100644 (file)
@@ -4,7 +4,7 @@
  */
 
 #include <common.h>
-#include <board/cogent/serial.h>
+#include "serial.h"
 #include <serial.h>
 #include <linux/compiler.h>
 
index 824cd2ea1f7cad3db94805d0e28229b7d45bda11..b2d3b6b4b25d2b31b4c85d5af1a9f4c288905a84 100644 (file)
@@ -14,8 +14,6 @@
 # more details.
 #
 
-$(shell mkdir -p $(obj)../../nvidia/common)
-
 obj-y  := paz00.o
 
 include ../../nvidia/common/common.mk
index 9f2937a9783cea35f5e91d442de9028f573156c6..bc8e0cad9496131739f7f747ce5ec34e369ad152 100644 (file)
@@ -482,7 +482,7 @@ static void setup_net_chip_gmpc(void)
                &ctrl_base->gpmc_nadv_ale);
 }
 
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+#ifdef CONFIG_SYS_I2C_OMAP34XX
 /*
  * Routine: reset_net_chip
  * Description: reset the Ethernet controller via TPS65930 GPIO
index 831be2e0e74b631cf9ce70aecb0f203eb07fcb29..6d7d06815cdb8c8b770113c0e511f2597139b636 100644 (file)
@@ -6,5 +6,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o
+obj-$(CONFIG_SYS_I2C_OMAP34XX) += eeprom.o
 obj-$(CONFIG_LCD) += omap3_display.o
index cf8c302b2e6563dd757f82fc2633ff4ded14eedc..e87162930d8549a20c5c35ee87396f89dbd9eae0 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _EEPROM_
 #define _EEPROM_
 
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+#ifdef CONFIG_SYS_I2C_OMAP34XX
 int cl_eeprom_read_mac_addr(uchar *buf);
 u32 cl_eeprom_get_board_rev(void);
 #else
index 0818673cbdc6ba37cd84796d30650105c161dbe8..f3bd00dbf18d1c042eb9f10a076792494203ceee 100644 (file)
@@ -5,8 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(obj)../../nvidia/common)
-
 obj-y  := trimslice.o
 
 include ../../nvidia/common/common.mk
index e43130aa67831880d82897b11a4af3c625d60d41..d49c3144904cb65df0868a81b8e62d17728048fc 100644 (file)
@@ -19,8 +19,8 @@ SECTIONS
        .text      :
        {
          arch/arm/cpu/arm926ejs/start.o                (.text*)
-         arch/arm/cpu/arm926ejs/davinci/libdavinci.o   (.text*)
-         drivers/mtd/nand/libnand.o                    (.text*)
+         arch/arm/cpu/arm926ejs/davinci/built-in.o     (.text*)
+         drivers/mtd/nand/built-in.o                   (.text*)
 
          *(.text*)
        }
index 40c9c8038bb1e88110172680151a8223a8b2c790..0035a0bf07d60a028618e028b5d4a42c91737e96 100644 (file)
@@ -16,10 +16,10 @@ SECTIONS
        .text : {
                *(.__image_copy_start)
                arch/arm/cpu/ixp/start.o(.text*)
-               net/libnet.o(.text*)
-               board/dvlhost/libdvlhost.o(.text*)
-               arch/arm/cpu/ixp/libixp.o(.text*)
-               drivers/serial/libserial.o(.text*)
+               net/built-in.o(.text*)
+               board/dvlhost/built-in.o(.text*)
+               arch/arm/cpu/ixp/built-in.o(.text*)
+               drivers/serial/built-in.o(.text*)
 
                . = env_offset;
                common/env_embedded.o(.ppcenv)
index 0930d484fb24d00047d1b007271743c622d07c80..b455c26e17d1e99698b61ece4481a26c8e96a2d2 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := top5200.o ../common/flash.o ../common/vpd.o ../common/am79c874.o
index b2645f6347aecc435c0eb6b006cd2b81c1293c45..0401639ce37e7f32d07b51767a2bb6208a3bb999 100644 (file)
@@ -5,7 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
 obj-y  = top860.o ../common/flash.o ../common/vpd.o ../common/am79c874.o
index a096e444181ad615da258c8b70057801b377f843..d0e264de923cc774521f16c22c24fd509d7bd962 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = adciop.o flash.o ../common/misc.o ../common/pci.o
index c6ab1a5e216eb9e5603996c711a449d2f9f5a623..ada8bfd3d315d9e397a696210065a12ffa641124 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = apc405.o \
        ../common/misc.o \
        ../common/auto_update.o
index 2d16313e8d69af15dd998496f0e066fdbe134e62..dd54f546a6c7a2268bc4146ddd979ecc88488937 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = ar405.o flash.o ../common/misc.o
index 4c866ee0aaf67dc54ac7c11ad65b535df18f2515..aab8de44bcfb994e5d2cb1629a75a9f29890d588 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = ash405.o flash.o \
        ../common/misc.o \
        ../common/esd405ep_nand.o \
index 8cfe3baf797ec3484308afb9b4f34cf4a5538e50..2bf50066c4f907243b8677512fe1c54c829bab99 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common/xilinx_jtag)
-endif
-
 # Objects for Xilinx JTAG programming (CPLD)
 CPLD    = ../common/xilinx_jtag/lenval.o \
          ../common/xilinx_jtag/micro.o \
index 1d1502071e0afa266d7bb3aed0b5246f8f5d4f48..ce2c6dd912fc4efd8ce1b4773718923b0af75401 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = cpci2dp.o flash.o ../common/misc.o ../common/cmd_loadpci.o
index 1af7e9454da116992ee0acf17df9e9f793d2d5dc..b140571796511601190da78f24385f4d197c4cac 100644 (file)
@@ -5,9 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = cpci405.o flash.o ../common/misc.o ../common/auto_update.o
 obj-y  += ../common/cmd_loadpci.o
index fb6c0e20e400b1f5d1d9ec81858ecb3e2503aa0c..8421f548695c4386528fc51e4589181a7882e758 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# ifneq ($(OBJTREE),$(SRCTREE))
-# $(shell mkdir -p $(obj)../common/xilinx_jtag)
-# endif
-
 # Objects for Xilinx JTAG programming (CPLD)
 # CPLD  = ../common/xilinx_jtag/lenval.o \
 #        ../common/xilinx_jtag/micro.o \
index 8b3dc3370471efe71e4814be6bc2a119d6f83771..a3300c9f4ac5a1980f9e41ed8a3934c4744629f3 100644 (file)
@@ -8,10 +8,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../../Marvell/common)
-endif
-
 obj-y  = misc.o
 obj-y  += cpci750.o serial.o ../../Marvell/common/memory.o pci.o \
          mv_eth.o  mpsc.o i2c.o \
index 4d3c34ae429f5ba9e65f4a7fe9bf17d42119ffe2..b8d6bea6dc7e897a8f6b2b5bd21789c8dd52980c 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = cpciiser4.o flash.o ../common/misc.o
index f0a5a8f09b9a1a889108c55d8995626c4d4c80aa..eb9f5f86d0df18e6786a1dbb73742ed6977e4b91 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = dasa_sim.o flash.o cmd_dasa_sim.o eeprom.o ../common/pci.o
index 6809c673ce7415656adead1fd69f42b8fae5b8cc..cfcfb66a15296b6e276b8112b0461a13ec17f88b 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common/xilinx_jtag)
-endif
-
 # Objects for Xilinx JTAG programming (CPLD)
 CPLD    = ../common/xilinx_jtag/lenval.o \
          ../common/xilinx_jtag/micro.o \
index 12ce41a9a8977a6c57063af497de7f0444032187..7914eab3557178271363202439d257b683bd778b 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = du405.o flash.o ../common/misc.o
index 0507f1b4ddf02599d38e614fccf2b85e7d2a2976..fba21a3ae22d946cf0eb95ec25e5f8a1ab98cbf2 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = hh405.o flash.o \
        ../common/misc.o \
        ../common/esd405ep_nand.o \
index 5447a959c05acfc166dc5aceff540bdfb2042c74..99e18b567fd941cf5bd389dbd218ac34ca2232c9 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = hub405.o flash.o \
        ../common/misc.o \
        ../common/esd405ep_nand.o \
index 0d9a6fdc437fed686d799ef076b2c66effe449c4..44b7d5d072d9c67742f5fe728243ecc04261ea0d 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = ocrtc.o flash.o ../common/misc.o cmd_ocrtc.o
index 2f8706bd6e7051fbba74dad2ab52e5326b04380f..9e659c796c981bca7fed2880b83ada59583fc84e 100644 (file)
@@ -5,9 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = pci405.o flash.o ../common/misc.o cmd_pci405.o
 obj-y  += writeibm.o
index a9d20c90b1c8c3619223564b199d9685e0bd3d5a..a54289c0733dea204b189547ea1b5a9d34e106fc 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-# ifneq ($(OBJTREE),$(SRCTREE))
-# $(shell mkdir -p $(obj)../common/xilinx_jtag)
-# endif
-
 # Objects for Xilinx JTAG programming (CPLD)
 # CPLD  = ../common/xilinx_jtag/lenval.o \
 #        ../common/xilinx_jtag/micro.o \
index 45b962f69a33d9df152b3885b66de74f69190719..6ffae677b157073d1c5d0102e08d0303397e1bac 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = plu405.o flash.o \
        ../common/misc.o \
        ../common/esd405ep_nand.o \
index f4aa1c9eeafdce14862352c45ebae1e648e6f030..ad98207f3ee4897c199d04cab0c9a5309568f2ff 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common/xilinx_jtag)
-endif
-
 # Objects for Xilinx JTAG programming (CPLD)
 CPLD    = ../common/xilinx_jtag/lenval.o \
          ../common/xilinx_jtag/micro.o \
index 7d5b273c0fb94ae73c89c553639ed3b145db0e5a..b3f6dcd1e7b2f121709e3d5cfa8cc77944fb2de8 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = pmc405de.o
 obj-$(CONFIG_CMD_CHIP_CONFIG) += chip_config.o
 obj-y += ../common/cmd_loadpci.o
index b1318c7429d02e9622b023f69ad9ed58189b9a3c..708e9d138e2b10d868574a63b4cb55368b9a3e35 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = pmc440.o cmd_pmc440.o sdram.o fpga.o \
        ../common/cmd_loadpci.o
 extra-y        += init.o
index 8fcfa37dc02ff1bd462200ac125d6c13aa9277bc..3d82399ed16017bbfc0571a33d5bf03a915e0291 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = voh405.o flash.o \
        ../common/misc.o \
        ../common/esd405ep_nand.o \
index c8a4a4e4c7b1675c9603fd79dab7fb171908026f..7cf5c0224c28ca0db7177019110ab08f79d9728e 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common/xilinx_jtag)
-endif
-
 # Objects for Xilinx JTAG programming (CPLD)
 CPLD    = ../common/xilinx_jtag/lenval.o \
          ../common/xilinx_jtag/micro.o \
index 046ebad30177a1ffb4d9ab7637b1c669270ec0b0..b9beeffc57cc31dc98ec57cf0121294277d0f95e 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = wuh405.o flash.o \
        ../common/misc.o \
        ../common/esd405ep_nand.o \
index 87642d6b405f9345dcaceb83e4f3a5a6e99b8978..59a86bfdc0608c087882bfd3c5bf36085e5ae180 100644 (file)
@@ -18,8 +18,8 @@ SECTIONS
 
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-    net/libnet.o                       (.text*)
-    board/esteem192e/libesteem192e.o   (.text*)
+    net/built-in.o                     (.text*)
+    board/esteem192e/built-in.o                (.text*)
 
     . = env_offset;
     common/env_embedded.o              (.text*)
diff --git a/board/freescale/m52277evb/config.mk b/board/freescale/m52277evb/config.mk
deleted file mode 100644 (file)
index 0ffb0a2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# (C) Copyright 2000-2003
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-# Coldfire contribution by Bernhard Kuhn <bkuhn@metrowerks.com>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
-
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
index f3337a3845e55c0c7b00cc3fe82f06b3647076ab..70121d9248e1c9867b27e0f843a986a577387c14 100644 (file)
@@ -13,8 +13,8 @@ SECTIONS
   .text      :
   {
     arch/m68k/cpu/mcf5227x/start.o     (.text*)
-    arch/m68k/cpu/mcf5227x/libmcf5227x.o       (.text*)
-    arch/m68k/lib/libm68k.o            (.text*)
+    arch/m68k/cpu/mcf5227x/built-in.o  (.text*)
+    arch/m68k/lib/built-in.o           (.text*)
 
     *(.text*)
   }
diff --git a/board/freescale/m5235evb/config.mk b/board/freescale/m5235evb/config.mk
deleted file mode 100644 (file)
index 9ab4582..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#
-# (C) Copyright 2000-2003
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-# Coldfire contribution by Bernhard Kuhn <bkuhn@metrowerks.com>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-/*CONFIG_SYS_TEXT_BASE = 0xFFC00000*/
-sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
-
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
index ef21299ea95f9c9650ec95c17fe6cea8c330f9fb..de8d09bf66303196ebcd03429d0cb4dd69868d88 100644 (file)
@@ -12,9 +12,9 @@ SECTIONS
   /* Read-only sections, merged into text segment: */
   .text      :
   {
-    arch/m68k/cpu/mcf532x/start.o              (.text*)
-    arch/m68k/cpu/mcf532x/libmcf532x.o (.text*)
-    arch/m68k/lib/libm68k.o            (.text*)
+    arch/m68k/cpu/mcf532x/start.o      (.text*)
+    arch/m68k/cpu/mcf532x/built-in.o   (.text*)
+    arch/m68k/lib/built-in.o           (.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
     common/env_embedded.o      (.text*)
diff --git a/board/freescale/m54451evb/config.mk b/board/freescale/m54451evb/config.mk
deleted file mode 100644 (file)
index 0ffb0a2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# (C) Copyright 2000-2003
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-# Coldfire contribution by Bernhard Kuhn <bkuhn@metrowerks.com>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
-
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
diff --git a/board/freescale/m54455evb/config.mk b/board/freescale/m54455evb/config.mk
deleted file mode 100644 (file)
index 0ffb0a2..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-# (C) Copyright 2000-2003
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-# Coldfire contribution by Bernhard Kuhn <bkuhn@metrowerks.com>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
-
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE)
index 3acc4ca548321ed85f8b24c53130238f9edb5c6c..8d5cc9101ae344fe5c226c8c6f1296f24ad7fd96 100644 (file)
@@ -22,11 +22,11 @@ SECTIONS
          /* WARNING - the following is hand-optimized to fit within    */
          /* the sector layout of our flash chips!      XXX FIXME XXX   */
 
-         arch/arm/cpu/arm1136/start.o                  (.text*)
-         board/freescale/mx31ads/libmx31ads.o  (.text*)
-         arch/arm/lib/libarm.o                 (.text*)
-         net/libnet.o                          (.text*)
-         drivers/mtd/libmtd.o                  (.text*)
+         arch/arm/cpu/arm1136/start.o          (.text*)
+         board/freescale/mx31ads/built-in.o    (.text*)
+         arch/arm/lib/built-in.o               (.text*)
+         net/built-in.o                        (.text*)
+         drivers/mtd/built-in.o                (.text*)
 
          . = DEFINED(env_offset) ? env_offset : .;
          common/env_embedded.o(.text*)
similarity index 97%
rename from board/freescale/p1010rdb/README
rename to board/freescale/p1010rdb/README.P1010RDB-PA
index 7f18aaa1b2a1aff66b20f5e20c8acd57c016a814..158a1b31522a138eef23ecc4eb26de438b5611d1 100644 (file)
@@ -204,5 +204,5 @@ Place uImage, p1010rdb.dtb and rootfs files in the TFTP disk area.
        => bootm 1000000 3000000 2000000
 
 
-Please contact your local field applications engineer or sales representative
-to obtain related documents, such as P1010-RDB User Guide for details.
+For more details, please refer to P1010RDB User Guide and access website
+www.freescale.com
diff --git a/board/freescale/p1010rdb/README.P1010RDB-PB b/board/freescale/p1010rdb/README.P1010RDB-PB
new file mode 100644 (file)
index 0000000..cf459b3
--- /dev/null
@@ -0,0 +1,188 @@
+Overview
+=========
+The P1010RDB-PB is a Freescale Reference Design Board that hosts the P1010 SoC.
+P1010RDB-PB is a variation of previous P1010RDB-PA board.
+
+The P1010 is a cost-effective, low-power, highly integrated host processor
+based on a Power Architecture e500v2 core (maximum core frequency 1GHz),that
+addresses the requirements of several routing, gateways, storage, consumer,
+and industrial applications. Applications of interest include the main CPUs and
+I/O processors in network attached storage (NAS), the voice over IP (VoIP)
+router/gateway, and wireless LAN (WLAN) and industrial controllers.
+
+The P1010RDB-PB board features are as following:
+Memory subsystem:
+       - 1G bytes unbuffered DDR3 SDRAM discrete devices (32-bit bus)
+       - 32M bytes NOR flash single-chip memory
+       - 2G bytes NAND flash memory
+       - 16M bytes SPI memory
+       - 256K bit M24256 I2C EEPROM
+       - I2C Board EEPROM 128x8 bit memory
+       - SD/MMC connector to interface with the SD memory card
+Interfaces:
+       - Three 10/100/1000 BaseT Ethernet ports (One RGMII and two SGMII)
+       - PCIe 2.0: two x1 mini-PCIe slots
+       - SATA 2.0: two SATA interfaces
+       - USB 2.0: one USB interface
+       - FlexCAN: two FlexCAN interfaces (revision 2.0B)
+       - UART: one USB-to-Serial interface
+       - TDM: 2 FXS ports connected via an external SLIC to the TDM interface.
+              1 FXO port connected via a relay to FXS for switchover to POTS
+
+Board connectors:
+       - Mini-ITX power supply connector
+       - JTAG/COP for debugging
+
+POR: support critical POR setting changed via switch on board
+PCB: 6-layer routing (4-layer signals, 2-layer power and ground)
+
+Physical Memory Map on P1010RDB
+===============================
+Address Start   Address End   Memory type      Attributes
+0x0000_0000    0x3fff_ffff   DDR               1G Cacheable
+0xa000_0000    0xdfff_ffff   PCI Express Mem   1G non-cacheable
+0xee00_0000    0xefff_ffff   NOR Flash         32M non-cacheable
+0xffc2_0000    0xffc5_ffff   PCI IO range      256K non-cacheable
+0xffa0_0000    0xffaf_ffff   NAND Flash        1M cacheable
+0xffb0_0000    0xffbf_ffff   Board CPLD        1M non-cacheable
+0xffd0_0000    0xffd0_3fff   L1 for Stack      16K Cacheable TLB0
+0xffe0_0000    0xffef_ffff   CCSR              1M non-cacheable
+
+
+Serial Port Configuration on P1010RDB
+=====================================
+Configure the serial port of the attached computer with the following values:
+       -Data rate: 115200 bps
+       -Number of data bits: 8
+       -Parity: None
+       -Number of Stop bits: 1
+       -Flow Control: Hardware/None
+
+
+P1010RDB-PB default DIP-switch settings
+=======================================
+SW1[1:8]= 10101010
+SW2[1:8]= 11011000
+SW3[1:8]= 10010000
+SW4[1:4]= 1010
+SW5[1:8]= 11111010
+
+
+P1010RDB-PB boot mode settings via DIP-switch
+=============================================
+SW4[1:4]= 1111 and SW3[3:4]= 00 for 16bit NOR boot
+SW4[1:4]= 1010 and SW3[3:4]= 01 for 8bit NAND boot
+SW4[1:4]= 0110 and SW3[3:4]= 00 for SPI boot
+SW4[1:4]= 0111 and SW3[3:4]= 10 for SD boot
+Note: 1 stands for 'on', 0 stands for 'off'
+
+
+Switch P1010RDB-PB boot mode via software without setting DIP-switch
+====================================================================
+=> run boot_bank0    (boot from NOR bank0)
+=> run boot_bank1    (boot from NOR bank1)
+=> run boot_nand     (boot from NAND flash)
+=> run boot_spi      (boot from SPI flash)
+=> run boot_sd       (boot from SD card)
+
+
+Frequency combination support on P1010RDB-PB
+=============================================
+SW1[4:7] SW5[1] SW5[5:8] SW2[2] Core(MHz) Platform(MHz) DDR(MT/s)
+0101      1      1010     0       800       400                800
+1001      1      1010     0       800       400                667
+1010      1      1100     0       667       333                667
+1000      0      1010     0       533       266                667
+0101      1      1010     1       1000      400                800
+1001      1      1010     1       1000      400                667
+
+
+Setting of pin mux
+==================
+Since pins multiplexing, TDM and CAN are muxed with SPI flash.
+SDHC is muxed with IFC. IFC and SPI flash are enabled by default.
+
+To enable TDM:
+=> setenv hwconfig fsl_p1010mux:tdm_can=tdm
+=> save;reset
+
+To enable FlexCAN:
+=> setenv hwconfig fsl_p1010mux:tdm_can=can
+=> save;reset
+
+To enable SDHC in case of NOR/NAND/SPI boot
+   a) For temporary use case in runtime without reboot system
+      run 'mux sdhc' in u-boot to validate SDHC with invalidating IFC.
+
+   b) For long-term use case
+      set 'esdhc' in hwconfig and save it.
+
+To enable IFC in case of SD boot
+   a) For temporary use case in runtime without reboot system
+      run 'mux ifc' in u-boot to validate IFC with invalidating SDHC.
+
+   b) For long-term use case
+      set 'ifc' in hwconfig and save it.
+
+
+Build images for different boot mode
+====================================
+First setup cross compile environment on build host
+   $ export ARCH=powerpc
+   $ export CROSS_COMPILE=<your-compiler-path>/powerpc-linux-gnu-
+
+1. For NOR boot
+   $ make P1010RDB-PB_NOR
+
+2. For NAND boot
+   $ make P1010RDB-PB_NAND
+
+3. For SPI boot
+   $ make P1010RDB-PB_SPIFLASH
+
+4. For SD boot
+   $ make P1010RDB-PB_SDCARD
+
+
+Steps to program images to flash for different boot mode
+========================================================
+1. NOR boot
+   => tftp 1000000 u-boot.bin
+   For bank0
+   => pro off all;era eff80000 efffffff;cp.b 1000000 eff80000 $filesize
+   set SW1[8]=0, SW4[1:4]= 1111 and SW3[3:4]= 00, then power on the board
+
+   For bank1
+   => pro off all;era eef80000 eeffffff;cp.b 1000000 eef80000 $filesize
+   set SW1[8]=1, SW4[1:4]= 1111 and SW3[3:4]= 00, then power on the board
+
+2. NAND boot
+   => tftp 1000000 u-boot-nand.bin
+   => nand erase 0 $filesize; nand write $loadaddr 0 $filesize
+   Set SW4[1:4]= 1010 and SW3[3:4]= 01, then power on the board
+
+3. SPI boot
+   1)  cat p1010rdb-config-header.bin u-boot.bin > u-boot-spi-combined.bin
+   2)  =>  tftp 1000000 u-boot-spi-combined.bin
+   3)  =>  sf probe 0; sf erase 0 100000; sf write 1000000 0 100000
+   set SW4[1:4]= 0110 and SW3[3:4]= 00, then power on the board
+
+4. SD boot
+   1)  cat p1010rdb-config-header.bin u-boot.bin > u-boot-sd-combined.bin
+   2)  => tftp 1000000 u-boot-sd-combined.bin
+   3)  => mux sdhc
+   4)  => mmc write 1000000 0 1050
+   set SW4[1:4]= 0111 and SW3[3:4]= 10, then power on the board
+
+
+Boot Linux from network using TFTP on P1010RDB-PB
+=================================================
+Place uImage, p1010rdb.dtb and rootfs files in the TFTP download path.
+       => tftp 1000000 uImage
+       => tftp 2000000 p1010rdb.dtb
+       => tftp 3000000 rootfs.ext2.gz.uboot.p1010rdb
+       => bootm 1000000 3000000 2000000
+
+
+For more details, please refer to P1010RDB-PB User Guide and access website
+www.freescale.com and Freescale QorIQ SDK Infocenter document.
index a2dba6ff1c12cf64e2412e39dac37496385935e6..93af9eb6a0632da4e27431bf3201752e14142f6e 100644 (file)
@@ -4,7 +4,7 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y  += $(BOARD).o
+obj-y  += t1040qds.o
 obj-y  += ddr.o
 obj-$(CONFIG_PCI)     += pci.o
 obj-y  += law.o
diff --git a/board/freescale/t1040qds/t1040_pbi.cfg b/board/freescale/t1040qds/t1040_pbi.cfg
new file mode 100644 (file)
index 0000000..624398a
--- /dev/null
@@ -0,0 +1,27 @@
+#PBI commands
+#Initialize CPC1
+09010000 00200400
+09138000 00000000
+091380c0 00000100
+#Configure CPC1 as 512KB SRAM
+09010100 00000000
+09010104 fffc0007
+09010f00 08000000
+09010000 80000000
+#Configure LAW for CPC1
+09000cf0 00000000
+09000cf4 fffc0000
+09000cf8 81000011
+#Configure alternate space
+09000010 00000000
+09000014 ff000000
+09000018 81000000
+#Configure SPI controller
+09110000 80000403
+09110020 2d170008
+09110024 00100008
+09110028 00100008
+0911002c 00100008
+#Flush PBL data
+09138000 00000000
+091380c0 00000000
diff --git a/board/freescale/t1040qds/t1040_rcw.cfg b/board/freescale/t1040qds/t1040_rcw.cfg
new file mode 100644 (file)
index 0000000..0d0dfa5
--- /dev/null
@@ -0,0 +1,7 @@
+#PBL preamble and RCW header
+aa55aa55 010e0100
+# serdes protocol 0x66
+0a10000c 0c000000 00000000 00000000
+66000002 00000000 fc027000 01000000
+00000000 00000000 00000000 00030810
+00000000 03fc500f 00000000 00000000
diff --git a/board/freescale/t104xrdb/Makefile b/board/freescale/t104xrdb/Makefile
new file mode 100644 (file)
index 0000000..76c0c94
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# Copyright 2013 Freescale Semiconductor, Inc.
+#
+# SPDX-License-Identifier:     GPL-2.0+
+#
+
+
+obj-y  += t104xrdb.o
+obj-y  += ddr.o
+obj-$(CONFIG_PCI)      += pci.o
+obj-y  += law.o
+obj-y  += tlb.o
diff --git a/board/freescale/t104xrdb/README b/board/freescale/t104xrdb/README
new file mode 100644 (file)
index 0000000..2cd8219
--- /dev/null
@@ -0,0 +1,200 @@
+Overview
+--------
+The T1040RDB is a Freescale reference board that hosts the T1040 SoC
+(and variants). Variants inclued T1042 presonality of T1040, in which
+case T1040RDB can also be called T1042RDB.
+
+The T1042RDB_PI is a Freescale reference board that hosts the T1042 SoC.
+(a personality of T1040 SoC). The board is similar to T1040RDB but is
+designed specially with low power features targeted for Printing Image Market.
+
+T1040 SoC Overview
+------------------
+The QorIQ T1040/T1042 processor support four integrated 64-bit e5500 PA
+processor cores with high-performance data path acceleration architecture
+and network peripheral interfaces required for networking & telecommunications.
+
+The T1040/T1042 SoC includes the following function and features:
+
+ - Four e5500 cores, each with a private 256 KB L2 cache
+ - 256 KB shared L3 CoreNet platform cache (CPC)
+ - Interconnect CoreNet platform
+ - 32-/64-bit DDR3L/DDR4 SDRAM memory controller with ECC and interleaving
+   support
+ - Data Path Acceleration Architecture (DPAA) incorporating acceleration
+ for the following functions:
+    -  Packet parsing, classification, and distribution
+    -  Queue management for scheduling, packet sequencing, and congestion
+       management
+    -  Cryptography Acceleration (SEC 5.0)
+    - RegEx Pattern Matching Acceleration (PME 2.2)
+    - IEEE Std 1588 support
+    - Hardware buffer management for buffer allocation and deallocation
+ - Ethernet interfaces
+    - Integrated 8-port Gigabit Ethernet switch (T1040 only)
+    - Four 1 Gbps Ethernet controllers
+ - Two RGMII interfaces or one RGMII and one MII interfaces
+ - High speed peripheral interfaces
+   - Four PCI Express 2.0 controllers running at up to 5 GHz
+   - Two SATA controllers supporting 1.5 and 3.0 Gb/s operation
+   - Upto two QSGMII interface
+   - Upto six SGMII interface supporting 1000 Mbps
+   - One SGMII interface supporting upto 2500 Mbps
+ - Additional peripheral interfaces
+   - Two USB 2.0 controllers with integrated PHY
+   - SD/eSDHC/eMMC
+   - eSPI controller
+   - Four I2C controllers
+   - Four UARTs
+   - Four GPIO controllers
+   - Integrated flash controller (IFC)
+   - LCD and HDMI interface (DIU) with 12 bit dual data rate
+   - TDM interface
+ - Multicore programmable interrupt controller (PIC)
+ - Two 8-channel DMA engines
+ - Single source clocking implementation
+ - Deep Sleep power implementaion (wakeup from GPIO/Timer/Ethernet/USB)
+
+T1040 SoC Personalities
+-------------------------
+
+T1022 Personality:
+T1022 is a reduced personality of T1040 with less core/clusters.
+
+T1042 Personality:
+T1042 is a reduced personality of T1040 without Integrated 8-port Gigabit
+Ethernet switch. Rest of the blocks are same as T1040
+
+
+T1040RDB board Overview
+-------------------------
+ - SERDES Connections, 8 lanes information:
+       1: None
+       2: SGMII
+       3: QSGMII
+       4: QSGMII
+       5: PCIe1 x1 slot
+       6: mini PCIe connector
+       7: mini PCIe connector
+       8: SATA connector
+ - DDR Controller
+     - Supports rates of up to 1600 MHz data-rate
+     - Supports one DDR3LP UDIMM/RDIMMs, of single-, dual- or quad-rank types.
+ - IFC/Local Bus
+     - NAND flash: 1GB 8-bit NAND flash
+     - NOR: 128MB 16-bit NOR Flash
+ - Ethernet
+     - Two on-board RGMII 10/100/1G ethernet ports.
+ - CPLD
+ - Clocks
+     - System and DDR clock (SYSCLK, “DDRCLK”)
+     - SERDES clocks
+ - Power Supplies
+ - USB
+     - Supports two USB 2.0 ports with integrated PHYs
+     - Two type A ports with 5V@1.5A per port.
+ - SDHC
+     - SDHC/SDXC connector
+ - SPI
+    -  On-board 64MB SPI flash
+ - Other IO
+    - Two Serial ports
+    - Four I2C ports
+
+T1042RDB_PI board Overview
+-------------------------
+ - SERDES Connections, 8 lanes information:
+       1, 2, 3, 4 : PCIe x4 slot
+       5: mini PCIe connector
+       6: mini PCIe connector
+       7: NA
+       8: SATA connector
+ - DDR Controller
+     - Supports rates of up to 1600 MHz data-rate
+     - Supports one DDR3LP UDIMM/RDIMMs, of single-, dual- or quad-rank types.
+ - IFC/Local Bus
+     - NAND flash: 1GB 8-bit NAND flash
+     - NOR: 128MB 16-bit NOR Flash
+ - Ethernet
+     - Two on-board RGMII 10/100/1G ethernet ports.
+ - CPLD
+ - Clocks
+     - System and DDR clock (SYSCLK, “DDRCLK”)
+     - SERDES clocks
+ - Video
+     - DIU supports video at up to 1280x1024x32bpp
+ - Power Supplies
+ - USB
+     - Supports two USB 2.0 ports with integrated PHYs
+     - Two type A ports with 5V@1.5A per port.
+ - SDHC
+     - SDHC/SDXC connector
+ - SPI
+    -  On-board 64MB SPI flash
+ - Other IO
+    - Two Serial ports
+    - Four I2C ports
+
+Memory map
+-----------
+The addresses in brackets are physical addresses.
+
+Start Address  End Address      Description                     Size
+0xF_FFDF_0000  0xF_FFDF_0FFF    IFC - CPLD                      4KB
+0xF_FF80_0000  0xF_FF80_FFFF    IFC - NAND Flash                64KB
+0xF_FE00_0000  0xF_FEFF_FFFF    CCSRBAR                         16MB
+0xF_F803_0000  0xF_F803_FFFF    PCI Express 4 I/O Space         64KB
+0xF_F802_0000  0xF_F802_FFFF    PCI Express 3 I/O Space                64KB
+0xF_F801_0000  0xF_F801_FFFF    PCI Express 2 I/O Space         64KB
+0xF_F800_0000  0xF_F800_FFFF    PCI Express 1 I/O Space                64KB
+0xF_F600_0000  0xF_F7FF_FFFF    Queue manager software portal   32MB
+0xF_F400_0000  0xF_F5FF_FFFF    Buffer manager software portal  32MB
+0xF_E800_0000  0xF_EFFF_FFFF    IFC - NOR Flash                 128MB
+0xF_0000_0000  0xF_003F_FFFF    DCSR                            4MB
+0xC_3000_0000  0xC_3FFF_FFFF    PCI Express 4 Mem Space         256MB
+0xC_2000_0000  0xC_2FFF_FFFF    PCI Express 3 Mem Space         256MB
+0xC_1000_0000  0xC_1FFF_FFFF    PCI Express 2 Mem Space         256MB
+0xC_0000_0000  0xC_0FFF_FFFF    PCI Express 1 Mem Space         256MB
+0x0_0000_0000  0x0_ffff_ffff    DDR                             2GB
+
+
+NOR Flash memory Map
+---------------------
+ Start          End             Definition                       Size
+0xEFF80000      0xEFFFFFFF      u-boot (current bank)            512KB
+0xEFF60000      0xEFF7FFFF      u-boot env (current bank)        128KB
+0xEFF40000      0xEFF5FFFF      FMAN Ucode (current bank)        128KB
+0xED300000      0xEFF3FFFF      rootfs (alt bank)                44MB + 256KB
+0xEC800000      0xEC8FFFF       Hardware device tree (alt bank)  1MB
+0xEC020000      0xEC7FFFFF      Linux.uImage (alt bank)          7MB + 875KB
+0xEC000000      0xEC01FFFF      RCW (alt bank)                   128KB
+0xEBF80000      0xEBFFFFFF      u-boot (alt bank)                512KB
+0xEBF60000      0xEBF7FFFF      u-boot env (alt bank)            128KB
+0xEBF40000      0xEBF5FFFF      FMAN ucode (alt bank)            128KB
+0xE9300000      0xEBF3FFFF      rootfs (current bank)            44MB + 256KB
+0xE8800000      0xE88FFFFF      Hardware device tree (cur bank)  11MB + 512KB
+0xE8020000      0xE86FFFFF      Linux.uImage (current bank)      7MB + 875KB
+0xE8000000      0xE801FFFF      RCW (current bank)               128KB
+
+
+Various Software configurations/environment variables/commands
+--------------------------------------------------------------
+The below commands apply to the board
+
+1. U-boot environment variable hwconfig
+   The default hwconfig is:
+       hwconfig=fsl_ddr:ctlr_intlv=null,bank_intlv=cs0_cs1;usb1:
+                                       dr_mode=host,phy_type=utmi
+   Note: For USB gadget set "dr_mode=peripheral"
+
+2. FMAN Ucode versions
+   fsl_fman_ucode_t1040.bin
+
+3. Switching to alternate bank
+   Commands for switching to alternate bank.
+
+       1. To change from vbank0 to vbank4
+               => qixis_reset altbank (it will boot using vbank4)
+
+       2.To change from vbank4 to vbank0
+               => qixis reset (it will boot using vbank0)
diff --git a/board/freescale/t104xrdb/ddr.c b/board/freescale/t104xrdb/ddr.c
new file mode 100644 (file)
index 0000000..8f58dd6
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <i2c.h>
+#include <hwconfig.h>
+#include <asm/mmu.h>
+#include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
+#include <asm/fsl_law.h>
+#include "ddr.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int fsl_ddr_get_dimm_params(dimm_params_t *pdimm,
+               unsigned int controller_number,
+               unsigned int dimm_number)
+{
+       const char dimm_model[] = "RAW timing DDR";
+
+       if ((controller_number == 0) && (dimm_number == 0)) {
+               memcpy(pdimm, &ddr_raw_timing, sizeof(dimm_params_t));
+               memset(pdimm->mpart, 0, sizeof(pdimm->mpart));
+               memcpy(pdimm->mpart, dimm_model, sizeof(dimm_model) - 1);
+       }
+
+       return 0;
+}
+
+void fsl_ddr_board_options(memctl_options_t *popts,
+                               dimm_params_t *pdimm,
+                               unsigned int ctrl_num)
+{
+       const struct board_specific_parameters *pbsp, *pbsp_highest = NULL;
+       ulong ddr_freq;
+
+       if (ctrl_num > 1) {
+               printf("Not supported controller number %d\n", ctrl_num);
+               return;
+       }
+       if (!pdimm->n_ranks)
+               return;
+
+       pbsp = udimms[0];
+
+       /* Get clk_adjust, cpo, write_data_delay,2t, according to the board ddr
+        * freqency and n_banks specified in board_specific_parameters table.
+        */
+       ddr_freq = get_ddr_freq(0) / 1000000;
+       while (pbsp->datarate_mhz_high) {
+               if (pbsp->n_ranks == pdimm->n_ranks &&
+                   (pdimm->rank_density >> 30) >= pbsp->rank_gb) {
+                       if (ddr_freq <= pbsp->datarate_mhz_high) {
+                               popts->cpo_override = pbsp->cpo;
+                               popts->write_data_delay =
+                                       pbsp->write_data_delay;
+                               popts->clk_adjust = pbsp->clk_adjust;
+                               popts->wrlvl_start = pbsp->wrlvl_start;
+                               popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2;
+                               popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3;
+                               popts->twot_en = pbsp->force_2t;
+                               goto found;
+                       }
+                       pbsp_highest = pbsp;
+               }
+               pbsp++;
+       }
+
+       if (pbsp_highest) {
+               printf("Error: board specific timing not found\n");
+               printf("for data rate %lu MT/s\n", ddr_freq);
+               printf("Trying to use the highest speed (%u) parameters\n",
+                      pbsp_highest->datarate_mhz_high);
+               popts->cpo_override = pbsp_highest->cpo;
+               popts->write_data_delay = pbsp_highest->write_data_delay;
+               popts->clk_adjust = pbsp_highest->clk_adjust;
+               popts->wrlvl_start = pbsp_highest->wrlvl_start;
+               popts->wrlvl_ctl_2 = pbsp->wrlvl_ctl_2;
+               popts->wrlvl_ctl_3 = pbsp->wrlvl_ctl_3;
+               popts->twot_en = pbsp_highest->force_2t;
+       } else {
+               panic("DIMM is not supported by this board");
+       }
+found:
+       debug("Found timing match: n_ranks %d, data rate %d, rank_gb %d\n"
+               "\tclk_adjust %d, wrlvl_start %d, wrlvl_ctrl_2 0x%x, "
+               "wrlvl_ctrl_3 0x%x\n",
+               pbsp->n_ranks, pbsp->datarate_mhz_high, pbsp->rank_gb,
+               pbsp->clk_adjust, pbsp->wrlvl_start, pbsp->wrlvl_ctl_2,
+               pbsp->wrlvl_ctl_3);
+
+       /*
+        * Factors to consider for half-strength driver enable:
+        *      - number of DIMMs installed
+        */
+       popts->half_strength_driver_enable = 0;
+       /*
+        * Write leveling override
+        */
+       popts->wrlvl_override = 1;
+       popts->wrlvl_sample = 0xf;
+
+       /*
+        * rtt and rtt_wr override
+        */
+       popts->rtt_override = 0;
+
+       /* Enable ZQ calibration */
+       popts->zq_en = 1;
+
+       /* DHC_EN =1, ODT = 75 Ohm */
+       popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
+       popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+}
+
+phys_size_t initdram(int board_type)
+{
+       phys_size_t dram_size;
+
+       puts("Initializing....using SPD\n");
+
+       dram_size = fsl_ddr_sdram();
+
+       dram_size = setup_ddr_tlbs(dram_size / 0x100000);
+       dram_size *= 0x100000;
+
+       puts("    DDR: ");
+       return dram_size;
+}
diff --git a/board/freescale/t104xrdb/ddr.h b/board/freescale/t104xrdb/ddr.h
new file mode 100644 (file)
index 0000000..9276b59
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __DDR_H__
+#define __DDR_H__
+
+dimm_params_t ddr_raw_timing = {
+       .n_ranks = 2,
+       .rank_density = 2147483648u,
+       .capacity = 4294967296u,
+       .primary_sdram_width = 64,
+       .ec_sdram_width = 8,
+       .registered_dimm = 0,
+       .mirrored_dimm = 1,
+       .n_row_addr = 15,
+       .n_col_addr = 10,
+       .n_banks_per_sdram_device = 8,
+       .edc_config = 2,        /* ECC */
+       .burst_lengths_bitmask = 0x0c,
+
+       .tckmin_x_ps = 1071,
+       .caslat_x = 0x2fe << 4, /* 5,6,7,8,9,10,11,13 */
+       .taa_ps = 13910,
+       .twr_ps = 15000,
+       .trcd_ps = 13910,
+       .trrd_ps = 6000,
+       .trp_ps = 13910,
+       .tras_ps = 34000,
+       .trc_ps = 48910,
+       .trfc_ps = 260000,
+       .twtr_ps = 7500,
+       .trtp_ps = 7500,
+       .refresh_rate_ps = 7800000,
+       .tfaw_ps = 35000,
+};
+
+struct board_specific_parameters {
+       u32 n_ranks;
+       u32 datarate_mhz_high;
+       u32 rank_gb;
+       u32 clk_adjust;
+       u32 wrlvl_start;
+       u32 wrlvl_ctl_2;
+       u32 wrlvl_ctl_3;
+       u32 cpo;
+       u32 write_data_delay;
+       u32 force_2t;
+};
+
+/*
+ * These tables contain all valid speeds we want to override with board
+ * specific parameters. datarate_mhz_high values need to be in ascending order
+ * for each n_ranks group.
+ */
+
+static const struct board_specific_parameters udimm0[] = {
+       /*
+        * memory controller 0
+        *   num|  hi| rank|  clk| wrlvl |   wrlvl   |  wrlvl | cpo  |wrdata|2T
+        * ranks| mhz| GB  |adjst| start |   ctl2    |  ctl3  |      |delay |
+        */
+       {2,  1066, 4, 8,     4, 0x05070609, 0x08090a08,   0xff,    2,  0},
+       {2,  1350, 4, 4,     8, 0x0809090b, 0x0c0c0d0a,   0xff,    2,  0},
+       {2,  1350, 0, 5,     7, 0x0709090b, 0x0c0c0d09,   0xff,    2,  0},
+       {2,  1666, 4, 4,     8, 0x080a0a0d, 0x0d10100b,   0xff,    2,  0},
+       {2,  1666, 0, 5,     7, 0x080a0a0c, 0x0d0d0e0a,   0xff,    2,  0},
+       {}
+};
+
+static const struct board_specific_parameters *udimms[] = {
+       udimm0,
+};
+#endif
diff --git a/board/freescale/t104xrdb/law.c b/board/freescale/t104xrdb/law.c
new file mode 100644 (file)
index 0000000..2362d43
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/fsl_law.h>
+#include <asm/mmu.h>
+
+struct law_entry law_table[] = {
+#ifndef CONFIG_SYS_NO_FLASH
+       SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_IFC),
+#endif
+#ifdef CONFIG_SYS_BMAN_MEM_PHYS
+       SET_LAW(CONFIG_SYS_BMAN_MEM_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_BMAN),
+#endif
+#ifdef CONFIG_SYS_QMAN_MEM_PHYS
+       SET_LAW(CONFIG_SYS_QMAN_MEM_PHYS, LAW_SIZE_32M, LAW_TRGT_IF_QMAN),
+#endif
+#ifdef CONFIG_SYS_CPLD_BASE_PHYS
+       SET_LAW(CONFIG_SYS_CPLD_BASE_PHYS, LAW_SIZE_128K, LAW_TRGT_IF_IFC),
+#endif
+#ifdef CONFIG_SYS_DCSRBAR_PHYS
+       SET_LAW(CONFIG_SYS_DCSRBAR_PHYS, LAW_SIZE_4M, LAW_TRGT_IF_DCSR),
+#endif
+#ifdef CONFIG_SYS_NAND_BASE_PHYS
+       SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_IFC),
+#endif
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
diff --git a/board/freescale/t104xrdb/pci.c b/board/freescale/t104xrdb/pci.c
new file mode 100644 (file)
index 0000000..c53e3b7
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <command.h>
+#include <pci.h>
+#include <asm/fsl_pci.h>
+#include <libfdt.h>
+#include <fdt_support.h>
+#include <asm/fsl_serdes.h>
+
+void pci_init_board(void)
+{
+       fsl_pcie_init_board(0);
+}
+
+void pci_of_setup(void *blob, bd_t *bd)
+{
+       FT_FSL_PCI_SETUP;
+}
diff --git a/board/freescale/t104xrdb/t104xrdb.c b/board/freescale/t104xrdb/t104xrdb.c
new file mode 100644 (file)
index 0000000..6e29d64
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <command.h>
+#include <netdev.h>
+#include <linux/compiler.h>
+#include <asm/mmu.h>
+#include <asm/processor.h>
+#include <asm/cache.h>
+#include <asm/immap_85xx.h>
+#include <asm/fsl_law.h>
+#include <asm/fsl_serdes.h>
+#include <asm/fsl_portals.h>
+#include <asm/fsl_liodn.h>
+#include <fm_eth.h>
+
+#include "t104xrdb.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int checkboard(void)
+{
+       struct cpu_type *cpu = gd->arch.cpu;
+
+       printf("Board: %sRDB\n", cpu->name);
+       return 0;
+}
+
+int board_early_init_r(void)
+{
+#ifdef CONFIG_SYS_FLASH_BASE
+       const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
+       const u8 flash_esel = find_tlb_idx((void *)flashbase, 1);
+
+       /*
+        * Remap Boot flash region to caching-inhibited
+        * so that flash can be erased properly.
+        */
+
+       /* Flush d-cache and invalidate i-cache of any FLASH data */
+       flush_dcache();
+       invalidate_icache();
+
+       /* invalidate existing TLB entry for flash */
+       disable_tlb(flash_esel);
+
+       set_tlb(1, flashbase, CONFIG_SYS_FLASH_BASE_PHYS,
+               MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+               0, flash_esel, BOOKE_PAGESZ_256M, 1);
+#endif
+       set_liodns();
+#ifdef CONFIG_SYS_DPAA_QBMAN
+       setup_portals();
+#endif
+
+       return 0;
+}
+
+int misc_init_r(void)
+{
+       return 0;
+}
+
+void ft_board_setup(void *blob, bd_t *bd)
+{
+       phys_addr_t base;
+       phys_size_t size;
+
+       ft_cpu_setup(blob, bd);
+
+       base = getenv_bootm_low();
+       size = getenv_bootm_size();
+
+       fdt_fixup_memory(blob, (u64)base, (u64)size);
+
+#ifdef CONFIG_PCI
+       pci_of_setup(blob, bd);
+#endif
+
+       fdt_fixup_liodn(blob);
+
+#ifdef CONFIG_HAS_FSL_DR_USB
+       fdt_fixup_dr_usb(blob, bd);
+#endif
+
+#ifdef CONFIG_SYS_DPAA_FMAN
+       fdt_fixup_fman_ethernet(blob);
+#endif
+}
diff --git a/board/freescale/t104xrdb/t104xrdb.h b/board/freescale/t104xrdb/t104xrdb.h
new file mode 100644 (file)
index 0000000..e7cc0c7
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#ifndef __T104x_RDB_H__
+#define __T104x_RDB_H__
+
+void fdt_fixup_board_enet(void *blob);
+void pci_of_setup(void *blob, bd_t *bd);
+
+#endif
diff --git a/board/freescale/t104xrdb/tlb.c b/board/freescale/t104xrdb/tlb.c
new file mode 100644 (file)
index 0000000..84f97a4
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+
+#include <common.h>
+#include <asm/mmu.h>
+
+struct fsl_e_tlb_entry tlb_table[] = {
+       /* TLB 0 - for temp stack in cache */
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR,
+                     CONFIG_SYS_INIT_RAM_ADDR_PHYS,
+                     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_PHYS + 4 * 1024,
+                     MAS3_SX|MAS3_SW|MAS3_SR, 0,
+                     0, 0, BOOKE_PAGESZ_4K, 0),
+       SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024,
+                     CONFIG_SYS_INIT_RAM_ADDR_PHYS + 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_PHYS + 12 * 1024,
+                     MAS3_SX|MAS3_SW|MAS3_SR, 0,
+                     0, 0, BOOKE_PAGESZ_4K, 0),
+
+       /* TLB 1 */
+       /* *I*** - Covers boot page */
+#if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L3_ADDR)
+       /*
+        * *I*G - L3SRAM. When L3 is used as 256K SRAM, the address of the
+        * SRAM is at 0xfffc0000, it covered the 0xfffff000.
+        */
+       SET_TLB_ENTRY(1, CONFIG_SYS_INIT_L3_ADDR, CONFIG_SYS_INIT_L3_ADDR,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 0, BOOKE_PAGESZ_256K, 1),
+#else
+       SET_TLB_ENTRY(1, 0xfffff000, 0xfffff000,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 0, BOOKE_PAGESZ_4K, 1),
+#endif
+
+       /* *I*G* - CCSRBAR */
+       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_16M, 1),
+
+       /* *I*G* - Flash, localbus */
+       /* This will be changed to *I*G* after relocation to RAM. */
+       SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE_PHYS,
+                     MAS3_SX|MAS3_SR, MAS2_W|MAS2_G,
+                     0, 2, BOOKE_PAGESZ_256M, 1),
+
+       /* *I*G* - PCI */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_MEM_VIRT, CONFIG_SYS_PCIE1_MEM_PHYS,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 3, BOOKE_PAGESZ_1G, 1),
+
+       /* *I*G* - PCI I/O */
+       SET_TLB_ENTRY(1, CONFIG_SYS_PCIE1_IO_VIRT, CONFIG_SYS_PCIE1_IO_PHYS,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 4, BOOKE_PAGESZ_256K, 1),
+
+       /* Bman/Qman */
+#ifdef CONFIG_SYS_BMAN_MEM_PHYS
+       SET_TLB_ENTRY(1, CONFIG_SYS_BMAN_MEM_BASE, CONFIG_SYS_BMAN_MEM_PHYS,
+                     MAS3_SX|MAS3_SW|MAS3_SR, 0,
+                     0, 5, BOOKE_PAGESZ_16M, 1),
+       SET_TLB_ENTRY(1, CONFIG_SYS_BMAN_MEM_BASE + 0x01000000,
+                     CONFIG_SYS_BMAN_MEM_PHYS + 0x01000000,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 6, BOOKE_PAGESZ_16M, 1),
+#endif
+#ifdef CONFIG_SYS_QMAN_MEM_PHYS
+       SET_TLB_ENTRY(1, CONFIG_SYS_QMAN_MEM_BASE, CONFIG_SYS_QMAN_MEM_PHYS,
+                     MAS3_SX|MAS3_SW|MAS3_SR, 0,
+                     0, 7, BOOKE_PAGESZ_16M, 1),
+       SET_TLB_ENTRY(1, CONFIG_SYS_QMAN_MEM_BASE + 0x01000000,
+                     CONFIG_SYS_QMAN_MEM_PHYS + 0x01000000,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 8, BOOKE_PAGESZ_16M, 1),
+#endif
+#ifdef CONFIG_SYS_DCSRBAR_PHYS
+       SET_TLB_ENTRY(1, CONFIG_SYS_DCSRBAR, CONFIG_SYS_DCSRBAR_PHYS,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 9, BOOKE_PAGESZ_4M, 1),
+#endif
+#ifdef CONFIG_SYS_NAND_BASE
+       /*
+        * *I*G - NAND
+        * entry 14 and 15 has been used hard coded, they will be disabled
+        * in cpu_init_f, so we use entry 16 for nand.
+        */
+       SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE_PHYS,
+                     MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 10, BOOKE_PAGESZ_64K, 1),
+#endif
+#ifdef CONFIG_SYS_CPLD_BASE
+       SET_TLB_ENTRY(1, CONFIG_SYS_CPLD_BASE, CONFIG_SYS_CPLD_BASE_PHYS,
+                     MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
+                     0, 11, BOOKE_PAGESZ_256K, 1),
+#endif
+};
+
+int num_tlb_entries = ARRAY_SIZE(tlb_table);
index e9c60286ce1ee6988d50bd69975c2313f3462fcf..309c8794890e0d20238b794c7a9c65af60f50a6f 100644 (file)
@@ -18,5 +18,4 @@ CONFIG_SYS_TEXT_BASE = 0x00000000
 # U-BOOT IN SDRAM
 #CONFIG_SYS_TEXT_BASE = 0x60000000
 
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-       -I$(TOPDIR)/board
+PLATFORM_CPPFLAGS += -I$(TOPDIR)/board
index 6c31a17f8cce6a04193ead01302c4c4f71779df1..d57efae1585aac287ec94e27c2c60385cb586a0c 100644 (file)
@@ -16,5 +16,4 @@ CONFIG_SYS_TEXT_BASE = 0x00000000
 # U-BOOT IN SDRAM
 #CONFIG_SYS_TEXT_BASE = 0x40000000
 
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-       -I$(TOPDIR)/board
+PLATFORM_CPPFLAGS += -I$(TOPDIR)/board
index 3b59cca5e6985f88ad30ced7bec956e262d13149..e87320be9962aedd1a635e4470de1d466bb4cd69 100644 (file)
@@ -15,5 +15,4 @@ CONFIG_SYS_TEXT_BASE = 0x00000000
 # U-BOOT IN RAM
 #CONFIG_SYS_TEXT_BASE = 0x40000000
 
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-       -I$(TOPDIR)/board
+PLATFORM_CPPFLAGS += -I$(TOPDIR)/board
index d98ed54c07c094f305d2f0400a922f3184d2ea77..df26f82c9cfa0d2f6cd7ec5ee65af739652894f7 100644 (file)
@@ -15,5 +15,4 @@ CONFIG_SYS_TEXT_BASE = 0x00000000
 # U-BOOT IN RAM
 #CONFIG_SYS_TEXT_BASE = 0x40000000
 
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-       -I$(TOPDIR)/board
+PLATFORM_CPPFLAGS += -I$(TOPDIR)/board
index 59e4e31690398def9fb9bf3edf043aad875e1caf..99f9a6872554409353e26ff07d4ddcb9f0fd060c 100644 (file)
@@ -15,5 +15,4 @@ CONFIG_SYS_TEXT_BASE = 0x00000000
 # RUN U-BOOT FROM RAM
 #CONFIG_SYS_TEXT_BASE = 0x40000000
 
-PLATFORM_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-       -I$(TOPDIR)/board
+PLATFORM_CPPFLAGS += -I$(TOPDIR)/board
index e217f0681947c401b5af4bf8dc774dac0c0a6a5c..70ab702fd979214f0cfdbcf3e228cb1793483799 100644 (file)
@@ -18,11 +18,11 @@ SECTIONS
 
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-    lib/libgeneric.o                   (.text*)
-    net/libnet.o                       (.text*)
-    arch/powerpc/cpu/mpc8xx/libmpc8xx.o        (.text*)
-    board/genietv/libgenietv.o         (.text*)
-    arch/powerpc/lib/libpowerpc.o      (.text*)
+    lib/built-in.o                     (.text*)
+    net/built-in.o                     (.text*)
+    arch/powerpc/cpu/mpc8xx/built-in.o (.text*)
+    board/genietv/built-in.o           (.text*)
+    arch/powerpc/lib/built-in.o                (.text*)
     *(.text.do_load_serial*)
     *(.text.do_mem_*)
     *(.text.do_bootm*)
index b654a96e0b73f49ba7ec22f29fb8e57dd4784de6..d4fa15344cc642539fd2aa2ac86c2757476e4cfe 100644 (file)
@@ -10,8 +10,5 @@ obj-y := h2200.o
 
 extra-y := h2200-header.bin
 
-$(obj)h2200-header.o: h2200-header.S
-       $(CC) $(CFLAGS) -c -o $@ $<
-
 $(obj)h2200-header.bin: $(obj)h2200-header.o
        $(OBJCOPY) -O binary $< $@
index 9419f83a70c60e37d65c69a1433b12661e557579..0309860391736ce9e615e8bf56ea2df6e70b9156 100644 (file)
@@ -17,7 +17,7 @@ SECTIONS
     /* the sector layout of our flash chips!   XXX FIXME XXX   */
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-    board/hermes/libhermes.o           (.text*)
+    board/hermes/built-in.o            (.text*)
 
     . = env_offset;
     common/env_embedded.o              (.text*)
index b44582fbeae742c367bd0d164fd9a7d62a74e4ff..20f193ab1d8b476a198c83c79af170d5251f8e2b 100644 (file)
@@ -5,7 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
 obj-y  := km82xx.o ../common/common.o ../common/ivm.o
index 7bdddf3bc303337d95c1dd56a759348169621d05..6c3268853e5fd72c0d64b0326c4e6bc411700237 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  += km83xx.o ../common/common.o ../common/ivm.o km83xx_i2c.o
index 32eaa9357ffa9df817dbbf2c8fc216ef331ba923..a17d8d963a98c2618e156818e4122ffb67ca804e 100644 (file)
@@ -6,10 +6,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := km_arm.o ../common/common.o ../common/ivm.o
 
 ifdef CONFIG_KM_FPGA_CONFIG
index 64eb37c9d7a7a7f666acb881c8f0609e9a2148f0..3e69ee2f15e18401fccbce16c3f0e6571ecbe1e9 100644 (file)
@@ -8,9 +8,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
-obj-y  := $(BOARD).o ddr.o eth.o tlb.o pci.o law.o \
+obj-y  := kmp204x.o ddr.o eth.o tlb.o pci.o law.o \
        ../common/common.o ../common/ivm.o
index b669ffefecdc822f2347e60b9b8dae57dc8cc7d2..ea36fa4e192f06223cfb5588e6242c3d3e09d1a7 100644 (file)
@@ -289,7 +289,6 @@ void adjust_core_voltage(void)
 {
        u8 data;
 
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
        data = 0x35;
        i2c_set_bus_num(0);
        i2c_write(0x40, 3, 1, &data, 1);
index b3ad86ce187492f0d4d311440154a6559ccfbac2..c896fcd64d7b4d74fdcf2984a981cfc362b34608 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = kup4k.o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
index 05a1afc3a9547c7d706e30e1779d94d717d4f4b5..6945943d09f2885d9f3a0e95d66341aa193f5a65 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = kup4x.o ../common/flash.o ../common/kup.o ../common/load_sernum_ethaddr.o ../common/pcmcia.o
index b6c68da7a89e5d31b012a6cfc12e408ee677f978..15699054603a1d18c9bd549a350bb27cc623a66b 100644 (file)
@@ -98,8 +98,8 @@ static void am3517_evm_musb_init(void)
  */
 int misc_init_r(void)
 {
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#ifdef CONFIG_SYS_I2C_OMAP34XX
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 #endif
 
        dieid_num_r();
index 08ce014aac61ad2a03ecca061ad6057e0f59d86a..e885b7c16051debb4b73611cf4db45f2dbddcd78 100644 (file)
@@ -18,7 +18,7 @@ SECTIONS
     /* the first two sectors (=8KB) of our S29GL flash chip */
     arch/powerpc/cpu/mpc5xxx/start.o   (.text*)
     arch/powerpc/cpu/mpc5xxx/traps.o   (.text*)
-    board/matrix_vision/common/libmatrix_vision.o (.text*)
+    board/matrix_vision/common/built-in.o      (.text*)
 
     /* This is only needed to force failure if size of above code will ever */
     /* increase and grow into reserved space. */
index 509eb591b34cfc1d1389d75cc596b7aa1e1c4bea..5bcf1305014e8bfa0592c3523eec8e068b824e2f 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = mip405.o cmd_mip405.o \
                ../common/pci.o \
                ../common/usb_uhci.o \
index 67381c108acc62de0c8d83754eedea460571b18e..98220826126bdd0266a68ba15e4572613c2285fe 100644 (file)
@@ -5,9 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  :=  pati.o cmd_pati.o \
                ../common/common_util.o
index 3d73cc3f8d6979900d73ad9771f83e20f86b8edf..0a3d059e9c0f5ef0b5309424dad16bab9ab41cbf 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  = pip405.o cmd_pip405.o \
                ../common/pci.o \
                ../common/isa.o \
index e0e96691c5fa76d367557b632e1f9b654d224413..175a19fa36751d567aa094f327a8ae697ca02cfe 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := ../common/common_util.o
 obj-y  += vcma9.o cmd_vcma9.o
 
index 121354bfebb098edded059775c5c5bd5ede304fa..5034a9675a0d258ad5e065c4a2597720ff328067 100644 (file)
@@ -14,12 +14,12 @@ SECTIONS
   .text      :
   {
     arch/powerpc/cpu/mpc824x/start.o           (.text*)
-    lib/libgeneric.o                           (.text*)
-    net/libnet.o                               (.text*)
-    drivers/pci/libpci.o                       (.text*)
-    arch/powerpc/cpu/mpc824x/libmpc824x.o      (.text*)
-    board/mvblue/libmvblue.o                   (.text*)
-    arch/powerpc/lib/libpowerpc.o              (.text*)
+    lib/built-in.o                             (.text*)
+    net/built-in.o                             (.text*)
+    drivers/pci/built-in.o                     (.text*)
+    arch/powerpc/cpu/mpc824x/built-in.o                (.text*)
+    board/mvblue/built-in.o                    (.text*)
+    arch/powerpc/lib/built-in.o                        (.text*)
 
     . = DEFINED(env_offset) ? env_offset : .;
     common/env_embedded.o      (.ppcenv*)
index f828f52c25462dd27b9084bcbe7581df13345f50..1f7c31d64b4e68da77477689882a77028c077476 100644 (file)
@@ -14,6 +14,4 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-$(shell mkdir -p $(obj)../cardhu)
-
 obj-y  = ../cardhu/cardhu.o
index 7265cfcccc81b2ce748397d8d60602c910af4d0d..f67044f2cf276e1dabeb29c04d3872267932d51b 100644 (file)
@@ -5,6 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(obj)../seaboard)
-
 obj-y  = ../seaboard/seaboard.o
index aace42a8be504446b5cd44d93397f5413c5231dc..9ac35d2f4e331056bff1b1359b270688444e97c2 100644 (file)
@@ -92,7 +92,7 @@ int get_board_revision(void)
 {
        int revision;
 
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+#ifdef CONFIG_SYS_I2C_OMAP34XX
        unsigned char data;
 
        /* board revisions <= R2410 connect 4030 irq_1 to gpio112             */
index dafb1eb8e633fdbf3443a2038ca18160f65407a3..034886ad5d9da980ffbd6c7cfe5a0c64491b0d8d 100644 (file)
@@ -91,7 +91,7 @@ void set_mux_conf_regs(void)
 {
        /* Initalize the board header */
        enable_i2c0_pin_mux();
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 
        enable_board_pin_mux();
 }
@@ -108,7 +108,7 @@ void sdram_init(void)
  */
 int board_init(void)
 {
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
 
index 43caffbc22838ca6f79eedb5d0ff5a2327aa7148..6ddda2296d310ee36fd4346797021ba228f60dd9 100644 (file)
@@ -5,10 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../../Marvell/common)
-endif
-
 obj-y  = misc.o
 obj-y  += p3mx.o mpsc.o mv_eth.o pci.o sdram_init.o serial.o \
                ../../Marvell/common/i2c.o ../../Marvell/common/memory.o
index 9a66cfdfe81d0313f5e3bbfd25d18ac4c546d2cf..364f163e4fc9a4acfd974425a37f15fcc1b82517 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := pci5441.o ../common/AMDLV065D.o
index 00ff743c960d2c0f9fd5d0c59992521bb19a9d77..776fa8ab4029fdedcaea11ad24cc07f86ac48bbe 100644 (file)
@@ -8,7 +8,6 @@
 CONFIG_SYS_TEXT_BASE = 0x018e0000
 
 PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
-PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/$(VENDOR)/include
 
 ifeq ($(debug),1)
 PLATFORM_CPPFLAGS += -DDEBUG
index 286db94aefdc50f30be0063d966645d7f00a905e..5450f93ac3ebdd905baa8900ec72f1fe00ebc1d5 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 obj-y  := pk1c20.o led.o ../common/AMDLV065D.o
index 7b0810a30251e2af2ace37aa53f47bb230e61812..83cfadc1130a6c56d602ecbfa1d471c59c932fb4 100644 (file)
@@ -8,7 +8,6 @@
 CONFIG_SYS_TEXT_BASE = 0x01fc0000
 
 PLATFORM_CPPFLAGS += -mno-hw-div -mno-hw-mul
-PLATFORM_CPPFLAGS += -I$(TOPDIR)/board/$(VENDOR)/include
 
 ifeq ($(debug),1)
 PLATFORM_CPPFLAGS += -DDEBUG
index 191f9eb8370203c541f397110231b3f68f21fa3d..7676cf43b17fc61ce9b5b6509e3e994e51a27365 100644 (file)
@@ -19,10 +19,10 @@ SECTIONS
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
 
-    lib/libgeneric.o                   (.text*)
-    net/libnet.o                       (.text*)
-    arch/powerpc/cpu/mpc8xx/libmpc8xx.o        (.text*)
-    arch/powerpc/lib/libpowerpc.o      (.text*)
+    lib/built-in.o                     (.text*)
+    net/built-in.o                     (.text*)
+    arch/powerpc/cpu/mpc8xx/built-in.o (.text*)
+    arch/powerpc/lib/built-in.o                (.text*)
 
     . = env_offset;
     common/env_embedded.o              (.text*)
index e2d365a1875112dcd96ae962de7b148eecba9995..fb4acf3641b52fbb3445facb8f575fb573482d4f 100644 (file)
@@ -57,8 +57,7 @@ int board_late_init(void)
 
        outl(inl(MSTPCR2) & ~0x10000000, MSTPCR2);
 
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-       i2c_set_bus_num(CONFIG_SYS_I2C_MODULE); /* Use I2C 1 */
+       i2c_set_bus_num(1); /* Use I2C 1 */
 
        /* Read MAC address */
        i2c_read(0x50, 0x10, 0, mac, 6);
index 05c818791c4909c1325eb96841fea7cc52df2b45..f890008be22885f86ce712d94a1c6cee86718ca6 100644 (file)
@@ -9,10 +9,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 # TBS: add for debugging purposes
 BUILDUSER := $(shell whoami)
 FORCEBUILD := $(shell rm -f karef.o)
index 76dfffc9c7a3088a63ca9f2ea9e21f4ef8aef673..37d91a51a3a22f80c1d0e8356f3634c701b085b4 100644 (file)
@@ -8,10 +8,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 # TBS: add for debugging purposes
 BUILDUSER := $(shell whoami)
 FORCEBUILD := $(shell rm -f metrobox.o)
index 6279c3281ce665a13febef5023d4cf2aa955b61e..32d2ee4de9490d5b0e4ea308f87d222d33f815fd 100644 (file)
@@ -42,7 +42,7 @@ void set_mux_conf_regs(void)
 {
        /* Initalize the board header */
        enable_i2c0_pin_mux();
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       i2c_set_bus_num(0);
        if (read_eeprom() < 0)
                puts("Could not get board ID.\n");
 
@@ -67,7 +67,7 @@ int board_init(void)
 #if defined(CONFIG_HW_WATCHDOG)
        hw_watchdog_init();
 #endif /* defined(CONFIG_HW_WATCHDOG) */
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       i2c_set_bus_num(0);
        if (read_eeprom() < 0)
                puts("Could not get board ID.\n");
 
index 5129c6e3b148bbb33c2b08689b7238e18958a066..f15993216b7e466e97213017b9a0849d4617b965 100644 (file)
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 ifdef CONFIG_SPL_BUILD
 obj-y  := mux.o
 endif
index 5129c6e3b148bbb33c2b08689b7238e18958a066..f15993216b7e466e97213017b9a0849d4617b965 100644 (file)
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 ifdef CONFIG_SPL_BUILD
 obj-y  := mux.o
 endif
index 5129c6e3b148bbb33c2b08689b7238e18958a066..f15993216b7e466e97213017b9a0849d4617b965 100644 (file)
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../common)
-endif
-
 ifdef CONFIG_SPL_BUILD
 obj-y  := mux.o
 endif
index 2a68934c327894df516109bacc886f0745f336aa..463af7eaa4c57b7731a9cd2cd79b4e48d1a3ef3b 100644 (file)
@@ -18,8 +18,8 @@ SECTIONS
 
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-    net/libnet.o                       (.text*)
-    arch/powerpc/cpu/mpc8xx/libmpc8xx.o        (.text*)
+    net/built-in.o                     (.text*)
+    arch/powerpc/cpu/mpc8xx/built-in.o (.text*)
     *(.text.v*printf)
 
     . = DEFINED(env_offset) ? env_offset : .;
index 49226251b2fca2ed64a1a7ef27d7dabd51de54b2..df564e9395983837d590b0d5e321fda8469800d6 100644 (file)
@@ -17,11 +17,11 @@ SECTIONS
     /* the sector layout of our flash chips!   XXX FIXME XXX   */
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-    lib/libgeneric.o                   (.text*)
-    net/libnet.o                       (.text*)
-    arch/powerpc/cpu/mpc8xx/libmpc8xx.o        (.text*)
-    arch/powerpc/lib/libpowerpc.o      (.text*)
-    board/svm_sc8xx/libsvm_sc8xx.o     (.text*)
+    lib/built-in.o                     (.text*)
+    net/built-in.o                     (.text*)
+    arch/powerpc/cpu/mpc8xx/built-in.o (.text*)
+    arch/powerpc/lib/built-in.o                (.text*)
+    board/svm_sc8xx/built-in.o         (.text*)
     *(.text.*printf)
     *(.text.do_mem_*)
     *(.text.flash*)
index 0299dd6486f093679ac2b6fbf2591bd03ced2dd4..db225ce1d9fdcaae7f3c19e036210ed683ae5e7f 100644 (file)
@@ -397,7 +397,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
        struct am335x_baseboard_id header;
 
        enable_i2c0_pin_mux();
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
        if (read_eeprom(&header) < 0)
                puts("Could not get board ID.\n");
 
index a173f620ef99636d1bfff4904895658fee6764a4..e77a501f56758d8fc8ca4c334596a9020897cc4e 100644 (file)
@@ -35,7 +35,7 @@ SECTIONS
        {
                *(.__image_copy_start)
                CPUDIR/start.o (.text*)
-               board/ti/am335x/libam335x.o (.text*)
+               board/ti/am335x/built-in.o (.text*)
                *(.text*)
        }
 
index 5eb97ff3780ccfc44c6ed4a948cda3af9c05e130..a649697257a8e6c61e479f68b8823e7e0cc104ad 100644 (file)
@@ -43,8 +43,8 @@ int board_init(void)
  */
 int misc_init_r(void)
 {
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#ifdef CONFIG_SYS_I2C_OMAP34XX
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 #endif
 
        dieid_num_r();
index 9f55e8f3589a4f3b5a3c6b0bc29e0195c673fa09..7a858be5e492daeaeba7a7619058e231078d3e73 100644 (file)
@@ -5,5 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-y  := $(BOARD).o
+obj-y  := beagle.o
 obj-$(CONFIG_STATUS_LED) += led.o
index c71c21852998d01be335746f70b1e6ac60eeee5b..81dd081d76a98b6f864037367abf05cc12e934d4 100644 (file)
@@ -146,8 +146,8 @@ void get_board_mem_timings(struct board_sdrc_timings *timings)
 int misc_init_r(void)
 {
 
-#ifdef CONFIG_DRIVER_OMAP34XX_I2C
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#ifdef CONFIG_SYS_I2C_OMAP34XX
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
 #endif
 
 #if defined(CONFIG_CMD_NET)
index 7ca3fe596f885d54449193cbe4749b2d6a472ecc..ebeac70ea14dccdc1ee074084ba96c1df278bfed 100644 (file)
@@ -4,9 +4,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(obj)../../nvidia/common)
-$(shell mkdir -p $(obj)../colibri_t20-common)
-
 obj-y  := ../../nvidia/common/board.o
 obj-y  += ../colibri_t20-common/colibri_t20-common.o
 obj-y  += colibri_t20_iris.o
index 757f4729ab601fd99205428da12df2dc405e4555..80c1eba87c99081fb415173b701d7c4ce98f5889 100644 (file)
@@ -6,6 +6,3 @@
 #
 
 obj-y  := tqm5200.o cmd_stk52xx.o cmd_tb5200.o cam5200_flash.o
-
-$(obj)cam5200_flash.o: cam5200_flash.c
-       $(CC) $(CFLAGS) -c -o $@ $<
index dc4a52808365e1b292f579dab27d7d21127429e3..6b8573d9abf71779a507ac544ebe74122a266e25 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../tqm8xx/)
-endif
-
 obj-y  = tqm8260.o ../tqm8xx/load_sernum_ethaddr.o
index 09af765f05a5dbe115a5d9269ce2ab3bfcd7dae9..8bf02414e300e43edb30bde1e06bf994441bbd01 100644 (file)
@@ -5,8 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../tqm8xx/)
-endif
-
 obj-y  = tqm8272.o ../tqm8xx/load_sernum_ethaddr.o nand.o
index cbfc94f57ea41e743d4098f9e096d94e685c5bc6..b77ae56c512040fded590a6dcea5d75a1b62ef4e 100644 (file)
@@ -18,13 +18,13 @@ SECTIONS
 
     arch/powerpc/cpu/mpc8xx/start.o    (.text*)
     arch/powerpc/cpu/mpc8xx/traps.o    (.text*)
-    arch/powerpc/cpu/mpc8xx/libmpc8xx.o (.text*)
-    arch/powerpc/lib/libpowerpc.o      (.text*)
-    board/tqc/tqm8xx/libtqm8xx.o       (.text*)
-    disk/libdisk.o                     (.text*)
-    drivers/net/libnet.o               (.text*)
-    drivers/libdrivers.o               (.text.pcmcia_on)
-    drivers/libdrivers.o               (.text.pcmcia_hardware_enable)
+    arch/powerpc/cpu/mpc8xx/built-in.o (.text*)
+    arch/powerpc/lib/built-in.o                (.text*)
+    board/tqc/tqm8xx/built-in.o                (.text*)
+    disk/built-in.o                    (.text*)
+    drivers/net/built-in.o             (.text*)
+    drivers/built-in.o                 (.text.pcmcia_on)
+    drivers/built-in.o                 (.text.pcmcia_hardware_enable)
 
     . = DEFINED(env_offset) ? env_offset : .;
     common/env_embedded.o      (.ppcenv*)
index 7eac4975ba1984fa5ef8de25a47acac6ae7800dc..c9b50e9f4dd5d9d43aa5ae8940adb6a0025e5167 100644 (file)
@@ -20,8 +20,8 @@ SECTIONS
        .text.0 :
        {
                arch/arm/cpu/pxa/start.o                (.text*)
-               board/vpac270/libvpac270.o              (.text*)
-               drivers/mtd/onenand/libonenand.o        (.text*)
+               board/vpac270/built-in.o                (.text*)
+               drivers/mtd/onenand/built-in.o          (.text*)
        }
 
 
index 1562f1775e608b163f521860e62ae6e8f1748e8f..c9da870657477df299f1708d593d2b704c037285 100644 (file)
@@ -9,8 +9,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../../xilinx/ppc405-generic)
-endif
-
 obj-y  += ../../xilinx/ppc405-generic/xilinx_ppc405_generic.o
index b2227c58a5230d723aa454e476aa0405764d0803..0acd95d6e4e2b01a54883f56837d67c6ee4b49c3 100644 (file)
@@ -9,9 +9,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifneq ($(OBJTREE),$(SRCTREE))
-$(shell mkdir -p $(obj)../../xilinx/ppc440-generic)
-endif
-
 obj-y  += ../../xilinx/ppc440-generic/xilinx_ppc440_generic.o
 extra-y        += ../../xilinx/ppc440-generic/init.o
index caba64e432cd98d0c94e4e190c65074d2428abd1..e742746281771eda03f08dd7327b2d47c64537e4 100644 (file)
@@ -963,6 +963,8 @@ Active  powerpc     mpc85xx        -           freescale       t4qds
 Active  powerpc     mpc85xx        -           freescale       t4qds               T4240QDS_SPIFLASH                    T4240QDS:PPC_T4240,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF80000                                                                  -
 Active  powerpc     mpc85xx        -           freescale       t4qds               T4240QDS_SRIO_PCIE_BOOT              T4240QDS:PPC_T4240,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF80000                                                                  -
 Active  powerpc     mpc85xx        -           freescale       t1040qds            T1040QDS                             T1040QDS:PPC_T1040                                                                                                                Naveen Burmi <NaveenBurmi@freescale.com>
+Active  powerpc     mpc85xx        -           freescale       t104xrdb            T1040RDB                             T1040RDB:PPC_T1040                                                                                                             Poonam Aggrwal  <poonam.aggrwal@freescale.com>
+Active  powerpc     mpc85xx        -           freescale       t104xrdb            T1042RDB_PI                          T1042RDB_PI:PPC_T1042                                                                                                          Poonam Aggrwal  <poonam.aggrwal@freescale.com>
 Active  powerpc     mpc85xx        -           gdsys           p1022               controlcenterd_36BIT_SDCARD          controlcenterd:36BIT,SDCARD                                                                                                       Dirk Eibach <eibach@gdsys.de>
 Active  powerpc     mpc85xx        -           gdsys           p1022               controlcenterd_36BIT_SDCARD_DEVELOP  controlcenterd:36BIT,SDCARD,DEVELOP                                                                                               Dirk Eibach <eibach@gdsys.de>
 Active  powerpc     mpc85xx        -           gdsys           p1022               controlcenterd_TRAILBLAZER           controlcenterd:TRAILBLAZER,SPIFLASH                                                                                               Dirk Eibach <eibach@gdsys.de>
index 32acbf93570cce26044c17eee4b8c79cf4b13c38..74404beb3635624cf04fa12159f66f531e638dc7 100644 (file)
@@ -232,14 +232,11 @@ obj-y += stdio.o
 
 CPPFLAGS += -I..
 
-$(obj)env_embedded.o: $(src)env_embedded.c $(obj)../tools/envcrc
+$(obj)env_embedded.o: $(src)env_embedded.c
        $(CC) $(AFLAGS) -Wa,--no-warn \
                -DENV_CRC=$(shell $(obj)../tools/envcrc) \
                -c -o $@ $(src)env_embedded.c
 
-$(obj)../tools/envcrc:
-       $(MAKE) -C ../tools
-
 # SEE README.arm-unaligned-accesses
 $(obj)hush.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
 $(obj)fdt_support.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
index ef694d8f87e1fb8fe145f3f057ab1c9b9bdba628..02539c40a005793efc18cadaf1722fa8b7aec78e 100644 (file)
@@ -161,7 +161,7 @@ int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt
 #if defined(CONFIG_SPI) && !defined(CONFIG_ENV_EEPROM_IS_ON_I2C)
                spi_read (addr, alen, buffer, len);
 #else
-               if (i2c_read (addr[0], offset, alen-1, buffer, len) != 0)
+               if (i2c_read (addr[0], addr[1], alen-1, buffer, len) != 0)
                        rcode = 1;
 #endif
                buffer += len;
@@ -339,7 +339,7 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cn
                /* Write is enabled ... now write eeprom value.
                 */
 #endif
-               if (i2c_write (addr[0], offset, alen-1, buffer, len) != 0)
+               if (i2c_write (addr[0], addr[1], alen-1, buffer, len) != 0)
                        rcode = 1;
 
 #endif
index 722c40b3f33044bb1680643c47b236308cf1dd2b..872cd8542800895cd94f13d5290fd1a82c3e9cf7 100644 (file)
@@ -325,8 +325,8 @@ int hash_command(const char *algo_name, int flags, cmd_tbl_t *cmdtp, int flag,
                printf("CRC32 for %08lx ... %08lx ==> %08lx\n",
                                addr, addr + len - 1, crc);
 
-               if (argc > 3) {
-                       ptr = (ulong *)simple_strtoul(argv[3], NULL, 16);
+               if (argc >= 3) {
+                       ptr = (ulong *)simple_strtoul(argv[0], NULL, 16);
                        *ptr = crc;
                }
        }
index 344138759ca9381bdadbe02323f55fafcf76c9d5..206de203cc8ff0f289e83803f24bfc09a6b45072 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -13,12 +13,6 @@ SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 
 export SHELL
 
-ifeq ($(CONFIG_TPL_BUILD),y)
-SPL_BIN := u-boot-tpl
-else
-SPL_BIN := u-boot-spl
-endif
-
 ifeq ($(CURDIR),$(SRCTREE))
 dir :=
 else
diff --git a/doc/README.p1010rdb b/doc/README.p1010rdb
deleted file mode 100644 (file)
index 6b2b5ff..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-Overview
-=========
-The P1010RDB is a Freescale reference design board that hosts the P1010 SoC.
-
-The P1010 is a cost-effective, low-power, highly integrated host processor
-based on a Power Architecture e500v2 core (maximum core frequency 800/1000 MHz),
-that addresses the requirements of several routing, gateways, storage, consumer,
-and industrial applications. Applications of interest include the main CPUs and
-I/O processors in network attached storage (NAS), the voice over IP (VoIP)
-router/gateway, and wireless LAN (WLAN) and industrial controllers.
-
-The P1010RDB board features are as follows:
-Memory subsystem:
-       - 1Gbyte unbuffered DDR3 SDRAM discrete devices (32-bit bus)
-       - 32 Mbyte NOR flash single-chip memory
-       - 32 Mbyte NAND flash memory
-       - 256 Kbit M24256 I2C EEPROM
-       - 16 Mbyte SPI memory
-       - I2C Board EEPROM 128x8 bit memory
-       - SD/MMC connector to interface with the SD memory card
-Interfaces:
-       - PCIe:
-               - Lane0: x1 mini-PCIe slot
-               - Lane1: x1 PCIe standard slot
-       - SATA:
-               - 1 internal SATA connector to 2.5" 160G SATA2 HDD
-               - 1 eSATA connector to rear panel
-       - 10/100/1000 BaseT Ethernet ports:
-               - eTSEC1, RGMII: one 10/100/1000 port using Vitesse VSC8641XKO
-               - eTSEC2, SGMII: one 10/100/1000 port using Vitesse VSC8221
-               - eTSEC3, SGMII: one 10/100/1000 port using Vitesse VSC8221
-       - USB 2.0 port:
-               - x1 USB2.0 port: via an ULPI PHY to micro-AB connector
-               - x1 USB2.0 poort via an internal PHY to micro-AB connector
-       - FlexCAN ports:
-               - x2 DB-9 female connectors for FlexCAN bus(revision 2.0B)
-                  interface;
-       - DUART interface:
-               - DUART interface: supports two UARTs up to 115200 bps for
-                 console display
-               - J45 connectors are used for these 2 UART ports.
-       - TDM
-               - 2 FXS ports connected via an external SLIC to the TDM
-                  interface. SLIC is controllled via SPI.
-               - 1 FXO port connected via a relay to FXS for switchover to
-                  POTS
-Board connectors:
-       - Mini-ITX power supply connector
-       - JTAG/COP for debugging
-IEEE Std. 1588 signals for test and measurement
-Real-time clock on I2C bus
-POR
-       - support critical POR setting changed via switch on board
-PCB
-       - 6-layer routing (4-layer signals, 2-layer power and ground)
-
-
-Serial Port Configuration on P1010RDB
-=====================================
-Configure the serial port of the attached computer with the following values:
-       -Data rate: 115200 bps
-       -Number of data bits: 8
-       -Parity: None
-       -Number of Stop bits: 1
-       -Flow Control: Hardware/None
-
-
-Settings of DIP-switch
-======================
-  SW4[1:4]= 1111 and SW6[4]=0 for boot from 16bit NOR flash
-  SW4[1:4]= 1000 and SW6[4]=1 for boot from 8bit NAND flash
-  SW4[1:4]= 0110 and SW6[4]=0 for boot from SPI flash
-Note: 1 stands for 'on', 0 stands for 'off'
-
-
-Setting of hwconfig
-===================
-If FlexCAN or TDM is needed, please set "fsl_p1010mux:tdm_can=can" or
-"fsl_p1010mux:tdm_can=tdm" explicitly in u-booot prompt as below for example:
-setenv hwconfig "fsl_p1010mux:tdm_can=tdm;usb1:dr_mode=host,phy_type=utmi"
-By default, don't set fsl_p1010mux:tdm_can, in this case, spi chip selection
-is set to spi-flash instead of to SLIC/TDM/DAC and tdm_can_sel is set to TDM
-instead of to CAN/UART1.
-
-
-Build and burn u-boot to NOR flash
-==================================
-1. Build u-boot.bin image
-       export ARCH=powerpc
-       export CROSS_COMPILE=/your_path/powerpc-linux-gnu-
-       make P1010RDB_NOR
-
-2. Burn u-boot.bin into NOR flash
-       => tftp $loadaddr $uboot
-       => protect off eff80000 +$filesize
-       => erase eff80000 +$filesize
-       => cp.b $loadaddr eff80000 $filesize
-
-3. Check SW4[1:4]= 1111 and SW6[4]=0, then power on.
-
-
-Alternate NOR bank
-============================
-1. Burn u-boot.bin into alternate NOR bank
-       => tftp $loadaddr $uboot
-       => protect off eef80000 +$filesize
-       => erase eef80000 +$filesize
-       => cp.b $loadaddr eef80000 $filesize
-
-2. Switch to alternate NOR bank
-       => mw.b ffb00009 1
-       => reset
-       or set SW1[8]= ON
-
-SW1[8]= OFF: Upper bank used for booting start
-SW1[8]= ON:  Lower bank used for booting start
-CPLD NOR bank selection register address 0xFFB00009 Bit[0]:
-0 - boot from upper 4 sectors
-1 - boot from lower 4 sectors
-
-
-Build and burn u-boot to NAND flash
-===================================
-1. Build u-boot.bin image
-       export ARCH=powerpc
-       export CROSS_COMPILE=/your_path/powerpc-linux-gnu-
-       make P1010RDB_NAND
-
-2. Burn u-boot-nand.bin into NAND flash
-       => tftp $loadaddr $uboot-nand
-       => nand erase 0 $filesize
-       => nand write $loadaddr 0 $filesize
-
-3. Check SW4[1:4]= 1000 and SW6[4]=1, then power on.
-
-
-
-Build and burn u-boot to SPI flash
-==================================
-1. Build u-boot-spi.bin image
-       make P1010RDB_SPIFLASH_config; make
-       Boot up kernel with rootfs.ext2.gz.uboot.p1010rdb
-       Download u-boot.bin to linux and you can find some config files
-       under /usr/share such as config_xx.dat. Do below command:
-       boot_format config_ddr3_1gb_p1010rdb_800M.dat u-boot.bin -spi \
-                       u-boot-spi.bin
-       to generate u-boot-spi.bin.
-
-2. Burn u-boot-spi.bin into SPI flash
-       => tftp $loadaddr $uboot-spi
-       => sf erase 0 100000
-       => sf write $loadaddr 0 $filesize
-
-3. Check SW4[1:4]= 0110 and SW6[4]=0, then power on.
-
-
-
-CPLD POR setting registers
-==========================
-1. Set POR switch selection register (addr 0xFFB00011) to 0.
-2. Write CPLD POR registers (BCSR0~BCSR3, addr 0xFFB00014~0xFFB00017) with
-   proper values.
-   If change boot ROM location to NOR or NAND flash, need write the IFC_CS0
-   switch command by I2C.
-3. Send reset command.
-   After reset, the new POR setting will be implemented.
-
-Two examples are given in below:
-Switch from NOR to NAND boot with default frequency:
-       => i2c dev 0
-       => i2c mw 18 1 f9
-       => i2c mw 18 3 f0
-       => mw.b ffb00011 0
-       => mw.b ffb00017 1
-       => reset
-Switch from NAND to NOR boot with Core/CCB/DDR (800/400/667 MHz):
-       => i2c dev 0
-       => i2c mw 18 1 f1
-       => i2c mw 18 3 f0
-       => mw.b ffb00011 0
-       => mw.b ffb00014 2
-       => mw.b ffb00015 5
-       => mw.b ffb00016 3
-       => mw.b ffb00017 f
-       => reset
-
-
-Boot Linux from network using TFTP on P1010RDB
-==============================================
-Place uImage, p1010rdb.dtb and rootfs files in the TFTP disk area.
-       => tftp 1000000 uImage
-       => tftp 2000000 p1010rdb.dtb
-       => tftp 3000000 rootfs.ext2.gz.uboot.p1010rdb
-       => bootm 1000000 3000000 2000000
-
-
-Please contact your local field applications engineer or sales representative
-to obtain related documents, such as P1010-RDB User Guide for details.
index c3182e4d90aa88220e8cec88a668607de287d08c..f045f433f65f8a839c4494f75730798026d06340 100644 (file)
@@ -103,3 +103,4 @@ CPCI440          powerpc     440GP          b568fd2     2007-12-27  Matthias Fuc
 PCIPPC2          powerpc     MPC740/MPC750  7c9e89b     2013-02-07  Wolfgang Denk <wd@denx.de>
 PCIPPC6          powerpc     MPC740/MPC750  -           -           Wolfgang Denk <wd@denx.de>
 omap2420h4       arm         omap24xx       -           2013-06-04  Richard Woodruff <r-woodruff2@ti.com>
+eNET             x86         x86            7e8c53d     2013-02-14  Graeme Russ <graeme.russ@gmail.com>
index 9cec2ba6fe96317f914e45effaf197de80a9ad48..5d03f37a187b8fb5f112578ff69043ea2d0135ce 100644 (file)
@@ -1,8 +1,8 @@
-obj-y += bios_emulator/
+obj-$(CONFIG_BIOSEMU) += bios_emulator/
 obj-y += block/
 obj-$(CONFIG_BOOTCOUNT_LIMIT) += bootcount/
 obj-y += crypto/
-obj-y += fpga/
+obj-$(CONFIG_FPGA) += fpga/
 obj-y += hwmon/
 obj-y += misc/
 obj-y += pcmcia/
@@ -13,3 +13,4 @@ obj-y += tpm/
 obj-y += twserial/
 obj-y += video/
 obj-y += watchdog/
+obj-$(CONFIG_QE) += qe/
index dd42e0f7665cc6af6c6f46173fc60f58d89f0a9f..52a2ceb4759ae181c95a5d0c2d17c84a245d915b 100644 (file)
@@ -1,8 +1,6 @@
 X86DIR  = x86emu
 
-$(shell mkdir -p $(obj)$(X86DIR))
-
-obj-$(CONFIG_BIOSEMU)  = atibios.o biosemu.o besys.o bios.o \
+obj-y = atibios.o biosemu.o besys.o bios.o \
        $(X86DIR)/decode.o \
        $(X86DIR)/ops2.o \
        $(X86DIR)/ops.o \
@@ -10,9 +8,8 @@ obj-$(CONFIG_BIOSEMU)  = atibios.o biosemu.o besys.o bios.o \
        $(X86DIR)/sys.o \
        $(X86DIR)/debug.o
 
-EXTRA_CFLAGS += -I. -I./include -I$(TOPDIR)/include \
+EXTRA_CFLAGS += -I. -I./include \
        -D__PPC__  -D__BIG_ENDIAN__
 
 CFLAGS += $(EXTRA_CFLAGS)
-HOSTCFLAGS += $(EXTRA_CFLAGS)
 CPPFLAGS += $(EXTRA_CFLAGS)
index 4fcdf40fd0e3b858c0e82be13bd281013f377ae4..dfb2e7fc760f564564b62840db878fd3c3b9083a 100644 (file)
@@ -5,7 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_FPGA
 obj-y += fpga.o
 obj-$(CONFIG_FPGA_SPARTAN2) += spartan2.o
 obj-$(CONFIG_FPGA_SPARTAN3) += spartan3.o
@@ -19,4 +18,3 @@ obj-$(CONFIG_FPGA_ACEX1K) += ACEX1K.o
 obj-$(CONFIG_FPGA_CYCLON2) += cyclon2.o
 obj-$(CONFIG_FPGA_STRATIX_II) += stratixII.o
 endif
-endif
index 5280bb3fe3e256c500d43203ba51fb9815d542ae..553b519cca37de74419d6a91b20e2414be106ef2 100644 (file)
@@ -11,21 +11,20 @@ obj-$(CONFIG_DW_I2C) += designware_i2c.o
 obj-$(CONFIG_I2C_MVTWSI) += mvtwsi.o
 obj-$(CONFIG_I2C_MV) += mv_i2c.o
 obj-$(CONFIG_I2C_MXS) += mxs_i2c.o
-obj-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o
-obj-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
-obj-$(CONFIG_DRIVER_OMAP34XX_I2C) += omap24xx_i2c.o
 obj-$(CONFIG_PCA9564_I2C) += pca9564_i2c.o
 obj-$(CONFIG_DRIVER_S3C24X0_I2C) += s3c24x0_i2c.o
 obj-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
 obj-$(CONFIG_U8500_I2C) += u8500_i2c.o
-obj-$(CONFIG_SH_I2C) += sh_i2c.o
 obj-$(CONFIG_SH_SH7734_I2C) += sh_sh7734_i2c.o
 obj-$(CONFIG_SYS_I2C) += i2c_core.o
 obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o
 obj-$(CONFIG_SYS_I2C_FTI2C010) += fti2c010.o
 obj-$(CONFIG_SYS_I2C_MXC) += mxc_i2c.o
+obj-$(CONFIG_SYS_I2C_OMAP24XX) += omap24xx_i2c.o
+obj-$(CONFIG_SYS_I2C_OMAP34XX) += omap24xx_i2c.o
 obj-$(CONFIG_SYS_I2C_PPC4XX) += ppc4xx_i2c.o
 obj-$(CONFIG_SYS_I2C_RCAR) += rcar_i2c.o
+obj-$(CONFIG_SYS_I2C_SH) += sh_i2c.o
 obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
 obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o
-obj-$(CONFIG_ZYNQ_I2C) += zynq_i2c.o
+obj-$(CONFIG_SYS_I2C_ZYNQ) += zynq_i2c.o
index c2f06627d3e312b52a24c6310927a317d4dd506d..cb2ac04b609864412a8054888f3420bf35ca0287 100644 (file)
@@ -151,7 +151,19 @@ void i2c_init(int speed, int slaveadd)
  */
 static void i2c_setaddress(unsigned int i2c_addr)
 {
+       unsigned int enbl;
+
+       /* Disable i2c */
+       enbl = readl(&i2c_regs_p->ic_enable);
+       enbl &= ~IC_ENABLE_0B;
+       writel(enbl, &i2c_regs_p->ic_enable);
+
        writel(i2c_addr, &i2c_regs_p->ic_tar);
+
+       /* Enable i2c */
+       enbl = readl(&i2c_regs_p->ic_enable);
+       enbl |= IC_ENABLE_0B;
+       writel(enbl, &i2c_regs_p->ic_enable);
 }
 
 /*
@@ -237,9 +249,6 @@ static int i2c_xfer_finish(void)
 
        i2c_flush_rxfifo();
 
-       /* Wait for read/write operation to complete on actual memory */
-       udelay(10000);
-
        return 0;
 }
 
index 46106b7712e6216c17822faa4cd8f5caa4dc8a52..a298c95e144ae3e35de1b0e2136929b793a282ad 100644 (file)
@@ -150,6 +150,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
 {
        struct mxs_i2c_regs *i2c_regs = (struct mxs_i2c_regs *)MXS_I2C0_BASE;
        uint32_t tmp = 0;
+       int timeout = MXS_I2C_MAX_TIMEOUT;
        int ret;
        int i;
 
@@ -169,9 +170,17 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
 
        for (i = 0; i < len; i++) {
                if (!(i & 3)) {
-                       while (readl(&i2c_regs->hw_i2c_queuestat) &
-                               I2C_QUEUESTAT_RD_QUEUE_EMPTY)
-                               ;
+                       while (--timeout) {
+                               tmp = readl(&i2c_regs->hw_i2c_queuestat);
+                               if (!(tmp & I2C_QUEUESTAT_RD_QUEUE_EMPTY))
+                                       break;
+                       }
+
+                       if (!timeout) {
+                               debug("MXS I2C: Failed receiving data!\n");
+                               return -ETIMEDOUT;
+                       }
+
                        tmp = readl(&i2c_regs->hw_i2c_queuedata);
                }
                buffer[i] = tmp & 0xff;
diff --git a/drivers/i2c/omap1510_i2c.c b/drivers/i2c/omap1510_i2c.c
deleted file mode 100644 (file)
index f91ee88..0000000
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * Basic I2C functions
- *
- * Copyright (c) 2003 Texas Instruments
- *
- * This package is free software;  you can redistribute it and/or
- * modify it under the terms of the license found in the file
- * named COPYING that should have accompanied this file.
- *
- * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- *
- * Author: Jian Zhang jzhang@ti.com, Texas Instruments
- *
- * Copyright (c) 2003 Wolfgang Denk, wd@denx.de
- * Rewritten to fit into the current U-Boot framework
- *
- */
-
-#include <common.h>
-
-static void wait_for_bb (void);
-static u16 wait_for_pin (void);
-
-void i2c_init (int speed, int slaveadd)
-{
-       u16 scl;
-
-       if (inw (I2C_CON) & I2C_CON_EN) {
-               outw (0, I2C_CON);
-               udelay (5000);
-       }
-
-       /* 12MHz I2C module clock */
-       outw (0, I2C_PSC);
-       outw (I2C_CON_EN, I2C_CON);
-       outw (0, I2C_SYSTEST);
-       /* have to enable intrrupts or OMAP i2c module doesn't work */
-       outw (I2C_IE_XRDY_IE | I2C_IE_RRDY_IE | I2C_IE_ARDY_IE |
-             I2C_IE_NACK_IE | I2C_IE_AL_IE, I2C_IE);
-       scl = (12000000 / 2) / speed - 6;
-       outw (scl, I2C_SCLL);
-       outw (scl, I2C_SCLH);
-       /* own address */
-       outw (slaveadd, I2C_OA);
-       outw (0, I2C_CNT);
-       udelay (1000);
-}
-
-static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value)
-{
-       int i2c_error = 0;
-       u16 status;
-
-       /* wait until bus not busy */
-       wait_for_bb ();
-
-       /* one byte only */
-       outw (1, I2C_CNT);
-       /* set slave address */
-       outw (devaddr, I2C_SA);
-       /* no stop bit needed here */
-       outw (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX, I2C_CON);
-
-       status = wait_for_pin ();
-
-       if (status & I2C_STAT_XRDY) {
-               /* Important: have to use byte access */
-               *(volatile u8 *) (I2C_DATA) = regoffset;
-               udelay (20000);
-               if (inw (I2C_STAT) & I2C_STAT_NACK) {
-                       i2c_error = 1;
-               }
-       } else {
-               i2c_error = 1;
-       }
-
-       if (!i2c_error) {
-               /* free bus, otherwise we can't use a combined transction */
-               outw (0, I2C_CON);
-               while (inw (I2C_STAT) || (inw (I2C_CON) & I2C_CON_MST)) {
-                       udelay (10000);
-                       /* Have to clear pending interrupt to clear I2C_STAT */
-                       inw (I2C_IV);
-               }
-
-               wait_for_bb ();
-               /* set slave address */
-               outw (devaddr, I2C_SA);
-               /* read one byte from slave */
-               outw (1, I2C_CNT);
-               /* need stop bit here */
-               outw (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_STP,
-                     I2C_CON);
-
-               status = wait_for_pin ();
-               if (status & I2C_STAT_RRDY) {
-                       *value = inw (I2C_DATA);
-                       udelay (20000);
-               } else {
-                       i2c_error = 1;
-               }
-
-               if (!i2c_error) {
-                       outw (I2C_CON_EN, I2C_CON);
-                       while (inw (I2C_STAT)
-                              || (inw (I2C_CON) & I2C_CON_MST)) {
-                               udelay (10000);
-                               inw (I2C_IV);
-                       }
-               }
-       }
-
-       return i2c_error;
-}
-
-static int i2c_write_byte (u8 devaddr, u8 regoffset, u8 value)
-{
-       int i2c_error = 0;
-       u16 status;
-
-       /* wait until bus not busy */
-       wait_for_bb ();
-
-       /* two bytes */
-       outw (2, I2C_CNT);
-       /* set slave address */
-       outw (devaddr, I2C_SA);
-       /* stop bit needed here */
-       outw (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX |
-             I2C_CON_STP, I2C_CON);
-
-       /* wait until state change */
-       status = wait_for_pin ();
-
-       if (status & I2C_STAT_XRDY) {
-               /* send out two bytes */
-               outw ((value << 8) + regoffset, I2C_DATA);
-               /* must have enough delay to allow BB bit to go low */
-               udelay (30000);
-               if (inw (I2C_STAT) & I2C_STAT_NACK) {
-                       i2c_error = 1;
-               }
-       } else {
-               i2c_error = 1;
-       }
-
-       if (!i2c_error) {
-               outw (I2C_CON_EN, I2C_CON);
-               while (inw (I2C_STAT) || (inw (I2C_CON) & I2C_CON_MST)) {
-                       udelay (1000);
-                       /* have to read to clear intrrupt */
-                       inw (I2C_IV);
-               }
-       }
-
-       return i2c_error;
-}
-
-int i2c_probe (uchar chip)
-{
-       int res = 1;
-
-       if (chip == inw (I2C_OA)) {
-               return res;
-       }
-
-       /* wait until bus not busy */
-       wait_for_bb ();
-
-       /* try to read one byte */
-       outw (1, I2C_CNT);
-       /* set slave address */
-       outw (chip, I2C_SA);
-       /* stop bit needed here */
-       outw (I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_STP, I2C_CON);
-       /* enough delay for the NACK bit set */
-       udelay (2000);
-       if (!(inw (I2C_STAT) & I2C_STAT_NACK)) {
-               res = 0;
-       } else {
-               outw (inw (I2C_CON) | I2C_CON_STP, I2C_CON);
-               udelay (20);
-               wait_for_bb ();
-       }
-
-       return res;
-}
-
-int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)
-{
-       int i;
-
-       if (alen > 1) {
-               printf ("I2C read: addr len %d not supported\n", alen);
-               return 1;
-       }
-
-       if (addr + len > 256) {
-               printf ("I2C read: address out of range\n");
-               return 1;
-       }
-
-       for (i = 0; i < len; i++) {
-               if (i2c_read_byte (chip, addr + i, &buffer[i])) {
-                       printf ("I2C read: I/O error\n");
-                       i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-                       return 1;
-               }
-       }
-
-       return 0;
-}
-
-int i2c_write (uchar chip, uint addr, int alen, uchar * buffer, int len)
-{
-       int i;
-
-       if (alen > 1) {
-               printf ("I2C read: addr len %d not supported\n", alen);
-               return 1;
-       }
-
-       if (addr + len > 256) {
-               printf ("I2C read: address out of range\n");
-               return 1;
-       }
-
-       for (i = 0; i < len; i++) {
-               if (i2c_write_byte (chip, addr + i, buffer[i])) {
-                       printf ("I2C read: I/O error\n");
-                       i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-                       return 1;
-               }
-       }
-
-       return 0;
-}
-
-static void wait_for_bb (void)
-{
-       int timeout = 10;
-
-       while ((inw (I2C_STAT) & I2C_STAT_BB) && timeout--) {
-               inw (I2C_IV);
-               udelay (1000);
-       }
-
-       if (timeout <= 0) {
-               printf ("timed out in wait_for_bb: I2C_STAT=%x\n",
-                       inw (I2C_STAT));
-       }
-}
-
-static u16 wait_for_pin (void)
-{
-       u16 status, iv;
-       int timeout = 10;
-
-       do {
-               udelay (1000);
-               status = inw (I2C_STAT);
-               iv = inw (I2C_IV);
-       } while (!iv &&
-                !(status &
-                  (I2C_STAT_ROVR | I2C_STAT_XUDF | I2C_STAT_XRDY |
-                   I2C_STAT_RRDY | I2C_STAT_ARDY | I2C_STAT_NACK |
-                   I2C_STAT_AL)) && timeout--);
-
-       if (timeout <= 0) {
-               printf ("timed out in wait_for_pin: I2C_STAT=%x\n",
-                       inw (I2C_STAT));
-       }
-
-       return status;
-}
index ef38d7172522e517e8ccc5c99bb642eec56160e7..3d38c035b67e5953507d509e928fc83acbe823f7 100644 (file)
@@ -35,6 +35,7 @@
  */
 
 #include <common.h>
+#include <i2c.h>
 
 #include <asm/arch/i2c.h>
 #include <asm/io.h>
@@ -48,22 +49,14 @@ DECLARE_GLOBAL_DATA_PTR;
 /* Absolutely safe for status update at 100 kHz I2C: */
 #define I2C_WAIT       200
 
-static int wait_for_bb(void);
-static u16 wait_for_event(void);
-static void flush_fifo(void);
+static int wait_for_bb(struct i2c_adapter *adap);
+static struct i2c *omap24_get_base(struct i2c_adapter *adap);
+static u16 wait_for_event(struct i2c_adapter *adap);
+static void flush_fifo(struct i2c_adapter *adap);
 
-/*
- * For SPL boot some boards need i2c before SDRAM is initialised so force
- * variables to live in SRAM
- */
-static struct i2c __attribute__((section (".data"))) *i2c_base =
-                                       (struct i2c *)I2C_DEFAULT_BASE;
-static unsigned int __attribute__((section (".data"))) bus_initialized[I2C_BUS_MAX] =
-                                       { [0 ... (I2C_BUS_MAX-1)] = 0 };
-static unsigned int __attribute__((section (".data"))) current_bus = 0;
-
-void i2c_init(int speed, int slaveadd)
+static void omap24_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
 {
+       struct i2c *i2c_base = omap24_get_base(adap);
        int psc, fsscll, fssclh;
        int hsscll = 0, hssclh = 0;
        u32 scll, sclh;
@@ -163,16 +156,15 @@ void i2c_init(int speed, int slaveadd)
               I2C_IE_NACK_IE | I2C_IE_AL_IE, &i2c_base->ie);
 #endif
        udelay(1000);
-       flush_fifo();
+       flush_fifo(adap);
        writew(0xFFFF, &i2c_base->stat);
        writew(0, &i2c_base->cnt);
-
-       if (gd->flags & GD_FLG_RELOC)
-               bus_initialized[current_bus] = 1;
 }
 
-static void flush_fifo(void)
-{      u16 stat;
+static void flush_fifo(struct i2c_adapter *adap)
+{
+       struct i2c *i2c_base = omap24_get_base(adap);
+       u16 stat;
 
        /* note: if you try and read data when its not there or ready
         * you get a bus error
@@ -192,8 +184,9 @@ static void flush_fifo(void)
  * i2c_probe: Use write access. Allows to identify addresses that are
  *            write-only (like the config register of dual-port EEPROMs)
  */
-int i2c_probe(uchar chip)
+static int omap24_i2c_probe(struct i2c_adapter *adap, uchar chip)
 {
+       struct i2c *i2c_base = omap24_get_base(adap);
        u16 status;
        int res = 1; /* default = fail */
 
@@ -201,7 +194,7 @@ int i2c_probe(uchar chip)
                return res;
 
        /* Wait until bus is free */
-       if (wait_for_bb())
+       if (wait_for_bb(adap))
                return res;
 
        /* No data transfer, slave addr only */
@@ -212,7 +205,7 @@ int i2c_probe(uchar chip)
        writew(I2C_CON_EN | I2C_CON_MST | I2C_CON_STT | I2C_CON_TRX |
               I2C_CON_STP, &i2c_base->con);
 
-       status = wait_for_event();
+       status = wait_for_event(adap);
 
        if ((status & ~I2C_STAT_XRDY) == 0 || (status & I2C_STAT_AL)) {
                /*
@@ -223,7 +216,7 @@ int i2c_probe(uchar chip)
                 */
                if (status == I2C_STAT_XRDY)
                        printf("i2c_probe: pads on bus %d probably not configured (status=0x%x)\n",
-                              current_bus, status);
+                              adap->hwadapnr, status);
 
                goto pr_exit;
        }
@@ -239,7 +232,7 @@ int i2c_probe(uchar chip)
                       I2C_CON_STP, &i2c_base->con);            /* STP */
        }
 pr_exit:
-       flush_fifo();
+       flush_fifo(adap);
        writew(0xFFFF, &i2c_base->stat);
        writew(0, &i2c_base->cnt);
        return res;
@@ -258,8 +251,10 @@ pr_exit:
  *           or that do not need a register address at all (such as some clock
  *           distributors).
  */
-int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
+static int omap24_i2c_read(struct i2c_adapter *adap, uchar chip, uint addr,
+                          int alen, uchar *buffer, int len)
 {
+       struct i2c *i2c_base = omap24_get_base(adap);
        int i2c_error = 0;
        u16 status;
 
@@ -287,7 +282,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
        }
 
        /* Wait until bus not busy */
-       if (wait_for_bb())
+       if (wait_for_bb(adap))
                return 1;
 
        /* Zero, one or two bytes reg address (offset) */
@@ -308,12 +303,12 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
 #endif
                /* Send register offset */
                while (1) {
-                       status = wait_for_event();
+                       status = wait_for_event(adap);
                        /* Try to identify bus that is not padconf'd for I2C */
                        if (status == I2C_STAT_XRDY) {
                                i2c_error = 2;
                                printf("i2c_read (addr phase): pads on bus %d probably not configured (status=0x%x)\n",
-                                      current_bus, status);
+                                      adap->hwadapnr, status);
                                goto rd_exit;
                        }
                        if (status == 0 || status & I2C_STAT_NACK) {
@@ -348,7 +343,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
 
        /* Receive data */
        while (1) {
-               status = wait_for_event();
+               status = wait_for_event(adap);
                /*
                 * Try to identify bus that is not padconf'd for I2C. This
                 * state could be left over from previous transactions if
@@ -357,7 +352,7 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
                if (status == I2C_STAT_XRDY) {
                        i2c_error = 2;
                        printf("i2c_read (data phase): pads on bus %d probably not configured (status=0x%x)\n",
-                              current_bus, status);
+                              adap->hwadapnr, status);
                        goto rd_exit;
                }
                if (status == 0 || status & I2C_STAT_NACK) {
@@ -375,15 +370,17 @@ int i2c_read(uchar chip, uint addr, int alen, uchar *buffer, int len)
        }
 
 rd_exit:
-       flush_fifo();
+       flush_fifo(adap);
        writew(0xFFFF, &i2c_base->stat);
        writew(0, &i2c_base->cnt);
        return i2c_error;
 }
 
 /* i2c_write: Address (reg offset) may be 0, 1 or 2 bytes long. */
-int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
+static int omap24_i2c_write(struct i2c_adapter *adap, uchar chip, uint addr,
+                           int alen, uchar *buffer, int len)
 {
+       struct i2c *i2c_base = omap24_get_base(adap);
        int i;
        u16 status;
        int i2c_error = 0;
@@ -415,7 +412,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
        }
 
        /* Wait until bus not busy */
-       if (wait_for_bb())
+       if (wait_for_bb(adap))
                return 1;
 
        /* Start address phase - will write regoffset + len bytes data */
@@ -428,12 +425,12 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
 
        while (alen) {
                /* Must write reg offset (one or two bytes) */
-               status = wait_for_event();
+               status = wait_for_event(adap);
                /* Try to identify bus that is not padconf'd for I2C */
                if (status == I2C_STAT_XRDY) {
                        i2c_error = 2;
                        printf("i2c_write: pads on bus %d probably not configured (status=0x%x)\n",
-                              current_bus, status);
+                              adap->hwadapnr, status);
                        goto wr_exit;
                }
                if (status == 0 || status & I2C_STAT_NACK) {
@@ -455,7 +452,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
        }
        /* Address phase is over, now write data */
        for (i = 0; i < len; i++) {
-               status = wait_for_event();
+               status = wait_for_event(adap);
                if (status == 0 || status & I2C_STAT_NACK) {
                        i2c_error = 1;
                        printf("i2c_write: error waiting for data ACK (status=0x%x)\n",
@@ -474,7 +471,7 @@ int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
        }
 
 wr_exit:
-       flush_fifo();
+       flush_fifo(adap);
        writew(0xFFFF, &i2c_base->stat);
        writew(0, &i2c_base->cnt);
        return i2c_error;
@@ -484,8 +481,9 @@ wr_exit:
  * Wait for the bus to be free by checking the Bus Busy (BB)
  * bit to become clear
  */
-static int wait_for_bb(void)
+static int wait_for_bb(struct i2c_adapter *adap)
 {
+       struct i2c *i2c_base = omap24_get_base(adap);
        int timeout = I2C_TIMEOUT;
        u16 stat;
 
@@ -514,8 +512,9 @@ static int wait_for_bb(void)
  * Wait for the I2C controller to complete current action
  * and update status
  */
-static u16 wait_for_event(void)
+static u16 wait_for_event(struct i2c_adapter *adap)
 {
+       struct i2c *i2c_base = omap24_get_base(adap);
        u16 status;
        int timeout = I2C_TIMEOUT;
 
@@ -540,7 +539,7 @@ static u16 wait_for_event(void)
                 * not been configured for I2C, and/or pull-ups are missing.
                 */
                printf("Check if pads/pull-ups of bus %d are properly configured\n",
-                      current_bus);
+                      adap->hwadapnr);
                writew(0xFFFF, &i2c_base->stat);
                status = 0;
        }
@@ -548,48 +547,93 @@ static u16 wait_for_event(void)
        return status;
 }
 
-int i2c_set_bus_num(unsigned int bus)
+static struct i2c *omap24_get_base(struct i2c_adapter *adap)
 {
-       if (bus >= I2C_BUS_MAX) {
-               printf("Bad bus: %x\n", bus);
-               return -1;
-       }
-
-       switch (bus) {
-       default:
-               bus = 0;        /* Fall through */
+       switch (adap->hwadapnr) {
        case 0:
-               i2c_base = (struct i2c *)I2C_BASE1;
+               return (struct i2c *)I2C_BASE1;
                break;
        case 1:
-               i2c_base = (struct i2c *)I2C_BASE2;
+               return (struct i2c *)I2C_BASE2;
                break;
 #if (I2C_BUS_MAX > 2)
        case 2:
-               i2c_base = (struct i2c *)I2C_BASE3;
+               return (struct i2c *)I2C_BASE3;
                break;
 #if (I2C_BUS_MAX > 3)
        case 3:
-               i2c_base = (struct i2c *)I2C_BASE4;
+               return (struct i2c *)I2C_BASE4;
                break;
 #if (I2C_BUS_MAX > 4)
        case 4:
-               i2c_base = (struct i2c *)I2C_BASE5;
+               return (struct i2c *)I2C_BASE5;
                break;
 #endif
 #endif
 #endif
+       default:
+               printf("wrong hwadapnr: %d\n", adap->hwadapnr);
+               break;
        }
+       return NULL;
+}
 
-       current_bus = bus;
+#if !defined(CONFIG_SYS_OMAP24_I2C_SPEED1)
+#define CONFIG_SYS_OMAP24_I2C_SPEED1 CONFIG_SYS_OMAP24_I2C_SPEED
+#endif
+#if !defined(CONFIG_SYS_OMAP24_I2C_SLAVE1)
+#define CONFIG_SYS_OMAP24_I2C_SLAVE1 CONFIG_SYS_OMAP24_I2C_SLAVE
+#endif
 
-       if (!bus_initialized[current_bus])
-               i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+U_BOOT_I2C_ADAP_COMPLETE(omap24_0, omap24_i2c_init, omap24_i2c_probe,
+                        omap24_i2c_read, omap24_i2c_write, NULL,
+                        CONFIG_SYS_OMAP24_I2C_SPEED,
+                        CONFIG_SYS_OMAP24_I2C_SLAVE,
+                        0)
+U_BOOT_I2C_ADAP_COMPLETE(omap24_1, omap24_i2c_init, omap24_i2c_probe,
+                        omap24_i2c_read, omap24_i2c_write, NULL,
+                        CONFIG_SYS_OMAP24_I2C_SPEED1,
+                        CONFIG_SYS_OMAP24_I2C_SLAVE1,
+                        1)
+#if (I2C_BUS_MAX > 2)
+#if !defined(CONFIG_SYS_OMAP24_I2C_SPEED2)
+#define CONFIG_SYS_OMAP24_I2C_SPEED2 CONFIG_SYS_OMAP24_I2C_SPEED
+#endif
+#if !defined(CONFIG_SYS_OMAP24_I2C_SLAVE2)
+#define CONFIG_SYS_OMAP24_I2C_SLAVE2 CONFIG_SYS_OMAP24_I2C_SLAVE
+#endif
 
-       return 0;
-}
+U_BOOT_I2C_ADAP_COMPLETE(omap24_2, omap24_i2c_init, omap24_i2c_probe,
+                        omap24_i2c_read, omap24_i2c_write, NULL,
+                        CONFIG_SYS_OMAP24_I2C_SPEED2,
+                        CONFIG_SYS_OMAP24_I2C_SLAVE2,
+                        2)
+#if (I2C_BUS_MAX > 3)
+#if !defined(CONFIG_SYS_OMAP24_I2C_SPEED3)
+#define CONFIG_SYS_OMAP24_I2C_SPEED3 CONFIG_SYS_OMAP24_I2C_SPEED
+#endif
+#if !defined(CONFIG_SYS_OMAP24_I2C_SLAVE3)
+#define CONFIG_SYS_OMAP24_I2C_SLAVE3 CONFIG_SYS_OMAP24_I2C_SLAVE
+#endif
 
-int i2c_get_bus_num(void)
-{
-       return (int) current_bus;
-}
+U_BOOT_I2C_ADAP_COMPLETE(omap24_3, omap24_i2c_init, omap24_i2c_probe,
+                        omap24_i2c_read, omap24_i2c_write, NULL,
+                        CONFIG_SYS_OMAP24_I2C_SPEED3,
+                        CONFIG_SYS_OMAP24_I2C_SLAVE3,
+                        3)
+#if (I2C_BUS_MAX > 4)
+#if !defined(CONFIG_SYS_OMAP24_I2C_SPEED4)
+#define CONFIG_SYS_OMAP24_I2C_SPEED4 CONFIG_SYS_OMAP24_I2C_SPEED
+#endif
+#if !defined(CONFIG_SYS_OMAP24_I2C_SLAVE4)
+#define CONFIG_SYS_OMAP24_I2C_SLAVE4 CONFIG_SYS_OMAP24_I2C_SLAVE
+#endif
+
+U_BOOT_I2C_ADAP_COMPLETE(omap24_4, omap24_i2c_init, omap24_i2c_probe,
+                        omap24_i2c_read, omap24_i2c_write, NULL,
+                        CONFIG_SYS_OMAP24_I2C_SPEED4,
+                        CONFIG_SYS_OMAP24_I2C_SLAVE4,
+                        4)
+#endif
+#endif
+#endif
index 808202c29940db690688dc84c53bb54b45fc4b02..cc191007503003e12ffa46e598537e262ed15dce 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <common.h>
+#include <i2c.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -22,8 +23,6 @@ struct sh_i2c {
 };
 #undef ureg
 
-static struct sh_i2c *base;
-
 /* ICCR */
 #define SH_I2C_ICCR_ICE                (1 << 7)
 #define SH_I2C_ICCR_RACK       (1 << 6)
@@ -43,202 +42,165 @@ static struct sh_i2c *base;
 #define SH_I2C_ICIC_ICCHB8     (1 << 6)
 #endif
 
+static const struct sh_i2c *i2c_dev[CONFIG_SYS_I2C_SH_NUM_CONTROLLERS] = {
+       (struct sh_i2c *)CONFIG_SYS_I2C_SH_BASE0,
+#ifdef CONFIG_SYS_I2C_SH_BASE1
+       (struct sh_i2c *)CONFIG_SYS_I2C_SH_BASE1,
+#endif
+#ifdef CONFIG_SYS_I2C_SH_BASE2
+       (struct sh_i2c *)CONFIG_SYS_I2C_SH_BASE2,
+#endif
+#ifdef CONFIG_SYS_I2C_SH_BASE3
+       (struct sh_i2c *)CONFIG_SYS_I2C_SH_BASE3,
+#endif
+#ifdef CONFIG_SYS_I2C_SH_BASE4
+       (struct sh_i2c *)CONFIG_SYS_I2C_SH_BASE4,
+#endif
+};
+
 static u16 iccl, icch;
 
 #define IRQ_WAIT 1000
 
-static void irq_dte(struct sh_i2c *base)
+static void sh_irq_dte(struct sh_i2c *dev)
 {
        int i;
 
-       for (i = 0 ; i < IRQ_WAIT ; i++) {
-               if (SH_IC_DTE & readb(&base->icsr))
+       for (i = 0; i < IRQ_WAIT; i++) {
+               if (SH_IC_DTE & readb(&dev->icsr))
                        break;
                udelay(10);
        }
 }
 
-static int irq_dte_with_tack(struct sh_i2c *base)
+static int sh_irq_dte_with_tack(struct sh_i2c *dev)
 {
        int i;
 
-       for (i = 0 ; i < IRQ_WAIT ; i++) {
-               if (SH_IC_DTE & readb(&base->icsr))
+       for (i = 0; i < IRQ_WAIT; i++) {
+               if (SH_IC_DTE & readb(&dev->icsr))
                        break;
-               if (SH_IC_TACK & readb(&base->icsr))
+               if (SH_IC_TACK & readb(&dev->icsr))
                        return -1;
                udelay(10);
        }
        return 0;
 }
 
-static void irq_busy(struct sh_i2c *base)
+static void sh_irq_busy(struct sh_i2c *dev)
 {
        int i;
 
-       for (i = 0 ; i < IRQ_WAIT ; i++) {
-               if (!(SH_IC_BUSY & readb(&base->icsr)))
+       for (i = 0; i < IRQ_WAIT; i++) {
+               if (!(SH_IC_BUSY & readb(&dev->icsr)))
                        break;
                udelay(10);
        }
 }
 
-static int i2c_set_addr(struct sh_i2c *base, u8 id, u8 reg, int stop)
+static int sh_i2c_set_addr(struct sh_i2c *dev, u8 chip, u8 addr, int stop)
 {
        u8 icic = SH_IC_TACK;
 
-       clrbits_8(&base->iccr, SH_I2C_ICCR_ICE);
-       setbits_8(&base->iccr, SH_I2C_ICCR_ICE);
+       debug("%s: chip: %x, addr: %x iccl: %x, icch %x\n",
+                               __func__, chip, addr, iccl, icch);
+       clrbits_8(&dev->iccr, SH_I2C_ICCR_ICE);
+       setbits_8(&dev->iccr, SH_I2C_ICCR_ICE);
 
-       writeb(iccl & 0xff, &base->iccl);
-       writeb(icch & 0xff, &base->icch);
+       writeb(iccl & 0xff, &dev->iccl);
+       writeb(icch & 0xff, &dev->icch);
 #ifdef CONFIG_SH_I2C_8BIT
        if (iccl > 0xff)
                icic |= SH_I2C_ICIC_ICCLB8;
        if (icch > 0xff)
                icic |= SH_I2C_ICIC_ICCHB8;
 #endif
-       writeb(icic, &base->icic);
+       writeb(icic, &dev->icic);
 
-       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RTS|SH_I2C_ICCR_BUSY), &base->iccr);
-       irq_dte(base);
+       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RTS|SH_I2C_ICCR_BUSY), &dev->iccr);
+       sh_irq_dte(dev);
 
-       clrbits_8(&base->icsr, SH_IC_TACK);
-       writeb(id << 1, &base->icdr);
-       if (irq_dte_with_tack(base) != 0)
+       clrbits_8(&dev->icsr, SH_IC_TACK);
+       writeb(chip << 1, &dev->icdr);
+       if (sh_irq_dte_with_tack(dev) != 0)
                return -1;
 
-       writeb(reg, &base->icdr);
+       writeb(addr, &dev->icdr);
        if (stop)
-               writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RTS), &base->iccr);
+               writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RTS), &dev->iccr);
 
-       if (irq_dte_with_tack(base) != 0)
+       if (sh_irq_dte_with_tack(dev) != 0)
                return -1;
        return 0;
 }
 
-static void i2c_finish(struct sh_i2c *base)
+static void sh_i2c_finish(struct sh_i2c *dev)
 {
-       writeb(0, &base->icsr);
-       clrbits_8(&base->iccr, SH_I2C_ICCR_ICE);
+       writeb(0, &dev->icsr);
+       clrbits_8(&dev->iccr, SH_I2C_ICCR_ICE);
 }
 
-static int i2c_raw_write(struct sh_i2c *base, u8 id, u8 reg, u8 val)
+static int
+sh_i2c_raw_write(struct sh_i2c *dev, u8 chip, uint addr, u8 val)
 {
        int ret = -1;
-       if (i2c_set_addr(base, id, reg, 0) != 0)
+       if (sh_i2c_set_addr(dev, chip, addr, 0) != 0)
                goto exit0;
        udelay(10);
 
-       writeb(val, &base->icdr);
-       if (irq_dte_with_tack(base) != 0)
+       writeb(val, &dev->icdr);
+       if (sh_irq_dte_with_tack(dev) != 0)
                goto exit0;
 
-       writeb((SH_I2C_ICCR_ICE | SH_I2C_ICCR_RTS), &base->iccr);
-       if (irq_dte_with_tack(base) != 0)
+       writeb((SH_I2C_ICCR_ICE | SH_I2C_ICCR_RTS), &dev->iccr);
+       if (sh_irq_dte_with_tack(dev) != 0)
                goto exit0;
-       irq_busy(base);
+       sh_irq_busy(dev);
        ret = 0;
+
 exit0:
-       i2c_finish(base);
+       sh_i2c_finish(dev);
        return ret;
 }
 
-static int i2c_raw_read(struct sh_i2c *base, u8 id, u8 reg)
+static int sh_i2c_raw_read(struct sh_i2c *dev, u8 chip, u8 addr)
 {
        int ret = -1;
 
 #if defined(CONFIG_SH73A0)
-       if (i2c_set_addr(base, id, reg, 0) != 0)
+       if (sh_i2c_set_addr(dev, chip, addr, 0) != 0)
                goto exit0;
 #else
-       if (i2c_set_addr(base, id, reg, 1) != 0)
+       if (sh_i2c_set_addr(dev, chip, addr, 1) != 0)
                goto exit0;
        udelay(100);
 #endif
 
-       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RTS|SH_I2C_ICCR_BUSY), &base->iccr);
-       irq_dte(base);
+       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RTS|SH_I2C_ICCR_BUSY), &dev->iccr);
+       sh_irq_dte(dev);
 
-       writeb(id << 1 | 0x01, &base->icdr);
-       if (irq_dte_with_tack(base) != 0)
+       writeb(chip << 1 | 0x01, &dev->icdr);
+       if (sh_irq_dte_with_tack(dev) != 0)
                goto exit0;
 
-       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_SCP), &base->iccr);
-       if (irq_dte_with_tack(base) != 0)
+       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_SCP), &dev->iccr);
+       if (sh_irq_dte_with_tack(dev) != 0)
                goto exit0;
 
-       ret = readb(&base->icdr) & 0xff;
+       ret = readb(&dev->icdr) & 0xff;
+
+       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RACK), &dev->iccr);
+       readb(&dev->icdr); /* Dummy read */
+       sh_irq_busy(dev);
 
-       writeb((SH_I2C_ICCR_ICE|SH_I2C_ICCR_RACK), &base->iccr);
-       readb(&base->icdr); /* Dummy read */
-       irq_busy(base);
 exit0:
-       i2c_finish(base);
+       sh_i2c_finish(dev);
 
        return ret;
 }
 
-#ifdef CONFIG_I2C_MULTI_BUS
-static unsigned int current_bus;
-
-/**
- * i2c_set_bus_num - change active I2C bus
- *     @bus: bus index, zero based
- *     @returns: 0 on success, non-0 on failure
- */
-int i2c_set_bus_num(unsigned int bus)
-{
-       if ((bus < 0) || (bus >= CONFIG_SYS_MAX_I2C_BUS)) {
-               printf("Bad bus: %d\n", bus);
-               return -1;
-       }
-
-       switch (bus) {
-       case 0:
-               base = (void *)CONFIG_SH_I2C_BASE0;
-               break;
-       case 1:
-               base = (void *)CONFIG_SH_I2C_BASE1;
-               break;
-#ifdef CONFIG_SH_I2C_BASE2
-       case 2:
-               base = (void *)CONFIG_SH_I2C_BASE2;
-               break;
-#endif
-#ifdef CONFIG_SH_I2C_BASE3
-       case 3:
-               base = (void *)CONFIG_SH_I2C_BASE3;
-               break;
-#endif
-#ifdef CONFIG_SH_I2C_BASE4
-       case 4:
-               base = (void *)CONFIG_SH_I2C_BASE4;
-               break;
-#endif
-       default:
-               return -1;
-       }
-       current_bus = bus;
-
-       return 0;
-}
-
-/**
- * i2c_get_bus_num - returns index of active I2C bus
- */
-unsigned int i2c_get_bus_num(void)
-{
-       return current_bus;
-}
-#endif
-
-#define SH_I2C_ICCL_CALC(clk, date, t_low, t_high) \
-               ((clk / rate) * (t_low / t_low + t_high))
-#define SH_I2C_ICCH_CALC(clk, date, t_low, t_high) \
-               ((clk / rate) * (t_high / t_low + t_high))
-
-void i2c_init(int speed, int slaveaddr)
+static void
+sh_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
 {
        int num, denom, tmp;
 
@@ -246,11 +208,6 @@ void i2c_init(int speed, int slaveaddr)
        if (!(gd->flags & GD_FLG_RELOC))
                return;
 
-#ifdef CONFIG_I2C_MULTI_BUS
-       current_bus = 0;
-#endif
-       base = (struct sh_i2c *)CONFIG_SH_I2C_BASE0;
-
        /*
         * Calculate the value for iccl. From the data sheet:
         * iccl = (p-clock / transfer-rate) * (L / (L + H))
@@ -272,67 +229,78 @@ void i2c_init(int speed, int slaveaddr)
                icch = (u16)((num/denom) + 1);
        else
                icch = (u16)(num/denom);
+
+       debug("clock: %d, speed %d, iccl: %x, icch: %x\n",
+                       CONFIG_SH_I2C_CLOCK, speed, iccl, icch);
 }
 
-/*
- * i2c_read: - Read multiple bytes from an i2c device
- *
- * The higher level routines take into account that this function is only
- * called with len < page length of the device (see configuration file)
- *
- * @chip:   address of the chip which is to be read
- * @addr:   i2c data address within the chip
- * @alen:   length of the i2c data address (1..2 bytes)
- * @buffer: where to write the data
- * @len:    how much byte do we want to read
- * @return: 0 in case of success
- */
-int i2c_read(u8 chip, u32 addr, int alen, u8 *buffer, int len)
+static int sh_i2c_read(struct i2c_adapter *adap, uint8_t chip,
+                               uint addr, int alen, u8 *data, int len)
 {
-       int ret;
-       int i = 0;
-       for (i = 0 ; i < len ; i++) {
-               ret = i2c_raw_read(base, chip, addr + i);
+       int ret, i;
+       struct sh_i2c *dev = (struct sh_i2c *)i2c_dev[adap->hwadapnr];
+
+       for (i = 0; i < len; i++) {
+               ret = sh_i2c_raw_read(dev, chip, addr + i);
                if (ret < 0)
                        return -1;
-               buffer[i] = ret & 0xff;
+
+               data[i] = ret & 0xff;
+               debug("%s: data[%d]: %02x\n", __func__, i, data[i]);
        }
+
        return 0;
 }
 
-/*
- * i2c_write: -  Write multiple bytes to an i2c device
- *
- * The higher level routines take into account that this function is only
- * called with len < page length of the device (see configuration file)
- *
- * @chip:   address of the chip which is to be written
- * @addr:   i2c data address within the chip
- * @alen:   length of the i2c data address (1..2 bytes)
- * @buffer: where to find the data to be written
- * @len:    how much byte do we want to read
- * @return: 0 in case of success
- */
-int i2c_write(u8 chip, u32 addr, int alen, u8 *buffer, int len)
+static int sh_i2c_write(struct i2c_adapter *adap, uint8_t chip, uint addr,
+                               int alen, u8 *data, int len)
 {
-       int i = 0;
-       for (i = 0; i < len ; i++)
-               if (i2c_raw_write(base, chip, addr + i, buffer[i]) != 0)
+       struct sh_i2c *dev = (struct sh_i2c *)i2c_dev[adap->hwadapnr];
+       int i;
+
+       for (i = 0; i < len; i++) {
+               debug("%s: data[%d]: %02x\n", __func__, i, data[i]);
+               if (sh_i2c_raw_write(dev, chip, addr + i, data[i]) != 0)
                        return -1;
+       }
        return 0;
 }
 
-/*
- * i2c_probe: - Test if a chip answers for a given i2c address
- *
- * @chip:   address of the chip which is searched for
- * @return: 0 if a chip was found, -1 otherwhise
- */
-int i2c_probe(u8 chip)
+static int
+sh_i2c_probe(struct i2c_adapter *adap, u8 dev)
 {
-       int ret;
+       return sh_i2c_read(adap, dev, 0, 0, NULL, 0);
+}
 
-       ret = i2c_set_addr(base, chip, 0, 1);
-       i2c_finish(base);
-       return ret;
+static unsigned int sh_i2c_set_bus_speed(struct i2c_adapter *adap,
+                       unsigned int speed)
+{
+       struct sh_i2c *dev = (struct sh_i2c *)i2c_dev[adap->hwadapnr];
+
+       sh_i2c_finish(dev);
+       sh_i2c_init(adap, speed, 0);
+
+       return 0;
 }
+
+/*
+ * Register RCAR i2c adapters
+ */
+U_BOOT_I2C_ADAP_COMPLETE(sh_0, sh_i2c_init, sh_i2c_probe, sh_i2c_read,
+       sh_i2c_write, sh_i2c_set_bus_speed, CONFIG_SYS_I2C_SH_SPEED0, 0, 0)
+#ifdef CONFIG_SYS_I2C_SH_BASE1
+U_BOOT_I2C_ADAP_COMPLETE(sh_1, sh_i2c_init, sh_i2c_probe, sh_i2c_read,
+       sh_i2c_write, sh_i2c_set_bus_speed, CONFIG_SYS_I2C_SH_SPEED1, 0, 1)
+#endif
+#ifdef CONFIG_SYS_I2C_SH_BASE2
+U_BOOT_I2C_ADAP_COMPLETE(sh_2, sh_i2c_init, sh_i2c_probe, sh_i2c_read,
+       sh_i2c_write, sh_i2c_set_bus_speed, CONFIG_SYS_I2C_SH_SPEED2, 0, 2)
+#endif
+#ifdef CONFIG_SYS_I2C_SH_BASE3
+U_BOOT_I2C_ADAP_COMPLETE(sh_3, sh_i2c_init, sh_i2c_probe, sh_i2c_read,
+       sh_i2c_write, sh_i2c_set_bus_speed, CONFIG_SYS_I2C_SH_SPEED3, 0, 3)
+#endif
+#ifdef CONFIG_SYS_I2C_SH_BASE4
+U_BOOT_I2C_ADAP_COMPLETE(sh_4, sh_i2c_init, sh_i2c_probe, sh_i2c_read,
+       sh_i2c_write, sh_i2c_set_bus_speed, CONFIG_SYS_I2C_SH_SPEED4, 0, 4)
+#endif
index ce2d23f725bd6fcdd5af2cfdfef7ab2d2ba109f1..70a9aeafd531124c70c0f45afdf98541872fb1e2 100644 (file)
@@ -74,7 +74,8 @@ static struct zynq_i2c_registers *zynq_i2c =
        (struct zynq_i2c_registers *)ZYNQ_I2C_BASE;
 
 /* I2C init called by cmd_i2c when doing 'i2c reset'. */
-void i2c_init(int requested_speed, int slaveadd)
+static void zynq_i2c_init(struct i2c_adapter *adap, int requested_speed,
+                         int slaveadd)
 {
        /* 111MHz / ( (3 * 17) * 22 ) = ~100KHz */
        writel((16 << ZYNQ_I2C_CONTROL_DIV_B_SHIFT) |
@@ -151,7 +152,7 @@ static u32 zynq_i2c_wait(u32 mask)
  * I2C probe called by cmd_i2c when doing 'i2c probe'.
  * Begin read, nak data byte, end.
  */
-int i2c_probe(u8 dev)
+static int zynq_i2c_probe(struct i2c_adapter *adap, u8 dev)
 {
        /* Attempt to read a byte */
        setbits_le32(&zynq_i2c->control, ZYNQ_I2C_CONTROL_CLR_FIFO |
@@ -170,7 +171,8 @@ int i2c_probe(u8 dev)
  * I2C read called by cmd_i2c when doing 'i2c read' and by cmd_eeprom.c
  * Begin write, send address byte(s), begin read, receive data bytes, end.
  */
-int i2c_read(u8 dev, uint addr, int alen, u8 *data, int length)
+static int zynq_i2c_read(struct i2c_adapter *adap, u8 dev, uint addr,
+                        int alen, u8 *data, int length)
 {
        u32 status;
        u32 i = 0;
@@ -235,7 +237,8 @@ int i2c_read(u8 dev, uint addr, int alen, u8 *data, int length)
  * I2C write called by cmd_i2c when doing 'i2c write' and by cmd_eeprom.c
  * Begin write, send address byte(s), send data bytes, end.
  */
-int i2c_write(u8 dev, uint addr, int alen, u8 *data, int length)
+static int zynq_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr,
+                         int alen, u8 *data, int length)
 {
        u8 *cur_data = data;
 
@@ -275,16 +278,16 @@ int i2c_write(u8 dev, uint addr, int alen, u8 *data, int length)
        return 0;
 }
 
-int i2c_set_bus_num(unsigned int bus)
+static unsigned int zynq_i2c_set_bus_speed(struct i2c_adapter *adap,
+                       unsigned int speed)
 {
-       /* Only support bus 0 */
-       if (bus > 0)
-               return -1;
-       return 0;
-}
+       if (speed != 1000000)
+               return -EINVAL;
 
-unsigned int i2c_get_bus_num(void)
-{
-       /* Only support bus 0 */
        return 0;
 }
+
+U_BOOT_I2C_ADAP_COMPLETE(zynq_0, zynq_i2c_init, zynq_i2c_probe, zynq_i2c_read,
+                        zynq_i2c_write, zynq_i2c_set_bus_speed,
+                        CONFIG_SYS_I2C_ZYNQ_SPEED, CONFIG_SYS_I2C_ZYNQ_SLAVE,
+                        0)
index 3fedddc8b5a10829e43db3625108773d4933ffc5..3e95727d798309bf9125f5d0f722334174062b3b 100644 (file)
@@ -9,15 +9,42 @@
 #include <status_led.h>
 #include <asm/gpio.h>
 
+#ifndef CONFIG_GPIO_LED_INVERTED_TABLE
+#define CONFIG_GPIO_LED_INVERTED_TABLE {}
+#endif
+
+static led_id_t gpio_led_inv[] = CONFIG_GPIO_LED_INVERTED_TABLE;
+
+static int gpio_led_gpio_value(led_id_t mask, int state)
+{
+       int i, gpio_value = (state == STATUS_LED_ON);
+
+       for (i = 0; i < ARRAY_SIZE(gpio_led_inv); i++) {
+               if (gpio_led_inv[i] == mask)
+                       gpio_value = !gpio_value;
+       }
+
+       return gpio_value;
+}
+
 void __led_init(led_id_t mask, int state)
 {
-       gpio_request(mask, "gpio_led");
-       gpio_direction_output(mask, state == STATUS_LED_ON);
+       int gpio_value;
+
+       if (gpio_request(mask, "gpio_led") != 0) {
+               printf("%s: failed requesting GPIO%lu!\n", __func__, mask);
+               return;
+       }
+
+       gpio_value = gpio_led_gpio_value(mask, state);
+       gpio_direction_output(mask, gpio_value);
 }
 
 void __led_set(led_id_t mask, int state)
 {
-       gpio_set_value(mask, state == STATUS_LED_ON);
+       int gpio_value = gpio_led_gpio_value(mask, state);
+
+       gpio_set_value(mask, gpio_value);
 }
 
 void __led_toggle(led_id_t mask)
index bec86c16c1ffbe6275d4ec39dcf3a07d16786dce..d0fd7fcceef8b4f146c1403cff8837a7709ae7e4 100644 (file)
@@ -4,7 +4,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_FMAN_ENET
 obj-y += dtsec.o
 obj-y += eth.o
 obj-y += fm.o
@@ -26,8 +25,10 @@ obj-$(CONFIG_PPC_P4080) += p4080.o
 obj-$(CONFIG_PPC_P5020) += p5020.o
 obj-$(CONFIG_PPC_P5040) += p5040.o
 obj-$(CONFIG_PPC_T1040) += t1040.o
+obj-$(CONFIG_PPC_T1042)        += t1040.o
+obj-$(CONFIG_PPC_T1020)        += t1040.o
+obj-$(CONFIG_PPC_T1022)        += t1040.o
 obj-$(CONFIG_PPC_T4240) += t4240.o
 obj-$(CONFIG_PPC_T4160) += t4240.o
 obj-$(CONFIG_PPC_B4420) += b4860.o
 obj-$(CONFIG_PPC_B4860) += b4860.o
-endif
index 7fa5ea635f02b3ca23c68d9c0473083b9afa46c9..077925521675c41d193f7128c3e8c2f81b3a5b99 100644 (file)
@@ -8,9 +8,8 @@
 LOCAL_CFLAGS  += -I$(TOPDIR)/drivers/net/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux
 CFLAGS  += $(LOCAL_CFLAGS)
 CPPFLAGS  += $(LOCAL_CFLAGS) # needed for depend
-HOSTCFLAGS  += $(LOCAL_CFLAGS)
 
-obj-$(CONFIG_IXP4XX_NPE) := npe.o \
+obj-y := npe.o \
        miiphy.o \
        IxOsalBufferMgt.o \
        IxOsalIoMem.o \
index b8c15f8e1f898d0c3a388d60694222bd3b79b510..7f1bd06922f4995b446581713c589d5b30ba670f 100644 (file)
@@ -4,5 +4,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(and $(CONFIG_QE),$(CONFIG_OF_LIBFDT)) += fdt.o
-obj-$(CONFIG_QE) += qe.o uccf.o uec.o uec_phy.o
+obj-y := qe.o uccf.o uec.o uec_phy.o
+obj-$(CONFIG_OF_LIBFDT) += fdt.o
index 4b8cbecaf9ef047518dbcb7908ab7c21d3b0f165..2f2353f809bc98e0899a3ba6611397456cfeed53 100644 (file)
@@ -3,8 +3,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-$(shell mkdir -p $(obj)slb9635_i2c)
-
 # TODO: Merge tpm_tis_lpc.c with tpm.c
 obj-$(CONFIG_TPM_ATMEL_TWI) += tpm_atmel_twi.o
 obj-$(CONFIG_TPM_TIS_I2C) += tpm.o
diff --git a/drivers/tpm/tis_i2c.c b/drivers/tpm/tis_i2c.c
deleted file mode 100644 (file)
index 22554e1..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include <config.h>
-#include <common.h>
-#include <fdtdec.h>
-#include <i2c.h>
-#include "slb9635_i2c/tpm.h"
-
-DECLARE_GLOBAL_DATA_PTR;
-
-/* TPM configuration */
-struct tpm {
-       int i2c_bus;
-       int slave_addr;
-       char inited;
-       int old_bus;
-} tpm;
-
-
-static int tpm_select(void)
-{
-       int ret;
-
-       tpm.old_bus = i2c_get_bus_num();
-       if (tpm.old_bus != tpm.i2c_bus) {
-               ret = i2c_set_bus_num(tpm.i2c_bus);
-               if (ret) {
-                       debug("%s: Fail to set i2c bus %d\n", __func__,
-                             tpm.i2c_bus);
-                       return -1;
-               }
-       }
-       return 0;
-}
-
-static int tpm_deselect(void)
-{
-       int ret;
-
-       if (tpm.old_bus != i2c_get_bus_num()) {
-               ret = i2c_set_bus_num(tpm.old_bus);
-               if (ret) {
-                       debug("%s: Fail to restore i2c bus %d\n",
-                             __func__, tpm.old_bus);
-                       return -1;
-               }
-       }
-       tpm.old_bus = -1;
-       return 0;
-}
-
-/**
- * Decode TPM configuration.
- *
- * @param dev  Returns a configuration of TPM device
- * @return 0 if ok, -1 on error
- */
-static int tpm_decode_config(struct tpm *dev)
-{
-#ifdef CONFIG_OF_CONTROL
-       const void *blob = gd->fdt_blob;
-       int node, parent;
-       int i2c_bus;
-
-       node = fdtdec_next_compatible(blob, 0, COMPAT_INFINEON_SLB9635_TPM);
-       if (node < 0) {
-               node = fdtdec_next_compatible(blob, 0,
-                                             COMPAT_INFINEON_SLB9645_TPM);
-       }
-       if (node < 0) {
-               debug("%s: Node not found\n", __func__);
-               return -1;
-       }
-       parent = fdt_parent_offset(blob, node);
-       if (parent < 0) {
-               debug("%s: Cannot find node parent\n", __func__);
-               return -1;
-       }
-       i2c_bus = i2c_get_bus_num_fdt(parent);
-       if (i2c_bus < 0)
-               return -1;
-       dev->i2c_bus = i2c_bus;
-       dev->slave_addr = fdtdec_get_addr(blob, node, "reg");
-#else
-       dev->i2c_bus = CONFIG_INFINEON_TPM_I2C_BUS;
-       dev->slave_addr = CONFIG_INFINEON_TPM_I2C_ADDR;
-#endif
-       return 0;
-}
-
-int tis_init(void)
-{
-       if (tpm.inited)
-               return 0;
-
-       if (tpm_decode_config(&tpm))
-               return -1;
-
-       if (tpm_select())
-               return -1;
-
-       /*
-        * Probe TPM twice; the first probing might fail because TPM is asleep,
-        * and the probing can wake up TPM.
-        */
-       if (i2c_probe(tpm.slave_addr) && i2c_probe(tpm.slave_addr)) {
-               debug("%s: fail to probe i2c addr 0x%x\n", __func__,
-                     tpm.slave_addr);
-               return -1;
-       }
-
-       tpm_deselect();
-
-       tpm.inited = 1;
-
-       return 0;
-}
-
-int tis_open(void)
-{
-       int rc;
-
-       if (!tpm.inited)
-               return -1;
-
-       if (tpm_select())
-               return -1;
-
-       rc = tpm_open(tpm.slave_addr);
-
-       tpm_deselect();
-
-       return rc;
-}
-
-int tis_close(void)
-{
-       if (!tpm.inited)
-               return -1;
-
-       if (tpm_select())
-               return -1;
-
-       tpm_close();
-
-       tpm_deselect();
-
-       return 0;
-}
-
-int tis_sendrecv(const uint8_t *sendbuf, size_t sbuf_size,
-               uint8_t *recvbuf, size_t *rbuf_len)
-{
-       int len;
-       uint8_t buf[4096];
-
-       if (!tpm.inited)
-               return -1;
-
-       if (sizeof(buf) < sbuf_size)
-               return -1;
-
-       memcpy(buf, sendbuf, sbuf_size);
-
-       if (tpm_select())
-               return -1;
-
-       len = tpm_transmit(buf, sbuf_size);
-
-       tpm_deselect();
-
-       if (len < 10) {
-               *rbuf_len = 0;
-               return -1;
-       }
-
-       memcpy(recvbuf, buf, len);
-       *rbuf_len = len;
-
-       return 0;
-}
index 33cc91ba711b345613ff4b41ab01746e6d0955ad..cad10a3ecb453cafa1fa3f472dbe0633fc0f691f 100644 (file)
@@ -14,25 +14,22 @@ endif
 include $(TOPDIR)/config.mk
 
 # Resulting ELF and binary exectuables will be named demo and demo.bin
-OUTPUT-$(CONFIG_API) = $(obj)demo
-OUTPUT = $(OUTPUT-y)
+OUTPUT = $(obj)demo
 
 # Source files located in the examples/api directory
-SOBJ_FILES-$(CONFIG_API) += crt0.o
-COBJ_FILES-$(CONFIG_API) += demo.o
-COBJ_FILES-$(CONFIG_API) += glue.o
-COBJ_FILES-$(CONFIG_API) += libgenwrap.o
+SOBJ_FILES-y += crt0.o
+COBJ_FILES-y += demo.o
+COBJ_FILES-y += glue.o
+COBJ_FILES-y += libgenwrap.o
 
 # Source files which exist outside the examples/api directory
-EXT_COBJ_FILES-$(CONFIG_API) += lib/crc32.o
-EXT_COBJ_FILES-$(CONFIG_API) += lib/ctype.o
-EXT_COBJ_FILES-$(CONFIG_API) += lib/div64.o
-EXT_COBJ_FILES-$(CONFIG_API) += lib/string.o
-EXT_COBJ_FILES-$(CONFIG_API) += lib/time.o
-EXT_COBJ_FILES-$(CONFIG_API) += lib/vsprintf.o
-ifeq ($(ARCH),powerpc)
-EXT_SOBJ_FILES-$(CONFIG_API) += arch/powerpc/lib/ppcstring.o
-endif
+EXT_COBJ_FILES-y += lib/crc32.o
+EXT_COBJ_FILES-y += lib/ctype.o
+EXT_COBJ_FILES-y += lib/div64.o
+EXT_COBJ_FILES-y += lib/string.o
+EXT_COBJ_FILES-y += lib/time.o
+EXT_COBJ_FILES-y += lib/vsprintf.o
+EXT_SOBJ_FILES-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o
 
 # Create a list of source files so their dependencies can be auto-generated
 SRCS   += $(addprefix $(SRCTREE)/,$(EXT_COBJ_FILES-y:.o=.c))
@@ -46,8 +43,6 @@ OBJS  += $(addprefix $(obj),$(COBJ_FILES-y))
 OBJS   += $(addprefix $(obj),$(notdir $(EXT_COBJ_FILES-y)))
 OBJS   += $(addprefix $(obj),$(notdir $(EXT_SOBJ_FILES-y)))
 
-CPPFLAGS += -I..
-
 all:   $(obj).depend $(OUTPUT)
 
 #########################################################################
index 4afedea065dd9e8da7c4bccfeaf4af109d1f7bc8..f4f102b3e1c47494cf4f9ddb51c130a069edc739 100644 (file)
@@ -8,7 +8,6 @@
 include $(TOPDIR)/config.mk
 
 ELF-$(ARCH)  :=
-ELF-$(BOARD) :=
 ELF-$(CPU)   :=
 ELF-y        := hello_world
 
@@ -20,14 +19,13 @@ ELF-mpc5xxx                      += interrupt
 ELF-mpc8xx                       += test_burst timer
 ELF-mpc8260                      += mem_to_mem_idma2intr
 ELF-ppc                          += sched
-ELF-oxc                          += eepro100_eeprom
 
 #
 # Some versions of make do not handle trailing white spaces properly;
 # leading to build failures. The problem was found with GNU Make 3.80.
 # Using 'strip' as a workaround for the problem.
 #
-ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)))
+ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(CPU)))
 
 SREC := $(addsuffix .srec,$(ELF))
 BIN  := $(addsuffix .bin,$(ELF))
@@ -54,8 +52,6 @@ SREC  := $(addprefix $(obj),$(SREC))
 
 gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
 
-CPPFLAGS += -I..
-
 # For PowerPC there's no need to compile standalone applications as a
 # relocatable executable.  The relocation data is not needed, and
 # also causes the entry point of the standalone application to be
diff --git a/examples/standalone/eepro100_eeprom.c b/examples/standalone/eepro100_eeprom.c
deleted file mode 100644 (file)
index 3c7f380..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright 1998-2001 by Donald Becker.
- * This software may be used and distributed according to the terms of
- * the GNU General Public License (GPL), incorporated herein by reference.
- * Contact the author for use under other terms.
- *
- * This program must be compiled with "-O"!
- * See the bottom of this file for the suggested compile-command.
- *
- * The author may be reached as becker@scyld.com, or C/O
- *  Scyld Computing Corporation
- *  410 Severn Ave., Suite 210
- *  Annapolis MD 21403
- *
- * Common-sense licensing statement: Using any portion of this program in
- * your own program means that you must give credit to the original author
- * and release the resulting code under the GPL.
- */
-
-/* avoid unnecessary memcpy function */
-#define _PPC_STRING_H_
-
-#include <common.h>
-#include <exports.h>
-
-static int reset_eeprom(unsigned long ioaddr, unsigned char *hwaddr);
-
-int eepro100_eeprom(int argc, char * const argv[])
-{
-       int ret = 0;
-
-       unsigned char hwaddr1[6] = { 0x00, 0x00, 0x02, 0x03, 0x04, 0x05 };
-       unsigned char hwaddr2[6] = { 0x00, 0x00, 0x02, 0x03, 0x04, 0x06 };
-
-       app_startup(argv);
-
-#if defined(CONFIG_OXC)
-       ret |= reset_eeprom(0x80000000, hwaddr1);
-       ret |= reset_eeprom(0x81000000, hwaddr2);
-#endif
-
-       return ret;
-}
-
-/* Default EEPROM for i82559 */
-static unsigned short default_eeprom[64] = {
-       0x0100, 0x0302, 0x0504, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-       0xffff, 0xffff, 0x40c0, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff,
-       0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-       0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-       0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-       0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-       0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
-       0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
-};
-
-static unsigned short eeprom[256];
-
-static int eeprom_size = 64;
-static int eeprom_addr_size = 6;
-
-static int debug = 0;
-
-static inline unsigned short swap16(unsigned short x)
-{
-       return (((x & 0xff) << 8) | ((x & 0xff00) >> 8));
-}
-
-static inline void outw(short data, long addr)
-{
-       *(volatile short *)(addr) = swap16(data);
-}
-
-static inline short inw(long addr)
-{
-       return swap16(*(volatile short *)(addr));
-}
-
-void *memcpy(void *dst, const void *src, unsigned int len)
-{
-       char *ret = dst;
-       while (len-- > 0) {
-               *ret++ = *((char *)src);
-               src++;
-       }
-       return (void *)ret;
-}
-
-/* The EEPROM commands include the alway-set leading bit. */
-#define EE_WRITE_CMD   (5)
-#define EE_READ_CMD            (6)
-#define EE_ERASE_CMD   (7)
-
-/* Serial EEPROM section. */
-#define EE_SHIFT_CLK   0x01    /* EEPROM shift clock. */
-#define EE_CS                  0x02    /* EEPROM chip select. */
-#define EE_DATA_WRITE  0x04    /* EEPROM chip data in. */
-#define EE_DATA_READ   0x08    /* EEPROM chip data out. */
-#define EE_ENB                 (0x4800 | EE_CS)
-#define EE_WRITE_0             0x4802
-#define EE_WRITE_1             0x4806
-#define EE_OFFSET              14
-
-/* Delay between EEPROM clock transitions. */
-#define eeprom_delay(ee_addr)  inw(ee_addr)
-
-/* Wait for the EEPROM to finish the previous operation. */
-static int eeprom_busy_poll(long ee_ioaddr)
-{
-       int i;
-       outw(EE_ENB, ee_ioaddr);
-       for (i = 0; i < 10000; i++)                     /* Typical 2000 ticks */
-               if (inw(ee_ioaddr) & EE_DATA_READ)
-                       break;
-       return i;
-}
-
-/* This executes a generic EEPROM command, typically a write or write enable.
-   It returns the data output from the EEPROM, and thus may also be used for
-   reads. */
-static int do_eeprom_cmd(long ioaddr, int cmd, int cmd_len)
-{
-       unsigned retval = 0;
-       long ee_addr = ioaddr + EE_OFFSET;
-
-       if (debug > 1)
-               printf(" EEPROM op 0x%x: ", cmd);
-
-       outw(EE_ENB | EE_SHIFT_CLK, ee_addr);
-
-       /* Shift the command bits out. */
-       do {
-               short dataval = (cmd & (1 << cmd_len)) ? EE_WRITE_1 : EE_WRITE_0;
-               outw(dataval, ee_addr);
-               eeprom_delay(ee_addr);
-               if (debug > 2)
-                       printf("%X", inw(ee_addr) & 15);
-               outw(dataval | EE_SHIFT_CLK, ee_addr);
-               eeprom_delay(ee_addr);
-               retval = (retval << 1) | ((inw(ee_addr) & EE_DATA_READ) ? 1 : 0);
-       } while (--cmd_len >= 0);
-#if 0
-       outw(EE_ENB, ee_addr);
-#endif
-       /* Terminate the EEPROM access. */
-       outw(EE_ENB & ~EE_CS, ee_addr);
-       if (debug > 1)
-               printf(" EEPROM result is 0x%5.5x.\n", retval);
-       return retval;
-}
-
-static int read_eeprom(long ioaddr, int location, int addr_len)
-{
-       return do_eeprom_cmd(ioaddr, ((EE_READ_CMD << addr_len) | location)
-               << 16 , 3 + addr_len + 16) & 0xffff;
-}
-
-static void write_eeprom(long ioaddr, int index, int value, int addr_len)
-{
-       long ee_ioaddr = ioaddr + EE_OFFSET;
-       int i;
-
-       /* Poll for previous op finished. */
-       eeprom_busy_poll(ee_ioaddr);                    /* Typical 0 ticks */
-       /* Enable programming modes. */
-       do_eeprom_cmd(ioaddr, (0x4f << (addr_len-4)), 3 + addr_len);
-       /* Do the actual write. */
-       do_eeprom_cmd(ioaddr,
-                                 (((EE_WRITE_CMD<<addr_len) | index)<<16) | (value & 0xffff),
-                                 3 + addr_len + 16);
-       /* Poll for write finished. */
-       i = eeprom_busy_poll(ee_ioaddr);                        /* Typical 2000 ticks */
-       if (debug)
-               printf(" Write finished after %d ticks.\n", i);
-       /* Disable programming. This command is not instantaneous, so we check
-          for busy before the next op. */
-       do_eeprom_cmd(ioaddr, (0x40 << (addr_len-4)), 3 + addr_len);
-       eeprom_busy_poll(ee_ioaddr);
-}
-
-static int reset_eeprom(unsigned long ioaddr, unsigned char *hwaddr)
-{
-       unsigned short checksum = 0;
-       int size_test;
-       int i;
-
-       printf("Resetting i82559 EEPROM @ 0x%08lX ... ", ioaddr);
-
-       size_test = do_eeprom_cmd(ioaddr, (EE_READ_CMD << 8) << 16, 27);
-       eeprom_addr_size = (size_test & 0xffe0000) == 0xffe0000 ? 8 : 6;
-       eeprom_size = 1 << eeprom_addr_size;
-
-       memcpy(eeprom, default_eeprom, sizeof default_eeprom);
-
-       for (i = 0; i < 3; i++)
-               eeprom[i] = (hwaddr[i*2+1]<<8) + hwaddr[i*2];
-
-       /* Recalculate the checksum. */
-       for (i = 0; i < eeprom_size - 1; i++)
-               checksum += eeprom[i];
-       eeprom[i] = 0xBABA - checksum;
-
-       for (i = 0; i < eeprom_size; i++)
-               write_eeprom(ioaddr, i, eeprom[i], eeprom_addr_size);
-
-       for (i = 0; i < eeprom_size; i++)
-               if (read_eeprom(ioaddr, i, eeprom_addr_size) != eeprom[i]) {
-                       printf("failed\n");
-                       return 1;
-               }
-
-       printf("done\n");
-       return 0;
-}
index bdcd74631d603def66d49b079c4200519236846a..34dc0351edd6931002c55d9d75df9a3a205a0ab0 100644 (file)
@@ -6,15 +6,20 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_FAT_SUPPORT) += fat/
+else
 obj-y                          += fs.o
 
-obj-y += cbfs/
-obj-y += cramfs/
-obj-y += ext4/
-obj-y += fdos/
-obj-y += jffs2/
-obj-y += reiserfs/
-obj-y += sandbox/
-obj-y += ubifs/
-obj-y += yaffs2/
-obj-y += zfs/
+obj-$(CONFIG_CMD_CBFS) += cbfs/
+obj-$(CONFIG_CMD_CRAMFS) += cramfs/
+obj-$(CONFIG_FS_EXT4) += ext4/
+obj-y += fat/
+obj-$(CONFIG_CMD_FDOS) += fdos/
+obj-$(CONFIG_CMD_JFFS2) += jffs2/
+obj-$(CONFIG_CMD_REISER) += reiserfs/
+obj-$(CONFIG_SANDBOX) += sandbox/
+obj-$(CONFIG_CMD_UBIFS) += ubifs/
+obj-$(CONFIG_YAFFS2) += yaffs2/
+obj-$(CONFIG_CMD_ZFS) += zfs/
+endif
index 6f33d2813d6c4573cd7528dbe60ae10d82064423..a106e05dd84fe6a2de8988dce4f81f5978af83d9 100644 (file)
@@ -3,4 +3,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_CMD_CBFS) := cbfs.o
+obj- := cbfs.o
index e2b2c7366c22c9e53492f5998bc2ffb19fd8f281..12d73a375e947d9fc0d812152b68df5f5fa13a16 100644 (file)
@@ -5,5 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_CMD_CRAMFS) := cramfs.o
-obj-$(CONFIG_CMD_CRAMFS) += uncompress.o
+obj-y := cramfs.o
+obj-y += uncompress.o
index 0f5d3995cbbb6e6c9f8c08d5e58648cbbfe39428..8d15bdad675d945bdb0289822573f22de7a4dea0 100644 (file)
@@ -9,5 +9,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_FS_EXT4) := ext4fs.o ext4_common.o dev.o
+obj-y := ext4fs.o ext4_common.o dev.o
 obj-$(CONFIG_EXT4_WRITE) += ext4_write.o ext4_journal.o crc16.o
index 95480af3e4dc5319f49fbd47b397a2ec5e5443ec..2f8b5addd6aeb14aece8a213e41049f930164f85 100644 (file)
@@ -10,4 +10,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_CMD_FDOS) := fat.o vfat.o dev.o fdos.o fs.o subdir.o
+obj-y := fat.o vfat.o dev.o fdos.o fs.o subdir.o
index 02e481f3ce2914f9403e8d4abd32ee72839f54cf..4cb0600cf9b9ad53f9f75568cc892e498c198f7d 100644 (file)
@@ -5,11 +5,9 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_CMD_JFFS2
 obj-$(CONFIG_JFFS2_LZO) += compr_lzo.o
 obj-y += compr_rtime.o
 obj-y += compr_rubin.o
 obj-y += compr_zlib.o
 obj-y += jffs2_1pass.o
 obj-y += mini_inflate.o
-endif
index 55f70b1a94f3062c3634f97efbe9f52625c01cdc..5a692f0ee7757b8c2d6682816dfadb1d635cfcfc 100644 (file)
@@ -9,4 +9,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_CMD_REISER) := reiserfs.o dev.o mode_string.o
+obj-y := reiserfs.o dev.o mode_string.o
index faa7c16ba013243b821c9dfe8d0cfbd072f07984..ca238f6d7da979b68b0c67d241fc529fdd762e42 100644 (file)
@@ -10,4 +10,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_SANDBOX) := sandboxfs.o
+obj-y := sandboxfs.o
index 47d5a8fb0add33daaf1c2c653f54578565a341bb..389b0e37e796cbd9d6cca0f48fc8b076a31e30da 100644 (file)
@@ -9,10 +9,10 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_CMD_UBIFS) := ubifs.o io.o super.o sb.o master.o lpt.o
-obj-$(CONFIG_CMD_UBIFS) += lpt_commit.o scan.o lprops.o
-obj-$(CONFIG_CMD_UBIFS) += tnc.o tnc_misc.o debug.o crc16.o budget.o
-obj-$(CONFIG_CMD_UBIFS) += log.o orphan.o recovery.o replay.o
+obj-y := ubifs.o io.o super.o sb.o master.o lpt.o
+obj-y += lpt_commit.o scan.o lprops.o
+obj-y += tnc.o tnc_misc.o debug.o crc16.o budget.o
+obj-y += log.o orphan.o recovery.o replay.o
 
 # SEE README.arm-unaligned-accesses
 $(obj)super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED)
index 077af7834e84dca66653a8fc58f9327c90e20897..d811287ddbf0034c3b61905edaeb9dc7a0d70a51 100644 (file)
@@ -16,7 +16,7 @@
 #
 # $Id: Makefile,v 1.15 2007/07/18 19:40:38 charles Exp $
 
-obj-$(CONFIG_YAFFS2) := \
+obj-y := \
        yaffs_allocator.o yaffs_attribs.o yaffs_bitmap.o yaffs_uboot_glue.o\
        yaffs_checkptrw.o yaffs_ecc.o yaffs_error.o \
        yaffsfs.o yaffs_guts.o yaffs_nameval.o yaffs_nand.o\
index 7090416b871ddb384a60b52f591583300f7d477e..fa58b7fcdec568e8c5f4d0a33677a0ae869a246e 100644 (file)
@@ -5,4 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_CMD_ZFS) := dev.o zfs.o zfs_fletcher.o zfs_sha256.o zfs_lzjb.o
+obj-y := dev.o zfs.o zfs_fletcher.o zfs_sha256.o zfs_lzjb.o
index 2738242c549a6ab5754c5e7b3bcb7c6b86668b18..7c6bec8f769078ba7064dee76d5b8c92d7e49210 100644 (file)
@@ -32,6 +32,8 @@
 #ifdef CONFIG_RAMBOOT_PBL
 #define CONFIG_RAMBOOT_TEXT_BASE       CONFIG_SYS_TEXT_BASE
 #define CONFIG_RESET_VECTOR_ADDRESS    0xfffffffc
+#define CONFIG_PBLPBI_CONFIG $(SRCTREE)/board/freescale/t1040qds/t1040_pbi.cfg
+#define CONFIG_PBLRCW_CONFIG $(SRCTREE)/board/freescale/t1040qds/t1040_rcw.cfg
 #endif
 
 /* High Level Configuration Options */
diff --git a/include/configs/T1040RDB.h b/include/configs/T1040RDB.h
new file mode 100644 (file)
index 0000000..620387f
--- /dev/null
@@ -0,0 +1,690 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * T1040 RDB board configuration file
+ */
+#define CONFIG_T104xRDB
+#define CONFIG_T1040RDB
+#define CONFIG_PHYS_64BIT
+
+#ifdef CONFIG_RAMBOOT_PBL
+#define CONFIG_RAMBOOT_TEXT_BASE       CONFIG_SYS_TEXT_BASE
+#define CONFIG_RESET_VECTOR_ADDRESS    0xfffffffc
+#endif
+
+/* High Level Configuration Options */
+#define CONFIG_BOOKE
+#define CONFIG_E500                    /* BOOKE e500 family */
+#define CONFIG_E500MC                  /* BOOKE e500mc family */
+#define CONFIG_SYS_BOOK3E_HV           /* Category E.HV supported */
+#define CONFIG_MPC85xx                 /* MPC85xx/PQ3 platform */
+#define CONFIG_MP                      /* support multiple processors */
+
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE   0xeff80000
+#endif
+
+#ifndef CONFIG_RESET_VECTOR_ADDRESS
+#define CONFIG_RESET_VECTOR_ADDRESS    0xeffffffc
+#endif
+
+#define CONFIG_SYS_FSL_CPC             /* Corenet Platform Cache */
+#define CONFIG_SYS_NUM_CPC             CONFIG_NUM_DDR_CONTROLLERS
+#define CONFIG_FSL_IFC                 /* Enable IFC Support */
+#define CONFIG_PCI                     /* Enable PCI/PCIE */
+#define CONFIG_PCI_INDIRECT_BRIDGE
+#define CONFIG_PCIE1                   /* PCIE controler 1 */
+#define CONFIG_PCIE2                   /* PCIE controler 2 */
+#define CONFIG_PCIE3                   /* PCIE controler 3 */
+#define CONFIG_PCIE4                   /* PCIE controler 4 */
+
+#define CONFIG_FSL_PCI_INIT            /* Use common FSL init code */
+#define CONFIG_SYS_PCI_64BIT           /* enable 64-bit PCI resources */
+
+#define CONFIG_FSL_LAW                 /* Use common FSL init code */
+
+#define CONFIG_ENV_OVERWRITE
+
+#ifdef CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_IS_NOWHERE
+#else
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#endif
+
+#ifndef CONFIG_SYS_NO_FLASH
+#if defined(CONFIG_SPIFLASH)
+#define CONFIG_SYS_EXTRA_ENV_RELOC
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SPI_BUS              0
+#define CONFIG_ENV_SPI_CS               0
+#define CONFIG_ENV_SPI_MAX_HZ           10000000
+#define CONFIG_ENV_SPI_MODE             0
+#define CONFIG_ENV_SIZE                 0x2000          /* 8KB */
+#define CONFIG_ENV_OFFSET               0x100000        /* 1MB */
+#define CONFIG_ENV_SECT_SIZE            0x10000
+#elif defined(CONFIG_SDCARD)
+#define CONFIG_SYS_EXTRA_ENV_RELOC
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV          0
+#define CONFIG_ENV_SIZE                        0x2000
+#define CONFIG_ENV_OFFSET              (512 * 1105)
+#elif defined(CONFIG_NAND)
+#define CONFIG_SYS_EXTRA_ENV_RELOC
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_SIZE                        CONFIG_SYS_NAND_BLOCK_SIZE
+#define CONFIG_ENV_OFFSET              (5 * CONFIG_SYS_NAND_BLOCK_SIZE)
+#else
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE                0x2000
+#define CONFIG_ENV_SECT_SIZE   0x20000 /* 128K (one sector) */
+#endif
+#else /* CONFIG_SYS_NO_FLASH */
+#define CONFIG_ENV_SIZE                0x2000
+#define CONFIG_ENV_SECT_SIZE   0x20000 /* 128K (one sector) */
+#endif
+
+#define CONFIG_SYS_CLK_FREQ    100000000
+#define CONFIG_DDR_CLK_FREQ    66666666
+
+/*
+ * These can be toggled for performance analysis, otherwise use default.
+ */
+#define CONFIG_SYS_CACHE_STASHING
+#define CONFIG_BACKSIDE_L2_CACHE
+#define CONFIG_SYS_INIT_L2CSR0         L2CSR0_L2E
+#define CONFIG_BTB                     /* toggle branch predition */
+#define CONFIG_DDR_ECC
+#ifdef CONFIG_DDR_ECC
+#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
+#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
+#endif
+
+#define CONFIG_ENABLE_36BIT_PHYS
+
+#define CONFIG_ADDR_MAP
+#define CONFIG_SYS_NUM_ADDR_MAP                64      /* number of TLB1 entries */
+
+#define CONFIG_SYS_MEMTEST_START       0x00200000      /* memtest works on */
+#define CONFIG_SYS_MEMTEST_END         0x00400000
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_PANIC_HANG      /* do not reset board on panic */
+
+/*
+ *  Config the L3 Cache as L3 SRAM
+ */
+#define CONFIG_SYS_INIT_L3_ADDR                0xFFFC0000
+
+#define CONFIG_SYS_DCSRBAR             0xf0000000
+#define CONFIG_SYS_DCSRBAR_PHYS                0xf00000000ull
+
+/*
+ * DDR Setup
+ */
+#define CONFIG_VERY_BIG_RAM
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+
+/* CONFIG_NUM_DDR_CONTROLLERS is defined in include/asm/config_mpc85xx.h */
+#define CONFIG_DIMM_SLOTS_PER_CTLR     1
+#define CONFIG_CHIP_SELECTS_PER_CTRL   (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
+
+#define CONFIG_DDR_SPD
+#define CONFIG_SYS_DDR_RAW_TIMING
+#define CONFIG_FSL_DDR3
+
+#define CONFIG_SYS_SPD_BUS_NUM 0
+#define SPD_EEPROM_ADDRESS     0x51
+
+#define CONFIG_SYS_SDRAM_SIZE  4096    /* for fixed parameter use */
+
+/*
+ * IFC Definitions
+ */
+#define CONFIG_SYS_FLASH_BASE  0xe8000000
+#define CONFIG_SYS_FLASH_BASE_PHYS     (0xf00000000ull | CONFIG_SYS_FLASH_BASE)
+
+#define CONFIG_SYS_NOR_CSPR_EXT        (0xf)
+#define CONFIG_SYS_NOR_CSPR    (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE) | \
+                               CSPR_PORT_SIZE_16 | \
+                               CSPR_MSEL_NOR | \
+                               CSPR_V)
+#define CONFIG_SYS_NOR_AMASK   IFC_AMASK(128*1024*1024)
+/* NOR Flash Timing Params */
+#define CONFIG_SYS_NOR_CSOR    CSOR_NAND_TRHZ_80
+#define CONFIG_SYS_NOR_FTIM0   (FTIM0_NOR_TACSE(0x4) | \
+                               FTIM0_NOR_TEADC(0x5) | \
+                               FTIM0_NOR_TEAHC(0x5))
+#define CONFIG_SYS_NOR_FTIM1   (FTIM1_NOR_TACO(0x35) | \
+                               FTIM1_NOR_TRAD_NOR(0x1A) |\
+                               FTIM1_NOR_TSEQRAD_NOR(0x13))
+#define CONFIG_SYS_NOR_FTIM2   (FTIM2_NOR_TCS(0x4) | \
+                               FTIM2_NOR_TCH(0x4) | \
+                               FTIM2_NOR_TWPH(0x0E) | \
+                               FTIM2_NOR_TWP(0x1c))
+#define CONFIG_SYS_NOR_FTIM3   0x0
+
+#define CONFIG_SYS_FLASH_QUIET_TEST
+#define CONFIG_FLASH_SHOW_PROGRESS     45 /* count down from 45/5: 9..1 */
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     2       /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024    /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000   /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE_PHYS}
+
+/* CPLD on IFC */
+#define CONFIG_SYS_CPLD_BASE   0xffdf0000
+#define CONFIG_SYS_CPLD_BASE_PHYS      (0xf00000000ull | CONFIG_SYS_CPLD_BASE)
+#define CONFIG_SYS_CSPR2       (CSPR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE_PHYS) \
+                               | CSPR_PORT_SIZE_8 \
+                               | CSPR_MSEL_GPCM \
+                               | CSPR_V)
+#define CONFIG_SYS_AMASK2      IFC_AMASK(64*1024)
+#define CONFIG_SYS_CSOR2       0x0
+/* CPLD Timing parameters for IFC CS2 */
+#define CONFIG_SYS_CS2_FTIM0           (FTIM0_GPCM_TACSE(0x0e) | \
+                                       FTIM0_GPCM_TEADC(0x0e) | \
+                                       FTIM0_GPCM_TEAHC(0x0e))
+#define CONFIG_SYS_CS2_FTIM1           (FTIM1_GPCM_TACO(0x0e) | \
+                                       FTIM1_GPCM_TRAD(0x1f))
+#define CONFIG_SYS_CS2_FTIM2           (FTIM2_GPCM_TCS(0x0e) | \
+                                       FTIM2_GPCM_TCH(0x0) | \
+                                       FTIM2_GPCM_TWP(0x1f))
+#define CONFIG_SYS_CS2_FTIM3           0x0
+
+/* NAND Flash on IFC */
+#define CONFIG_NAND_FSL_IFC
+#define CONFIG_SYS_NAND_BASE           0xff800000
+#define CONFIG_SYS_NAND_BASE_PHYS      (0xf00000000ull | CONFIG_SYS_NAND_BASE)
+
+#define CONFIG_SYS_NAND_CSPR_EXT       (0xf)
+#define CONFIG_SYS_NAND_CSPR   (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
+                               | CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
+                               | CSPR_MSEL_NAND        /* MSEL = NAND */ \
+                               | CSPR_V)
+#define CONFIG_SYS_NAND_AMASK  IFC_AMASK(64*1024)
+
+#define CONFIG_SYS_NAND_CSOR    (CSOR_NAND_ECC_ENC_EN   /* ECC on encode */ \
+                               | CSOR_NAND_ECC_DEC_EN  /* ECC on decode */ \
+                               | CSOR_NAND_ECC_MODE_4  /* 4-bit ECC */ \
+                               | CSOR_NAND_RAL_3       /* RAL = 3Byes */ \
+                               | CSOR_NAND_PGS_4K      /* Page Size = 4K */ \
+                               | CSOR_NAND_SPRZ_224/* Spare size = 224 */ \
+                               | CSOR_NAND_PB(64))     /*Pages Per Block = 64*/
+
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+
+/* ONFI NAND Flash mode0 Timing Params */
+#define CONFIG_SYS_NAND_FTIM0          (FTIM0_NAND_TCCST(0x07) | \
+                                       FTIM0_NAND_TWP(0x18)   | \
+                                       FTIM0_NAND_TWCHT(0x07) | \
+                                       FTIM0_NAND_TWH(0x0a))
+#define CONFIG_SYS_NAND_FTIM1          (FTIM1_NAND_TADLE(0x32) | \
+                                       FTIM1_NAND_TWBE(0x39)  | \
+                                       FTIM1_NAND_TRR(0x0e)   | \
+                                       FTIM1_NAND_TRP(0x18))
+#define CONFIG_SYS_NAND_FTIM2          (FTIM2_NAND_TRAD(0x0f) | \
+                                       FTIM2_NAND_TREH(0x0a) | \
+                                       FTIM2_NAND_TWHRE(0x1e))
+#define CONFIG_SYS_NAND_FTIM3          0x0
+
+#define CONFIG_SYS_NAND_DDR_LAW                11
+#define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
+#define CONFIG_SYS_MAX_NAND_DEVICE     1
+#define CONFIG_MTD_NAND_VERIFY_WRITE
+#define CONFIG_CMD_NAND
+
+#define CONFIG_SYS_NAND_BLOCK_SIZE     (512 * 1024)
+
+#if defined(CONFIG_NAND)
+#define CONFIG_SYS_CSPR0_EXT           CONFIG_SYS_NAND_CSPR_EXT
+#define CONFIG_SYS_CSPR0               CONFIG_SYS_NAND_CSPR
+#define CONFIG_SYS_AMASK0              CONFIG_SYS_NAND_AMASK
+#define CONFIG_SYS_CSOR0               CONFIG_SYS_NAND_CSOR
+#define CONFIG_SYS_CS0_FTIM0           CONFIG_SYS_NAND_FTIM0
+#define CONFIG_SYS_CS0_FTIM1           CONFIG_SYS_NAND_FTIM1
+#define CONFIG_SYS_CS0_FTIM2           CONFIG_SYS_NAND_FTIM2
+#define CONFIG_SYS_CS0_FTIM3           CONFIG_SYS_NAND_FTIM3
+#define CONFIG_SYS_CSPR1_EXT           CONFIG_SYS_NOR_CSPR_EXT
+#define CONFIG_SYS_CSPR1               CONFIG_SYS_NOR_CSPR
+#define CONFIG_SYS_AMASK1              CONFIG_SYS_NOR_AMASK
+#define CONFIG_SYS_CSOR1               CONFIG_SYS_NOR_CSOR
+#define CONFIG_SYS_CS1_FTIM0           CONFIG_SYS_NOR_FTIM0
+#define CONFIG_SYS_CS1_FTIM1           CONFIG_SYS_NOR_FTIM1
+#define CONFIG_SYS_CS1_FTIM2           CONFIG_SYS_NOR_FTIM2
+#define CONFIG_SYS_CS1_FTIM3           CONFIG_SYS_NOR_FTIM3
+#else
+#define CONFIG_SYS_CSPR0_EXT           CONFIG_SYS_NOR_CSPR_EXT
+#define CONFIG_SYS_CSPR0               CONFIG_SYS_NOR_CSPR
+#define CONFIG_SYS_AMASK0              CONFIG_SYS_NOR_AMASK
+#define CONFIG_SYS_CSOR0               CONFIG_SYS_NOR_CSOR
+#define CONFIG_SYS_CS0_FTIM0           CONFIG_SYS_NOR_FTIM0
+#define CONFIG_SYS_CS0_FTIM1           CONFIG_SYS_NOR_FTIM1
+#define CONFIG_SYS_CS0_FTIM2           CONFIG_SYS_NOR_FTIM2
+#define CONFIG_SYS_CS0_FTIM3           CONFIG_SYS_NOR_FTIM3
+#define CONFIG_SYS_CSPR1_EXT           CONFIG_SYS_NAND_CSPR_EXT
+#define CONFIG_SYS_CSPR1               CONFIG_SYS_NAND_CSPR
+#define CONFIG_SYS_AMASK1              CONFIG_SYS_NAND_AMASK
+#define CONFIG_SYS_CSOR1               CONFIG_SYS_NAND_CSOR
+#define CONFIG_SYS_CS1_FTIM0           CONFIG_SYS_NAND_FTIM0
+#define CONFIG_SYS_CS1_FTIM1           CONFIG_SYS_NAND_FTIM1
+#define CONFIG_SYS_CS1_FTIM2           CONFIG_SYS_NAND_FTIM2
+#define CONFIG_SYS_CS1_FTIM3           CONFIG_SYS_NAND_FTIM3
+#endif
+
+#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE
+
+#if defined(CONFIG_RAMBOOT_PBL)
+#define CONFIG_SYS_RAMBOOT
+#endif
+
+#define CONFIG_BOARD_EARLY_INIT_R
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_HWCONFIG
+
+/* define to use L1 as initial stack */
+#define CONFIG_L1_INIT_RAM
+#define CONFIG_SYS_INIT_RAM_LOCK
+#define CONFIG_SYS_INIT_RAM_ADDR       0xfdd00000      /* Initial L1 address */
+#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH     0xf
+#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW      0xfe0ec000
+/* The assembler doesn't like typecast */
+#define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
+       ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
+         CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
+#define CONFIG_SYS_INIT_RAM_SIZE               0x00004000
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                       GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_MONITOR_LEN         (512 * 1024)
+#define CONFIG_SYS_MALLOC_LEN          (4 * 1024 * 1024)
+
+/* Serial Port - controlled on board with jumper J8
+ * open - index 2
+ * shorted - index 1
+ */
+#define CONFIG_CONS_INDEX      1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         (get_bus_freq(0)/2)
+
+#define CONFIG_SYS_BAUDRATE_TABLE      \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
+
+#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x11C500)
+#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x11C600)
+#define CONFIG_SYS_NS16550_COM3        (CONFIG_SYS_CCSRBAR+0x11D500)
+#define CONFIG_SYS_NS16550_COM4        (CONFIG_SYS_CCSRBAR+0x11D600)
+#define CONFIG_SERIAL_MULTI            /* Enable both serial ports */
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV   /* determine from environment */
+
+/* Use the HUSH parser */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_BOARD_SETUP
+#define CONFIG_OF_STDOUT_VIA_ALIAS
+
+/* new uImage format support */
+#define CONFIG_FIT
+#define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+
+/* I2C */
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_FSL             /* Use FSL common I2C driver */
+#define CONFIG_SYS_FSL_I2C_SPEED       400000  /* I2C speed in Hz */
+#define CONFIG_SYS_FSL_I2C_SLAVE       0x7F
+#define CONFIG_SYS_FSL_I2C2_SPEED      400000  /* I2C speed in Hz */
+#define CONFIG_SYS_FSL_I2C2_SLAVE      0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET      0x118000
+#define CONFIG_SYS_FSL_I2C2_OFFSET     0x119000
+
+/* I2C bus multiplexer */
+#define I2C_MUX_PCA_ADDR                0x70
+#define I2C_MUX_CH_DEFAULT      0x8
+
+
+/*
+ * eSPI - Enhanced SPI
+ */
+#define CONFIG_FSL_ESPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_STMICRO
+#define CONFIG_CMD_SF
+#define CONFIG_SF_DEFAULT_SPEED         10000000
+#define CONFIG_SF_DEFAULT_MODE          0
+
+/*
+ * General PCI
+ * Memory space is mapped 1-1, but I/O space must start from 0.
+ */
+
+#ifdef CONFIG_PCI
+/* controller 1, direct to uli, tgtid 3, Base address 20000 */
+#ifdef CONFIG_PCIE1
+#define        CONFIG_SYS_PCIE1_MEM_VIRT       0x80000000
+#define        CONFIG_SYS_PCIE1_MEM_BUS        0xe0000000
+#define        CONFIG_SYS_PCIE1_MEM_PHYS       0xc00000000ull
+#define CONFIG_SYS_PCIE1_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE1_IO_VIRT       0xf8000000
+#define CONFIG_SYS_PCIE1_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE1_IO_PHYS       0xff8000000ull
+#define CONFIG_SYS_PCIE1_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+/* controller 2, Slot 2, tgtid 2, Base address 201000 */
+#ifdef CONFIG_PCIE2
+#define CONFIG_SYS_PCIE2_MEM_VIRT      0x90000000
+#define CONFIG_SYS_PCIE2_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE2_MEM_PHYS      0xc10000000ull
+#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE2_IO_VIRT       0xf8010000
+#define CONFIG_SYS_PCIE2_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE2_IO_PHYS       0xff8010000ull
+#define CONFIG_SYS_PCIE2_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+/* controller 3, Slot 1, tgtid 1, Base address 202000 */
+#ifdef CONFIG_PCIE3
+#define CONFIG_SYS_PCIE3_MEM_VIRT      0xa0000000
+#define CONFIG_SYS_PCIE3_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE3_MEM_PHYS      0xc20000000ull
+#define CONFIG_SYS_PCIE3_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE3_IO_VIRT       0xf8020000
+#define CONFIG_SYS_PCIE3_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE3_IO_PHYS       0xff8020000ull
+#define CONFIG_SYS_PCIE3_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+/* controller 4, Base address 203000 */
+#ifdef CONFIG_PCIE4
+#define CONFIG_SYS_PCIE4_MEM_VIRT      0xb0000000
+#define CONFIG_SYS_PCIE4_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE4_MEM_PHYS      0xc30000000ull
+#define CONFIG_SYS_PCIE4_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE4_IO_VIRT       0xf8030000
+#define CONFIG_SYS_PCIE4_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE4_IO_PHYS       0xff8030000ull
+#define CONFIG_SYS_PCIE4_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+#define CONFIG_PCI_PNP                 /* do pci plug-and-play */
+#define CONFIG_E1000
+
+#define CONFIG_PCI_SCAN_SHOW           /* show pci devices on startup */
+#define CONFIG_DOS_PARTITION
+#endif /* CONFIG_PCI */
+
+/* SATA */
+#define CONFIG_FSL_SATA_V2
+#ifdef CONFIG_FSL_SATA_V2
+#define CONFIG_LIBATA
+#define CONFIG_FSL_SATA
+
+#define CONFIG_SYS_SATA_MAX_DEVICE     1
+#define CONFIG_SATA1
+#define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
+#define CONFIG_SYS_SATA1_FLAGS         FLAGS_DMA
+
+#define CONFIG_LBA48
+#define CONFIG_CMD_SATA
+#define CONFIG_DOS_PARTITION
+#define CONFIG_CMD_EXT2
+#endif
+
+/*
+* USB
+*/
+#define CONFIG_HAS_FSL_DR_USB
+
+#ifdef CONFIG_HAS_FSL_DR_USB
+#define CONFIG_USB_EHCI
+
+#ifdef CONFIG_USB_EHCI
+#define CONFIG_CMD_USB
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+#define CONFIG_CMD_EXT2
+#endif
+#endif
+
+#define CONFIG_MMC
+
+#ifdef CONFIG_MMC
+#define CONFIG_FSL_ESDHC
+#define CONFIG_SYS_FSL_ESDHC_ADDR       CONFIG_SYS_MPC85xx_ESDHC_ADDR
+#define CONFIG_CMD_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
+/* Qman/Bman */
+#ifndef CONFIG_NOBQFMAN
+#define CONFIG_SYS_DPAA_QBMAN          /* Support Q/Bman */
+#define CONFIG_SYS_BMAN_NUM_PORTALS    25
+#define CONFIG_SYS_BMAN_MEM_BASE       0xf4000000
+#define CONFIG_SYS_BMAN_MEM_PHYS       0xff4000000ull
+#define CONFIG_SYS_BMAN_MEM_SIZE       0x02000000
+#define CONFIG_SYS_QMAN_NUM_PORTALS    25
+#define CONFIG_SYS_QMAN_MEM_BASE       0xf6000000
+#define CONFIG_SYS_QMAN_MEM_PHYS       0xff6000000ull
+#define CONFIG_SYS_QMAN_MEM_SIZE       0x02000000
+
+#define CONFIG_SYS_DPAA_FMAN
+#define CONFIG_SYS_DPAA_PME
+
+/* Default address of microcode for the Linux Fman driver */
+#if defined(CONFIG_SPIFLASH)
+/*
+ * env is stored at 0x100000, sector size is 0x10000, ucode is stored after
+ * env, so we got 0x110000.
+ */
+#define CONFIG_SYS_QE_FW_IN_SPIFLASH
+#define CONFIG_SYS_QE_FMAN_FW_ADDR     0x110000
+#elif defined(CONFIG_SDCARD)
+/*
+ * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is
+ * about 545KB (1089 blocks), Env is stored after the image, and the env size is
+ * 0x2000 (16 blocks), 8 + 1089 + 16 = 1113, enlarge it to 1130.
+ */
+#define CONFIG_SYS_QE_FMAN_FW_IN_MMC
+#define CONFIG_SYS_QE_FMAN_FW_ADDR     (512 * 1130)
+#elif defined(CONFIG_NAND)
+#define CONFIG_SYS_QE_FMAN_FW_IN_NAND
+#define CONFIG_SYS_QE_FMAN_FW_ADDR     (6 * CONFIG_SYS_NAND_BLOCK_SIZE)
+#else
+#define CONFIG_SYS_QE_FMAN_FW_IN_NOR
+#define CONFIG_SYS_QE_FMAN_FW_ADDR             0xEFF40000
+#endif
+#define CONFIG_SYS_QE_FMAN_FW_LENGTH   0x10000
+#define CONFIG_SYS_FDT_PAD             (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
+#endif /* CONFIG_NOBQFMAN */
+
+#ifdef CONFIG_SYS_DPAA_FMAN
+#define CONFIG_FMAN_ENET
+#define CONFIG_PHY_VITESSE
+#define CONFIG_PHY_REALTEK
+#endif
+
+#ifdef CONFIG_FMAN_ENET
+#define CONFIG_SYS_FM1_DTSEC1_RISER_PHY_ADDR    0x1c
+#define CONFIG_SYS_FM1_DTSEC2_RISER_PHY_ADDR    0x1d
+#define CONFIG_SYS_FM1_DTSEC3_RISER_PHY_ADDR    0x1e
+#define CONFIG_SYS_FM1_DTSEC4_RISER_PHY_ADDR    0x1f
+
+#define CONFIG_MII             /* MII PHY management */
+#define CONFIG_ETHPRIME                "FM1@DTSEC1"
+#define CONFIG_PHY_GIGE                /* Include GbE speed/duplex detection */
+#endif
+
+/*
+ * Environment
+ */
+#define CONFIG_LOADS_ECHO              /* echo on for serial download */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE   /* allow baudrate change */
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_ERRATA
+#define CONFIG_CMD_GREPENV
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_REGINFO
+#define CONFIG_CMD_SETEXPR
+
+#ifdef CONFIG_PCI
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_NET
+#endif
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_CMDLINE_EDITING                 /* Command-line editing */
+#define CONFIG_AUTO_COMPLETE                   /* add autocompletion support */
+#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_SYS_CBSIZE      1024            /* Console I/O Buffer Size */
+#else
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+#endif
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */
+#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks*/
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 64 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ   (64 << 20)      /* Initial map for Linux*/
+#define CONFIG_SYS_BOOTM_LEN   (64 << 20)      /* Increase max gunzip size */
+
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_KGDB_BAUDRATE   230400  /* speed to run kgdb serial port */
+#define CONFIG_KGDB_SER_INDEX  2       /* which serial port to use */
+#endif
+
+/*
+ * Environment Configuration
+ */
+#define CONFIG_ROOTPATH                "/opt/nfsroot"
+#define CONFIG_BOOTFILE                "uImage"
+#define CONFIG_UBOOTPATH       "u-boot.bin"    /* U-Boot image on TFTP server*/
+
+/* default location for tftp and bootm */
+#define CONFIG_LOADADDR                1000000
+
+#define CONFIG_BOOTDELAY       10      /*-1 disables auto-boot*/
+
+#define CONFIG_BAUDRATE        115200
+
+#define __USB_PHY_TYPE utmi
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                               \
+       "hwconfig=fsl_ddr:ctlr_intlv=cacheline,"                \
+       "bank_intlv=cs0_cs1;"                                   \
+       "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
+       "netdev=eth0\0"                                         \
+       "uboot=" __stringify(CONFIG_UBOOTPATH) "\0"             \
+       "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"     \
+       "tftpflash=tftpboot $loadaddr $uboot && "               \
+       "protect off $ubootaddr +$filesize && "                 \
+       "erase $ubootaddr +$filesize && "                       \
+       "cp.b $loadaddr $ubootaddr $filesize && "               \
+       "protect on $ubootaddr +$filesize && "                  \
+       "cmp.b $loadaddr $ubootaddr $filesize\0"                \
+       "consoledev=ttyS0\0"                                    \
+       "ramdiskaddr=2000000\0"                                 \
+       "ramdiskfile=t1040rdb/ramdisk.uboot\0"                  \
+       "fdtaddr=c00000\0"                                      \
+       "fdtfile=t1040rdb/t1040rdb.dtb\0"                       \
+       "bdev=sda3\0"                                           \
+       "c=ffe\0"
+
+#define CONFIG_LINUX                       \
+       "setenv bootargs root=/dev/ram rw "            \
+       "console=$consoledev,$baudrate $othbootargs;"  \
+       "setenv ramdiskaddr 0x02000000;"               \
+       "setenv fdtaddr 0x00c00000;"                   \
+       "setenv loadaddr 0x1000000;"                   \
+       "bootm $loadaddr $ramdiskaddr $fdtaddr"
+
+#define CONFIG_HDBOOT                                  \
+       "setenv bootargs root=/dev/$bdev rw "           \
+       "console=$consoledev,$baudrate $othbootargs;"   \
+       "tftp $loadaddr $bootfile;"                     \
+       "tftp $fdtaddr $fdtfile;"                       \
+       "bootm $loadaddr - $fdtaddr"
+
+#define CONFIG_NFSBOOTCOMMAND                  \
+       "setenv bootargs root=/dev/nfs rw "     \
+       "nfsroot=$serverip:$rootpath "          \
+       "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
+       "console=$consoledev,$baudrate $othbootargs;"   \
+       "tftp $loadaddr $bootfile;"             \
+       "tftp $fdtaddr $fdtfile;"               \
+       "bootm $loadaddr - $fdtaddr"
+
+#define CONFIG_RAMBOOTCOMMAND                          \
+       "setenv bootargs root=/dev/ram rw "             \
+       "console=$consoledev,$baudrate $othbootargs;"   \
+       "tftp $ramdiskaddr $ramdiskfile;"               \
+       "tftp $loadaddr $bootfile;"                     \
+       "tftp $fdtaddr $fdtfile;"                       \
+       "bootm $loadaddr $ramdiskaddr $fdtaddr"
+
+#define CONFIG_BOOTCOMMAND             CONFIG_LINUX
+
+#ifdef CONFIG_SECURE_BOOT
+#include <asm/fsl_secure_boot.h>
+#endif
+
+#endif /* __CONFIG_H */
diff --git a/include/configs/T1042RDB_PI.h b/include/configs/T1042RDB_PI.h
new file mode 100644 (file)
index 0000000..4b023f9
--- /dev/null
@@ -0,0 +1,694 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*
+ * T1042RDB_PI board configuration file
+ */
+#define CONFIG_T104xRDB
+#define CONFIG_T1042RDB_PI
+#define CONFIG_PHYS_64BIT
+
+#ifdef CONFIG_RAMBOOT_PBL
+#define CONFIG_RAMBOOT_TEXT_BASE       CONFIG_SYS_TEXT_BASE
+#define CONFIG_RESET_VECTOR_ADDRESS    0xfffffffc
+#endif
+
+/* High Level Configuration Options */
+#define CONFIG_BOOKE
+#define CONFIG_E500                    /* BOOKE e500 family */
+#define CONFIG_E500MC                  /* BOOKE e500mc family */
+#define CONFIG_SYS_BOOK3E_HV           /* Category E.HV supported */
+#define CONFIG_MPC85xx                 /* MPC85xx/PQ3 platform */
+#define CONFIG_MP                      /* support multiple processors */
+
+#ifndef CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_TEXT_BASE   0xeff80000
+#endif
+
+#ifndef CONFIG_RESET_VECTOR_ADDRESS
+#define CONFIG_RESET_VECTOR_ADDRESS    0xeffffffc
+#endif
+
+#define CONFIG_SYS_FSL_CPC             /* Corenet Platform Cache */
+#define CONFIG_SYS_NUM_CPC             CONFIG_NUM_DDR_CONTROLLERS
+#define CONFIG_FSL_IFC                 /* Enable IFC Support */
+#define CONFIG_PCI                     /* Enable PCI/PCIE */
+#define CONFIG_PCI_INDIRECT_BRIDGE
+#define CONFIG_PCIE1                   /* PCIE controler 1 */
+#define CONFIG_PCIE2                   /* PCIE controler 2 */
+#define CONFIG_PCIE3                   /* PCIE controler 3 */
+#define CONFIG_PCIE4                   /* PCIE controler 4 */
+
+#define CONFIG_FSL_PCI_INIT            /* Use common FSL init code */
+#define CONFIG_SYS_PCI_64BIT           /* enable 64-bit PCI resources */
+
+#define CONFIG_FSL_LAW                 /* Use common FSL init code */
+
+#define CONFIG_ENV_OVERWRITE
+
+#ifdef CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_IS_NOWHERE
+#else
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#endif
+
+#ifndef CONFIG_SYS_NO_FLASH
+#if defined(CONFIG_SPIFLASH)
+#define CONFIG_SYS_EXTRA_ENV_RELOC
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_SPI_BUS              0
+#define CONFIG_ENV_SPI_CS               0
+#define CONFIG_ENV_SPI_MAX_HZ           10000000
+#define CONFIG_ENV_SPI_MODE             0
+#define CONFIG_ENV_SIZE                 0x2000          /* 8KB */
+#define CONFIG_ENV_OFFSET               0x100000        /* 1MB */
+#define CONFIG_ENV_SECT_SIZE            0x10000
+#elif defined(CONFIG_SDCARD)
+#define CONFIG_SYS_EXTRA_ENV_RELOC
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV          0
+#define CONFIG_ENV_SIZE                        0x2000
+#define CONFIG_ENV_OFFSET              (512 * 1105)
+#elif defined(CONFIG_NAND)
+#define CONFIG_SYS_EXTRA_ENV_RELOC
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_SIZE                        CONFIG_SYS_NAND_BLOCK_SIZE
+#define CONFIG_ENV_OFFSET              (5 * CONFIG_SYS_NAND_BLOCK_SIZE)
+#else
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_ADDR                (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE                0x2000
+#define CONFIG_ENV_SECT_SIZE   0x20000 /* 128K (one sector) */
+#endif
+#else /* CONFIG_SYS_NO_FLASH */
+#define CONFIG_ENV_SIZE                0x2000
+#define CONFIG_ENV_SECT_SIZE   0x20000 /* 128K (one sector) */
+#endif
+
+#define CONFIG_SYS_CLK_FREQ    100000000
+#define CONFIG_DDR_CLK_FREQ    66666666
+
+/*
+ * These can be toggled for performance analysis, otherwise use default.
+ */
+#define CONFIG_SYS_CACHE_STASHING
+#define CONFIG_BACKSIDE_L2_CACHE
+#define CONFIG_SYS_INIT_L2CSR0         L2CSR0_L2E
+#define CONFIG_BTB                     /* toggle branch predition */
+#define CONFIG_DDR_ECC
+#ifdef CONFIG_DDR_ECC
+#define CONFIG_ECC_INIT_VIA_DDRCONTROLLER
+#define CONFIG_MEM_INIT_VALUE          0xdeadbeef
+#endif
+
+#define CONFIG_ENABLE_36BIT_PHYS
+
+#define CONFIG_ADDR_MAP
+#define CONFIG_SYS_NUM_ADDR_MAP                64      /* number of TLB1 entries */
+
+#define CONFIG_SYS_MEMTEST_START       0x00200000      /* memtest works on */
+#define CONFIG_SYS_MEMTEST_END         0x00400000
+#define CONFIG_SYS_ALT_MEMTEST
+#define CONFIG_PANIC_HANG      /* do not reset board on panic */
+
+/*
+ *  Config the L3 Cache as L3 SRAM
+ */
+#define CONFIG_SYS_INIT_L3_ADDR                0xFFFC0000
+
+#define CONFIG_SYS_DCSRBAR             0xf0000000
+#define CONFIG_SYS_DCSRBAR_PHYS                0xf00000000ull
+
+/*
+ * DDR Setup
+ */
+#define CONFIG_VERY_BIG_RAM
+#define CONFIG_SYS_DDR_SDRAM_BASE      0x00000000
+#define CONFIG_SYS_SDRAM_BASE          CONFIG_SYS_DDR_SDRAM_BASE
+
+/* CONFIG_NUM_DDR_CONTROLLERS is defined in include/asm/config_mpc85xx.h */
+#define CONFIG_DIMM_SLOTS_PER_CTLR     1
+#define CONFIG_CHIP_SELECTS_PER_CTRL   (4 * CONFIG_DIMM_SLOTS_PER_CTLR)
+
+#define CONFIG_DDR_SPD
+#define CONFIG_SYS_DDR_RAW_TIMING
+#define CONFIG_FSL_DDR3
+
+#define CONFIG_SYS_SPD_BUS_NUM 0
+#define SPD_EEPROM_ADDRESS     0x51
+
+#define CONFIG_SYS_SDRAM_SIZE  4096    /* for fixed parameter use */
+
+/*
+ * IFC Definitions
+ */
+#define CONFIG_SYS_FLASH_BASE  0xe8000000
+#define CONFIG_SYS_FLASH_BASE_PHYS     (0xf00000000ull | CONFIG_SYS_FLASH_BASE)
+
+#define CONFIG_SYS_NOR_CSPR_EXT        (0xf)
+#define CONFIG_SYS_NOR_CSPR    (CSPR_PHYS_ADDR(CONFIG_SYS_FLASH_BASE) | \
+                               CSPR_PORT_SIZE_16 | \
+                               CSPR_MSEL_NOR | \
+                               CSPR_V)
+#define CONFIG_SYS_NOR_AMASK   IFC_AMASK(128*1024*1024)
+/* NOR Flash Timing Params */
+#define CONFIG_SYS_NOR_CSOR    CSOR_NAND_TRHZ_80
+#define CONFIG_SYS_NOR_FTIM0   (FTIM0_NOR_TACSE(0x4) | \
+                               FTIM0_NOR_TEADC(0x5) | \
+                               FTIM0_NOR_TEAHC(0x5))
+#define CONFIG_SYS_NOR_FTIM1   (FTIM1_NOR_TACO(0x35) | \
+                               FTIM1_NOR_TRAD_NOR(0x1A) |\
+                               FTIM1_NOR_TSEQRAD_NOR(0x13))
+#define CONFIG_SYS_NOR_FTIM2   (FTIM2_NOR_TCS(0x4) | \
+                               FTIM2_NOR_TCH(0x4) | \
+                               FTIM2_NOR_TWPH(0x0E) | \
+                               FTIM2_NOR_TWP(0x1c))
+#define CONFIG_SYS_NOR_FTIM3   0x0
+
+#define CONFIG_SYS_FLASH_QUIET_TEST
+#define CONFIG_FLASH_SHOW_PROGRESS     45 /* count down from 45/5: 9..1 */
+
+#define CONFIG_SYS_MAX_FLASH_BANKS     2       /* number of banks */
+#define CONFIG_SYS_MAX_FLASH_SECT      1024    /* sectors per device */
+#define CONFIG_SYS_FLASH_ERASE_TOUT    60000   /* Flash Erase Timeout (ms) */
+#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (ms) */
+
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+#define CONFIG_SYS_FLASH_BANKS_LIST    {CONFIG_SYS_FLASH_BASE_PHYS}
+
+/* CPLD on IFC */
+#define CONFIG_SYS_CPLD_BASE   0xffdf0000
+#define CONFIG_SYS_CPLD_BASE_PHYS      (0xf00000000ull | CONFIG_SYS_CPLD_BASE)
+#define CONFIG_SYS_CSPR2       (CSPR_PHYS_ADDR(CONFIG_SYS_CPLD_BASE_PHYS) \
+                               | CSPR_PORT_SIZE_8 \
+                               | CSPR_MSEL_GPCM \
+                               | CSPR_V)
+#define CONFIG_SYS_AMASK2      IFC_AMASK(64*1024)
+#define CONFIG_SYS_CSOR2       0x0
+/* CPLD Timing parameters for IFC CS2 */
+#define CONFIG_SYS_CS2_FTIM0           (FTIM0_GPCM_TACSE(0x0e) | \
+                                       FTIM0_GPCM_TEADC(0x0e) | \
+                                       FTIM0_GPCM_TEAHC(0x0e))
+#define CONFIG_SYS_CS2_FTIM1           (FTIM1_GPCM_TACO(0x0e) | \
+                                       FTIM1_GPCM_TRAD(0x1f))
+#define CONFIG_SYS_CS2_FTIM2           (FTIM2_GPCM_TCS(0x0e) | \
+                                       FTIM2_GPCM_TCH(0x0) | \
+                                       FTIM2_GPCM_TWP(0x1f))
+#define CONFIG_SYS_CS2_FTIM3           0x0
+
+/* NAND Flash on IFC */
+#define CONFIG_NAND_FSL_IFC
+#define CONFIG_SYS_NAND_BASE           0xff800000
+#define CONFIG_SYS_NAND_BASE_PHYS      (0xf00000000ull | CONFIG_SYS_NAND_BASE)
+
+#define CONFIG_SYS_NAND_CSPR_EXT       (0xf)
+#define CONFIG_SYS_NAND_CSPR   (CSPR_PHYS_ADDR(CONFIG_SYS_NAND_BASE_PHYS) \
+                               | CSPR_PORT_SIZE_8 /* Port Size = 8 bit */ \
+                               | CSPR_MSEL_NAND        /* MSEL = NAND */ \
+                               | CSPR_V)
+#define CONFIG_SYS_NAND_AMASK  IFC_AMASK(64*1024)
+
+#define CONFIG_SYS_NAND_CSOR    (CSOR_NAND_ECC_ENC_EN   /* ECC on encode */ \
+                               | CSOR_NAND_ECC_DEC_EN  /* ECC on decode */ \
+                               | CSOR_NAND_ECC_MODE_4  /* 4-bit ECC */ \
+                               | CSOR_NAND_RAL_3       /* RAL = 3Byes */ \
+                               | CSOR_NAND_PGS_4K      /* Page Size = 4K */ \
+                               | CSOR_NAND_SPRZ_224/* Spare size = 224 */ \
+                               | CSOR_NAND_PB(64))     /*Pages Per Block = 64*/
+
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+
+/* ONFI NAND Flash mode0 Timing Params */
+#define CONFIG_SYS_NAND_FTIM0          (FTIM0_NAND_TCCST(0x07) | \
+                                       FTIM0_NAND_TWP(0x18)   | \
+                                       FTIM0_NAND_TWCHT(0x07) | \
+                                       FTIM0_NAND_TWH(0x0a))
+#define CONFIG_SYS_NAND_FTIM1          (FTIM1_NAND_TADLE(0x32) | \
+                                       FTIM1_NAND_TWBE(0x39)  | \
+                                       FTIM1_NAND_TRR(0x0e)   | \
+                                       FTIM1_NAND_TRP(0x18))
+#define CONFIG_SYS_NAND_FTIM2          (FTIM2_NAND_TRAD(0x0f) | \
+                                       FTIM2_NAND_TREH(0x0a) | \
+                                       FTIM2_NAND_TWHRE(0x1e))
+#define CONFIG_SYS_NAND_FTIM3          0x0
+
+#define CONFIG_SYS_NAND_DDR_LAW                11
+#define CONFIG_SYS_NAND_BASE_LIST      { CONFIG_SYS_NAND_BASE }
+#define CONFIG_SYS_MAX_NAND_DEVICE     1
+#define CONFIG_MTD_NAND_VERIFY_WRITE
+#define CONFIG_CMD_NAND
+
+#define CONFIG_SYS_NAND_BLOCK_SIZE     (512 * 1024)
+
+#if defined(CONFIG_NAND)
+#define CONFIG_SYS_CSPR0_EXT           CONFIG_SYS_NAND_CSPR_EXT
+#define CONFIG_SYS_CSPR0               CONFIG_SYS_NAND_CSPR
+#define CONFIG_SYS_AMASK0              CONFIG_SYS_NAND_AMASK
+#define CONFIG_SYS_CSOR0               CONFIG_SYS_NAND_CSOR
+#define CONFIG_SYS_CS0_FTIM0           CONFIG_SYS_NAND_FTIM0
+#define CONFIG_SYS_CS0_FTIM1           CONFIG_SYS_NAND_FTIM1
+#define CONFIG_SYS_CS0_FTIM2           CONFIG_SYS_NAND_FTIM2
+#define CONFIG_SYS_CS0_FTIM3           CONFIG_SYS_NAND_FTIM3
+#define CONFIG_SYS_CSPR1_EXT           CONFIG_SYS_NOR_CSPR_EXT
+#define CONFIG_SYS_CSPR1               CONFIG_SYS_NOR_CSPR
+#define CONFIG_SYS_AMASK1              CONFIG_SYS_NOR_AMASK
+#define CONFIG_SYS_CSOR1               CONFIG_SYS_NOR_CSOR
+#define CONFIG_SYS_CS1_FTIM0           CONFIG_SYS_NOR_FTIM0
+#define CONFIG_SYS_CS1_FTIM1           CONFIG_SYS_NOR_FTIM1
+#define CONFIG_SYS_CS1_FTIM2           CONFIG_SYS_NOR_FTIM2
+#define CONFIG_SYS_CS1_FTIM3           CONFIG_SYS_NOR_FTIM3
+#else
+#define CONFIG_SYS_CSPR0_EXT           CONFIG_SYS_NOR_CSPR_EXT
+#define CONFIG_SYS_CSPR0               CONFIG_SYS_NOR_CSPR
+#define CONFIG_SYS_AMASK0              CONFIG_SYS_NOR_AMASK
+#define CONFIG_SYS_CSOR0               CONFIG_SYS_NOR_CSOR
+#define CONFIG_SYS_CS0_FTIM0           CONFIG_SYS_NOR_FTIM0
+#define CONFIG_SYS_CS0_FTIM1           CONFIG_SYS_NOR_FTIM1
+#define CONFIG_SYS_CS0_FTIM2           CONFIG_SYS_NOR_FTIM2
+#define CONFIG_SYS_CS0_FTIM3           CONFIG_SYS_NOR_FTIM3
+#define CONFIG_SYS_CSPR1_EXT           CONFIG_SYS_NAND_CSPR_EXT
+#define CONFIG_SYS_CSPR1               CONFIG_SYS_NAND_CSPR
+#define CONFIG_SYS_AMASK1              CONFIG_SYS_NAND_AMASK
+#define CONFIG_SYS_CSOR1               CONFIG_SYS_NAND_CSOR
+#define CONFIG_SYS_CS1_FTIM0           CONFIG_SYS_NAND_FTIM0
+#define CONFIG_SYS_CS1_FTIM1           CONFIG_SYS_NAND_FTIM1
+#define CONFIG_SYS_CS1_FTIM2           CONFIG_SYS_NAND_FTIM2
+#define CONFIG_SYS_CS1_FTIM3           CONFIG_SYS_NAND_FTIM3
+#endif
+
+#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE
+
+#if defined(CONFIG_RAMBOOT_PBL)
+#define CONFIG_SYS_RAMBOOT
+#endif
+
+#define CONFIG_BOARD_EARLY_INIT_R
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_HWCONFIG
+
+/* define to use L1 as initial stack */
+#define CONFIG_L1_INIT_RAM
+#define CONFIG_SYS_INIT_RAM_LOCK
+#define CONFIG_SYS_INIT_RAM_ADDR       0xfdd00000      /* Initial L1 address */
+#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH     0xf
+#define CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW      0xfe0ec000
+/* The assembler doesn't like typecast */
+#define CONFIG_SYS_INIT_RAM_ADDR_PHYS \
+       ((CONFIG_SYS_INIT_RAM_ADDR_PHYS_HIGH * 1ull << 32) | \
+         CONFIG_SYS_INIT_RAM_ADDR_PHYS_LOW)
+#define CONFIG_SYS_INIT_RAM_SIZE               0x00004000
+
+#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
+                                       GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
+
+#define CONFIG_SYS_MONITOR_LEN         (512 * 1024)
+#define CONFIG_SYS_MALLOC_LEN          (4 * 1024 * 1024)
+
+/* Serial Port - controlled on board with jumper J8
+ * open - index 2
+ * shorted - index 1
+ */
+#define CONFIG_CONS_INDEX      1
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE    1
+#define CONFIG_SYS_NS16550_CLK         (get_bus_freq(0)/2)
+
+#define CONFIG_SYS_BAUDRATE_TABLE      \
+       {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
+
+#define CONFIG_SYS_NS16550_COM1        (CONFIG_SYS_CCSRBAR+0x11C500)
+#define CONFIG_SYS_NS16550_COM2        (CONFIG_SYS_CCSRBAR+0x11C600)
+#define CONFIG_SYS_NS16550_COM3        (CONFIG_SYS_CCSRBAR+0x11D500)
+#define CONFIG_SYS_NS16550_COM4        (CONFIG_SYS_CCSRBAR+0x11D600)
+#define CONFIG_SERIAL_MULTI            /* Enable both serial ports */
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV   /* determine from environment */
+
+/* Use the HUSH parser */
+#define CONFIG_SYS_HUSH_PARSER
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
+
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT
+#define CONFIG_OF_BOARD_SETUP
+#define CONFIG_OF_STDOUT_VIA_ALIAS
+
+/* new uImage format support */
+#define CONFIG_FIT
+#define CONFIG_FIT_VERBOSE     /* enable fit_format_{error,warning}() */
+
+/* I2C */
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_FSL             /* Use FSL common I2C driver */
+#define CONFIG_SYS_FSL_I2C_SPEED       400000  /* I2C speed in Hz */
+#define CONFIG_SYS_FSL_I2C_SLAVE       0x7F
+#define CONFIG_SYS_FSL_I2C2_SPEED      400000  /* I2C speed in Hz */
+#define CONFIG_SYS_FSL_I2C2_SLAVE      0x7F
+#define CONFIG_SYS_FSL_I2C_OFFSET      0x118000
+#define CONFIG_SYS_FSL_I2C2_OFFSET     0x119000
+
+/* I2C bus multiplexer */
+#define I2C_MUX_PCA_ADDR                0x70
+
+/*
+ * RTC configuration
+ */
+#define RTC
+#define CONFIG_RTC_DS1337               1
+#define CONFIG_SYS_I2C_RTC_ADDR         0x68
+
+/*DVI encoder*/
+#define CONFIG_HDMI_ENCODER_I2C_ADDR  0x75
+
+/*
+ * eSPI - Enhanced SPI
+ */
+#define CONFIG_FSL_ESPI
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_STMICRO
+#define CONFIG_CMD_SF
+#define CONFIG_SF_DEFAULT_SPEED         10000000
+#define CONFIG_SF_DEFAULT_MODE          0
+
+/*
+ * General PCI
+ * Memory space is mapped 1-1, but I/O space must start from 0.
+ */
+
+#ifdef CONFIG_PCI
+/* controller 1, direct to uli, tgtid 3, Base address 20000 */
+#ifdef CONFIG_PCIE1
+#define        CONFIG_SYS_PCIE1_MEM_VIRT       0x80000000
+#define        CONFIG_SYS_PCIE1_MEM_BUS        0xe0000000
+#define        CONFIG_SYS_PCIE1_MEM_PHYS       0xc00000000ull
+#define CONFIG_SYS_PCIE1_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE1_IO_VIRT       0xf8000000
+#define CONFIG_SYS_PCIE1_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE1_IO_PHYS       0xff8000000ull
+#define CONFIG_SYS_PCIE1_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+/* controller 2, Slot 2, tgtid 2, Base address 201000 */
+#ifdef CONFIG_PCIE2
+#define CONFIG_SYS_PCIE2_MEM_VIRT      0x90000000
+#define CONFIG_SYS_PCIE2_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE2_MEM_PHYS      0xc10000000ull
+#define CONFIG_SYS_PCIE2_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE2_IO_VIRT       0xf8010000
+#define CONFIG_SYS_PCIE2_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE2_IO_PHYS       0xff8010000ull
+#define CONFIG_SYS_PCIE2_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+/* controller 3, Slot 1, tgtid 1, Base address 202000 */
+#ifdef CONFIG_PCIE3
+#define CONFIG_SYS_PCIE3_MEM_VIRT      0xa0000000
+#define CONFIG_SYS_PCIE3_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE3_MEM_PHYS      0xc20000000ull
+#define CONFIG_SYS_PCIE3_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE3_IO_VIRT       0xf8020000
+#define CONFIG_SYS_PCIE3_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE3_IO_PHYS       0xff8020000ull
+#define CONFIG_SYS_PCIE3_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+/* controller 4, Base address 203000 */
+#ifdef CONFIG_PCIE4
+#define CONFIG_SYS_PCIE4_MEM_VIRT      0xb0000000
+#define CONFIG_SYS_PCIE4_MEM_BUS       0xe0000000
+#define CONFIG_SYS_PCIE4_MEM_PHYS      0xc30000000ull
+#define CONFIG_SYS_PCIE4_MEM_SIZE      0x10000000      /* 256M */
+#define CONFIG_SYS_PCIE4_IO_VIRT       0xf8030000
+#define CONFIG_SYS_PCIE4_IO_BUS                0x00000000
+#define CONFIG_SYS_PCIE4_IO_PHYS       0xff8030000ull
+#define CONFIG_SYS_PCIE4_IO_SIZE       0x00010000      /* 64k */
+#endif
+
+#define CONFIG_PCI_PNP                 /* do pci plug-and-play */
+#define CONFIG_E1000
+
+#define CONFIG_PCI_SCAN_SHOW           /* show pci devices on startup */
+#define CONFIG_DOS_PARTITION
+#endif /* CONFIG_PCI */
+
+/* SATA */
+#define CONFIG_FSL_SATA_V2
+#ifdef CONFIG_FSL_SATA_V2
+#define CONFIG_LIBATA
+#define CONFIG_FSL_SATA
+
+#define CONFIG_SYS_SATA_MAX_DEVICE     1
+#define CONFIG_SATA1
+#define CONFIG_SYS_SATA1               CONFIG_SYS_MPC85xx_SATA1_ADDR
+#define CONFIG_SYS_SATA1_FLAGS         FLAGS_DMA
+
+#define CONFIG_LBA48
+#define CONFIG_CMD_SATA
+#define CONFIG_DOS_PARTITION
+#define CONFIG_CMD_EXT2
+#endif
+
+/*
+* USB
+*/
+#define CONFIG_HAS_FSL_DR_USB
+
+#ifdef CONFIG_HAS_FSL_DR_USB
+#define CONFIG_USB_EHCI
+
+#ifdef CONFIG_USB_EHCI
+#define CONFIG_CMD_USB
+#define CONFIG_USB_STORAGE
+#define CONFIG_USB_EHCI_FSL
+#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
+#define CONFIG_CMD_EXT2
+#endif
+#endif
+
+#define CONFIG_MMC
+
+#ifdef CONFIG_MMC
+#define CONFIG_FSL_ESDHC
+#define CONFIG_SYS_FSL_ESDHC_ADDR       CONFIG_SYS_MPC85xx_ESDHC_ADDR
+#define CONFIG_CMD_MMC
+#define CONFIG_GENERIC_MMC
+#define CONFIG_CMD_EXT2
+#define CONFIG_CMD_FAT
+#define CONFIG_DOS_PARTITION
+#endif
+
+/* Qman/Bman */
+#ifndef CONFIG_NOBQFMAN
+#define CONFIG_SYS_DPAA_QBMAN          /* Support Q/Bman */
+#define CONFIG_SYS_BMAN_NUM_PORTALS    25
+#define CONFIG_SYS_BMAN_MEM_BASE       0xf4000000
+#define CONFIG_SYS_BMAN_MEM_PHYS       0xff4000000ull
+#define CONFIG_SYS_BMAN_MEM_SIZE       0x02000000
+#define CONFIG_SYS_QMAN_NUM_PORTALS    25
+#define CONFIG_SYS_QMAN_MEM_BASE       0xf6000000
+#define CONFIG_SYS_QMAN_MEM_PHYS       0xff6000000ull
+#define CONFIG_SYS_QMAN_MEM_SIZE       0x02000000
+
+#define CONFIG_SYS_DPAA_FMAN
+#define CONFIG_SYS_DPAA_PME
+
+/* Default address of microcode for the Linux Fman driver */
+#if defined(CONFIG_SPIFLASH)
+/*
+ * env is stored at 0x100000, sector size is 0x10000, ucode is stored after
+ * env, so we got 0x110000.
+ */
+#define CONFIG_SYS_QE_FW_IN_SPIFLASH
+#define CONFIG_SYS_QE_FMAN_FW_ADDR     0x110000
+#elif defined(CONFIG_SDCARD)
+/*
+ * PBL SD boot image should stored at 0x1000(8 blocks), the size of the image is
+ * about 545KB (1089 blocks), Env is stored after the image, and the env size is
+ * 0x2000 (16 blocks), 8 + 1089 + 16 = 1113, enlarge it to 1130.
+ */
+#define CONFIG_SYS_QE_FMAN_FW_IN_MMC
+#define CONFIG_SYS_QE_FMAN_FW_ADDR     (512 * 1130)
+#elif defined(CONFIG_NAND)
+#define CONFIG_SYS_QE_FMAN_FW_IN_NAND
+#define CONFIG_SYS_QE_FMAN_FW_ADDR     (6 * CONFIG_SYS_NAND_BLOCK_SIZE)
+#else
+#define CONFIG_SYS_QE_FMAN_FW_IN_NOR
+#define CONFIG_SYS_QE_FMAN_FW_ADDR             0xEFF40000
+#endif
+#define CONFIG_SYS_QE_FMAN_FW_LENGTH   0x10000
+#define CONFIG_SYS_FDT_PAD             (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
+#endif /* CONFIG_NOBQFMAN */
+
+#ifdef CONFIG_SYS_DPAA_FMAN
+#define CONFIG_FMAN_ENET
+#define CONFIG_PHY_VITESSE
+#define CONFIG_PHY_REALTEK
+#endif
+
+#ifdef CONFIG_FMAN_ENET
+#define CONFIG_MII             /* MII PHY management */
+#define CONFIG_ETHPRIME                "FM1@DTSEC1"
+#define CONFIG_PHY_GIGE                /* Include GbE speed/duplex detection */
+#endif
+
+/*
+ * Environment
+ */
+#define CONFIG_LOADS_ECHO              /* echo on for serial download */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE   /* allow baudrate change */
+
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_ERRATA
+#define CONFIG_CMD_GREPENV
+#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_I2C
+#define CONFIG_CMD_MII
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_REGINFO
+#define CONFIG_CMD_SETEXPR
+
+#ifdef CONFIG_PCI
+#define CONFIG_CMD_PCI
+#define CONFIG_CMD_NET
+#endif
+
+/*
+ * Miscellaneous configurable options
+ */
+#define CONFIG_SYS_LONGHELP                    /* undef to save memory */
+#define CONFIG_CMDLINE_EDITING                 /* Command-line editing */
+#define CONFIG_AUTO_COMPLETE                   /* add autocompletion support */
+#define CONFIG_SYS_LOAD_ADDR   0x2000000       /* default load address */
+#define CONFIG_SYS_PROMPT      "=> "           /* Monitor Command Prompt */
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_SYS_CBSIZE      1024            /* Console I/O Buffer Size */
+#else
+#define CONFIG_SYS_CBSIZE      256             /* Console I/O Buffer Size */
+#endif
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16)
+#define CONFIG_SYS_MAXARGS     16              /* max number of command args */
+#define CONFIG_SYS_BARGSIZE    CONFIG_SYS_CBSIZE/* Boot Argument Buffer Size */
+#define CONFIG_SYS_HZ          1000            /* decrementer freq: 1ms ticks*/
+
+/*
+ * For booting Linux, the board info and command line data
+ * have to be in the first 64 MB of memory, since this is
+ * the maximum mapped by the Linux kernel during initialization.
+ */
+#define CONFIG_SYS_BOOTMAPSZ   (64 << 20)      /* Initial map for Linux*/
+#define CONFIG_SYS_BOOTM_LEN   (64 << 20)      /* Increase max gunzip size */
+
+#ifdef CONFIG_CMD_KGDB
+#define CONFIG_KGDB_BAUDRATE   230400  /* speed to run kgdb serial port */
+#define CONFIG_KGDB_SER_INDEX  2       /* which serial port to use */
+#endif
+
+/*
+ * Environment Configuration
+ */
+#define CONFIG_ROOTPATH                "/opt/nfsroot"
+#define CONFIG_BOOTFILE                "uImage"
+#define CONFIG_UBOOTPATH       "u-boot.bin"    /* U-Boot image on TFTP server*/
+
+/* default location for tftp and bootm */
+#define CONFIG_LOADADDR                1000000
+
+#define CONFIG_BOOTDELAY       10      /*-1 disables auto-boot*/
+
+#define CONFIG_BAUDRATE        115200
+
+#define __USB_PHY_TYPE utmi
+
+#define        CONFIG_EXTRA_ENV_SETTINGS                               \
+       "hwconfig=fsl_ddr:ctlr_intlv=cacheline,"                \
+       "bank_intlv=cs0_cs1;"                                   \
+       "usb1:dr_mode=host,phy_type=" __stringify(__USB_PHY_TYPE) "\0"\
+       "netdev=eth0\0"                                         \
+       "uboot=" __stringify(CONFIG_UBOOTPATH) "\0"             \
+       "ubootaddr=" __stringify(CONFIG_SYS_TEXT_BASE) "\0"     \
+       "tftpflash=tftpboot $loadaddr $uboot && "               \
+       "protect off $ubootaddr +$filesize && "                 \
+       "erase $ubootaddr +$filesize && "                       \
+       "cp.b $loadaddr $ubootaddr $filesize && "               \
+       "protect on $ubootaddr +$filesize && "                  \
+       "cmp.b $loadaddr $ubootaddr $filesize\0"                \
+       "consoledev=ttyS0\0"                                    \
+       "ramdiskaddr=2000000\0"                                 \
+       "ramdiskfile=t1040rdb_pi/ramdisk.uboot\0"                       \
+       "fdtaddr=c00000\0"                                      \
+       "fdtfile=t1040rdb_pi/t1040rdb_pi.dtb\0"                         \
+       "bdev=sda3\0"                                           \
+       "c=ffe\0"
+
+#define CONFIG_LINUX                       \
+       "setenv bootargs root=/dev/ram rw "            \
+       "console=$consoledev,$baudrate $othbootargs;"  \
+       "setenv ramdiskaddr 0x02000000;"               \
+       "setenv fdtaddr 0x00c00000;"                   \
+       "setenv loadaddr 0x1000000;"                   \
+       "bootm $loadaddr $ramdiskaddr $fdtaddr"
+
+#define CONFIG_HDBOOT                                  \
+       "setenv bootargs root=/dev/$bdev rw "           \
+       "console=$consoledev,$baudrate $othbootargs;"   \
+       "tftp $loadaddr $bootfile;"                     \
+       "tftp $fdtaddr $fdtfile;"                       \
+       "bootm $loadaddr - $fdtaddr"
+
+#define CONFIG_NFSBOOTCOMMAND                  \
+       "setenv bootargs root=/dev/nfs rw "     \
+       "nfsroot=$serverip:$rootpath "          \
+       "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
+       "console=$consoledev,$baudrate $othbootargs;"   \
+       "tftp $loadaddr $bootfile;"             \
+       "tftp $fdtaddr $fdtfile;"               \
+       "bootm $loadaddr - $fdtaddr"
+
+#define CONFIG_RAMBOOTCOMMAND                          \
+       "setenv bootargs root=/dev/ram rw "             \
+       "console=$consoledev,$baudrate $othbootargs;"   \
+       "tftp $ramdiskaddr $ramdiskfile;"               \
+       "tftp $loadaddr $bootfile;"                     \
+       "tftp $fdtaddr $fdtfile;"                       \
+       "bootm $loadaddr $ramdiskaddr $fdtaddr"
+
+#define CONFIG_BOOTCOMMAND             CONFIG_LINUX
+
+#ifdef CONFIG_SECURE_BOOT
+#include <asm/fsl_secure_boot.h>
+#endif
+
+#endif /* __CONFIG_H */
index 1d5916753db09248706e0001188311aae871edd5..d75df927976ac5cc03ef16e6a2a631901739247e 100644 (file)
 #define CONFIG_SYS_NS16550_COM6                0x481aa000      /* UART5 */
 #define CONFIG_BAUDRATE                        115200
 
-/* I2C Configuration */
 #define CONFIG_CMD_EEPROM
 #define CONFIG_ENV_EEPROM_IS_ON_I2C
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50    /* Main EEPROM */
index b24ef5414381d57198f63a0a820f5785bae51c79..468fb43ea8e4b88106c9472b2f7738becd076146 100644 (file)
 #undef CONFIG_CMD_IMLS         /* List all found images        */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 #undef CONFIG_CMD_NET
 #undef CONFIG_CMD_NFS
index f13fd7001cc5b65ffea0a22c285bade7a4a35289..a3473b51bd475a2dd62ddccbe9507dc76b57fd9f 100644 (file)
 #undef CONFIG_CMD_IMLS         /* List all found images        */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 #undef CONFIG_CMD_NET
 #undef CONFIG_CMD_NFS
index ce09c2e13834a3492b71145e449c04a0f9821be6..5b09b45b56352be3499d1b176720405a8f75ce1f 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 7144c6319fe9909a6b929d22d91b39dfcb30461d..a22c868422178f8e002c93a68c7ccb31ad7254ca 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 62bd3bf085c904841b206f1c7f705605e193ec6c..3aa3d50a89b450702fa359c0d777503851e09ed0 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 25cebf880fa45392e165e2acfdb0f1835733db60..02945bee798dbd5a32e3d124ec256b2e09a59935 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 77822e792f8c1e44c9348ef15b140b99e788880e..ffb0caf9476bb4c99e3786193bf6db72f2ea5b04 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 77f47d9457f85c9ab124a056d314df8fdef8124d..8f10eba4677cefa5d8888a2dda1da19b6f5d7011 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 55e61d674fd1feefff87a138bbb798381c9570f9..a1c8e8a8560cb823e708d82916181049159e0510 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index a6c63cb4933cb3fa9320947ad9e19568fa7418c4..f4ecd0ddbe61aa766de1aceadf2d65f39a6601d2 100644 (file)
 #undef CONFIG_CMD_IMLS         /* List all found images        */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
 #define CONFIG_I2C_MULTI_BUS
index 13315dc4b6b70151e9f242992288c3e2cf1ad906..4f43ba988227d0b067b482118473374e52197a35 100644 (file)
 #define CONFIG_DOS_PARTITION           1
 
 /* I2C */
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /* TWL4030 */
 #define CONFIG_TWL4030_POWER           1
index c19c4c7549d52062aca68c4746b5b679c6f8420c..5049afca7a7025a00939217285c165424ecaa7a4 100644 (file)
 #undef CONFIG_CMD_NFS          /* NFS support                  */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index f2f41028eb899bf642970f20a483de582cc67a4a..d0e72e3e13447ef36d88f44e450fcfedc702858c 100644 (file)
@@ -85,8 +85,8 @@
 
 #define ENV_IS_EMBEDDED
 #define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 
index 335e9cdffa182e94a76460e19584dd9817a3d84a..3483cf1f58bc7aa50d33e1839be35fcefcaca7fb 100644 (file)
 
 /* I2C */
 #define CONFIG_CMD_I2C
-#define CONFIG_SH_I2C 1
-#define CONFIG_HARD_I2C                1
-#define CONFIG_I2C_MULTI_BUS   1
-#define CONFIG_SYS_MAX_I2C_BUS 2
-#define CONFIG_SYS_I2C_MODULE  1
-#define CONFIG_SYS_I2C_SPEED   100000 /* 100 kHz */
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_SH
 #define CONFIG_SYS_I2C_SLAVE   0x7F
+#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 2
+#define CONFIG_SYS_I2C_SH_BASE0        0xA4470000
+#define CONFIG_SYS_I2C_SH_SPEED0       100000
+#define CONFIG_SYS_I2C_SH_BASE1        0xA4750000
+#define CONFIG_SYS_I2C_SH_SPEED1       100000
 #define CONFIG_SH_I2C_DATA_HIGH        4
 #define CONFIG_SH_I2C_DATA_LOW         5
 #define CONFIG_SH_I2C_CLOCK    41666666
-#define CONFIG_SH_I2C_BASE0            0xA4470000
-#define CONFIG_SH_I2C_BASE1            0xA4750000
 
 /* Ether */
 #define CONFIG_SH_ETHER 1
index b86eb430a15d4699a0b5e8766d8362cc21feaf76..7dbee3cdb99bb350753fb30c66fb0744ebfcdb97 100644 (file)
@@ -8,7 +8,6 @@
 #define __CONFIG_H
 
 #define CONFIG_SYS_DCACHE_OFF
-#define CONFIG_L2_OFF
 #define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_SYS_NO_FLASH
index 52917551212a493461cf57212fd08d5558fafc0c..ac5ca9af37b839385a891f03aa3f86f066f5993f 100644 (file)
@@ -95,8 +95,8 @@
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 1afd48793214215ace01c881871507fe7ca3b312..f183279ba89b2f177fb3d4e64001e18d53646374 100644 (file)
@@ -22,7 +22,6 @@
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 #define CONFIG_BOARD_EARLY_INIT_F
-#define CONFIG_L2_OFF
 #define CONFIG_OF_LIBFDT
 
 #include <config_cmd_default.h>
 
 /* I2C */
 #define CONFIG_CMD_I2C
-#define CONFIG_SH_I2C 1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_SH
+#define CONFIG_SYS_I2C_SH_NUM_CONTROLLERS 5
+#define CONFIG_SYS_I2C_SH_BASE0        0xE6820000
+#define CONFIG_SYS_I2C_SH_SPEED0       100000
+#define CONFIG_SYS_I2C_SH_BASE1        0xE6822000
+#define CONFIG_SYS_I2C_SH_SPEED1       100000
+#define CONFIG_SYS_I2C_SH_BASE2        0xE6824000
+#define CONFIG_SYS_I2C_SH_SPEED2       100000
+#define CONFIG_SYS_I2C_SH_BASE3        0xE6826000
+#define CONFIG_SYS_I2C_SH_SPEED3       100000
+#define CONFIG_SYS_I2C_SH_BASE4        0xE6828000
+#define CONFIG_SYS_I2C_SH_SPEED4       100000
 #define CONFIG_SH_I2C_8BIT
-#define CONFIG_HARD_I2C
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_SYS_MAX_I2C_BUS  (5)
-#define CONFIG_SYS_I2C_MODULE
-#define CONFIG_SYS_I2C_SPEED    (100000) /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE    (0x7F)
-#define CONFIG_SH_I2C_DATA_HIGH (4)
-#define CONFIG_SH_I2C_DATA_LOW  (5)
-#define CONFIG_SH_I2C_CLOCK     (104000000) /* 104 MHz */
-#define CONFIG_SH_I2C_BASE0     (0xE6820000)
-#define CONFIG_SH_I2C_BASE1     (0xE6822000)
-#define CONFIG_SH_I2C_BASE2     (0xE6824000)
-#define CONFIG_SH_I2C_BASE3     (0xE6826000)
-#define CONFIG_SH_I2C_BASE4     (0xE6828000)
+#define CONFIG_SH_I2C_DATA_HIGH 4
+#define CONFIG_SH_I2C_DATA_LOW  5
+#define CONFIG_SH_I2C_CLOCK     104000000 /* 104 MHz */
 
 #endif /* __KZM9G_H */
index 4098e724fef68a7e4cc9865e746a6221a9fcf697..458c33a58611dfb03ab369b95aa20469e01b685b 100644 (file)
@@ -40,8 +40,8 @@
 /*
  * Memory map
  */
-#define CONFIG_SYS_TEXT_BASE           0xbfc00000 /* Rom version */
-#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_FLASH_BASE
+#define CONFIG_SYS_TEXT_BASE           0xbe000000 /* Rom version */
+#define CONFIG_SYS_MONITOR_BASE                CONFIG_SYS_TEXT_BASE
 
 #define CONFIG_SYS_SDRAM_BASE          0x80000000 /* Cached addr */
 #define CONFIG_SYS_MEM_SIZE            (256 * 1024 * 1024)
index 56102f5712fc54a6de8215d620d570301a9da9b5..dcd29ce7cbd29fc83d39c888814fded51074accc 100644 (file)
 #undef CONFIG_CMD_IMLS         /* List all found images        */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /* RTC */
 #define CONFIG_RTC_DS1337
index 8a44ef5a74d87e866f6368bfd8ba31af46f7785e..0f2a4ef973fee989c50f4ff1249028e4d31a9f61 100644 (file)
@@ -29,7 +29,6 @@
 
 #define CONFIG_SYS_TEXT_BASE           0x97800000
 
-#define        CONFIG_L2_OFF
 #define        CONFIG_SYS_ICACHE_OFF
 #define        CONFIG_SYS_DCACHE_OFF
 
index 4332779d255109c213f32d967e88312e48e6cd40..e0c0fac8e1935926158e5019a6500d0f57975c81 100644 (file)
 #undef CONFIG_CMD_SETGETDCR            /* DCR support on 4xx */
 
 #define CONFIG_OMAP3_SPI
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index 8b686356685c81e6403a9f9a04868a48332c9861..9eab1903ff8aec2e9ccc11e2b530c84f02c50817 100644 (file)
 #undef CONFIG_CMD_IMLS         /* List all found images        */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_I2C_MULTI_BUS           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_VIDEO_OMAP3     /* DSS Support                  */
 
 /*
index 3eae28884c228a851f4b27309673db08ecc23d40..43616e2b029b791e809063e21bc5b203dc2b7254 100644 (file)
 /*
  * I2C
  */
-#define CONFIG_HARD_I2C
-#define CONFIG_DRIVER_OMAP34XX_I2C
-
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * PISMO support
index cdaa9ba9a442ce63f6944867f1f2893a6d8a95b8..71062a601fa884c75ab8c87203cb0482dbebea3e 100644 (file)
 #undef CONFIG_CMD_IMLS         /* List all found images        */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_I2C_OMAP34XX
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
 
 /*
  * TWL4030
index 0c096f429f1a16d6703386069107900860195018..bedd6f9cb39b61794fefd71c270879f6ae3c8117 100644 (file)
 /*
  * I2C
  */
-#define CONFIG_HARD_I2C
-#define CONFIG_DRIVER_OMAP34XX_I2C
-
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_I2C_MULTI_BUS
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index 45da2e00b29279e5a9b63a7e687ccf4aa8e90eb8..8d11010f84596e66e05e4b36ee29442747b7ac37 100644 (file)
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_FPGA
 
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           0
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
-#define CONFIG_I2C_MULTI_BUS           1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index 00d7c6cebca4976d86563b34de48ae0602eadaf1..e0f026269fc497ffb814e89d47c88d3c940d23e2 100644 (file)
 #define CONFIG_CMD_NET         /* bootp, tftpboot, rarpboot    */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_DRIVER_OMAP34XX_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index 3cce0de48d5b1756dc48ee70ce2e974c00ed97b0..eacdfaaa53b04a8df199ed973690cafd44bafa3e 100644 (file)
 #undef CONFIG_CMD_NFS          /* NFS support                  */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index 697a3f386c059f653b47330d8c8561cfe682aa37..6f1304dc9432e374b9f8203d3e3f77d72fb79d64 100644 (file)
 /*
  * I2C for power management setup
  */
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /* OMITTED:  single 1 Gbit MT29F1G NAND flash */
 
index 8591f98a8a7d79d9e83fa144a0477868b818094f..1dd53fa13308a8ca244c3d83d1c050dc9a909239 100644 (file)
 #undef CONFIG_CMD_NFS          /* NFS support                  */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index cb8c7ec6f0667a3e7e307901826199538fa4d314..f7497408158f74ba5f187c249f13ac93f43978ec 100644 (file)
 #undef CONFIG_CMD_NFS                  /* NFS support                  */
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C                        1
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /*
  * TWL4030
index bad34b3e7130701e633c4aab0c506f2aceae158f..f46b833b531583991c3d57ce7ac04863c8afcb02 100644 (file)
@@ -22,8 +22,6 @@
 #define CONFIG_DISPLAY_BOARDINFO
 #define CONFIG_BOARD_EARLY_INIT_F
 
-/* Keep L2 Cache Disabled */
-#define CONFIG_L2_OFF                  1
 #define CONFIG_SYS_DCACHE_OFF          1
 
 #define CONFIG_SYS_SDRAM_BASE          0x40000000
index 4970b13e9679f6a18948e6ae79b3af89d1680c46..6f41ee771832de055a034028e4c0f8897ac6e943 100644 (file)
 /* I2C Configuration */
 #define CONFIG_I2C
 #define CONFIG_CMD_I2C
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_DRIVER_OMAP24XX_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP24XX
 #define CONFIG_CMD_EEPROM
 #define CONFIG_ENV_EEPROM_IS_ON_I2C
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50    /* Main EEPROM */
index e3944782f68210c2c93218a796bec53c0f783150..f37653fea3f0ee89647762e9c33ea9bb538abab2 100644 (file)
 /* I2C Configuration */
 #define CONFIG_I2C
 #define CONFIG_CMD_I2C
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_DRIVER_OMAP24XX_I2C
-
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    OMAP_I2C_STANDARD
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP24XX
 
 /* Defines for SPL */
 #define CONFIG_SPL
index e2e8efe58c1128c5114809f42915d0a197369036..1388f49986067785dc5d8517b5254ef39fab34f5 100644 (file)
@@ -25,9 +25,6 @@
 /* Mach Type */
 #define CONFIG_MACH_TYPE               MACH_TYPE_SMDKV310
 
-/* Keep L2 Cache Disabled */
-#define CONFIG_L2_OFF                  1
-
 #define CONFIG_SYS_SDRAM_BASE          0x40000000
 #define CONFIG_SYS_TEXT_BASE           0x43E00000
 
index 00d6fa5e89e3ca26c7d998ee10440c81a2e0cf84..9a069f3cdba522bfb42d01d7e57c5c0f016421c7 100644 (file)
@@ -23,7 +23,6 @@
  * (easy to change)
  */
 #define CONFIG_U8500
-#define CONFIG_L2_OFF
 
 #define CONFIG_SYS_MEMTEST_START       0x00000000
 #define CONFIG_SYS_MEMTEST_END 0x1FFFFFFF
index 980636c93b582fc8712568039d24ae2234e0bfd3..608578ad2cf03c2f8f6ad6964feea5e88221e26e 100644 (file)
@@ -16,7 +16,6 @@
 #define CONFIG_SOCFPGA_VIRTUAL_TARGET
 
 #define CONFIG_ARMV7
-#define CONFIG_L2_OFF
 #define CONFIG_SYS_DCACHE_OFF
 #undef CONFIG_USE_IRQ
 
diff --git a/include/configs/spieval.h b/include/configs/spieval.h
deleted file mode 100644 (file)
index 07668de..0000000
+++ /dev/null
@@ -1,494 +0,0 @@
-/*
- * (C) Copyright 2003-2005
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * (C) Copyright 2004-2005
- * Martin Krause, TQ-Systems GmbH, martin.krause@tqs.de
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#ifndef __CONFIG_H
-#define __CONFIG_H
-
-/*
- * High Level Configuration Options
- * (easy to change)
- */
-
-#define CONFIG_MPC5xxx         1       /* This is an MPC5xxx CPU */
-#define CONFIG_MPC5200         1       /* (more precisely an MPC5200 CPU) */
-#define CONFIG_TQM5200         1       /* ... on TQM5200 module */
-#undef CONFIG_TQM5200_REV100           /*  define for revision 100 modules */
-#define CONFIG_STK52XX         1       /* ... on a STK52XX base board */
-#define CONFIG_STK52XX_REV100  1       /*  define for revision 100 baseboards */
-
-#define CONFIG_SYS_MPC5XXX_CLKIN       33000000 /* ... running at 33.000000MHz */
-
-#define CONFIG_HIGH_BATS       1       /* High BATs supported */
-
-/*
- * Serial console configuration
- */
-#define CONFIG_PSC_CONSOLE     6       /* console is on PSC6 */
-#define CONFIG_BAUDRATE                115200  /* ... at 115200 bps */
-#define CONFIG_SYS_BAUDRATE_TABLE      { 9600, 19200, 38400, 57600, 115200, 230400 }
-
-#ifdef CONFIG_STK52XX
-#undef CONFIG_PS2KBD                   /* AT-PS/2 Keyboard             */
-#define CONFIG_PS2MULT                 /* .. on PS/2 Multiplexer       */
-#define CONFIG_PS2SERIAL       6       /* .. on PSC6                   */
-#define CONFIG_PS2MULT_DELAY   (CONFIG_SYS_HZ/2)       /* Initial delay        */
-#define CONFIG_BOARD_EARLY_INIT_R
-#endif /* CONFIG_STK52XX */
-
-/*
- * PCI Mapping:
- * 0x40000000 - 0x4fffffff - PCI Memory
- * 0x50000000 - 0x50ffffff - PCI IO Space
- */
-#ifdef CONFIG_STK52XX
-#define CONFIG_PCI             1
-#define CONFIG_PCI_PNP         1
-/* #define CONFIG_PCI_SCAN_SHOW        1 */
-
-#define CONFIG_PCI_MEM_BUS     0x40000000
-#define CONFIG_PCI_MEM_PHYS    CONFIG_PCI_MEM_BUS
-#define CONFIG_PCI_MEM_SIZE    0x10000000
-
-#define CONFIG_PCI_IO_BUS      0x50000000
-#define CONFIG_PCI_IO_PHYS     CONFIG_PCI_IO_BUS
-#define CONFIG_PCI_IO_SIZE     0x01000000
-
-#define CONFIG_EEPRO100                1
-#define CONFIG_SYS_RX_ETH_BUFFER       8  /* use 8 rx buffer on eepro100  */
-#define CONFIG_NS8382X         1
-#endif /* CONFIG_STK52XX */
-
-/*
- * Video console
- */
-#if 1
-#define CONFIG_VIDEO
-#define CONFIG_VIDEO_SM501
-#define CONFIG_VIDEO_SM501_32BPP
-#define CONFIG_CFB_CONSOLE
-#define CONFIG_VIDEO_LOGO
-#define CONFIG_VGA_AS_SINGLE_DEVICE
-#define CONFIG_CONSOLE_EXTRA_INFO
-#define CONFIG_VIDEO_SW_CURSOR
-#define CONFIG_SPLASH_SCREEN
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV
-#endif
-
-/* Partitions */
-#define CONFIG_MAC_PARTITION
-#define CONFIG_DOS_PARTITION
-#define CONFIG_ISO_PARTITION
-
-/* USB */
-#ifdef CONFIG_STK52XX
-#define CONFIG_USB_OHCI
-#define CONFIG_USB_STORAGE
-#endif
-
-/* POST support */
-#define CONFIG_POST            (CONFIG_SYS_POST_MEMORY   | \
-                                CONFIG_SYS_POST_CPU       | \
-                                CONFIG_SYS_POST_I2C)
-
-#ifdef CONFIG_POST
-/* preserve space for the post_word at end of on-chip SRAM */
-#define MPC5XXX_SRAM_POST_SIZE MPC5XXX_SRAM_SIZE-4
-#endif
-
-
-/*
- * BOOTP options
- */
-#define CONFIG_BOOTP_BOOTFILESIZE
-#define CONFIG_BOOTP_BOOTPATH
-#define CONFIG_BOOTP_GATEWAY
-#define CONFIG_BOOTP_HOSTNAME
-
-
-/*
- * Command line configuration.
- */
-#include <config_cmd_default.h>
-
-#define CONFIG_CMD_ASKENV
-#define CONFIG_CMD_DATE
-#define CONFIG_CMD_DHCP
-#define CONFIG_CMD_ECHO
-#define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_I2C
-#define CONFIG_CMD_MII
-#define CONFIG_CMD_NFS
-#define CONFIG_CMD_PING
-#define CONFIG_CMD_REGINFO
-#define CONFIG_CMD_SNTP
-
-#if defined(CONFIG_MINIFAP) || defined(CONFIG_STK52XX)
-    #define CONFIG_CMD_IDE
-    #define CONFIG_CMD_FAT
-    #define CONFIG_CMD_EXT2
-#endif
-
-#ifdef CONFIG_STK52XX
-    #define CONFIG_CMD_USB
-    #define CONFIG_CMD_FAT
-#endif
-
-#ifdef CONFIG_VIDEO
-    #define CONFIG_CMD_BMP
-#endif
-
-#ifdef CONFIG_PCI
-    #define CONFIG_CMD_PCI
-    #define CONFIG_PCIAUTO_SKIP_HOST_BRIDGE    1
-#endif
-
-#ifdef CONFIG_POST
-#define CONFIG_CMD_DIAG
-#endif
-
-
-#define        CONFIG_TIMESTAMP                /* display image timestamps */
-
-#if (CONFIG_SYS_TEXT_BASE == 0xFC000000)               /* Boot low */
-#   define CONFIG_SYS_LOWBOOT          1
-#endif
-
-/*
- * Autobooting
- */
-#define CONFIG_BOOTDELAY       5       /* autoboot after 5 seconds */
-
-#define CONFIG_PREBOOT "echo;" \
-       "echo Type \\\"run flash_nfs\\\" to mount root filesystem over NFS;" \
-       "echo"
-
-#undef CONFIG_BOOTARGS
-
-#define CONFIG_EXTRA_ENV_SETTINGS                                      \
-       "netdev=eth0\0"                                                 \
-       "rootpath=/opt/eldk/ppc_6xx\0"                                  \
-       "ramargs=setenv bootargs root=/dev/ram rw\0"                    \
-       "nfsargs=setenv bootargs root=/dev/nfs rw "                     \
-               "nfsroot=${serverip}:${rootpath}\0"                     \
-       "addip=setenv bootargs ${bootargs} "                            \
-               "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"      \
-               ":${hostname}:${netdev}:off panic=1\0"                  \
-       "flash_self=run ramargs addip;"                                 \
-               "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
-       "flash_nfs=run nfsargs addip;"                                  \
-               "bootm ${kernel_addr}\0"                                \
-       "net_nfs=tftp 200000 ${bootfile};run nfsargs addip;bootm\0"     \
-       "bootfile=/tftpboot/tqm5200/uImage\0"                           \
-       "load=tftp 200000 ${u-boot}\0"                                  \
-       "u-boot=/tftpboot/tqm5200/u-boot.bin\0"                         \
-       "update=protect off FC000000 FC05FFFF;"                         \
-               "erase FC000000 FC05FFFF;"                              \
-               "cp.b 200000 FC000000 ${filesize};"                     \
-               "protect on FC000000 FC05FFFF\0"                        \
-       ""
-
-#define CONFIG_BOOTCOMMAND     "run net_nfs"
-
-/*
- * IPB Bus clocking configuration.
- */
-#define CONFIG_SYS_IPBCLK_EQUALS_XLBCLK                /* define for 133MHz speed */
-
-#if defined(CONFIG_SYS_IPBCLK_EQUALS_XLBCLK)
-/*
- * PCI Bus clocking configuration
- *
- * Actually a PCI Clock of 66 MHz is only set (in cpu_init.c) if
- * CONFIG_SYS_IPBCLK_EQUALS_XLBCLK is defined. This is because a PCI Clock
- * of 66 MHz yet hasn't been tested with a IPB Bus Clock of 66 MHz.
- */
-#define CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2   /* define for 66MHz speed */
-#endif
-
-/*
- * I2C configuration
- */
-#define CONFIG_HARD_I2C                1       /* I2C with hardware support */
-#ifdef CONFIG_TQM5200_REV100
-#define CONFIG_SYS_I2C_MODULE          1       /* Select I2C module #1 for rev. 100 board */
-#else
-#define CONFIG_SYS_I2C_MODULE          2       /* Select I2C module #2 for all other revs */
-#endif
-
-/*
- * I2C clock frequency
- *
- * Please notice, that the resulting clock frequency could differ from the
- * configured value. This is because the I2C clock is derived from system
- * clock over a frequency divider with only a few divider values. U-boot
- * calculates the best approximation for CONFIG_SYS_I2C_SPEED. However the calculated
- * approximation allways lies below the configured value, never above.
- */
-#define CONFIG_SYS_I2C_SPEED           100000 /* 100 kHz */
-#define CONFIG_SYS_I2C_SLAVE           0x7F
-
-/*
- * EEPROM configuration for onboard EEPROM M24C32 (M24C64 should work
- * also). For other EEPROMs configuration should be verified. On Mini-FAP the
- * EEPROM (24C64) is on the same I2C address (but on other I2C bus), so the
- * same configuration could be used.
- */
-#define CONFIG_SYS_I2C_EEPROM_ADDR             0x50    /* 1010000x */
-#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN         2
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS      5       /* =32 Bytes per write */
-#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS  20
-
-/*
- * HW-Monitor configuration on Mini-FAP
- */
-#if defined (CONFIG_MINIFAP)
-#define CONFIG_SYS_I2C_HWMON_ADDR              0x2C
-#endif
-
-/* List of I2C addresses to be verified by POST */
-#if defined (CONFIG_MINIFAP)
-#undef CONFIG_SYS_POST_I2C_ADDRS
-#define CONFIG_SYS_POST_I2C_ADDRS      {CONFIG_SYS_I2C_EEPROM_ADDR,    \
-                                        CONFIG_SYS_I2C_HWMON_ADDR,     \
-                                        CONFIG_SYS_I2C_SLAVE}
-#endif
-
-/*
- * Flash configuration
- */
-#define CONFIG_SYS_FLASH_BASE          CONFIG_SYS_TEXT_BASE /* 0xFC000000 */
-
-/* use CFI flash driver if no module variant is spezified */
-#define CONFIG_SYS_FLASH_CFI           1       /* Flash is CFI conformant */
-#define CONFIG_FLASH_CFI_DRIVER        1       /* Use the common driver */
-#define CONFIG_SYS_FLASH_BANKS_LIST    { CONFIG_SYS_BOOTCS_START }
-#define CONFIG_SYS_FLASH_EMPTY_INFO
-#define CONFIG_SYS_FLASH_SIZE          0x04000000 /* 64 MByte */
-#define CONFIG_SYS_MAX_FLASH_SECT      512     /* max num of sects on one chip */
-#undef CONFIG_SYS_FLASH_USE_BUFFER_WRITE       /* not supported yet for AMD */
-
-#if !defined(CONFIG_SYS_LOWBOOT)
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_FLASH_BASE + 0x00760000 + 0x00800000)
-#else  /* CONFIG_SYS_LOWBOOT */
-#define CONFIG_ENV_ADDR                (CONFIG_SYS_FLASH_BASE + 0x00060000)
-#endif /* CONFIG_SYS_LOWBOOT */
-#define CONFIG_SYS_MAX_FLASH_BANKS     1       /* max num of flash banks
-                                          (= chip selects) */
-#define CONFIG_SYS_FLASH_ERASE_TOUT    240000  /* Flash Erase Timeout (in ms)  */
-#define CONFIG_SYS_FLASH_WRITE_TOUT    500     /* Flash Write Timeout (in ms)  */
-
-
-/*
- * Environment settings
- */
-#define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_SIZE                0x10000
-#define CONFIG_ENV_SECT_SIZE   0x20000
-#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define        CONFIG_ENV_SIZE_REDUND  (CONFIG_ENV_SIZE)
-
-/*
- * Memory map
- */
-#define CONFIG_SYS_MBAR                0xF0000000
-#define CONFIG_SYS_SDRAM_BASE          0x00000000
-#define CONFIG_SYS_DEFAULT_MBAR        0x80000000
-
-/* Use ON-Chip SRAM until RAM will be available */
-#define CONFIG_SYS_INIT_RAM_ADDR       MPC5XXX_SRAM
-#ifdef CONFIG_POST
-/* preserve space for the post_word at end of on-chip SRAM */
-#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_POST_SIZE
-#else
-#define CONFIG_SYS_INIT_RAM_SIZE       MPC5XXX_SRAM_SIZE
-#endif
-
-
-#define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_INIT_SP_OFFSET      CONFIG_SYS_GBL_DATA_OFFSET
-
-#define CONFIG_SYS_MONITOR_BASE        CONFIG_SYS_TEXT_BASE
-#if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
-#   define CONFIG_SYS_RAMBOOT          1
-#endif
-
-#define CONFIG_SYS_MONITOR_LEN         (384 << 10)     /* Reserve 384 kB for Monitor   */
-#define CONFIG_SYS_MALLOC_LEN          (128 << 10)     /* Reserve 128 kB for malloc()  */
-#define CONFIG_SYS_BOOTMAPSZ           (8 << 20)       /* Initial Memory map for Linux */
-
-/*
- * Ethernet configuration
- */
-#define CONFIG_MPC5xxx_FEC     1
-/*
- * Define CONFIG_FEC_10MBIT to force FEC at 10Mb
- */
-/* #define CONFIG_FEC_10MBIT 1 */
-#define CONFIG_PHY_ADDR                0x00
-
-/*
- * GPIO configuration
- *
- * use pin gpio_wkup_6 as second SDRAM chip select (mem_cs1):
- *     Bit 0 (mask: 0x80000000): 1
- * use ALT CAN position: Bits 2-3 (mask: 0x30000000):
- *     00 -> No Alternatives, CAN1/2 on PSC2 according to PSC2 setting.
- *     01 -> CAN1 on I2C1, CAN2 on Tmr0/1.
- *           Use for REV200 STK52XX boards. Do not use with REV100 modules
- *           (because, there I2C1 is used as I2C bus)
- * use PSC1 as UART: Bits 28-31 (mask: 0x00000007): 0100
- * use PSC2 as CAN: Bits 25:27 (mask: 0x00000030)
- *     000 -> All PSC2 pins are GIOPs
- *     001 -> CAN1/2 on PSC2 pins
- *            Use for REV100 STK52xx boards
- * use PSC6:
- *   on STK52xx:
- *     use as UART. Pins PSC6_0 to PSC6_3 are used.
- *     Bits 9:11 (mask: 0x00700000):
- *        101 -> PSC6 : Extended POST test is not available
- *   on MINI-FAP and TQM5200_IB:
- *     use PSC6_0 to PSC6_3 as GPIO: Bits 9:11 (mask: 0x00700000):
- *        000 -> PSC6 could not be used as UART, CODEC or IrDA
- *   GPIO on PSC6_3 is used in post_hotkeys_pressed() to enable extended POST
- *   tests.
- */
-#if defined (CONFIG_MINIFAP)
-# define CONFIG_SYS_GPS_PORT_CONFIG    0x91000004
-#elif defined (CONFIG_STK52XX)
-# if defined (CONFIG_STK52XX_REV100)
-#  define CONFIG_SYS_GPS_PORT_CONFIG   0x81500014
-# else /* STK52xx REV200 and above */
-#  if defined (CONFIG_TQM5200_REV100)
-#   error TQM5200 REV100 not supported on STK52XX REV200 or above
-#  else/* TQM5200 REV200 and above */
-#   define CONFIG_SYS_GPS_PORT_CONFIG  0x91500004
-#  endif
-# endif
-#else  /* TMQ5200 Inbetriebnahme-Board */
-# define CONFIG_SYS_GPS_PORT_CONFIG    0x81000004
-#endif
-
-/*
- * RTC configuration
- */
-#define CONFIG_RTC_MPC5200     1       /* use internal MPC5200 RTC */
-
-/*
- * Miscellaneous configurable options
- */
-#define CONFIG_SYS_LONGHELP                    /* undef to save memory     */
-#if defined(CONFIG_CMD_KGDB)
-#define CONFIG_SYS_CBSIZE              1024    /* Console I/O Buffer Size  */
-#else
-#define CONFIG_SYS_CBSIZE              256     /* Console I/O Buffer Size  */
-#endif
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
-#define CONFIG_SYS_MAXARGS             16      /* max number of command args   */
-#define CONFIG_SYS_BARGSIZE            CONFIG_SYS_CBSIZE       /* Boot Argument Buffer Size    */
-
-/* Enable an alternate, more extensive memory test */
-#define CONFIG_SYS_ALT_MEMTEST
-
-#define CONFIG_SYS_MEMTEST_START       0x00100000      /* memtest works on */
-#define CONFIG_SYS_MEMTEST_END         0x00f00000      /* 1 ... 15 MB in DRAM  */
-
-#define CONFIG_SYS_LOAD_ADDR           0x100000        /* default load address */
-
-#define CONFIG_SYS_CACHELINE_SIZE      32      /* For MPC5xxx CPUs */
-#if defined(CONFIG_CMD_KGDB)
-#  define CONFIG_SYS_CACHELINE_SHIFT   5       /* log base 2 of the above value */
-#endif
-
-/*
- * Enable loopw command.
- */
-#define CONFIG_LOOPW
-
-/*
- * Various low-level settings
- */
-#define CONFIG_SYS_HID0_INIT           HID0_ICE | HID0_ICFI
-#define CONFIG_SYS_HID0_FINAL          HID0_ICE
-
-#define CONFIG_SYS_BOOTCS_START        CONFIG_SYS_FLASH_BASE
-#define CONFIG_SYS_BOOTCS_SIZE         CONFIG_SYS_FLASH_SIZE
-#ifdef CONFIG_SYS_PCICLK_EQUALS_IPBCLK_DIV2
-#define CONFIG_SYS_BOOTCS_CFG          0x0008DF30 /* for pci_clk  = 66 MHz */
-#else
-#define CONFIG_SYS_BOOTCS_CFG          0x0004DF30 /* for pci_clk = 33 MHz */
-#endif
-#define CONFIG_SYS_CS0_START           CONFIG_SYS_FLASH_BASE
-#define CONFIG_SYS_CS0_SIZE            CONFIG_SYS_FLASH_SIZE
-
-#define CONFIG_LAST_STAGE_INIT
-
-/*
- * SRAM - Do not map below 2 GB in address space, because this area is used
- * for SDRAM autosizing.
- */
-#define CONFIG_SYS_CS2_START           0xE5000000
-#define CONFIG_SYS_CS2_SIZE            0x100000        /* 1 MByte */
-#define CONFIG_SYS_CS2_CFG             0x0004D930
-
-/*
- * Grafic controller - Do not map below 2 GB in address space, because this
- * area is used for SDRAM autosizing.
- */
-#define SM501_FB_BASE          0xE0000000
-#define CONFIG_SYS_CS1_START           (SM501_FB_BASE)
-#define CONFIG_SYS_CS1_SIZE            0x4000000       /* 64 MByte */
-#define CONFIG_SYS_CS1_CFG             0x8F48FF70
-#define SM501_MMIO_BASE                CONFIG_SYS_CS1_START + 0x03E00000
-
-#define CONFIG_SYS_CS_BURST            0x00000000
-#define CONFIG_SYS_CS_DEADCYCLE        0x33333311      /* 1 dead cycle for flash and SM501 */
-
-#define CONFIG_SYS_RESET_ADDRESS       0xff000000
-
-/*-----------------------------------------------------------------------
- * USB stuff
- *-----------------------------------------------------------------------
- */
-#define CONFIG_USB_CLOCK       0x0001BBBB
-#define CONFIG_USB_CONFIG      0x00001000
-
-/*-----------------------------------------------------------------------
- * IDE/ATA stuff Supports IDE harddisk
- *-----------------------------------------------------------------------
- */
-
-#undef CONFIG_IDE_8xx_PCCARD           /* Use IDE with PC Card Adapter */
-
-#undef CONFIG_IDE_8xx_DIRECT           /* Direct IDE    not supported  */
-#undef CONFIG_IDE_LED                  /* LED   for ide not supported  */
-
-#define CONFIG_IDE_RESET               /* reset for ide supported      */
-#define CONFIG_IDE_PREINIT
-
-#define CONFIG_SYS_IDE_MAXBUS          1       /* max. 1 IDE bus               */
-#define CONFIG_SYS_IDE_MAXDEVICE       2       /* max. 2 drives per IDE bus    */
-
-#define CONFIG_SYS_ATA_IDE0_OFFSET     0x0000
-
-#define CONFIG_SYS_ATA_BASE_ADDR       MPC5XXX_ATA
-
-/* Offset for data I/O                 */
-#define CONFIG_SYS_ATA_DATA_OFFSET     (0x0060)
-
-/* Offset for normal register accesses */
-#define CONFIG_SYS_ATA_REG_OFFSET      (CONFIG_SYS_ATA_DATA_OFFSET)
-
-/* Offset for alternate registers      */
-#define CONFIG_SYS_ATA_ALT_OFFSET      (0x005C)
-
-/* Interval between registers                                               */
-#define CONFIG_SYS_ATA_STRIDE          4
-
-#endif /* __CONFIG_H */
index 48698b57da40acfab64e6705165906735cf920bb..439fc47eb85171183cbb10ef3f76751fd3f5ae54 100644 (file)
 #undef CONFIG_CMD_IMLS
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           400000
-#define CONFIG_SYS_I2C_SLAVE           1
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    400000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50            /* base address */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1               /* bytes of address */
 #define CONFIG_SYS_I2C_EEPROM_ADDR_OVERFLOW    0x07
-#define CONFIG_DRIVER_OMAP34XX_I2C
-
 
 /*
  * Board NAND Info.
@@ -369,7 +368,7 @@ struct tam3517_module_info {
 
 #define TAM3517_READ_EEPROM(info, ret) \
 do {                                                           \
-       i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);   \
+       i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); \
        if (eeprom_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0,          \
                (void *)info, sizeof(*info)))                   \
                ret = 1;                                        \
index 2adb071ddb99b824fb9e2bb49c75cb4f98de9147..627836a7e818c0983c045a73a1a69ae930a1e2d4 100644 (file)
  * it linked after the configuration sector.
  */
 # define LDS_BOARD_TEXT \
-       arch/blackfin/lib/libblackfin.o (.text*); \
-       arch/blackfin/cpu/libblackfin.o (.text*); \
+       arch/blackfin/lib/built-in.o (.text*); \
+       arch/blackfin/cpu/built-in.o (.text*); \
        . = DEFINED(env_offset) ? env_offset : .; \
        common/env_embedded.o (.text*);
 #endif
index 84269ad262c09d32bbc6e8f7e8a5a7017d8628d7..99b60fcf6155c5ee5b335ab3090780d100ec1d8d 100644 (file)
 
 /* I2C IP block */
 #define CONFIG_I2C
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_I2C_MULTI_BUS
-#define CONFIG_DRIVER_OMAP24XX_I2C
 #define CONFIG_CMD_I2C
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP24XX
 
 /* MMC/SD IP block */
 #define CONFIG_MMC
index 3ca1fd0e657a7177a419ca3eca16dc7c72bb61a0..cc4001fcd13a1cee45585f3d9b35846aef7263d5 100644 (file)
 #define CONFIG_DOS_PARTITION
 
 /* I2C */
-#define CONFIG_HARD_I2C
-#define CONFIG_SYS_I2C_SPEED           100000
-#define CONFIG_SYS_I2C_SLAVE           1
-#define CONFIG_DRIVER_OMAP34XX_I2C     1
-#define CONFIG_I2C_MULTI_BUS
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED    100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE    1
+#define CONFIG_SYS_I2C_OMAP34XX
 
 /* EEPROM */
 #define CONFIG_SYS_I2C_MULTI_EEPROMS
index 45d33a68968c6feb9804162d538de2f1d522139e..629299d107022edc0d4f56b1624c25c40f078c5f 100644 (file)
@@ -12,7 +12,6 @@
  * (easy to change)
  */
 #define CONFIG_U8500
-#define CONFIG_L2_OFF
 
 #define CONFIG_SYS_MEMTEST_START       0x00000000
 #define CONFIG_SYS_MEMTEST_END 0x1FFFFFFF
index 4c6e6e8f6a57cfbfe8f0dd6cac006cf03c485e67..82ec826f73544e549398950b063c065376617e4f 100644 (file)
 /* I2C */
 #if defined(CONFIG_ZYNQ_I2C0) || defined(CONFIG_ZYNQ_I2C1)
 # define CONFIG_CMD_I2C
-# define CONFIG_ZYNQ_I2C
-# define CONFIG_HARD_I2C
-# define CONFIG_SYS_I2C_SPEED          100000
-# define CONFIG_SYS_I2C_SLAVE          1
+# define CONFIG_SYS_I2C
+# define CONFIG_SYS_I2C_ZYNQ
+# define CONFIG_SYS_I2C_ZYNQ_SPEED             100000
+# define CONFIG_SYS_I2C_ZYNQ_SLAVE             1
 #endif
 
 #if defined(CONFIG_ZYNQ_DCC)
index 4e3b500f5ad54fa213cc46759fee8e7ed9525800..e787f77be8533dd85429e98b39b5ca165fb1d73c 100644 (file)
@@ -6,6 +6,13 @@
 #
 
 ifndef CONFIG_SPL_BUILD
+
+obj-$(CONFIG_RSA) += rsa/
+obj-$(CONFIG_LZMA) += lzma/
+obj-$(CONFIG_LZO) += lzo/
+obj-$(CONFIG_ZLIB) += zlib/
+obj-$(CONFIG_TIZEN) += tizen/
+
 obj-$(CONFIG_AES) += aes.o
 obj-$(CONFIG_BZIP2) += bzlib.o
 obj-$(CONFIG_BZIP2) += bzlib_crctable.o
index 25c6797fb60a2f002c0582e298dd098d927e17f8..f8eda06c9f59849382f96838c9f7a4855fd2dbfd 100644 (file)
@@ -10,4 +10,4 @@
 
 CFLAGS += -D_LZMA_PROB32
 
-obj-$(CONFIG_LZMA) += LzmaDec.o LzmaTools.o
+obj-y += LzmaDec.o LzmaTools.o
index dd853eae2310df91fe276ac3b17704f50d4ea3af..2936544abc07a6c991cd15812470c1712d1d72f8 100644 (file)
@@ -5,4 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_LZO) += lzo1x_decompress.o
+obj-y += lzo1x_decompress.o
index 693c745514aa0a12533818f6e7c05117fe029f50..164ab3996455fb58f4a590b032327c57f6b11d61 100644 (file)
@@ -7,6 +7,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_FIT_SIGNATURE
-obj-$(CONFIG_RSA) += rsa-verify.o
-endif
+obj-$(CONFIG_FIT_SIGNATURE) += rsa-verify.o
index 1e9e04d9915e2c042e95b1c318f49a75f4455782..2fba95f438d806a86f6bc292d5ae5099afca33fc 100644 (file)
@@ -5,4 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-obj-$(CONFIG_ZLIB) += zlib.o
+obj-y += zlib.o
index 20459c92e26ed92f536ea6e8ab9716bd8425c6ae..022a20555f5e0105d0a78b6818ddead63095281f 100644 (file)
@@ -24,11 +24,9 @@ OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin \
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin \
        $(nandobj)System.map
 
-all:   $(obj).depend $(ALL)
-
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
 
@@ -37,13 +35,12 @@ $(nandobj)u-boot-spl.bin:   $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)System.map:  $(nandobj)u-boot-spl
                @$(NM) $< | \
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
-               sort > $(nandobj)System.map
+               sort > $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
@@ -52,43 +49,43 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
 
 # from cpu directory
 $(obj)cache.S:
-       @rm -f $(obj)cache.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $(obj)cache.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@
 
 $(obj)gpio.c:
-       @rm -f $(obj)gpio.c
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/gpio.c $(obj)gpio.c
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/gpio.c $@
 
 $(obj)ndfc.c:
-       @rm -f $(obj)ndfc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $(obj)ndfc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@
 
 $(obj)start.S:
-       @rm -f $(obj)start.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@
 
 # from board directory
 $(obj)memory.c:
-       @rm -f $(obj)memory.c
-       ln -s $(SRCTREE)/board/amcc/acadia/memory.c $(obj)memory.c
+       @rm -f $@
+       ln -s $(SRCTREE)/board/amcc/acadia/memory.c $@
 
 $(obj)pll.c:
-       @rm -f $(obj)pll.c
-       ln -s $(SRCTREE)/board/amcc/acadia/pll.c $(obj)pll.c
+       @rm -f $@
+       ln -s $(SRCTREE)/board/amcc/acadia/pll.c $@
 
 # from nand_spl directory
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/nand_boot.c $@
 
 # from drivers/mtd/nand directory
 $(obj)nand_ecc.c:
-       @rm -f $(obj)nand_ecc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@
 
 #########################################################################
 
index ca3dab4f2557a525f52a1e1f1b8160fd65690c1a..d413a480ad84349180d202c6a05d03a30f250dc8 100644 (file)
@@ -24,9 +24,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -36,8 +34,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
@@ -46,36 +43,36 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
 
 # from cpu directory
 $(obj)ndfc.c:
-       @rm -f $(obj)ndfc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $(obj)ndfc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@
 
 $(obj)start.S:
-       @rm -f $(obj)start.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@
 
 # from board directory
 $(obj)init.S:
-       @rm -f $(obj)init.S
-       ln -s $(SRCTREE)/board/amcc/bamboo/init.S $(obj)init.S
+       @rm -f $@
+       ln -s $(SRCTREE)/board/amcc/bamboo/init.S $@
 
 # from nand_spl directory
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/nand_boot.c $@
 
 # from drivers/mtd/nand directory
 $(obj)nand_ecc.c:
-       @rm -f $(obj)nand_ecc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@
 
 ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)sdram.c:
-       @rm -f $(obj)sdram.c
-       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/sdram.c $(obj)sdram.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/sdram.c $@
 endif
 
 #########################################################################
index f50d84b8c91a7fe844bd1f34cde658cb99274136..b2ef03f78b09286785a027d0cc5e700162194b3d 100644 (file)
@@ -29,9 +29,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -41,8 +39,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
@@ -51,36 +48,36 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
 
 # from cpu directory
 $(obj)ndfc.c:
-       @rm -f $(obj)ndfc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $(obj)ndfc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@
 
 $(obj)start.S:
-       @rm -f $(obj)start.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@
 
 # from board directory
 $(obj)init.S:
-       @rm -f $(obj)init.S
-       ln -s $(SRCTREE)/board/amcc/canyonlands/init.S $(obj)init.S
+       @rm -f $@
+       ln -s $(SRCTREE)/board/amcc/canyonlands/init.S $@
 
 # from nand_spl directory
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/nand_boot.c $@
 
 # from drivers/mtd/nand directory
 $(obj)nand_ecc.c:
-       @rm -f $(obj)nand_ecc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@
 
 ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)ddr2_fixed.c:
-       @rm -f $(obj)ddr2_fixed.c
-       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/ddr2_fixed.c $(obj)ddr2_fixed.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/ddr2_fixed.c $@
 endif
 
 #########################################################################
index 8b4206f57b48a9d1aea28278715d8c1bbee06b1d..5899b9efe835ea5f99958feeebf8f485c41c1653 100644 (file)
@@ -24,9 +24,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -36,8 +34,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
@@ -46,38 +43,38 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
 
 # from cpu directory
 $(obj)44x_spd_ddr2.c: $(obj)ecc.h
-       @rm -f $(obj)44x_spd_ddr2.c
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c $(obj)44x_spd_ddr2.c
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c $@
 
 $(obj)cache.S:
-       @rm -f $(obj)cache.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $(obj)cache.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@
 
 $(obj)ecc.h:
-       @rm -f $(obj)ecc.h
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/ecc.h $(obj)ecc.h
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/ecc.h $@
 
 $(obj)ndfc.c:
-       @rm -f $(obj)ndfc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $(obj)ndfc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@
 
 $(obj)start.S:
-       @rm -f $(obj)start.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@
 
 # from nand_spl directory
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/nand_boot.c $@
 
 # from drivers/nand directory
 $(obj)nand_ecc.c:
-       @rm -f $(obj)nand_ecc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@
 
 #########################################################################
 
index 0fcf030d4354bb04210603bb41b7099f4bd29501..fea6c4e489b0c2d0076b77fb26c50216a26f47a9 100644 (file)
@@ -24,9 +24,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -36,8 +34,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
@@ -46,41 +43,41 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
 
 # from cpu directory
 $(obj)denali_data_eye.c:
-       @rm -f $(obj)denali_data_eye.c
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/denali_data_eye.c $(obj)denali_data_eye.c
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/denali_data_eye.c $@
 
 $(obj)ndfc.c:
-       @rm -f $(obj)ndfc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $(obj)ndfc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@
 
 $(obj)start.S:
-       @rm -f $(obj)start.S
-       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@
 
 # from board directory
 $(obj)init.S:
-       @rm -f $(obj)init.S
-       ln -s $(SRCTREE)/board/amcc/sequoia/init.S $(obj)init.S
+       @rm -f $@
+       ln -s $(SRCTREE)/board/amcc/sequoia/init.S $@
 
 $(obj)sdram.c:
-       @rm -f $(obj)sdram.c
+       @rm -f $@
        @rm -f $(obj)sdram.h
-       ln -s $(SRCTREE)/board/amcc/sequoia/sdram.c $(obj)sdram.c
+       ln -s $(SRCTREE)/board/amcc/sequoia/sdram.c $@
        ln -s $(SRCTREE)/board/amcc/sequoia/sdram.h $(obj)sdram.h
 
 # from nand_spl directory
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/nand_boot.c $@
 
 # from drivers/mtd/nand directory
 $(obj)nand_ecc.c:
-       @rm -f $(obj)nand_ecc.c
-       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $(obj)nand_ecc.c
+       @rm -f $@
+       ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@
 
 #########################################################################
 
index 5b11d1067e245f1acd4e4067847383bde9108115..c49a6e0b8f6553ea8eb4e41857347a769abfe1de 100644 (file)
@@ -28,9 +28,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -40,8 +38,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
@@ -49,32 +46,31 @@ $(nandobj)u-boot.lds: $(LDSCRIPT)
 # create symbolic links for common files
 
 $(obj)start.S:
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $(obj)start.S
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@
 
 $(obj)nand_boot_fsl_elbc.c:
-       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
-              $(obj)nand_boot_fsl_elbc.c
+       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
 
 $(obj)sdram.c:
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/sdram.c $(obj)sdram.c
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@
 
 $(obj)$(BOARD).c:
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $(obj)$(BOARD).c
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@
 
 $(obj)ns16550.c:
-       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
+       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
 
 $(obj)spl_minimal.c:
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $(obj)spl_minimal.c
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@
 
 $(obj)cache.c:
-       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
+       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
 
 $(obj)time.c:
-       ln -sf $(SRCTREE)/arch/powerpc/lib/time.c $(obj)time.c
+       ln -sf $(SRCTREE)/arch/powerpc/lib/time.c $@
 
 $(obj)ticks.S:
-       ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $(obj)ticks.S
+       ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $@
 
 #########################################################################
 
index d3dac2074c1f3c1c8cff7c8b0fcdd2b92a01143d..62330815cc731ba2fcb37c56ad2e58673e399239 100644 (file)
@@ -30,9 +30,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -42,8 +40,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot-nand_spl.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
@@ -52,58 +49,57 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
 # create symbolic links for common files
 
 $(obj)cache.c:
-       @rm -f $(obj)cache.c
-       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
 
 $(obj)cpu_init_early.c:
-       @rm -f $(obj)cpu_init_early.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
 
 $(obj)spl_minimal.c:
-       @rm -f $(obj)spl_minimal.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
 
 $(obj)fsl_law.c:
-       @rm -f $(obj)fsl_law.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
 
 $(obj)law.c:
-       @rm -f $(obj)law.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
 
 $(obj)nand_boot_fsl_elbc.c:
-       @rm -f $(obj)nand_boot_fsl_elbc.c
-       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
-              $(obj)nand_boot_fsl_elbc.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
 
 $(obj)ns16550.c:
-       @rm -f $(obj)ns16550.c
-       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
 
 $(obj)fixed_ivor.S:
-       @rm -f $(obj)fixed_ivor.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
 
 $(obj)start.S: $(obj)fixed_ivor.S
-       @rm -f $(obj)start.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
 
 $(obj)tlb.c:
-       @rm -f $(obj)tlb.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
 
 $(obj)tlb_table.c:
-       @rm -f $(obj)tlb_table.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
 
 ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@
 endif
 
 #########################################################################
index d3dac2074c1f3c1c8cff7c8b0fcdd2b92a01143d..62330815cc731ba2fcb37c56ad2e58673e399239 100644 (file)
@@ -30,9 +30,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -42,8 +40,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot-nand_spl.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
@@ -52,58 +49,57 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
 # create symbolic links for common files
 
 $(obj)cache.c:
-       @rm -f $(obj)cache.c
-       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
 
 $(obj)cpu_init_early.c:
-       @rm -f $(obj)cpu_init_early.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
 
 $(obj)spl_minimal.c:
-       @rm -f $(obj)spl_minimal.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
 
 $(obj)fsl_law.c:
-       @rm -f $(obj)fsl_law.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
 
 $(obj)law.c:
-       @rm -f $(obj)law.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
 
 $(obj)nand_boot_fsl_elbc.c:
-       @rm -f $(obj)nand_boot_fsl_elbc.c
-       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
-              $(obj)nand_boot_fsl_elbc.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
 
 $(obj)ns16550.c:
-       @rm -f $(obj)ns16550.c
-       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
 
 $(obj)fixed_ivor.S:
-       @rm -f $(obj)fixed_ivor.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
 
 $(obj)start.S: $(obj)fixed_ivor.S
-       @rm -f $(obj)start.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
 
 $(obj)tlb.c:
-       @rm -f $(obj)tlb.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
 
 $(obj)tlb_table.c:
-       @rm -f $(obj)tlb_table.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
 
 ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@
 endif
 
 #########################################################################
index d3dac2074c1f3c1c8cff7c8b0fcdd2b92a01143d..62330815cc731ba2fcb37c56ad2e58673e399239 100644 (file)
@@ -30,9 +30,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -42,8 +40,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot-nand_spl.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
@@ -52,58 +49,57 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
 # create symbolic links for common files
 
 $(obj)cache.c:
-       @rm -f $(obj)cache.c
-       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
 
 $(obj)cpu_init_early.c:
-       @rm -f $(obj)cpu_init_early.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
 
 $(obj)spl_minimal.c:
-       @rm -f $(obj)spl_minimal.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
 
 $(obj)fsl_law.c:
-       @rm -f $(obj)fsl_law.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
 
 $(obj)law.c:
-       @rm -f $(obj)law.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
 
 $(obj)nand_boot_fsl_elbc.c:
-       @rm -f $(obj)nand_boot_fsl_elbc.c
-       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
-              $(obj)nand_boot_fsl_elbc.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
 
 $(obj)ns16550.c:
-       @rm -f $(obj)ns16550.c
-       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
 
 $(obj)fixed_ivor.S:
-       @rm -f $(obj)fixed_ivor.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
 
 $(obj)start.S: $(obj)fixed_ivor.S
-       @rm -f $(obj)start.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
 
 $(obj)tlb.c:
-       @rm -f $(obj)tlb.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
 
 $(obj)tlb_table.c:
-       @rm -f $(obj)tlb_table.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
 
 ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@
 endif
 
 #########################################################################
index e89d4054ab17d45661f33acf61943cd7f74c3ef7..dbdfa198959522cfaaadf933bc36441d102a2898 100644 (file)
@@ -25,9 +25,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -37,8 +35,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot-nand_spl.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
@@ -47,58 +44,57 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
 # create symbolic links for common files
 
 $(obj)cache.c:
-       @rm -f $(obj)cache.c
-       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
 
 $(obj)cpu_init_early.c:
-       @rm -f $(obj)cpu_init_early.c
-       ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $(obj)cpu_init_early.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $@
 
 $(obj)spl_minimal.c:
-       @rm -f $(obj)spl_minimal.c
-       ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $(obj)spl_minimal.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $@
 
 $(obj)fsl_law.c:
-       @rm -f $(obj)fsl_law.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
 
 $(obj)law.c:
-       @rm -f $(obj)law.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
 
 $(obj)nand_boot_fsl_elbc.c:
-       @rm -f $(obj)nand_boot_fsl_elbc.c
-       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
-              $(obj)nand_boot_fsl_elbc.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
 
 $(obj)ns16550.c:
-       @rm -f $(obj)ns16550.c
-       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
 
 $(obj)fixed_ivor.S:
-       @rm -f $(obj)fixed_ivor.S
-       ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $(obj)fixed_ivor.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $@
 
 $(obj)start.S: $(obj)fixed_ivor.S
-       @rm -f $(obj)start.S
-       ln -sf $(SRCTREE)/$(CPUDIR)/start.S $(obj)start.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/$(CPUDIR)/start.S $@
 
 $(obj)tlb.c:
-       @rm -f $(obj)tlb.c
-       ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $(obj)tlb.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $@
 
 $(obj)tlb_table.c:
-       @rm -f $(obj)tlb_table.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
 
 ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@
 endif
 
 #########################################################################
index d3dac2074c1f3c1c8cff7c8b0fcdd2b92a01143d..62330815cc731ba2fcb37c56ad2e58673e399239 100644 (file)
@@ -30,9 +30,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -42,8 +40,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot-nand_spl.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
@@ -52,58 +49,57 @@ $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
 # create symbolic links for common files
 
 $(obj)cache.c:
-       @rm -f $(obj)cache.c
-       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $(obj)cache.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
 
 $(obj)cpu_init_early.c:
-       @rm -f $(obj)cpu_init_early.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $(obj)cpu_init_early.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
 
 $(obj)spl_minimal.c:
-       @rm -f $(obj)spl_minimal.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $(obj)spl_minimal.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
 
 $(obj)fsl_law.c:
-       @rm -f $(obj)fsl_law.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $(obj)fsl_law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
 
 $(obj)law.c:
-       @rm -f $(obj)law.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
 
 $(obj)nand_boot_fsl_elbc.c:
-       @rm -f $(obj)nand_boot_fsl_elbc.c
-       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
-              $(obj)nand_boot_fsl_elbc.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
 
 $(obj)ns16550.c:
-       @rm -f $(obj)ns16550.c
-       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
 
 $(obj)resetvec.S:
-       @rm -f $(obj)resetvec.S
-       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $(obj)resetvec.S
+       @rm -f $@
+       ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
 
 $(obj)fixed_ivor.S:
-       @rm -f $(obj)fixed_ivor.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $(obj)fixed_ivor.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
 
 $(obj)start.S: $(obj)fixed_ivor.S
-       @rm -f $(obj)start.S
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $(obj)start.S
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
 
 $(obj)tlb.c:
-       @rm -f $(obj)tlb.c
-       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $(obj)tlb.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
 
 $(obj)tlb_table.c:
-       @rm -f $(obj)tlb_table.c
-       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c
+       @rm -f $@
+       ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
 
 ifneq ($(OBJTREE), $(SRCTREE))
 $(obj)nand_boot.c:
-       @rm -f $(obj)nand_boot.c
-       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $(obj)nand_boot.c
+       @rm -f $@
+       ln -s $(SRCTREE)/nand_spl/board/$(BOARDDIR)/nand_boot.c $@
 endif
 
 #########################################################################
index 08739edc4e4bda715f85fbf781b33ead92e751fe..90f132c34c0bab4f2d3b3223e9f14191528f6592 100644 (file)
@@ -28,9 +28,7 @@ OBJS  := $(addprefix $(obj),$(SOBJS) $(COBJS))
 __OBJS := $(SOBJS) $(COBJS)
 LNDIR  := $(nandobj)board/$(BOARDDIR)
 
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
+all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
 
 $(nandobj)u-boot-spl-16k.bin:  $(nandobj)u-boot-spl
        $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
@@ -40,8 +38,7 @@ $(nandobj)u-boot-spl.bin:     $(nandobj)u-boot-spl
 
 $(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
        cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $(nandobj)u-boot-spl
+               -Map $(nandobj)u-boot-spl.map -o $@
 
 $(nandobj)u-boot.lds: $(LDSCRIPT)
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
index 1ac7aa511dafde94212462b02e61bb16a2b64c1a..b23debcabe9cac3ffe637ee747121152943ab403 100644 (file)
@@ -5,6 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += sysmon.o
index d8b195289ea8a9310dd6a1e2907f89e5fe0fae88..a50ce67cde408d241343ec04831285033216a17a 100644 (file)
@@ -5,6 +5,4 @@
 #
 # SPDX-License-Identifier:     GPL-2.0+
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += sysmon.o watchdog.o dspic.o fpga.o dsp.o gdc.o
index cd27a5ce34a9a9e3300dc0def43898f483598b6f..5c37f497ccc858721f202579a50565a6cf1efab9 100644 (file)
@@ -5,6 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += codec.o dsp.o
index 3f748892a76cba2fc2c545d05326bc1d4bcb96bd..b43b77b2d31f91f2683f0d5b9f9af3e9140c2530 100644 (file)
@@ -5,6 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += coproc_com.o
index 0643d01a7b13a1fc3238e9c10664941503d315ba..4b3c50e6afdb31b3d8b134fa3be7959a9c6c895e 100644 (file)
@@ -5,6 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += ecc.o
index 7a2930a797f0770fbd9bc0566e58b2c0385852c5..f8bb6c9343fcf974417a0683098bbd396f186501 100644 (file)
@@ -5,7 +5,5 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += cache_8xx.o
 obj-$(CONFIG_HAS_POST) += cache.o ether.o spr.o uart.o usb.o watchdog.o
index b7435c825296f0b7ddc9e3a3f9901a2a9a01f385..ed3e8e87fdd1f996788959b7161895f6f3229778 100644 (file)
@@ -5,8 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += cache_4xx.o
 obj-$(CONFIG_HAS_POST) += cache.o
 obj-$(CONFIG_HAS_POST) += denali_ecc.o
index 2f6844cca4eb71d69230b7814327dbed2061c96f..328f880b1d952367be8372f15374513481c086a3 100644 (file)
@@ -5,6 +5,4 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += flash.o i2c.o memory.o rtc.o
index f19fea3e5f65a7ee6810873dfc44cb72698789b8..d2b8a940df11ccc1642d5ed052b00a03035828f1 100644 (file)
@@ -5,8 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += asm.o
 obj-$(CONFIG_HAS_POST) += cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o
 obj-$(CONFIG_HAS_POST) += threei.o andi.o srawi.o rlwnm.o rlwinm.o rlwimi.o
index 6aec96c023a8fc4d465387759191b4ca42920e63..ee01a313f1b019002f50da80c6c485135a321354 100644 (file)
@@ -5,8 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-CPPFLAGS += -I$(TOPDIR)
-
 obj-$(CONFIG_HAS_POST) += 20001122-1.o
 obj-$(CONFIG_HAS_POST) += 20010114-2.o
 obj-$(CONFIG_HAS_POST) += 20010226-1.o
index 2ef7341f37f8213b1abe51112c1449f0b835ba72..e3354aaa3ff31f4d509342c7fa6fa046135379c7 100644 (file)
@@ -10,10 +10,6 @@ SRCS :=
 
 include Makefile
 
-# Backward compatible: obj-y is preferable
-COBJS := $(sort $(COBJS) $(COBJS-y))
-SOBJS := $(sort $(SOBJS) $(SOBJS-y))
-
 # Going forward use the following
 obj-y := $(sort $(obj-y))
 extra-y := $(sort $(extra-y))
@@ -24,11 +20,18 @@ obj-y               := $(patsubst %/, %/built-in.o, $(obj-y))
 subdir-obj-y   := $(filter %/built-in.o, $(obj-y))
 subdir-obj-y   := $(addprefix $(obj),$(subdir-obj-y))
 
-SRCS   += $(COBJS:.o=.c) $(SOBJS:.o=.S) \
- $(wildcard $(obj-y:.o=.c) $(obj-y:.o=.S) $(lib-y:.o=.c) $(lib-y:.o=.S) $(extra-y:.o=.c) $(extra-y:.o=.S))
-OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS) $(obj-y))
+SRCS   += $(wildcard $(obj-y:.o=.c) $(obj-y:.o=.S) $(lib-y:.o=.c) \
+       $(lib-y:.o=.S) $(extra-y:.o=.c) $(extra-y:.o=.S))
+OBJS   := $(addprefix $(obj),$(obj-y))
+
+# $(obj-dirs) is a list of directories that contain object files
+obj-dirs := $(dir $(OBJS))
+
+# Create directories for object files if directory does not exist
+# Needed when obj-y := dir/file.o syntax is used
+_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
 
-LGOBJS := $(addprefix $(obj),$(sort $(GLSOBJS) $(GLCOBJS)) $(lib-y))
+LGOBJS := $(addprefix $(obj),$(sort $(lib-y)))
 
 all: $(LIB) $(addprefix $(obj),$(extra-y))
 
index cbd3d278491cdf1b6284fbfb414e5c187fb4c89b..29d7818df5076b21c6f6846ccc89513648b89a10 100644 (file)
@@ -54,63 +54,54 @@ ifeq ($(CPU),mpc85xx)
 START += $(START_PATH)/resetvec.o
 endif
 
-LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
+LIBS-y += arch/$(ARCH)/lib/
 
-LIBS-y += $(CPUDIR)/lib$(CPU).o
-ifeq ($(CPU),mpc83xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
-ifeq ($(CPU),mpc85xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-ifdef CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-LIBS-y += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o
-endif
-endif
-ifeq ($(CPU),mpc86xx)
-LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o
-endif
+LIBS-y += $(CPUDIR)/
 
 ifdef SOC
-LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
-endif
-LIBS-y += board/$(BOARDDIR)/lib$(BOARD).o
-LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/lib$(VENDOR).o
-
-LIBS-$(CONFIG_SPL_FRAMEWORK) += common/spl/libspl.o
-LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/libcommon.o
-LIBS-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/libdisk.o
-LIBS-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/libi2c.o
-LIBS-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/libgpio.o
-LIBS-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/libmmc.o
-LIBS-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/libserial.o
-LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/libspi_flash.o
-LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/libspi.o
-LIBS-$(CONFIG_SPL_FAT_SUPPORT) += fs/fat/libfat.o
-LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/libgeneric.o
-LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/libpower.o \
-       drivers/power/pmic/libpmic.o
-LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/libnand.o
-LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/libonenand.o
-LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/libdma.o
-LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/memory.o
-LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/libnet.o
-LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/libnet.o
-LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/libphy.o
-LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/net/phy/libphy.o
-LIBS-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += drivers/usb/musb-new/libusb_musb-new.o
-LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/usb/gadget/libusb_gadget.o
-LIBS-$(CONFIG_SPL_WATCHDOG_SUPPORT) += drivers/watchdog/libwatchdog.o
+LIBS-y += $(CPUDIR)/$(SOC)/
+endif
+LIBS-y += board/$(BOARDDIR)/
+LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
+
+LIBS-$(CONFIG_SPL_FRAMEWORK) += common/spl/
+LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/
+LIBS-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
+LIBS-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/
+LIBS-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/
+LIBS-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/
+LIBS-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/
+LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/
+LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/
+LIBS-y += fs/
+LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/
+LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/ \
+       drivers/power/pmic/
+LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/
+LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/
+LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/
+LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/
+LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/
+LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/
+LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/
+LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/net/phy/
+LIBS-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += drivers/usb/musb-new/
+LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/usb/gadget/
+LIBS-$(CONFIG_SPL_WATCHDOG_SUPPORT) += drivers/watchdog/
 
 ifneq (,$(CONFIG_MX23)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35))
-LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
+LIBS-y += arch/$(ARCH)/imx-common/
 endif
 
-LIBS-$(CONFIG_ARM) += arch/arm/cpu/libcpu.o
+LIBS-$(CONFIG_ARM) += arch/arm/cpu/
+LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/
 
 ifneq ($(CONFIG_MX23)$(CONFIG_MX35),)
-LIBS-y += arch/$(ARCH)/imx-common/libimx-common.o
+LIBS-y += arch/$(ARCH)/imx-common/
 endif
 
+LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y))
+
 # Add GCC lib
 ifeq ("$(USE_PRIVATE_LIBGCC)", "yes")
 PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/libgcc.o
@@ -175,8 +166,7 @@ all:        $(ALL-y)
 
 ifdef CONFIG_SAMSUNG
 $(obj)$(BOARD)-spl.bin: $(obj)u-boot-spl.bin
-       $(OBJTREE)/tools/mk$(BOARD)spl \
-               $(obj)u-boot-spl.bin $(obj)$(BOARD)-spl.bin
+       $(OBJTREE)/tools/mk$(BOARD)spl $< $@
 endif
 
 $(obj)$(SPL_BIN).bin:  $(obj)$(SPL_BIN)
@@ -195,7 +185,6 @@ $(START):
 
 $(LIBS):       depend
        $(MAKE) $(build) $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))
-       mv $(dir $@)built-in.o $@
 
 $(obj)u-boot-spl.lds: $(LDSCRIPT) depend
        $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
index 090b653116e40a5fcd405d70fef9f0c0d2806d1f..c30c1d4114c9db582cf2658a535c03c3210dfd84 100644 (file)
@@ -89,10 +89,16 @@ a few commits or boards, it will be pretty slow. As a tip, if you don't
 plan to use your machine for anything else, you can use -T to increase the
 number of threads beyond the default.
 
-Buildman lets you build all boards, or a subset. Specify the subset using
-the board name, architecture name, SOC name, or anything else in the
-boards.cfg file. So 'at91' will build all AT91 boards (arm), powerpc will
-build all PowerPC boards.
+Buildman lets you build all boards, or a subset. Specify the subset by passing
+command-line arguments that list the desired board name, architecture name,
+SOC name, or anything else in the boards.cfg file. Multiple arguments are
+allowed. Each argument will be interpreted as a regular expression, so
+behaviour is a superset of exact or substring matching. Examples are:
+
+* 'tegra20'      All boards with a Tegra20 SoC
+* 'tegra'        All boards with any Tegra Soc (Tegra20, Tegra30, Tegra114...)
+* '^tegra[23]0$' All boards with either Tegra20 or Tegra30 SoC
+* 'powerpc'      All PowerPC boards
 
 Buildman does not store intermediate object files. It optionally copies
 the binary output into a directory when a build is successful. Size
@@ -643,7 +649,7 @@ snapper9260=${at91-boards} BUILD_TAG=442
 snapper9g45=${at91-boards} BUILD_TAG=443
 
 This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260
-and 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9g45. A special
+and 'make ENABLE_AT91_TEST=1 BUILD_TAG=443' for snapper9g45. A special
 variable ${target} is available to access the target name (snapper9260 and
 snapper9g20 in this case). Variables are resolved recursively.
 
index 1d3db206bda10508d906bfb3a5a01e26ea81423e..5172a473e35333296b97eb1a4bb6dfa79a6f51a0 100644 (file)
@@ -3,6 +3,8 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
+import re
+
 class Board:
     """A particular board that we can build"""
     def __init__(self, status, arch, cpu, soc, vendor, board_name, target, options):
@@ -135,14 +137,22 @@ class Boards:
             due to each argument, arranged by argument.
         """
         result = {}
+        argres = {}
         for arg in args:
             result[arg] = 0
+            argres[arg] = re.compile(arg)
         result['all'] = 0
 
         for board in self._boards:
             if args:
                 for arg in args:
-                    if arg in board.props:
+                    argre = argres[arg]
+                    match = False
+                    for prop in board.props:
+                        match = argre.match(prop)
+                        if match:
+                            break
+                    if match:
                         if not board.build_it:
                             board.build_it = True
                             result[arg] += 1
index dee91fccc0a36217611baae53ecaa0646102b4f0..dd98fb65c0dccef2701d1bb877f055d0cda58c83 100644 (file)
@@ -23,8 +23,6 @@ BINS  := $(addprefix $(obj),$(BINS))
 #
 HOSTCPPFLAGS = -I$(BFD_ROOT_DIR)/include
 
-HOSTOS := $(shell uname -s | sed -e 's/\([Cc][Yy][Gg][Ww][Ii][Nn]\).*/cygwin/')
-
 ifeq ($(HOSTOS),cygwin)
 
 all:
diff --git a/tools/imls/Makefile b/tools/imls/Makefile
deleted file mode 100644 (file)
index b045df2..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-# (C) Copyright 2009 Marco Stornelli <marco.stornelli@gmail.com>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-include $(TOPDIR)/config.mk
-
-# Generated executable files
-BIN_FILES-y += imls
-
-# Source files which exist outside the tools/imls directory
-EXT_OBJ_FILES-y += lib/crc32.o
-EXT_OBJ_FILES-y += lib/md5.o
-EXT_OBJ_FILES-y += lib/sha1.o
-EXT_OBJ_FILES-y += common/image.o
-
-# Source files located in the tools/imls directory
-OBJ_FILES-y += imls.o
-
-# Flattened device tree objects
-LIBFDT_OBJ_FILES-y += fdt.o
-LIBFDT_OBJ_FILES-y += fdt_ro.o
-LIBFDT_OBJ_FILES-y += fdt_rw.o
-LIBFDT_OBJ_FILES-y += fdt_strerror.o
-LIBFDT_OBJ_FILES-y += fdt_wip.o
-
-# now $(obj) is defined
-SRCS   += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c))
-SRCS   += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c))
-SRCS   += $(addprefix $(SRCTREE)/lib/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c))
-BINS   := $(addprefix $(obj),$(sort $(BIN_FILES-y)))
-LIBFDT_OBJS    := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
-
-#
-# Compile for a hosted environment on the target
-# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
-#
-HOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
-               -idirafter $(SRCTREE)/arch/$(ARCH)/include \
-               -idirafter $(OBJTREE)/include \
-               -I $(SRCTREE)/lib/libfdt \
-               -I $(SRCTREE)/tools \
-               -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES
-
-ifeq ($(MTD_VERSION),old)
-HOSTCPPFLAGS += -DMTD_OLD
-endif
-
-all:   $(BINS)
-
-$(obj)imls:    $(obj)imls.o $(obj)crc32.o $(obj)image.o $(obj)md5.o \
-               $(obj)sha1.o $(LIBFDT_OBJS)
-       $(CC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
-       $(STRIP) $@
-
-# Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED
-$(obj)image.o: $(SRCTREE)/common/image.c
-       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
-
-$(obj)imls.o: $(SRCTREE)/tools/imls/imls.c
-       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
-
-# Some of the tool objects need to be accessed from outside the tools/imls directory
-$(obj)%.o: $(SRCTREE)/common/%.c
-       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
-
-$(obj)%.o: $(SRCTREE)/lib/%.c
-       $(CC) -g $(HOSTCFLAGS) -c -o $@ $<
-
-$(obj)%.o: $(SRCTREE)/lib/libfdt/%.c
-       $(CC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<
-
-clean:
-       rm -rf *.o imls
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/tools/imls/README b/tools/imls/README
deleted file mode 100644 (file)
index 9adf923..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# (C) Copyright 2009 Marco Stornelli <marco.stornelli@gmail.com>
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-IMLS
--------------
-
-imls is an implementation of a Linux command line tool to access
-to raw flash partitions and list images made with mkimage command.
-
-For building against older versions of the MTD headers (meaning before
-v2.6.8-rc1) it is required to pass the argument "MTD_VERSION=old" to
-make.
-
-Usage examples
---------------
-
-1) Flash with sectors of 128KiB and 32 sectors:
-
-> imls -c 32 -s 131072 /dev/mtd0
-Searching...
-Image Name:   foo
-Created:      Fri Apr 10 18:11:30 2009
-Image Type:   Intel x86 Linux Standalone Program (uncompressed)
-Data Size:    10716 Bytes = 10.46 kB = 0.01 MB
-Load Address: 00000000
-Entry Point:  00000000
-
-2) Flash with sectors of 64KiB and 128 sectors and with a search offset of one
-sector:
-
-> imls -o 1 -c 128 -s 65536 /dev/mtd0
-Searching...
-Image Name:   foo
-Created:      Fri Apr 10 18:11:30 2009
-Image Type:   Intel x86 Linux Standalone Program (uncompressed)
-Data Size:    10716 Bytes = 10.46 kB = 0.01 MB
-Load Address: 00000000
-Entry Point:  00000000
diff --git a/tools/imls/imls.c b/tools/imls/imls.c
deleted file mode 100644 (file)
index 95043b4..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-/*
- * (C) Copyright 2009 Marco Stornelli
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <asm/page.h>
-
-#ifdef MTD_OLD
-#include <stdint.h>
-#include <linux/mtd/mtd.h>
-#else
-#define  __user        /* nothing */
-#include <mtd/mtd-user.h>
-#endif
-
-#include <sha1.h>
-#include <libfdt.h>
-#include <fdt_support.h>
-#include <image.h>
-
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
-
-extern unsigned long crc32(unsigned long crc, const char *buf, unsigned int len);
-static void usage(void);
-static int image_verify_header(char *ptr, int fd);
-static int flash_bad_block(int fd, uint8_t mtd_type, loff_t start);
-
-char   *cmdname;
-char   *devicefile;
-
-unsigned int sectorcount = 0;
-int sflag = 0;
-unsigned int sectoroffset = 0;
-unsigned int sectorsize = 0;
-int cflag = 0;
-
-int main (int argc, char **argv)
-{
-       int fd = -1, err = 0, readbyte = 0, j;
-       struct mtd_info_user mtdinfo;
-       char buf[sizeof(image_header_t)];
-       int found = 0;
-
-       cmdname = *argv;
-
-       while (--argc > 0 && **++argv == '-') {
-               while (*++*argv) {
-                       switch (**argv) {
-                       case 'c':
-                               if (--argc <= 0)
-                                       usage ();
-                               sectorcount = (unsigned int)atoi(*++argv);
-                               cflag = 1;
-                               goto NXTARG;
-                       case 'o':
-                               if (--argc <= 0)
-                                       usage ();
-                               sectoroffset = (unsigned int)atoi(*++argv);
-                               goto NXTARG;
-
-                       case 's':
-                               if (--argc <= 0)
-                                       usage ();
-                               sectorsize = (unsigned int)atoi(*++argv);
-                               sflag = 1;
-                               goto NXTARG;
-                       default:
-                               usage ();
-                       }
-               }
-NXTARG:                ;
-       }
-
-       if (argc != 1 || cflag == 0 || sflag == 0)
-               usage();
-
-       devicefile = *argv;
-
-       fd = open(devicefile, O_RDONLY);
-       if (fd < 0) {
-               fprintf (stderr, "%s: Can't open %s: %s\n",
-                        cmdname, devicefile, strerror(errno));
-               exit(EXIT_FAILURE);
-       }
-
-       err = ioctl(fd, MEMGETINFO, &mtdinfo);
-       if (err < 0) {
-               fprintf(stderr, "%s: Cannot get MTD information: %s\n",cmdname,
-                       strerror(errno));
-               exit(EXIT_FAILURE);
-       }
-
-       if (mtdinfo.type != MTD_NORFLASH && mtdinfo.type != MTD_NANDFLASH) {
-               fprintf(stderr, "%s: Unsupported flash type %u\n",
-                       cmdname, mtdinfo.type);
-               exit(EXIT_FAILURE);
-       }
-
-       if (sectorsize * sectorcount != mtdinfo.size) {
-               fprintf(stderr, "%s: Partition size (%d) incompatible with "
-                       "sector size and count\n", cmdname, mtdinfo.size);
-               exit(EXIT_FAILURE);
-       }
-
-       if (sectorsize * sectoroffset >= mtdinfo.size) {
-               fprintf(stderr, "%s: Partition size (%d) incompatible with "
-                       "sector offset given\n", cmdname, mtdinfo.size);
-               exit(EXIT_FAILURE);
-       }
-
-       if (sectoroffset > sectorcount - 1) {
-               fprintf(stderr, "%s: Sector offset cannot be grater than "
-                       "sector count minus one\n", cmdname);
-               exit(EXIT_FAILURE);
-       }
-
-       printf("Searching....\n");
-
-       for (j = sectoroffset; j < sectorcount; ++j) {
-
-               if (lseek(fd, j*sectorsize, SEEK_SET) != j*sectorsize) {
-                       fprintf(stderr, "%s: lseek failure: %s\n",
-                       cmdname, strerror(errno));
-                       exit(EXIT_FAILURE);
-               }
-
-               err = flash_bad_block(fd, mtdinfo.type, j*sectorsize);
-               if (err < 0)
-                       exit(EXIT_FAILURE);
-               if (err)
-                       continue; /* Skip and jump to next */
-
-               readbyte = read(fd, buf, sizeof(image_header_t));
-               if (readbyte != sizeof(image_header_t)) {
-                       fprintf(stderr, "%s: Can't read from device: %s\n",
-                       cmdname, strerror(errno));
-                       exit(EXIT_FAILURE);
-               }
-
-               if (fdt_check_header(buf)) {
-                       /* old-style image */
-                       if (image_verify_header(buf, fd)) {
-                               found = 1;
-                               image_print_contents((image_header_t *)buf);
-                       }
-               } else {
-                       /* FIT image */
-                       fit_print_contents(buf);
-               }
-
-       }
-
-       close(fd);
-
-       if(!found)
-               printf("No images found\n");
-
-       exit(EXIT_SUCCESS);
-}
-
-void usage()
-{
-       fprintf (stderr, "Usage:\n"
-                        "       %s [-o offset] -s size -c count device\n"
-                        "          -o ==> number of sectors to use as offset\n"
-                        "          -c ==> number of sectors\n"
-                        "          -s ==> size of sectors (byte)\n",
-               cmdname);
-
-       exit(EXIT_FAILURE);
-}
-
-static int image_verify_header(char *ptr, int fd)
-{
-       int len, nread;
-       char *data;
-       uint32_t checksum;
-       image_header_t *hdr = (image_header_t *)ptr;
-       char buf[PAGE_SIZE];
-
-       if (image_get_magic(hdr) != IH_MAGIC)
-               return 0;
-
-       data = (char *)hdr;
-       len  = image_get_header_size();
-
-       checksum = image_get_hcrc(hdr);
-       hdr->ih_hcrc = htonl(0);        /* clear for re-calculation */
-
-       if (crc32(0, data, len) != checksum) {
-               fprintf(stderr,
-                     "%s: Maybe image found but it has bad header checksum!\n",
-                     cmdname);
-               return 0;
-       }
-
-       len = image_get_size(hdr);
-       checksum = 0;
-
-       while (len > 0) {
-               nread = read(fd, buf, MIN(len,PAGE_SIZE));
-               if (nread != MIN(len,PAGE_SIZE)) {
-                       fprintf(stderr,
-                               "%s: Error while reading: %s\n",
-                               cmdname, strerror(errno));
-                       exit(EXIT_FAILURE);
-               }
-               checksum = crc32(checksum, buf, nread);
-               len -= nread;
-       }
-
-       if (checksum != image_get_dcrc(hdr)) {
-               fprintf (stderr,
-                       "%s: Maybe image found but it has corrupted data!\n",
-                       cmdname);
-               return 0;
-       }
-
-       return 1;
-}
-
-/*
- * Test for bad block on NAND, just returns 0 on NOR, on NAND:
- * 0   - block is good
- * > 0 - block is bad
- * < 0 - failed to test
- */
-static int flash_bad_block(int fd, uint8_t mtd_type, loff_t start)
-{
-       if (mtd_type == MTD_NANDFLASH) {
-               int badblock = ioctl(fd, MEMGETBADBLOCK, &start);
-
-               if (badblock < 0) {
-                       fprintf(stderr,"%s: Cannot read bad block mark: %s\n",
-                               cmdname, strerror(errno));
-                       return badblock;
-               }
-
-               if (badblock) {
-                       return badblock;
-               }
-       }
-
-       return 0;
-}
index e6d30706216b9711163d957f33916daa34b0c77b..59f1776f54b72e427b65b9a108cf80fa08761ac1 100644 (file)
@@ -180,6 +180,14 @@ END
        together and put after the cover letter. Can appear multiple
        times.
 
+Commit-notes:
+blah blah
+blah blah
+more blah blah
+END
+       Similar, but for a single commit (patch). These notes will appear
+       immediately below the --- cut in the patch file.
+
  Signed-off-by: Their Name <email>
        A sign-off is added automatically to your patches (this is
        probably a bug). If you put this tag in your patches, it will
@@ -227,7 +235,7 @@ TEST=...
 Change-Id:
 Review URL:
 Reviewed-on:
-
+Commit-xxxx: (except Commit-notes)
 
 Exercise for the reader: Try adding some tags to one of your current
 patch series and see how the patches turn out.
index 900cfb3a5a6c630e3894db6004b3e77a2b955fd8..89cce7f88a297dd32e486cd3cd1a7a0ef7819332 100644 (file)
@@ -21,6 +21,7 @@ class Commit:
         changes: Dict containing a list of changes (single line strings).
             The dict is indexed by change version (an integer)
         cc_list: List of people to aliases/emails to cc on this commit
+        notes: List of lines in the commit (not series) notes
     """
     def __init__(self, hash):
         self.hash = hash
@@ -28,6 +29,7 @@ class Commit:
         self.tags = []
         self.changes = {}
         self.cc_list = []
+        self.notes = []
 
     def AddChange(self, version, info):
         """Add a new change line to the change list for a version.
index c2045230af442b4ee8e148300e41575a964bb0bf..684204c63fdd4398f66a59a437ffc3ff98ffc759 100644 (file)
@@ -30,7 +30,10 @@ re_cover = re.compile('^Cover-letter:')
 re_cover_cc = re.compile('^Cover-letter-cc: *(.*)')
 
 # Patch series tag
-re_series = re.compile('^Series-([a-z-]*): *(.*)')
+re_series_tag = re.compile('^Series-([a-z-]*): *(.*)')
+
+# Commit series tag
+re_commit_tag = re.compile('^Commit-([a-z-]*): *(.*)')
 
 # Commit tags that we want to collect and keep
 re_tag = re.compile('^(Tested-by|Acked-by|Reviewed-by|Cc): (.*)')
@@ -90,6 +93,20 @@ class PatchStream:
         if self.is_log:
             self.series.AddTag(self.commit, line, name, value)
 
+    def AddToCommit(self, line, name, value):
+        """Add a new Commit-xxx tag.
+
+        When a Commit-xxx tag is detected, we come here to record it.
+
+        Args:
+            line: Source line containing tag (useful for debug/error messages)
+            name: Tag name (part after 'Commit-')
+            value: Tag value (part after 'Commit-xxx: ')
+        """
+        if name == 'notes':
+            self.in_section = 'commit-' + name
+            self.skip_blank = False
+
     def CloseCommit(self):
         """Save the current commit into our commit list, and reset our state"""
         if self.commit and self.is_log:
@@ -138,7 +155,8 @@ class PatchStream:
                 line = line[4:]
 
         # Handle state transition and skipping blank lines
-        series_match = re_series.match(line)
+        series_tag_match = re_series_tag.match(line)
+        commit_tag_match = re_commit_tag.match(line)
         commit_match = re_commit.match(line) if self.is_log else None
         cover_cc_match = re_cover_cc.match(line)
         tag_match = None
@@ -165,6 +183,9 @@ class PatchStream:
                 elif self.in_section == 'notes':
                     if self.is_log:
                         self.series.notes += self.section
+                elif self.in_section == 'commit-notes':
+                    if self.is_log:
+                        self.commit.notes += self.section
                 else:
                     self.warn.append("Unknown section '%s'" % self.in_section)
                 self.in_section = None
@@ -178,7 +199,7 @@ class PatchStream:
             self.commit.subject = line
 
         # Detect the tags we want to remove, and skip blank lines
-        elif re_remove.match(line):
+        elif re_remove.match(line) and not commit_tag_match:
             self.skip_blank = True
 
             # TEST= should be the last thing in the commit, so remove
@@ -211,9 +232,9 @@ class PatchStream:
             self.skip_blank = False
 
         # Detect Series-xxx tags
-        elif series_match:
-            name = series_match.group(1)
-            value = series_match.group(2)
+        elif series_tag_match:
+            name = series_tag_match.group(1)
+            value = series_tag_match.group(2)
             if name == 'changes':
                 # value is the version number: e.g. 1, or 2
                 try:
@@ -226,6 +247,14 @@ class PatchStream:
                 self.AddToSeries(line, name, value)
                 self.skip_blank = True
 
+        # Detect Commit-xxx tags
+        elif commit_tag_match:
+            name = commit_tag_match.group(1)
+            value = commit_tag_match.group(2)
+            if name == 'notes':
+                self.AddToCommit(line, name, value)
+                self.skip_blank = True
+
         # Detect the start of a new commit
         elif commit_match:
             self.CloseCommit()
@@ -276,7 +305,7 @@ class PatchStream:
                 out = []
                 log = self.series.MakeChangeLog(self.commit)
                 out += self.FormatTags(self.tags)
-                out += [line] + log
+                out += [line] + self.commit.notes + [''] + log
             elif self.found_test:
                 if not re_allowed_after_test.match(line):
                     self.lines_after_test += 1
diff --git a/tools/updater/Makefile b/tools/updater/Makefile
deleted file mode 100644 (file)
index 19dd5eb..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# (C) Copyright 2000-2006
-# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
-
-LOAD_ADDR = 0x40000
-
-include $(TOPDIR)/config.mk
-
-PROG           = $(obj)updater
-IMAGE          = $(obj)updater.image
-
-COBJS          = update.o flash.o flash_hw.o utils.o cmd_flash.o string.o ctype.o dummy.o
-COBJS_LINKS    = stubs.o
-AOBJS          = ppcstring.o
-AOBJS_LINKS    = memio.o
-
-OBJS   := $(addprefix $(obj),$(COBJS) $(COBJS_LINKS) $(AOBJS) $(AOBJS_LINKS))
-SRCS   := $(COBJS:.o=.c) $(AOBJS:.o=.S) $(addprefix $(obj), $(COBJS_LINKS:.o:.c) $(AOBJS_LINKS:.o:.S))
-
-CPPFLAGS += -I$(TOPDIR) -I$(TOPDIR)/board/MAI/AmigaOneG3SE
-CFLAGS   += -I$(TOPDIR)/board/MAI/AmigaOneG3SE
-AFLAGS   += -I$(TOPDIR)/board/MAI/AmigaOneG3SE
-
-DEPS = $(OBJTREE)/u-boot.bin $(OBJTREE)/tools/mkimage
-ifneq ($(DEPS),$(wildcard $(DEPS)))
-$(error "updater: Missing required objects, please run regular build first")
-endif
-
-all:   $(obj).depend $(PROG) $(IMAGE)
-
-#########################################################################
-
-$(obj)%.srec:  %.o $(LIB)
-       $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $< $(LIB)
-       $(OBJCOPY) -O srec $(<:.o=) $@
-
-$(obj)%.o: %.c
-       $(CC) $(CFLAGS) -c -o $@ $<
-
-$(obj)%.o: %.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)memio.o: $(obj)memio.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)memio.S:
-       rm -f $(obj)memio.c
-       ln -s $(SRCTREE)/board/MAI/AmigaOneG3SE/memio.S $(obj)memio.S
-
-$(obj)stubs.o: $(obj)stubs.c
-       $(CC) $(CFLAGS) -c -o $@ $<
-
-$(obj)stubs.c:
-       rm -f $(obj)stubs.c
-       ln -s $(SRCTREE)/examples/stubs.c $(obj)stubs.c
-
-#########################################################################
-
-$(obj)updater: $(OBJS)
-       $(LD) -g -Ttext $(LOAD_ADDR) -o $(obj)updater -e _main $(OBJS)
-       $(OBJCOPY) -O binary $(obj)updater $(obj)updater.bin
-
-$(obj)updater.image: $(obj)updater $(OBJTREE)/u-boot.bin
-       cat >/tmp/tempimage $(obj)updater.bin junk $(OBJTREE)/u-boot.bin
-       $(OBJTREE)/tools/mkimage -A ppc -O u-boot -T standalone -C none -a $(LOAD_ADDR) \
-       -e `$(NM) $(obj)updater | grep _main | cut --bytes=0-8` \
-       -n "Firmware Updater" -d /tmp/tempimage $(obj)updater.image
-       rm /tmp/tempimage
-       cp $(obj)updater.image /tftpboot
-
-(obj)updater.image2: $(obj)updater $(OBJTREE)/u-boot.bin
-       cat >/tmp/tempimage $(obj)updater.bin junk ../../create_image/image
-       $(OBJTREE)/tools/mkimage -A ppc -O u-boot -T standalone -C none -a $(LOAD_ADDR) \
-       -e `$(NM) $(obj)updater | grep _main | cut --bytes=0-8` \
-       -n "Firmware Updater" -d /tmp/tempimage $(obj)updater.image
-       rm /tmp/tempimage
-       cp $(obj)updater.image /tftpboot
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/tools/updater/cmd_flash.c b/tools/updater/cmd_flash.c
deleted file mode 100644 (file)
index 3a604d0..0000000
+++ /dev/null
@@ -1,401 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- * FLASH support
- */
-#include <common.h>
-#include <command.h>
-#include <flash.h>
-
-#if defined(CONFIG_CMD_FLASH)
-
-extern flash_info_t flash_info[];      /* info for FLASH chips */
-
-/*
- * The user interface starts numbering for Flash banks with 1
- * for historical reasons.
- */
-
-/*
- * this routine looks for an abbreviated flash range specification.
- * the syntax is B:SF[-SL], where B is the bank number, SF is the first
- * sector to erase, and SL is the last sector to erase (defaults to SF).
- * bank numbers start at 1 to be consistent with other specs, sector numbers
- * start at zero.
- *
- * returns:    1       - correct spec; *pinfo, *psf and *psl are
- *                       set appropriately
- *             0       - doesn't look like an abbreviated spec
- *             -1      - looks like an abbreviated spec, but got
- *                       a parsing error, a number out of range,
- *                       or an invalid flash bank.
- */
-static int
-abbrev_spec(char *str, flash_info_t **pinfo, int *psf, int *psl)
-{
-    flash_info_t *fp;
-    int bank, first, last;
-    char *p, *ep;
-
-    if ((p = strchr(str, ':')) == NULL)
-       return 0;
-    *p++ = '\0';
-
-    bank = simple_strtoul(str, &ep, 10);
-    if (ep == str || *ep != '\0' ||
-      bank < 1 || bank > CONFIG_SYS_MAX_FLASH_BANKS ||
-      (fp = &flash_info[bank - 1])->flash_id == FLASH_UNKNOWN)
-       return -1;
-
-    str = p;
-    if ((p = strchr(str, '-')) != NULL)
-       *p++ = '\0';
-
-    first = simple_strtoul(str, &ep, 10);
-    if (ep == str || *ep != '\0' || first >= fp->sector_count)
-       return -1;
-
-    if (p != NULL) {
-       last = simple_strtoul(p, &ep, 10);
-       if (ep == p || *ep != '\0' ||
-         last < first || last >= fp->sector_count)
-           return -1;
-    }
-    else
-       last = first;
-
-    *pinfo = fp;
-    *psf = first;
-    *psl = last;
-
-    return 1;
-}
-int do_flinfo (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
-{
-       ulong bank;
-
-       if (argc == 1) {        /* print info for all FLASH banks */
-               for (bank=0; bank <CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
-                       printf ("\nBank # %ld: ", bank+1);
-
-                       flash_print_info (&flash_info[bank]);
-               }
-               return 0;
-       }
-
-       bank = simple_strtoul(argv[1], NULL, 16);
-       if ((bank < 1) || (bank > CONFIG_SYS_MAX_FLASH_BANKS)) {
-               printf ("Only FLASH Banks # 1 ... # %d supported\n",
-                       CONFIG_SYS_MAX_FLASH_BANKS);
-               return 1;
-       }
-       printf ("\nBank # %ld: ", bank);
-       flash_print_info (&flash_info[bank-1]);
-       return 0;
-}
-int do_flerase(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
-{
-       flash_info_t *info;
-       ulong bank, addr_first, addr_last;
-       int n, sect_first, sect_last;
-       int rcode = 0;
-
-       if (argc < 2)
-               return cmd_usage(cmdtp);
-
-       if (strcmp(argv[1], "all") == 0) {
-               for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
-                       printf ("Erase Flash Bank # %ld ", bank);
-                       info = &flash_info[bank-1];
-                       rcode = flash_erase (info, 0, info->sector_count-1);
-               }
-               return rcode;
-       }
-
-       if ((n = abbrev_spec(argv[1], &info, &sect_first, &sect_last)) != 0) {
-               if (n < 0) {
-                       printf("Bad sector specification\n");
-                       return 1;
-               }
-               printf ("Erase Flash Sectors %d-%d in Bank # %d ",
-                       sect_first, sect_last, (info-flash_info)+1);
-               rcode = flash_erase(info, sect_first, sect_last);
-               return rcode;
-       }
-
-       if (argc != 3)
-               return cmd_usage(cmdtp);
-
-       if (strcmp(argv[1], "bank") == 0) {
-               bank = simple_strtoul(argv[2], NULL, 16);
-               if ((bank < 1) || (bank > CONFIG_SYS_MAX_FLASH_BANKS)) {
-                       printf ("Only FLASH Banks # 1 ... # %d supported\n",
-                               CONFIG_SYS_MAX_FLASH_BANKS);
-                       return 1;
-               }
-               printf ("Erase Flash Bank # %ld ", bank);
-               info = &flash_info[bank-1];
-               rcode = flash_erase (info, 0, info->sector_count-1);
-               return rcode;
-       }
-
-       addr_first = simple_strtoul(argv[1], NULL, 16);
-       addr_last  = simple_strtoul(argv[2], NULL, 16);
-
-       if (addr_first >= addr_last)
-               return cmd_usage(cmdtp);
-
-       printf ("Erase Flash from 0x%08lx to 0x%08lx ", addr_first, addr_last);
-       rcode = flash_sect_erase(addr_first, addr_last);
-       return rcode;
-}
-
-int flash_sect_erase (ulong addr_first, ulong addr_last)
-{
-       flash_info_t *info;
-       ulong bank;
-       int s_first, s_last;
-       int erased;
-       int rcode = 0;
-
-       erased = 0;
-
-       for (bank=0,info = &flash_info[0]; bank < CONFIG_SYS_MAX_FLASH_BANKS; ++bank, ++info) {
-               ulong b_end;
-               int sect;
-
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       continue;
-               }
-
-               b_end = info->start[0] + info->size - 1; /* bank end addr */
-
-               s_first = -1;           /* first sector to erase        */
-               s_last  = -1;           /* last  sector to erase        */
-
-               for (sect=0; sect < info->sector_count; ++sect) {
-                       ulong end;              /* last address in current sect */
-                       short s_end;
-
-                       s_end = info->sector_count - 1;
-
-                       end = (sect == s_end) ? b_end : info->start[sect + 1] - 1;
-
-                       if (addr_first > end)
-                               continue;
-                       if (addr_last < info->start[sect])
-                               continue;
-
-                       if (addr_first == info->start[sect]) {
-                               s_first = sect;
-                       }
-                       if (addr_last  == end) {
-                               s_last  = sect;
-                       }
-               }
-               if (s_first>=0 && s_first<=s_last) {
-                       erased += s_last - s_first + 1;
-                       rcode = flash_erase (info, s_first, s_last);
-               }
-       }
-       if (erased) {
-           /*  printf ("Erased %d sectors\n", erased); */
-       } else {
-               printf ("Error: start and/or end address"
-                       " not on sector boundary\n");
-               rcode = 1;
-       }
-       return rcode;
-}
-
-
-int do_protect(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
-{
-       flash_info_t *info;
-       ulong bank, addr_first, addr_last;
-       int i, p, n, sect_first, sect_last;
-       int rcode = 0;
-
-       if (argc < 3)
-               return cmd_usage(cmdtp);
-
-       if (strcmp(argv[1], "off") == 0)
-               p = 0;
-       else if (strcmp(argv[1], "on") == 0)
-               p = 1;
-       else
-               return cmd_usage(cmdtp);
-
-       if (strcmp(argv[2], "all") == 0) {
-               for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
-                       info = &flash_info[bank-1];
-                       if (info->flash_id == FLASH_UNKNOWN) {
-                               continue;
-                       }
-                       /*printf ("%sProtect Flash Bank # %ld\n", */
-                       /*      p ? "" : "Un-", bank); */
-
-                       for (i=0; i<info->sector_count; ++i) {
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-                               if (flash_real_protect(info, i, p))
-                                       rcode = 1;
-                               putc ('.');
-#else
-                               info->protect[i] = p;
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-                       }
-               }
-
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-               if (!rcode) puts (" done\n");
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-
-               return rcode;
-       }
-
-       if ((n = abbrev_spec(argv[2], &info, &sect_first, &sect_last)) != 0) {
-               if (n < 0) {
-                       printf("Bad sector specification\n");
-                       return 1;
-               }
-               /*printf("%sProtect Flash Sectors %d-%d in Bank # %d\n", */
-               /*      p ? "" : "Un-", sect_first, sect_last, */
-               /*      (info-flash_info)+1); */
-               for (i = sect_first; i <= sect_last; i++) {
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-                       if (flash_real_protect(info, i, p))
-                               rcode =  1;
-                       putc ('.');
-#else
-                       info->protect[i] = p;
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-               }
-
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-               if (!rcode) puts (" done\n");
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-
-               return rcode;
-       }
-
-       if (argc != 4)
-               return cmd_usage(cmdtp);
-
-       if (strcmp(argv[2], "bank") == 0) {
-               bank = simple_strtoul(argv[3], NULL, 16);
-               if ((bank < 1) || (bank > CONFIG_SYS_MAX_FLASH_BANKS)) {
-                       printf ("Only FLASH Banks # 1 ... # %d supported\n",
-                               CONFIG_SYS_MAX_FLASH_BANKS);
-                       return 1;
-               }
-               printf ("%sProtect Flash Bank # %ld\n",
-                       p ? "" : "Un-", bank);
-               info = &flash_info[bank-1];
-
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("missing or unknown FLASH type\n");
-                       return 1;
-               }
-               for (i=0; i<info->sector_count; ++i) {
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-                       if (flash_real_protect(info, i, p))
-                               rcode =  1;
-                       putc ('.');
-#else
-                       info->protect[i] = p;
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-               }
-
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-               if (!rcode)
-                       puts(" done\n");
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-
-               return rcode;
-       }
-
-       addr_first = simple_strtoul(argv[2], NULL, 16);
-       addr_last  = simple_strtoul(argv[3], NULL, 16);
-
-       if (addr_first >= addr_last)
-               return cmd_usage(cmdtp);
-
-       return flash_sect_protect (p, addr_first, addr_last);
-}
-int flash_sect_protect (int p, ulong addr_first, ulong addr_last)
-{
-       flash_info_t *info;
-       ulong bank;
-       int s_first, s_last;
-       int protected, i;
-       int rcode = 0;
-
-       protected = 0;
-
-       for (bank=0,info = &flash_info[0]; bank < CONFIG_SYS_MAX_FLASH_BANKS; ++bank, ++info) {
-               ulong b_end;
-               int sect;
-
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       continue;
-               }
-
-               b_end = info->start[0] + info->size - 1; /* bank end addr */
-
-               s_first = -1;           /* first sector to erase        */
-               s_last  = -1;           /* last  sector to erase        */
-
-               for (sect=0; sect < info->sector_count; ++sect) {
-                       ulong end;              /* last address in current sect */
-                       short s_end;
-
-                       s_end = info->sector_count - 1;
-
-                       end = (sect == s_end) ? b_end : info->start[sect + 1] - 1;
-
-                       if (addr_first > end)
-                               continue;
-                       if (addr_last < info->start[sect])
-                               continue;
-
-                       if (addr_first == info->start[sect]) {
-                               s_first = sect;
-                       }
-                       if (addr_last  == end) {
-                               s_last  = sect;
-                       }
-               }
-               if (s_first>=0 && s_first<=s_last) {
-                       protected += s_last - s_first + 1;
-                       for (i=s_first; i<=s_last; ++i) {
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-                               if (flash_real_protect(info, i, p))
-                                       rcode = 1;
-                               putc ('.');
-#else
-                               info->protect[i] = p;
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-                       }
-               }
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-               if (!rcode) putc ('\n');
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-
-       }
-       if (protected) {
-           /*  printf ("%sProtected %d sectors\n", */
-           /*  p ? "" : "Un-", protected); */
-       } else {
-           printf ("Error: start and/or end address"
-                       " not on sector boundary\n");
-               rcode = 1;
-       }
-       return rcode;
-}
-
-#endif
diff --git a/tools/updater/ctype.c b/tools/updater/ctype.c
deleted file mode 100644 (file)
index 96fa9ed..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * (C) Copyright 2000
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-/*
- *  linux/lib/ctype.c
- *
- *  Copyright (C) 1991, 1992  Linus Torvalds
- */
-
-#include <linux/ctype.h>
-
-unsigned char _ctype[] = {
-_C,_C,_C,_C,_C,_C,_C,_C,                       /* 0-7 */
-_C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C,                /* 8-15 */
-_C,_C,_C,_C,_C,_C,_C,_C,                       /* 16-23 */
-_C,_C,_C,_C,_C,_C,_C,_C,                       /* 24-31 */
-_S|_SP,_P,_P,_P,_P,_P,_P,_P,                   /* 32-39 */
-_P,_P,_P,_P,_P,_P,_P,_P,                       /* 40-47 */
-_D,_D,_D,_D,_D,_D,_D,_D,                       /* 48-55 */
-_D,_D,_P,_P,_P,_P,_P,_P,                       /* 56-63 */
-_P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U,     /* 64-71 */
-_U,_U,_U,_U,_U,_U,_U,_U,                       /* 72-79 */
-_U,_U,_U,_U,_U,_U,_U,_U,                       /* 80-87 */
-_U,_U,_U,_P,_P,_P,_P,_P,                       /* 88-95 */
-_P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L,     /* 96-103 */
-_L,_L,_L,_L,_L,_L,_L,_L,                       /* 104-111 */
-_L,_L,_L,_L,_L,_L,_L,_L,                       /* 112-119 */
-_L,_L,_L,_P,_P,_P,_P,_C,                       /* 120-127 */
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,               /* 128-143 */
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,               /* 144-159 */
-_S|_SP,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,   /* 160-175 */
-_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,       /* 176-191 */
-_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,       /* 192-207 */
-_U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L,       /* 208-223 */
-_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,       /* 224-239 */
-_L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L};      /* 240-255 */
diff --git a/tools/updater/dummy.c b/tools/updater/dummy.c
deleted file mode 100644 (file)
index 9fe5ac1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-volatile int __dummy = 0xDEADBEEF;
diff --git a/tools/updater/flash.c b/tools/updater/flash.c
deleted file mode 100644 (file)
index 5388872..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * (C) Copyright 2000-2006
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <flash.h>
-
-extern flash_info_t  flash_info[]; /* info for FLASH chips */
-
-/*-----------------------------------------------------------------------
- * Functions
- */
-
-/*-----------------------------------------------------------------------
- * Set protection status for monitor sectors
- *
- * The monitor is always located in the _first_ Flash bank.
- * If necessary you have to map the second bank at lower addresses.
- */
-void
-flash_protect (int flag, ulong from, ulong to, flash_info_t *info)
-{
-       ulong b_end = info->start[0] + info->size - 1;  /* bank end address */
-       short s_end = info->sector_count - 1;   /* index of last sector */
-       int i;
-
-       /* Do nothing if input data is bad. */
-       if (info->sector_count == 0 || info->size == 0 || to < from) {
-               return;
-       }
-
-       /* There is nothing to do if we have no data about the flash
-        * or the protect range and flash range don't overlap.
-        */
-       if (info->flash_id == FLASH_UNKNOWN ||
-           to < info->start[0] || from > b_end) {
-               return;
-       }
-
-       for (i=0; i<info->sector_count; ++i) {
-               ulong end;              /* last address in current sect */
-
-               end = (i == s_end) ? b_end : info->start[i + 1] - 1;
-
-               /* Update protection if any part of the sector
-                * is in the specified range.
-                */
-               if (from <= end && to >= info->start[i]) {
-                       if (flag & FLAG_PROTECT_CLEAR) {
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-                               flash_real_protect(info, i, 0);
-#else
-                               info->protect[i] = 0;
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-                       }
-                       else if (flag & FLAG_PROTECT_SET) {
-#if defined(CONFIG_SYS_FLASH_PROTECTION)
-                               flash_real_protect(info, i, 1);
-#else
-                               info->protect[i] = 1;
-#endif /* CONFIG_SYS_FLASH_PROTECTION */
-                       }
-               }
-       }
-}
-
-/*-----------------------------------------------------------------------
- */
-
-flash_info_t *
-addr2info (ulong addr)
-{
-#ifndef CONFIG_SPD823TS
-       flash_info_t *info;
-       int i;
-
-       for (i=0, info = &flash_info[0]; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
-               if (info->flash_id != FLASH_UNKNOWN &&
-                   addr >= info->start[0] &&
-                   /* WARNING - The '- 1' is needed if the flash
-                    * is at the end of the address space, since
-                    * info->start[0] + info->size wraps back to 0.
-                    * Please don't change this unless you understand this.
-                    */
-                   addr <= info->start[0] + info->size - 1) {
-                       return (info);
-               }
-       }
-#endif /* CONFIG_SPD823TS */
-
-       return (NULL);
-}
-
-/*-----------------------------------------------------------------------
- * Copy memory to flash.
- * Make sure all target addresses are within Flash bounds,
- * and no protected sectors are hit.
- * Returns:
- * ERR_OK          0 - OK
- * ERR_TIMOUT      1 - write timeout
- * ERR_NOT_ERASED  2 - Flash not erased
- * ERR_PROTECTED   4 - target range includes protected sectors
- * ERR_INVAL       8 - target address not in Flash memory
- * ERR_ALIGN       16 - target address not aligned on boundary
- *                     (only some targets require alignment)
- */
-int
-flash_write (char *src, ulong addr, ulong cnt)
-{
-#ifdef CONFIG_SPD823TS
-       return (ERR_TIMOUT);    /* any other error codes are possible as well */
-#else
-       int i;
-       ulong         end        = addr + cnt - 1;
-       flash_info_t *info_first = addr2info (addr);
-       flash_info_t *info_last  = addr2info (end );
-       flash_info_t *info;
-       int j;
-
-       if (cnt == 0) {
-               return (ERR_OK);
-       }
-
-       if (!info_first || !info_last) {
-               return (ERR_INVAL);
-       }
-
-       for (info = info_first; info <= info_last; ++info) {
-               ulong b_end = info->start[0] + info->size;      /* bank end addr */
-               short s_end = info->sector_count - 1;
-               for (i=0; i<info->sector_count; ++i) {
-                       ulong e_addr = (i == s_end) ? b_end : info->start[i + 1];
-
-                       if ((end >= info->start[i]) && (addr < e_addr) &&
-                           (info->protect[i] != 0) ) {
-                               return (ERR_PROTECTED);
-                       }
-               }
-       }
-
-       printf("\rWriting ");
-       for (j=0; j<20; j++) putc(177);
-       printf("\rWriting ");
-
-       /* finally write data to flash */
-       for (info = info_first; info <= info_last && cnt>0; ++info) {
-               ulong len;
-
-               len = info->start[0] + info->size - addr;
-               if (len > cnt)
-                       len = cnt;
-
-               if ((i = write_buff(info, src, addr, len)) != 0) {
-                       return (i);
-               }
-               cnt  -= len;
-               addr += len;
-               src  += len;
-       }
-       return (ERR_OK);
-#endif /* CONFIG_SPD823TS */
-}
-
-/*-----------------------------------------------------------------------
- */
diff --git a/tools/updater/flash_hw.c b/tools/updater/flash_hw.c
deleted file mode 100644 (file)
index 54a910b..0000000
+++ /dev/null
@@ -1,643 +0,0 @@
-/*
- * (C) Copyright 2001
- * Josh Huber <huber@mclx.com>, Mission Critical Linux, Inc.
- *
- * (C) Copyright 2002
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-
-#include <common.h>
-#include <flash.h>
-#include <asm/io.h>
-#include <memio.h>
-
-/*---------------------------------------------------------------------*/
-#undef DEBUG_FLASH
-
-#ifdef DEBUG_FLASH
-#define DEBUGF(fmt,args...) printf(fmt ,##args)
-#else
-#define DEBUGF(fmt,args...)
-#endif
-/*---------------------------------------------------------------------*/
-
-flash_info_t   flash_info[];
-
-static ulong flash_get_size (ulong addr, flash_info_t *info);
-static int flash_get_offsets (ulong base, flash_info_t *info);
-static int write_word (flash_info_t *info, ulong dest, ulong data);
-static void flash_reset (ulong addr);
-
-int flash_xd_nest;
-
-static void flash_to_xd(void)
-{
-    unsigned char x;
-
-    flash_xd_nest ++;
-
-    if (flash_xd_nest == 1)
-    {
-       DEBUGF("Flash on XD\n");
-       x = pci_read_cfg_byte(0, 0, 0x74);
-       pci_write_cfg_byte(0, 0, 0x74, x|1);
-    }
-}
-
-static void flash_to_mem(void)
-{
-    unsigned char x;
-
-    flash_xd_nest --;
-
-    if (flash_xd_nest == 0)
-    {
-       DEBUGF("Flash on memory bus\n");
-       x = pci_read_cfg_byte(0, 0, 0x74);
-       pci_write_cfg_byte(0, 0, 0x74, x&0xFE);
-    }
-}
-
-unsigned long flash_init_old(void)
-{
-    int i;
-
-    for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++)
-    {
-       flash_info[i].flash_id = FLASH_UNKNOWN;
-       flash_info[i].sector_count = 0;
-       flash_info[i].size = 0;
-    }
-
-
-    return 1;
-}
-
-unsigned long flash_init (void)
-{
-       unsigned int i;
-       unsigned long flash_size = 0;
-
-       flash_xd_nest = 0;
-
-       flash_to_xd();
-
-       /* Init: no FLASHes known */
-       for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
-               flash_info[i].flash_id = FLASH_UNKNOWN;
-               flash_info[i].sector_count = 0;
-               flash_info[i].size = 0;
-       }
-
-       DEBUGF("\n## Get flash size @ 0x%08x\n", CONFIG_SYS_FLASH_BASE);
-
-       flash_size = flash_get_size (CONFIG_SYS_FLASH_BASE, flash_info);
-
-       DEBUGF("## Flash bank size: %08lx\n", flash_size);
-
-       if (flash_size) {
-#if CONFIG_SYS_MONITOR_BASE >= CONFIG_SYS_FLASH_BASE && \
-    CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_MAX_SIZE
-               /* monitor protection ON by default */
-               flash_protect(FLAG_PROTECT_SET,
-                             CONFIG_SYS_MONITOR_BASE,
-                             CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN - 1,
-                             &flash_info[0]);
-#endif
-
-#ifdef CONFIG_ENV_IS_IN_FLASH
-               /* ENV protection ON by default */
-               flash_protect(FLAG_PROTECT_SET,
-                             CONFIG_ENV_ADDR,
-                             CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1,
-                             &flash_info[0]);
-#endif
-
-       } else {
-               printf ("Warning: the BOOT Flash is not initialised !");
-       }
-
-       flash_to_mem();
-
-       return flash_size;
-}
-
-/*
- * The following code cannot be run from FLASH!
- */
-static ulong flash_get_size (ulong addr, flash_info_t *info)
-{
-       short i;
-       uchar value;
-       uchar *x = (uchar *)addr;
-
-       flash_to_xd();
-
-       /* Write auto select command: read Manufacturer ID */
-       x[0x0555] =  0xAA;
-       __asm__ volatile ("sync\n eieio");
-       x[0x02AA] =  0x55;
-       __asm__ volatile ("sync\n eieio");
-       x[0x0555] =  0x90;
-       __asm__ volatile ("sync\n eieio");
-
-       value = x[0];
-       __asm__ volatile ("sync\n eieio");
-
-       DEBUGF("Manuf. ID @ 0x%08lx: 0x%08x\n", (ulong)addr, value);
-
-       switch (value | (value << 16)) {
-               case AMD_MANUFACT:
-                       info->flash_id = FLASH_MAN_AMD;
-                       break;
-
-               case FUJ_MANUFACT:
-                       info->flash_id = FLASH_MAN_FUJ;
-                       break;
-
-               case STM_MANUFACT:
-                       info->flash_id = FLASH_MAN_STM;
-                       break;
-
-               default:
-                       info->flash_id = FLASH_UNKNOWN;
-                       info->sector_count = 0;
-                       info->size = 0;
-                       flash_reset (addr);
-                       return 0;
-       }
-
-       value = x[1];
-       __asm__ volatile ("sync\n eieio");
-
-       DEBUGF("Device ID @ 0x%08lx: 0x%08x\n", addr+1, value);
-
-       switch (value) {
-               case AMD_ID_F040B:
-                       DEBUGF("Am29F040B\n");
-                       info->flash_id += FLASH_AM040;
-                       info->sector_count = 8;
-                       info->size = 0x00080000;
-                       break;                  /* => 512 kB            */
-
-               case AMD_ID_LV040B:
-                       DEBUGF("Am29LV040B\n");
-                       info->flash_id += FLASH_AM040;
-                       info->sector_count = 8;
-                       info->size = 0x00080000;
-                       break;                  /* => 512 kB            */
-
-               case AMD_ID_LV400T:
-                       DEBUGF("Am29LV400T\n");
-                       info->flash_id += FLASH_AM400T;
-                       info->sector_count = 11;
-                       info->size = 0x00100000;
-                       break;                  /* => 1 MB              */
-
-               case AMD_ID_LV400B:
-                       DEBUGF("Am29LV400B\n");
-                       info->flash_id += FLASH_AM400B;
-                       info->sector_count = 11;
-                       info->size = 0x00100000;
-                       break;                  /* => 1 MB              */
-
-               case AMD_ID_LV800T:
-                       DEBUGF("Am29LV800T\n");
-                       info->flash_id += FLASH_AM800T;
-                       info->sector_count = 19;
-                       info->size = 0x00200000;
-                       break;                  /* => 2 MB              */
-
-               case AMD_ID_LV800B:
-                       DEBUGF("Am29LV400B\n");
-                       info->flash_id += FLASH_AM800B;
-                       info->sector_count = 19;
-                       info->size = 0x00200000;
-                       break;                  /* => 2 MB              */
-
-               case AMD_ID_LV160T:
-                       DEBUGF("Am29LV160T\n");
-                       info->flash_id += FLASH_AM160T;
-                       info->sector_count = 35;
-                       info->size = 0x00400000;
-                       break;                  /* => 4 MB              */
-
-               case AMD_ID_LV160B:
-                       DEBUGF("Am29LV160B\n");
-                       info->flash_id += FLASH_AM160B;
-                       info->sector_count = 35;
-                       info->size = 0x00400000;
-                       break;                  /* => 4 MB              */
-
-               case AMD_ID_LV320T:
-                       DEBUGF("Am29LV320T\n");
-                       info->flash_id += FLASH_AM320T;
-                       info->sector_count = 67;
-                       info->size = 0x00800000;
-                       break;                  /* => 8 MB              */
-
-#if 0
-               /* Has the same ID as AMD_ID_LV320T, to be fixed */
-               case AMD_ID_LV320B:
-                       DEBUGF("Am29LV320B\n");
-                       info->flash_id += FLASH_AM320B;
-                       info->sector_count = 67;
-                       info->size = 0x00800000;
-                       break;                  /* => 8 MB              */
-#endif
-
-               case AMD_ID_LV033C:
-                       DEBUGF("Am29LV033C\n");
-                       info->flash_id += FLASH_AM033C;
-                       info->sector_count = 64;
-                       info->size = 0x01000000;
-                       break;                  /* => 16Mb              */
-
-               case STM_ID_F040B:
-                       DEBUGF("M29F040B\n");
-                       info->flash_id += FLASH_AM040;
-                       info->sector_count = 8;
-                       info->size = 0x00080000;
-                       break;                  /* => 512 kB            */
-
-               default:
-                       info->flash_id = FLASH_UNKNOWN;
-                       flash_reset (addr);
-                       flash_to_mem();
-                       return (0);             /* => no or unknown flash */
-
-       }
-
-       if (info->sector_count > CONFIG_SYS_MAX_FLASH_SECT) {
-               printf ("** ERROR: sector count %d > max (%d) **\n",
-                       info->sector_count, CONFIG_SYS_MAX_FLASH_SECT);
-               info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
-       }
-
-       if (! flash_get_offsets (addr, info)) {
-               flash_reset (addr);
-               flash_to_mem();
-               return 0;
-       }
-
-       /* check for protected sectors */
-       for (i = 0; i < info->sector_count; i++) {
-               /* read sector protection at sector address, (A7 .. A0) = 0x02 */
-               /* D0 = 1 if protected */
-               value = in8(info->start[i] + 2);
-               iobarrier_rw();
-               info->protect[i] = (value & 1) != 0;
-       }
-
-       /*
-        * Reset bank to read mode
-        */
-       flash_reset (addr);
-
-       flash_to_mem();
-
-       return (info->size);
-}
-
-static int flash_get_offsets (ulong base, flash_info_t *info)
-{
-       unsigned int i;
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-               case FLASH_AM040:
-                       /* set sector offsets for uniform sector type   */
-                       for (i = 0; i < info->sector_count; i++) {
-                               info->start[i] = base + i * info->size /
-                                                           info->sector_count;
-                       }
-                       break;
-               default:
-                       return 0;
-       }
-
-       return 1;
-}
-
-int flash_erase (flash_info_t *info, int s_first, int s_last)
-{
-       volatile ulong addr = info->start[0];
-       int flag, prot, sect, l_sect;
-       ulong start, now, last;
-
-       flash_to_xd();
-
-       if (s_first < 0 || s_first > s_last) {
-               if (info->flash_id == FLASH_UNKNOWN) {
-                       printf ("- missing\n");
-               } else {
-                       printf ("- no sectors to erase\n");
-               }
-               flash_to_mem();
-               return 1;
-       }
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("Can't erase unknown flash type %08lx - aborted\n",
-                       info->flash_id);
-               flash_to_mem();
-               return 1;
-       }
-
-       prot = 0;
-       for (sect=s_first; sect<=s_last; ++sect) {
-               if (info->protect[sect]) {
-                       prot++;
-               }
-       }
-
-       if (prot) {
-               printf ("- Warning: %d protected sectors will not be erased!\n",
-                       prot);
-       } else {
-               printf ("");
-       }
-
-       l_sect = -1;
-
-       /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts();
-
-       out8(addr + 0x555, 0xAA);
-       iobarrier_rw();
-       out8(addr + 0x2AA, 0x55);
-       iobarrier_rw();
-       out8(addr + 0x555, 0x80);
-       iobarrier_rw();
-       out8(addr + 0x555, 0xAA);
-       iobarrier_rw();
-       out8(addr + 0x2AA, 0x55);
-       iobarrier_rw();
-
-       /* Start erase on unprotected sectors */
-       for (sect = s_first; sect<=s_last; sect++) {
-               if (info->protect[sect] == 0) { /* not protected */
-                       addr = info->start[sect];
-                       out8(addr, 0x30);
-                       iobarrier_rw();
-                       l_sect = sect;
-               }
-       }
-
-       /* re-enable interrupts if necessary */
-       if (flag)
-               enable_interrupts();
-
-       /* wait at least 80us - let's wait 1 ms */
-       udelay (1000);
-
-       /*
-        * We wait for the last triggered sector
-        */
-       if (l_sect < 0)
-               goto DONE;
-
-       start = get_timer (0);
-       last  = start;
-       addr = info->start[l_sect];
-
-       DEBUGF ("Start erase timeout: %d\n", CONFIG_SYS_FLASH_ERASE_TOUT);
-
-       while ((in8(addr) & 0x80) != 0x80) {
-               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
-                       printf ("Timeout\n");
-                       flash_reset (info->start[0]);
-                       flash_to_mem();
-                       return 1;
-               }
-               /* show that we're waiting */
-               if ((now - last) > 1000) {      /* every second */
-                       putc ('.');
-                       last = now;
-               }
-               iobarrier_rw();
-       }
-
-DONE:
-       /* reset to read mode */
-       flash_reset (info->start[0]);
-       flash_to_mem();
-
-       printf (" done\n");
-       return 0;
-}
-
-/*
- * Copy memory to flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
-{
-       ulong cp, wp, data;
-       int i, l, rc;
-       ulong out_cnt = 0;
-
-       flash_to_xd();
-
-       wp = (addr & ~3);       /* get lower word aligned address */
-
-       /*
-        * handle unaligned start bytes
-        */
-       if ((l = addr - wp) != 0) {
-               data = 0;
-               for (i=0, cp=wp; i<l; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-               for (; i<4 && cnt>0; ++i) {
-                       data = (data << 8) | *src++;
-                       --cnt;
-                       ++cp;
-               }
-               for (; cnt==0 && i<4; ++i, ++cp) {
-                       data = (data << 8) | (*(uchar *)cp);
-               }
-
-               if ((rc = write_word(info, wp, data)) != 0) {
-                       flash_to_mem();
-                       return (rc);
-               }
-               wp += 4;
-       }
-
-       putc(219);
-
-       /*
-        * handle word aligned part
-        */
-       while (cnt >= 4) {
-           if (out_cnt>26214)
-           {
-               putc(219);
-               out_cnt = 0;
-           }
-           data = 0;
-           for (i=0; i<4; ++i) {
-               data = (data << 8) | *src++;
-           }
-           if ((rc = write_word(info, wp, data)) != 0) {
-               flash_to_mem();
-               return (rc);
-           }
-           wp  += 4;
-           cnt -= 4;
-           out_cnt += 4;
-       }
-
-       if (cnt == 0) {
-               flash_to_mem();
-               return (0);
-       }
-
-       /*
-        * handle unaligned tail bytes
-        */
-       data = 0;
-       for (i=0, cp=wp; i<4 && cnt>0; ++i, ++cp) {
-               data = (data << 8) | *src++;
-               --cnt;
-       }
-       for (; i<4; ++i, ++cp) {
-               data = (data << 8) | (*(uchar *)cp);
-       }
-
-       flash_to_mem();
-       return (write_word(info, wp, data));
-}
-
-/*
- * Write a word to Flash, returns:
- * 0 - OK
- * 1 - write timeout
- * 2 - Flash not erased
- */
-static int write_word (flash_info_t *info, ulong dest, ulong data)
-{
-       volatile ulong addr = info->start[0];
-       ulong start;
-       int i;
-
-       flash_to_xd();
-
-       /* Check if Flash is (sufficiently) erased */
-       if ((in32(dest) & data) != data) {
-               flash_to_mem();
-               return (2);
-       }
-
-       /* write each byte out */
-       for (i = 0; i < 4; i++) {
-               char *data_ch = (char *)&data;
-               int flag = disable_interrupts();
-
-               out8(addr + 0x555, 0xAA);
-               iobarrier_rw();
-               out8(addr + 0x2AA, 0x55);
-               iobarrier_rw();
-               out8(addr + 0x555, 0xA0);
-               iobarrier_rw();
-               out8(dest+i, data_ch[i]);
-               iobarrier_rw();
-
-               /* re-enable interrupts if necessary */
-               if (flag)
-                       enable_interrupts();
-
-               /* data polling for D7 */
-               start = get_timer (0);
-               while ((in8(dest+i) & 0x80) != (data_ch[i] & 0x80)) {
-                       if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
-                               flash_reset (addr);
-                               flash_to_mem();
-                               return (1);
-                       }
-                       iobarrier_rw();
-               }
-       }
-
-       flash_reset (addr);
-       flash_to_mem();
-       return (0);
-}
-
-/*
- * Reset bank to read mode
- */
-static void flash_reset (ulong addr)
-{
-       flash_to_xd();
-       out8(addr, 0xF0);       /* reset bank */
-       iobarrier_rw();
-       flash_to_mem();
-}
-
-void flash_print_info (flash_info_t *info)
-{
-       int i;
-
-       if (info->flash_id == FLASH_UNKNOWN) {
-               printf ("missing or unknown FLASH type\n");
-               return;
-       }
-
-       switch (info->flash_id & FLASH_VENDMASK) {
-       case FLASH_MAN_AMD:     printf ("AMD ");                break;
-       case FLASH_MAN_FUJ:     printf ("FUJITSU ");            break;
-       case FLASH_MAN_BM:      printf ("BRIGHT MICRO ");       break;
-       case FLASH_MAN_STM:     printf ("SGS THOMSON ");        break;
-       default:                printf ("Unknown Vendor ");     break;
-       }
-
-       switch (info->flash_id & FLASH_TYPEMASK) {
-       case FLASH_AM040:       printf ("29F040 or 29LV040 (4 Mbit, uniform sectors)\n");
-                               break;
-       case FLASH_AM400B:      printf ("AM29LV400B (4 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM400T:      printf ("AM29LV400T (4 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM800B:      printf ("AM29LV800B (8 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM800T:      printf ("AM29LV800T (8 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM160B:      printf ("AM29LV160B (16 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM160T:      printf ("AM29LV160T (16 Mbit, top boot sector)\n");
-                               break;
-       case FLASH_AM320B:      printf ("AM29LV320B (32 Mbit, bottom boot sect)\n");
-                               break;
-       case FLASH_AM320T:      printf ("AM29LV320T (32 Mbit, top boot sector)\n");
-                               break;
-       default:                printf ("Unknown Chip Type\n");
-                               break;
-       }
-
-       if (info->size % 0x100000 == 0) {
-               printf ("  Size: %ld MB in %d Sectors\n",
-                       info->size / 0x100000, info->sector_count);
-       } else if (info->size % 0x400 == 0) {
-               printf ("  Size: %ld KB in %d Sectors\n",
-                       info->size / 0x400, info->sector_count);
-       } else {
-               printf ("  Size: %ld B in %d Sectors\n",
-                       info->size, info->sector_count);
-       }
-
-       printf ("  Sector Start Addresses:");
-       for (i=0; i<info->sector_count; ++i) {
-               if ((i % 5) == 0)
-                       printf ("\n   ");
-               printf (" %08lX%s",
-                       info->start[i],
-                       info->protect[i] ? " (RO)" : "     "
-               );
-       }
-       printf ("\n");
-}
diff --git a/tools/updater/junk b/tools/updater/junk
deleted file mode 100644 (file)
index f73285a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-................................................................................................................................................................................................................................................................
\ No newline at end of file
diff --git a/tools/updater/ppcstring.S b/tools/updater/ppcstring.S
deleted file mode 100644 (file)
index 8152ac9..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * String handling functions for PowerPC.
- *
- * Copyright (C) 1996 Paul Mackerras.
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-#include <ppc_asm.tmpl>
-#include <asm/errno.h>
-
-       .globl  strcpy
-strcpy:
-       addi    r5,r3,-1
-       addi    r4,r4,-1
-1:     lbzu    r0,1(r4)
-       cmpwi   0,r0,0
-       stbu    r0,1(r5)
-       bne     1b
-       blr
-
-       .globl  strncpy
-strncpy:
-       cmpwi   0,r5,0
-       beqlr
-       mtctr   r5
-       addi    r6,r3,-1
-       addi    r4,r4,-1
-1:     lbzu    r0,1(r4)
-       cmpwi   0,r0,0
-       stbu    r0,1(r6)
-       bdnzf   2,1b            /* dec ctr, branch if ctr != 0 && !cr0.eq */
-       blr
-
-       .globl  strcat
-strcat:
-       addi    r5,r3,-1
-       addi    r4,r4,-1
-1:     lbzu    r0,1(r5)
-       cmpwi   0,r0,0
-       bne     1b
-       addi    r5,r5,-1
-1:     lbzu    r0,1(r4)
-       cmpwi   0,r0,0
-       stbu    r0,1(r5)
-       bne     1b
-       blr
-
-       .globl  strcmp
-strcmp:
-       addi    r5,r3,-1
-       addi    r4,r4,-1
-1:     lbzu    r3,1(r5)
-       cmpwi   1,r3,0
-       lbzu    r0,1(r4)
-       subf.   r3,r0,r3
-       beqlr   1
-       beq     1b
-       blr
-
-       .globl  strlen
-strlen:
-       addi    r4,r3,-1
-1:     lbzu    r0,1(r4)
-       cmpwi   0,r0,0
-       bne     1b
-       subf    r3,r3,r4
-       blr
-
-       .globl  memset
-memset:
-       rlwimi  r4,r4,8,16,23
-       rlwimi  r4,r4,16,0,15
-       addi    r6,r3,-4
-       cmplwi  0,r5,4
-       blt     7f
-       stwu    r4,4(r6)
-       beqlr
-       andi.   r0,r6,3
-       add     r5,r0,r5
-       subf    r6,r0,r6
-       rlwinm  r0,r5,32-2,2,31
-       mtctr   r0
-       bdz     6f
-1:     stwu    r4,4(r6)
-       bdnz    1b
-6:     andi.   r5,r5,3
-7:     cmpwi   0,r5,0
-       beqlr
-       mtctr   r5
-       addi    r6,r6,3
-8:     stbu    r4,1(r6)
-       bdnz    8b
-       blr
-
-       .globl  bcopy
-bcopy:
-       mr      r6,r3
-       mr      r3,r4
-       mr      r4,r6
-       b       memcpy
-
-       .globl  memmove
-memmove:
-       cmplw   0,r3,r4
-       bgt     backwards_memcpy
-       /* fall through */
-
-       .globl  memcpy
-memcpy:
-       rlwinm. r7,r5,32-3,3,31         /* r0 = r5 >> 3 */
-       addi    r6,r3,-4
-       addi    r4,r4,-4
-       beq     2f                      /* if less than 8 bytes to do */
-       andi.   r0,r6,3                 /* get dest word aligned */
-       mtctr   r7
-       bne     5f
-1:     lwz     r7,4(r4)
-       lwzu    r8,8(r4)
-       stw     r7,4(r6)
-       stwu    r8,8(r6)
-       bdnz    1b
-       andi.   r5,r5,7
-2:     cmplwi  0,r5,4
-       blt     3f
-       lwzu    r0,4(r4)
-       addi    r5,r5,-4
-       stwu    r0,4(r6)
-3:     cmpwi   0,r5,0
-       beqlr
-       mtctr   r5
-       addi    r4,r4,3
-       addi    r6,r6,3
-4:     lbzu    r0,1(r4)
-       stbu    r0,1(r6)
-       bdnz    4b
-       blr
-5:     subfic  r0,r0,4
-       mtctr   r0
-6:     lbz     r7,4(r4)
-       addi    r4,r4,1
-       stb     r7,4(r6)
-       addi    r6,r6,1
-       bdnz    6b
-       subf    r5,r0,r5
-       rlwinm. r7,r5,32-3,3,31
-       beq     2b
-       mtctr   r7
-       b       1b
-
-       .globl  backwards_memcpy
-backwards_memcpy:
-       rlwinm. r7,r5,32-3,3,31         /* r0 = r5 >> 3 */
-       add     r6,r3,r5
-       add     r4,r4,r5
-       beq     2f
-       andi.   r0,r6,3
-       mtctr   r7
-       bne     5f
-1:     lwz     r7,-4(r4)
-       lwzu    r8,-8(r4)
-       stw     r7,-4(r6)
-       stwu    r8,-8(r6)
-       bdnz    1b
-       andi.   r5,r5,7
-2:     cmplwi  0,r5,4
-       blt     3f
-       lwzu    r0,-4(r4)
-       subi    r5,r5,4
-       stwu    r0,-4(r6)
-3:     cmpwi   0,r5,0
-       beqlr
-       mtctr   r5
-4:     lbzu    r0,-1(r4)
-       stbu    r0,-1(r6)
-       bdnz    4b
-       blr
-5:     mtctr   r0
-6:     lbzu    r7,-1(r4)
-       stbu    r7,-1(r6)
-       bdnz    6b
-       subf    r5,r0,r5
-       rlwinm. r7,r5,32-3,3,31
-       beq     2b
-       mtctr   r7
-       b       1b
-
-       .globl  memcmp
-memcmp:
-       cmpwi   0,r5,0
-       ble-    2f
-       mtctr   r5
-       addi    r6,r3,-1
-       addi    r4,r4,-1
-1:     lbzu    r3,1(r6)
-       lbzu    r0,1(r4)
-       subf.   r3,r0,r3
-       bdnzt   2,1b
-       blr
-2:     li      r3,0
-       blr
-
-       .global memchr
-memchr:
-       cmpwi   0,r5,0
-       ble-    2f
-       mtctr   r5
-       addi    r3,r3,-1
-1:     lbzu    r0,1(r3)
-       cmpw    0,r0,r4
-       bdnzf   2,1b
-       beqlr
-2:     li      r3,0
-       blr
diff --git a/tools/updater/string.c b/tools/updater/string.c
deleted file mode 100644 (file)
index 954fb01..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- *  linux/lib/string.c
- *
- *  Copyright (C) 1991, 1992  Linus Torvalds
- */
-
-/*
- * stupid library routines.. The optimized versions should generally be found
- * as inline code in <asm-xx/string.h>
- *
- * These are buggy as well..
- */
-
-#include <linux/types.h>
-#include <linux/string.h>
-#include <malloc.h>
-
-#define __HAVE_ARCH_BCOPY
-#define __HAVE_ARCH_MEMCMP
-#define __HAVE_ARCH_MEMCPY
-#define __HAVE_ARCH_MEMMOVE
-#define __HAVE_ARCH_MEMSET
-#define __HAVE_ARCH_STRCAT
-#define __HAVE_ARCH_STRCMP
-#define __HAVE_ARCH_STRCPY
-#define __HAVE_ARCH_STRLEN
-#define __HAVE_ARCH_STRNCPY
-
-char * ___strtok = NULL;
-
-#ifndef __HAVE_ARCH_STRCPY
-char * strcpy(char * dest,const char *src)
-{
-       char *tmp = dest;
-
-       while ((*dest++ = *src++) != '\0')
-               /* nothing */;
-       return tmp;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRNCPY
-char * strncpy(char * dest,const char *src,size_t count)
-{
-       char *tmp = dest;
-
-       while (count-- && (*dest++ = *src++) != '\0')
-               /* nothing */;
-
-       return tmp;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRCAT
-char * strcat(char * dest, const char * src)
-{
-       char *tmp = dest;
-
-       while (*dest)
-               dest++;
-       while ((*dest++ = *src++) != '\0')
-               ;
-
-       return tmp;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRNCAT
-char * strncat(char *dest, const char *src, size_t count)
-{
-       char *tmp = dest;
-
-       if (count) {
-               while (*dest)
-                       dest++;
-               while ((*dest++ = *src++)) {
-                       if (--count == 0) {
-                               *dest = '\0';
-                               break;
-                       }
-               }
-       }
-
-       return tmp;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRCMP
-int strcmp(const char * cs,const char * ct)
-{
-       register signed char __res;
-
-       while (1) {
-               if ((__res = *cs - *ct++) != 0 || !*cs++)
-                       break;
-       }
-
-       return __res;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRNCMP
-int strncmp(const char * cs,const char * ct,size_t count)
-{
-       register signed char __res = 0;
-
-       while (count) {
-               if ((__res = *cs - *ct++) != 0 || !*cs++)
-                       break;
-               count--;
-       }
-
-       return __res;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRCHR
-char * strchr(const char * s, int c)
-{
-       for(; *s != (char) c; ++s)
-               if (*s == '\0')
-                       return NULL;
-       return (char *) s;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRRCHR
-char * strrchr(const char * s, int c)
-{
-       const char *p = s + strlen(s);
-       do {
-          if (*p == (char)c)
-              return (char *)p;
-       } while (--p >= s);
-       return NULL;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRLEN
-size_t strlen(const char * s)
-{
-       const char *sc;
-
-       for (sc = s; *sc != '\0'; ++sc)
-               /* nothing */;
-       return sc - s;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRNLEN
-size_t strnlen(const char * s, size_t count)
-{
-       const char *sc;
-
-       for (sc = s; count-- && *sc != '\0'; ++sc)
-               /* nothing */;
-       return sc - s;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRDUP
-char * strdup(const char *s)
-{
-       char *new;
-
-       if ((s == NULL) ||
-           ((new = malloc (strlen(s) + 1)) == NULL) ) {
-               return NULL;
-       }
-
-       strcpy (new, s);
-       return new;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRSPN
-size_t strspn(const char *s, const char *accept)
-{
-       const char *p;
-       const char *a;
-       size_t count = 0;
-
-       for (p = s; *p != '\0'; ++p) {
-               for (a = accept; *a != '\0'; ++a) {
-                       if (*p == *a)
-                               break;
-               }
-               if (*a == '\0')
-                       return count;
-               ++count;
-       }
-
-       return count;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRPBRK
-char * strpbrk(const char * cs,const char * ct)
-{
-       const char *sc1,*sc2;
-
-       for( sc1 = cs; *sc1 != '\0'; ++sc1) {
-               for( sc2 = ct; *sc2 != '\0'; ++sc2) {
-                       if (*sc1 == *sc2)
-                               return (char *) sc1;
-               }
-       }
-       return NULL;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRTOK
-char * strtok(char * s,const char * ct)
-{
-       char *sbegin, *send;
-
-       sbegin  = s ? s : ___strtok;
-       if (!sbegin) {
-               return NULL;
-       }
-       sbegin += strspn(sbegin,ct);
-       if (*sbegin == '\0') {
-               ___strtok = NULL;
-               return( NULL );
-       }
-       send = strpbrk( sbegin, ct);
-       if (send && *send != '\0')
-               *send++ = '\0';
-       ___strtok = send;
-       return (sbegin);
-}
-#endif
-
-#ifndef __HAVE_ARCH_MEMSET
-void * memset(void * s,char c,size_t count)
-{
-       char *xs = (char *) s;
-
-       while (count--)
-               *xs++ = c;
-
-       return s;
-}
-#endif
-
-#ifndef __HAVE_ARCH_BCOPY
-char * bcopy(const char * src, char * dest, int count)
-{
-       char *tmp = dest;
-
-       while (count--)
-               *tmp++ = *src++;
-
-       return dest;
-}
-#endif
-
-#ifndef __HAVE_ARCH_MEMCPY
-void * memcpy(void * dest,const void *src,size_t count)
-{
-       char *tmp = (char *) dest, *s = (char *) src;
-
-       while (count--)
-               *tmp++ = *s++;
-
-       return dest;
-}
-#endif
-
-#ifndef __HAVE_ARCH_MEMMOVE
-void * memmove(void * dest,const void *src,size_t count)
-{
-       char *tmp, *s;
-
-       if (dest <= src) {
-               tmp = (char *) dest;
-               s = (char *) src;
-               while (count--)
-                       *tmp++ = *s++;
-               }
-       else {
-               tmp = (char *) dest + count;
-               s = (char *) src + count;
-               while (count--)
-                       *--tmp = *--s;
-               }
-
-       return dest;
-}
-#endif
-
-#ifndef __HAVE_ARCH_MEMCMP
-int memcmp(const void * cs,const void * ct,size_t count)
-{
-       const unsigned char *su1, *su2;
-       signed char res = 0;
-
-       for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--)
-               if ((res = *su1 - *su2) != 0)
-                       break;
-       return res;
-}
-#endif
-
-/*
- * find the first occurrence of byte 'c', or 1 past the area if none
- */
-#ifndef __HAVE_ARCH_MEMSCAN
-void * memscan(void * addr, int c, size_t size)
-{
-       unsigned char * p = (unsigned char *) addr;
-
-       while (size) {
-               if (*p == c)
-                       return (void *) p;
-               p++;
-               size--;
-       }
-       return (void *) p;
-}
-#endif
-
-#ifndef __HAVE_ARCH_STRSTR
-char * strstr(const char * s1,const char * s2)
-{
-       int l1, l2;
-
-       l2 = strlen(s2);
-       if (!l2)
-               return (char *) s1;
-       l1 = strlen(s1);
-       while (l1 >= l2) {
-               l1--;
-               if (!memcmp(s1,s2,l2))
-                       return (char *) s1;
-               s1++;
-       }
-       return NULL;
-}
-#endif
diff --git a/tools/updater/update.c b/tools/updater/update.c
deleted file mode 100644 (file)
index 18f122a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <common.h>
-#include <exports.h>
-
-extern unsigned long __dummy;
-void do_reset (void);
-void do_updater(void);
-
-void _main(void)
-{
-    int i;
-    printf("U-Boot Firmware Updater\n\n\n");
-    printf("****************************************************\n"
-              "*  ATTENTION!! PLEASE READ THIS NOTICE CAREFULLY!  *\n"
-              "****************************************************\n\n"
-              "This program  will update your computer's  firmware.\n"
-              "Do NOT  remove the disk,  reset the  machine,  or do\n"
-              "anything that  might disrupt functionality.  If this\n");
-    printf("Program fails, your computer  might be unusable, and\n"
-              "you will  need to return your  board for reflashing.\n"
-              "If you find this too risky,  remove the diskette and\n"
-              "switch off your  machine now.  Otherwise  press the \n"
-              "SPACE key now to start the process\n\n");
-    do
-    {
-       char x;
-       while (!tstc());
-       x = getc();
-       if (x == ' ') break;
-    } while (1);
-
-    do_updater();
-
-    i = 5;
-
-    printf("\nUpdate done. Please remove diskette.\n");
-    printf("The machine will automatically reset in %d seconds\n", i);
-    printf("You can switch off/reset now when the floppy is removed\n\n");
-
-    while (i)
-    {
-       printf("Resetting in %d\r", i);
-       udelay(1000000);
-       i--;
-    }
-    do_reset();
-    while (1);
-}
-
-void do_updater(void)
-{
-    unsigned long *addr = &__dummy + 65;
-    unsigned long flash_size = flash_init();
-    int rc;
-
-    flash_sect_protect(0, 0xFFF00000, 0xFFF7FFFF);
-    printf("Erasing ");
-    flash_sect_erase(0xFFF00000, 0xFFF7FFFF);
-    printf("Writing ");
-    rc = flash_write((uchar *)addr, 0xFFF00000, 0x7FFFF);
-    if (rc != 0) printf("\nFlashing failed due to error %d\n", rc);
-    else printf("\ndone\n");
-    flash_sect_protect(1, 0xFFF00000, 0xFFF7FFFF);
-}
diff --git a/tools/updater/utils.c b/tools/updater/utils.c
deleted file mode 100644 (file)
index 61a6118..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-#include <common.h>
-#include <asm/processor.h>
-#include <memio.h>
-#include <linux/ctype.h>
-
-static __inline__ unsigned long
-get_msr(void)
-{
-       unsigned long msr;
-
-       asm volatile("mfmsr %0" : "=r" (msr) :);
-       return msr;
-}
-
-static __inline__ void
-set_msr(unsigned long msr)
-{
-       asm volatile("mtmsr %0" : : "r" (msr));
-}
-
-static __inline__ unsigned long
-get_dec(void)
-{
-       unsigned long val;
-
-       asm volatile("mfdec %0" : "=r" (val) :);
-       return val;
-}
-
-
-static __inline__ void
-set_dec(unsigned long val)
-{
-       asm volatile("mtdec %0" : : "r" (val));
-}
-
-
-void
-enable_interrupts(void)
-{
-    set_msr (get_msr() | MSR_EE);
-}
-
-/* returns flag if MSR_EE was set before */
-int
-disable_interrupts(void)
-{
-    ulong msr;
-
-    msr = get_msr();
-    set_msr (msr & ~MSR_EE);
-    return ((msr & MSR_EE) != 0);
-}
-
-u8 in8(u32 port)
-{
-    return in_byte(port);
-}
-
-void out8(u32 port, u8 val)
-{
-    out_byte(port, val);
-}
-
-unsigned long in32(u32 port)
-{
-    return in_long(port);
-}
-
-unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
-{
-       unsigned long result = 0,value;
-
-       if (*cp == '0') {
-               cp++;
-               if ((*cp == 'x') && isxdigit(cp[1])) {
-                       base = 16;
-                       cp++;
-               }
-               if (!base) {
-                       base = 8;
-               }
-       }
-       if (!base) {
-               base = 10;
-       }
-       while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
-           ? toupper(*cp) : *cp)-'A'+10) < base) {
-               result = result*base + value;
-               cp++;
-       }
-       if (endp)
-               *endp = (char *)cp;
-       return result;
-}
-
-long simple_strtol(const char *cp,char **endp,unsigned int base)
-{
-       if(*cp=='-')
-               return -simple_strtoul(cp+1,endp,base);
-       return simple_strtoul(cp,endp,base);
-}
-
-static inline void
-soft_restart(unsigned long addr)
-{
-       /* SRR0 has system reset vector, SRR1 has default MSR value */
-       /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */
-
-       __asm__ __volatile__ ("mtspr    26, %0"         :: "r" (addr));
-       __asm__ __volatile__ ("li       4, (1 << 6)"    ::: "r4");
-       __asm__ __volatile__ ("mtspr    27, 4");
-       __asm__ __volatile__ ("rfi");
-
-       while(1);       /* not reached */
-}
-
-void
-do_reset (void)
-{
-       ulong addr;
-       /* flush and disable I/D cache */
-       __asm__ __volatile__ ("mfspr    3, 1008"        ::: "r3");
-       __asm__ __volatile__ ("ori      5, 5, 0xcc00"   ::: "r5");
-       __asm__ __volatile__ ("ori      4, 3, 0xc00"    ::: "r4");
-       __asm__ __volatile__ ("andc     5, 3, 5"        ::: "r5");
-       __asm__ __volatile__ ("sync");
-       __asm__ __volatile__ ("mtspr    1008, 4");
-       __asm__ __volatile__ ("isync");
-       __asm__ __volatile__ ("sync");
-       __asm__ __volatile__ ("mtspr    1008, 5");
-       __asm__ __volatile__ ("isync");
-       __asm__ __volatile__ ("sync");
-
-#ifdef CONFIG_SYS_RESET_ADDRESS
-       addr = CONFIG_SYS_RESET_ADDRESS;
-#else
-       /*
-        * note: when CONFIG_SYS_MONITOR_BASE points to a RAM address,
-        * CONFIG_SYS_MONITOR_BASE - sizeof (ulong) is usually a valid
-        * address. Better pick an address known to be invalid on your
-        * system and assign it to CONFIG_SYS_RESET_ADDRESS.
-        */
-       addr = CONFIG_SYS_MONITOR_BASE - sizeof (ulong);
-#endif
-       soft_restart(addr);
-       while(1);       /* not reached */
-}