From 6024743d64c01a28669f9a39e49fe7ee0ffa599e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mia=20Pilchov=C3=A1?= Date: Sat, 15 Feb 2025 17:22:04 +0100 Subject: [PATCH] u-boot: update version /home/liliana/Dingussy/local/releases/tt1860562 --- MODULE_LICENSE_GPL2 | 0 Makefile | 2905 +++++++++++++++++------- NOTICE | 298 +++ board/tomtom/strasbourg/Makefile | 80 + board/tomtom/strasbourg/mfd_feat.c | 48 + board/tomtom/strasbourg/mfd_feat.h | 64 + board/tomtom/strasbourg/preboot.ush | 16 + board/tomtom/strasbourg/strasbourg.c | 677 ++++++ board/tomtom/strasbourg/u-boot.lds | 118 + common/cmd_bootm.c | 1933 ++++++++-------- include/asm-arm/arch-omap3/mem.h | 16 +- include/configs/rennes_b1-debug.h | 27 + include/configs/rennes_b1.h | 42 + include/configs/stuttgart_b1-debug.h | 27 + include/configs/stuttgart_b1.h | 43 + include/linux/padconfig_common.h | 191 ++ include/linux/padconfig_monopoli.h | 327 +++ include/linux/padconfig_rennes_b1.h | 407 ++++ include/linux/padconfig_stuttgart_b1.h | 407 ++++ lib_arm/board.c | 366 ++- plat-tomtom/offenburg/sys_info.c | 334 +++ 21 files changed, 6431 insertions(+), 1895 deletions(-) create mode 100644 MODULE_LICENSE_GPL2 create mode 100644 NOTICE create mode 100644 board/tomtom/strasbourg/Makefile create mode 100644 board/tomtom/strasbourg/mfd_feat.c create mode 100644 board/tomtom/strasbourg/mfd_feat.h create mode 100644 board/tomtom/strasbourg/preboot.ush create mode 100644 board/tomtom/strasbourg/strasbourg.c create mode 100644 board/tomtom/strasbourg/u-boot.lds create mode 100644 include/configs/rennes_b1-debug.h create mode 100644 include/configs/rennes_b1.h create mode 100644 include/configs/stuttgart_b1-debug.h create mode 100644 include/configs/stuttgart_b1.h create mode 100644 include/linux/padconfig_common.h create mode 100644 include/linux/padconfig_monopoli.h create mode 100644 include/linux/padconfig_rennes_b1.h create mode 100644 include/linux/padconfig_stuttgart_b1.h create mode 100644 plat-tomtom/offenburg/sys_info.c diff --git a/MODULE_LICENSE_GPL2 b/MODULE_LICENSE_GPL2 new file mode 100644 index 000000000..e69de29bb diff --git a/Makefile b/Makefile index 5987f5f34..45024002a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# (C) Copyright 2000-2006 +# (C) Copyright 2000-2008 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. # # See file CREDITS for list of people who contributed to this @@ -12,7 +12,7 @@ # # 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 +# 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 @@ -21,12 +21,28 @@ # MA 02111-1307 USA # +## +### +#### +#### revocation number of this bootloader (revocation count of target device +#### should be AT MOST this number, or it will refuse to run) +#### + +BRICKNUM = 1 + +#### +#### NOTE may be overridden further down in this file, as newer targets +#### or SoCs may want to start fresh +### +## + VERSION = 1 -PATCHLEVEL = 1 +PATCHLEVEL = 3 SUBLEVEL = 4 -EXTRAVERSION = +EXTRAVERSION ?= 0 +X_ARCH ?= unknown U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -VERSION_FILE = include/version_autogenerated.h +VERSION_FILE = $(obj)include/version_autogenerated.h HOSTARCH := $(shell uname -m | \ sed -e s/i.86/i386/ \ @@ -34,6 +50,7 @@ HOSTARCH := $(shell uname -m | \ -e s/arm.*/arm/ \ -e s/sa110/arm/ \ -e s/powerpc/ppc/ \ + -e s/ppc64/ppc/ \ -e s/macppc/ppc/) HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ @@ -44,33 +61,132 @@ export HOSTARCH HOSTOS # Deal with colliding definitions from tcsh etc. VENDOR= + +######################################################################### +# Key setup +BCM4760_KEY ?= $(TOPDIR)/../tools/secureboot/bcm4760/tt_bl_bcm4760_dev_privkey.dsa + + +######################################################################### +# s3c64xx key collection +S3C64XX_KEYDIR = $(TOPDIR)/../tools/secureboot/s3c64xx + +#key that signs u-boot +S3C64XX_PRVKEY ?= $(S3C64XX_KEYDIR)/TT_prv_uboot_s3c64xx_dev.rsa + +#key that verifies u-boot from BL1 +S3C64XX_PUBKEY ?= $(S3C64XX_KEYDIR)/TT_pub_uboot_s3c64xx_dev.rsa + +export S3C64XX_PUBKEY + +######################################################################### +# OMAP3 Bootloader signing key +OMAP3_KEYDIR = $(TOPDIR)/../tools/secureboot/omap3 + +#key that signs u-boot +OMAP3_KEY ?= $(OMAP3_KEYDIR)/TT_prv_uboot_omap3_dev.rsa + +######################################################################### +# Allow for silent builds +ifeq (,$(findstring s,$(MAKEFLAGS))) +XECHO = echo +else +XECHO = : +endif + +######################################################################### +# +# U-boot build supports producing a object files to the separate external +# directory. Two use cases are supported: +# +# 1) Add O= to the make command line +# 'make O=/tmp/build all' +# +# 2) Set environement variable BUILD_DIR to point to the desired location +# 'export BUILD_DIR=/tmp/build' +# 'make' +# +# The second approach can also be used with a MAKEALL script +# 'export BUILD_DIR=/tmp/build' +# './MAKEALL' +# +# Command line 'O=' setting overrides BUILD_DIR environent variable. +# +# When none of the above methods is used the local build is performed and +# the object files are placed in the source directory. +# + +ifdef O +ifeq ("$(origin O)", "command line") +BUILD_DIR := $(O) +endif +endif + +ifneq ($(BUILD_DIR),) +saved-output := $(BUILD_DIR) + +# Attempt to create a output directory. +$(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}) + +# Verify if it was successful. +BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd) +$(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist)) +endif # ifneq ($(BUILD_DIR),) + +OBJTREE := $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR)) +SRCTREE := $(CURDIR) +TOPDIR := $(SRCTREE) +LNDIR := $(OBJTREE) +export TOPDIR SRCTREE OBJTREE + +MKCONFIG := $(SRCTREE)/mkconfig +export MKCONFIG + +ifneq ($(OBJTREE),$(SRCTREE)) +REMOTE_BUILD := 1 +export REMOTE_BUILD +endif + +# $(obj) and (src) are defined in config.mk but here in main Makefile +# we also need them before config.mk is included which is the case for +# some targets like unconfig, clean, clobber, distclean, etc. +ifneq ($(OBJTREE),$(SRCTREE)) +obj := $(OBJTREE)/ +src := $(SRCTREE)/ +else +obj := +src := +endif +export obj src + +# Make sure CDPATH settings don't interfere +unexport CDPATH + ######################################################################### -TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) -export TOPDIR +ifeq ($(ARCH),powerpc) +ARCH = ppc +endif + +ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk)) -ifeq (include/config.mk,$(wildcard include/config.mk)) # load ARCH, BOARD, and CPU configuration -include include/config.mk +include $(obj)include/config.mk export ARCH CPU BOARD VENDOR SOC + ifndef CROSS_COMPILE -ifeq ($(HOSTARCH),ppc) +ifeq ($(HOSTARCH),$(ARCH)) CROSS_COMPILE = else ifeq ($(ARCH),ppc) -CROSS_COMPILE = powerpc-linux- +CROSS_COMPILE = ppc_8xx- endif ifeq ($(ARCH),arm) -#CROSS_COMPILE = arm-linux- -CROSS_COMPILE = arm-none-linux-gnueabi- +CROSS_COMPILE = arm-linux- endif ifeq ($(ARCH),i386) -ifeq ($(HOSTARCH),i386) -CROSS_COMPILE = -else CROSS_COMPILE = i386-linux- endif -endif ifeq ($(ARCH),mips) CROSS_COMPILE = mips_4KC- endif @@ -87,17 +203,25 @@ ifeq ($(ARCH),microblaze) CROSS_COMPILE = mb- endif ifeq ($(ARCH),blackfin) -CROSS_COMPILE = bfin-elf- +CROSS_COMPILE = bfin-uclinux- endif +ifeq ($(ARCH),avr32) +CROSS_COMPILE = avr32-linux- endif +ifeq ($(ARCH),sh) +CROSS_COMPILE = sh4-linux- endif +ifeq ($(ARCH),sparc) +CROSS_COMPILE = sparc-elf- +endif # sparc +endif # HOSTARCH,ARCH +endif # CROSS_COMPILE export CROSS_COMPILE # load other configuration include $(TOPDIR)/config.mk - ######################################################################### # U-Boot objects....order is important (i.e. start must be first) @@ -109,133 +233,386 @@ endif ifeq ($(CPU),ppc4xx) OBJS += cpu/$(CPU)/resetvec.o endif -ifeq ($(CPU),mpc83xx) -OBJS += cpu/$(CPU)/resetvec.o -endif ifeq ($(CPU),mpc85xx) OBJS += cpu/$(CPU)/resetvec.o endif -ifeq ($(CPU),bf533) -OBJS += cpu/$(CPU)/start1.o cpu/$(CPU)/interrupt.o cpu/$(CPU)/cache.o -OBJS += cpu/$(CPU)/cplbhdlr.o cpu/$(CPU)/cplbmgr.o cpu/$(CPU)/flush.o -endif + +OBJS := $(addprefix $(obj),$(OBJS)) LIBS = lib_generic/libgeneric.a -LIBS += board/$(BOARDDIR)/lib$(BOARD).a +LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ + "board/$(VENDOR)/common/lib$(VENDOR).a"; fi) LIBS += cpu/$(CPU)/lib$(CPU).a ifdef SOC LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a endif +ifeq ($(CPU),ixp) +LIBS += cpu/ixp/npe/libnpe.a +endif LIBS += lib_$(ARCH)/lib$(ARCH).a -LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \ - fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a +ifeq ($(CONFIG_CMD_JFFS2),y) +LIBS += fs/jffs2/libjffs2.a +endif +ifeq ($(CONFIG_CMD_REISER),y) +LIBS += fs/reiserfs/libreiserfs.a +endif +ifeq ($(CONFIG_CMD_CRAMFS),y) +LIBS += fs/cramfs/libcramfs.a +endif +ifeq ($(CONFIG_CMD_FAT),y) +LIBS += fs/fat/libfat.a fs/fdos/libfdos.a +endif +LIBS += fs/ext2/libext2fs.a +ifeq ($(CONFIG_CMD_NET),y) LIBS += net/libnet.a +endif LIBS += disk/libdisk.a -LIBS += rtc/librtc.a -LIBS += dtt/libdtt.a -LIBS += drivers/libdrivers.a -LIBS += drivers/onenand/libonenand.a -LIBS += drivers/nand/libnand.a -LIBS += drivers/nand_legacy/libnand_legacy.a -LIBS += drivers/sk98lin/libsk98lin.a -LIBS += post/libpost.a post/cpu/libcpu.a +ifeq ($(CONFIG_BIOSEMU),y) +LIBS += drivers/bios_emulator/libatibiosemu.a +endif +ifdef BLOCK +LIBS += drivers/block/libblock.a +endif +LIBS += drivers/dma/libdma.a +LIBS += drivers/hwmon/libhwmon.a +ifeq ($(CONFIG_CMD_I2C),y) +LIBS += drivers/i2c/libi2c.a +endif +ifdef INPUT +LIBS += drivers/input/libinput.a +endif +LIBS += drivers/misc/libmisc.a +LIBS += drivers/mmc/libmmc.a +ifeq ($(CONFIG_CMD_MTD),y) +LIBS += drivers/mtd/libmtd.a +ifeq ($(CONFIG_CMD_NAND),y) +LIBS += drivers/mtd/nand/libnand.a +LIBS += drivers/mtd/nand_legacy/libnand_legacy.a +endif +ifeq ($(CONFIG_CMD_ONENAND),y) +LIBS += drivers/mtd/onenand/libonenand.a +endif +LIBS += drivers/mtd/spi/libspi_flash.a +endif +ifeq ($(CONFIG_CMD_NET),y) +LIBS += drivers/net/libnet.a +LIBS += drivers/net/sk98lin/libsk98lin.a +endif +LIBS += drivers/pci/libpci.a +ifeq ($(CONFIG_CMD_PCMCIA),y) +LIBS += drivers/pcmcia/libpcmcia.a +endif +ifdef SPI +LIBS += drivers/spi/libspi.a +endif +ifeq ($(CPU),mpc83xx) +LIBS += drivers/qe/qe.a +endif +ifeq ($(CPU),mpc85xx) +LIBS += drivers/qe/qe.a +endif +ifeq ($(CONFIG_CMD_DATE),y) +LIBS += drivers/rtc/librtc.a +endif +LIBS += drivers/serial/libserial.a +ifeq ($(CONFIG_CMD_USB),y) +LIBS += drivers/usb/libusb.a +endif +ifeq ($(CONFIG_VIDEO),y) +LIBS += drivers/video/libvideo.a +endif LIBS += common/libcommon.a -LIBS += $(BOARDLIBS) -.PHONY : $(LIBS) +LIBS += libfdt/libfdt.a +LIBS += api/libapi.a +LIBS += post/libpost.a +LIBS += crypto/libcrypto.a + +LIBS := $(addprefix $(obj),$(LIBS)) +.PHONY : $(LIBS) $(VERSION_FILE) + +LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a +LIBBOARD := $(addprefix $(obj),$(LIBBOARD)) # Add GCC lib PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc - # The "tools" are needed early, so put this first # Don't include stuff already done in $(LIBS) SUBDIRS = tools \ - post \ - examples \ - post/cpu + example-scripts \ + examples + .PHONY : $(SUBDIRS) +ifeq ($(CONFIG_NAND_U_BOOT),y) +NAND_SPL = nand_spl +U_BOOT_NAND = $(obj)u-boot-nand.bin +endif + +ifeq ($(CONFIG_ONENAND_U_BOOT),y) +ONENAND_IPL = onenand_ipl +U_BOOT_ONENAND = $(obj)u-boot-onenand.bin +endif + +__OBJS := $(subst $(obj),,$(OBJS)) +__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD)) + ######################################################################### ######################################################################### -ALL = u-boot.srec u-boot.bin System.map +ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND) $(obj)u-boot.dis +ifeq ($(ARCH),blackfin) +ALL += $(obj)u-boot.ldr +endif +ifeq ($(SOC),bcm4760) +ALL += $(obj)u-boot.target +endif +ifeq ($(CPU),s5p64xx) +ALL += $(obj)u-boot.target +endif +ifeq ($(CPU),omap3) +ALL += $(obj)u-boot.target +BRICKNUM = 0 +endif all: $(ALL) -u-boot.hex: u-boot +$(obj)u-boot.hex: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -u-boot.srec: u-boot +$(obj)u-boot.srec: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -u-boot.bin: u-boot +$(obj)u-boot.bin: $(obj)u-boot $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ +ifeq ($(CONFIG_TT_HEADER),y) + $(obj)tools/ubootadm write -o $@ -v $(EXTRAVERSION) -p $(X_ARCH) -b $(BRICKNUM) +endif -u-boot.img: u-boot.bin +$(obj)u-boot.ldr: $(obj)u-boot + $(LDR) -T $(CONFIG_BFIN_CPU) -f -c $@ $< $(LDR_FLAGS) + +$(obj)u-boot.ldr.hex: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary + +$(obj)u-boot.ldr.srec: $(obj)u-boot.ldr + $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary + +$(obj)u-boot.img: $(obj)u-boot.bin ./tools/mkimage -A $(ARCH) -T firmware -C none \ -a $(TEXT_BASE) -e 0 \ -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ -d $< $@ -u-boot.dis: u-boot +.NOTPARALLEL: $(obj)u-boot.bcm4760 # Make sure signing prompt isn't mangled + + +ifeq ($(SOC),bcm4760) +$(obj)u-boot.target: $(obj)u-boot.bin + ln -s -f $(BCM4760_KEY) $(obj)bcm4760_privkey.dsa + $(TOPDIR)/tools/mkImage-bcm4760 --magic=0xbcb00755 \ + --cust-dsa $< $@ < $(obj)bcm4760_privkey.dsa +endif + +ifeq ($(CPU),s5p64xx) +$(obj)u-boot.target: $(obj)u-boot.bin + $(TOPDIR)/tools/s3c-prepare $< $@ + #$(TOPDIR)/tools/s3c-dd $(TOPDIR)/board/$(BOARDDIR)/stage1 $< $@ $(CPU) + #$(TOPDIR)/tools/s3c-sign-bl2 -k $(S3C64XX_PRVKEY) $@ +endif + +ifeq ($(CPU),omap3) +$(obj)u-boot.target: $(obj)u-boot.bin + cp $^ $@ && $(TOPDIR)/tools/omap3-sign-uboot -k $(OMAP3_KEY) $$($(TOPDIR)/tools/get_omap3_size.sh $^) $@ +endif + +$(obj)u-boot.sha1: $(obj)u-boot.bin + $(obj)tools/ubsha1 $(obj)u-boot.bin + +$(obj)u-boot.dis: $(obj)u-boot $(OBJDUMP) -d $< > $@ -u-boot: depend version $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT) - UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ - $(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \ - --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \ +$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) + UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \ + sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ + cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \ + --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ -Map u-boot.map -o u-boot -$(LIBS): - $(MAKE) -C `dirname $@` +$(OBJS): depend $(obj)include/autoconf.mk + $(MAKE) -C cpu/$(CPU) $(if $(REMOTE_BUILD),$@,$(notdir $@)) -$(SUBDIRS): +$(LIBS): depend $(obj)include/autoconf.mk + $(MAKE) -C $(dir $(subst $(obj),,$@)) + +$(LIBBOARD): depend $(LIBS) $(obj)include/autoconf.mk + $(MAKE) -C $(dir $(subst $(obj),,$@)) + +$(SUBDIRS): depend $(obj)include/autoconf.mk $(MAKE) -C $@ all -version: - @echo -n "#define U_BOOT_VERSION \"U-Boot " > $(VERSION_FILE); \ - echo -n "$(U_BOOT_VERSION)" >> $(VERSION_FILE); \ - echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \ - $(TOPDIR)) >> $(VERSION_FILE); \ - echo "\"" >> $(VERSION_FILE) +$(LDSCRIPT): depend $(obj)include/autoconf.mk + $(MAKE) -C $(dir $@) $(notdir $@) + +$(NAND_SPL): $(VERSION_FILE) $(obj)include/autoconf.mk + $(MAKE) -C nand_spl/board/$(BOARDDIR) all + +$(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk + cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin + +$(ONENAND_IPL): $(VERSION_FILE) $(obj)include/autoconf.mk + $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all + +$(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk + cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin + cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin + +$(VERSION_FILE): + @( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \ + '$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \ + ) > $@.tmp + @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ gdbtools: - $(MAKE) -C tools/gdb || exit 1 + $(MAKE) -C tools/gdb all || exit 1 -depend dep: - @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done +updater: + $(MAKE) -C tools/updater all || exit 1 -tags: - ctags -w `find $(SUBDIRS) include \ - lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \ - fs/cramfs fs/fat fs/fdos fs/jffs2 \ - net disk rtc dtt drivers drivers/sk98lin common \ - \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` +env: + $(MAKE) -C tools/env all MTD_VERSION=${MTD_VERSION} || exit 1 + +depend dep: $(VERSION_FILE) + for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir _depend ; done + +TAG_SUBDIRS += include +TAG_SUBDIRS += lib_generic board/$(BOARDDIR) +TAG_SUBDIRS += cpu/$(CPU) +TAG_SUBDIRS += lib_$(ARCH) +ifeq ($(CONFIG_CMD_CRAMFS),y) +TAG_SUBDIRS += fs/cramfs +endif +TAG_SUBDIRS += fs/fat +TAG_SUBDIRS += fs/fdos +ifeq ($(CONFIG_CMD_JFFS2),y) +TAG_SUBDIRS += fs/jffs2 +endif +ifeq ($(CONFIG_CMD_NET),y) +TAG_SUBDIRS += net +endif +TAG_SUBDIRS += disk +TAG_SUBDIRS += common +ifeq ($(CONFIG_BIOSEMU),y) +TAG_SUBDIRS += drivers/bios_emulator +endif +ifdef BLOCK +TAG_SUBDIRS += drivers/block +endif +TAG_SUBDIRS += drivers/hwmon +ifeq ($(CONFIG_CMD_I2C),y) +TAG_SUBDIRS += drivers/i2c +endif +ifdef INPUT +TAG_SUBDIRS += drivers/input +endif +TAG_SUBDIRS += drivers/misc +TAG_SUBDIRS += drivers/mmc +ifeq ($(CONFIG_CMD_MTD),y) +TAG_SUBDIRS += drivers/mtd +ifeq ($(CONFIG_CMD_NAND),y) +TAG_SUBDIRS += drivers/mtd/nand +TAG_SUBDIRS += drivers/mtd/nand_legacy +endif +ifeq ($(CONFIG_CMD_ONENAND),y) +TAG_SUBDIRS += drivers/mtd/onenand +endif +TAG_SUBDIRS += drivers/mtd/spi +endif +ifeq ($(CONFIG_CMD_NET),y) +TAG_SUBDIRS += drivers/net +TAG_SUBDIRS += drivers/net/sk98lin +endif +TAG_SUBDIRS += drivers/pci +ifeq ($(CONFIG_CMD_PCMCIA),y) +TAG_SUBDIRS += drivers/pcmcia +endif +TAG_SUBDIRS += drivers/qe +ifeq ($(CONFIG_CMD_DATE),y) +TAG_SUBDIRS += drivers/rtc +endif +TAG_SUBDIRS += drivers/serial +ifdef SPI +TAG_SUBDIRS += drivers/spi +endif +ifeq ($(CONFIG_CMD_USB),y) +TAG_SUBDIRS += drivers/usb +endif +ifeq ($(CONFIG_VIDEO),y) +TAG_SUBDIRS += drivers/video +endif + +tags ctags: + ctags -w -o $(obj)ctags `find $(SUBDIRS) $(TAG_SUBDIRS) \ + -name '*.[ch]' -print` etags: - etags -a `find $(SUBDIRS) include \ - lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \ - fs/cramfs fs/fat fs/fdos fs/jffs2 \ - net disk rtc dtt drivers drivers/sk98lin common \ - \( -name CVS -prune \) -o \( -name '*.[ch]' -print \)` + etags -a -o $(obj)etags `find $(SUBDIRS) $(TAG_SUBDIRS) \ + -name '*.[ch]' -print` +cscope: + find $(SUBDIRS) $(TAG_SUBDIRS) -name '*.[ch]' -print \ + > cscope.files + cscope -b -q -k -System.map: u-boot +$(obj)System.map: $(obj)u-boot @$(NM) $< | \ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ - sort > System.map + sort > $(obj)System.map + +# +# Auto-generate the autoconf.mk file (which is included by all makefiles) +# +# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. +# the dep file is only include in this top level makefile to determine when +# to regenerate the autoconf.mk file. +$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h + @$(XECHO) Generating $@ ; \ + set -e ; \ + : Generate the dependancies ; \ + $(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \ + -MQ $(obj)include/autoconf.mk include/common.h > $@ + +$(obj)include/autoconf.mk: $(obj)include/config.h + @$(XECHO) Generating $@ ; \ + set -e ; \ + : Extract the config macros ; \ + $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \ + sed -n -f tools/scripts/define2mk.sed > $@ + +sinclude $(obj)include/autoconf.mk.dep +sinclude $(obj)include/autoconf.mk ######################################################################### -else -all install u-boot u-boot.srec depend dep: +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 \ +$(SUBDIRS) $(VERSION_FILE) gdbtools updater env depend \ +dep tags ctags etags cscope $(obj)System.map: @echo "System not configured - see README" >&2 @ exit 1 -endif +endif # config.mk + +.PHONY : CHANGELOG +CHANGELOG: + git log --no-merges U-Boot-1_1_5.. | \ + unexpand -a | sed -e 's/\s\s*$$//' > $@ ######################################################################### unconfig: - @rm -f include/config.h include/config.mk board/*/config.tmp + @rm -f $(obj)include/config.h $(obj)include/config.mk \ + $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ + $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep #======================================================================== # PowerPC @@ -246,29 +623,32 @@ unconfig: ######################################################################### canmb_config: unconfig - @./mkconfig -a canmb ppc mpc5xxx canmb + @$(MKCONFIG) -a canmb ppc mpc5xxx canmb cmi_mpc5xx_config: unconfig - @./mkconfig $(@:_config=) ppc mpc5xx cmi + @$(MKCONFIG) $(@:_config=) ppc mpc5xx cmi PATI_config: unconfig - @./mkconfig $(@:_config=) ppc mpc5xx pati mpl + @$(MKCONFIG) $(@:_config=) ppc mpc5xx pati mpl ######################################################################### ## MPC5xxx Systems ######################################################################### aev_config: unconfig - @./mkconfig -a aev ppc mpc5xxx tqm5200 + @$(MKCONFIG) -a aev ppc mpc5xxx tqm5200 tqc BC3450_config: unconfig - @./mkconfig -a BC3450 ppc mpc5xxx bc3450 + @$(MKCONFIG) -a BC3450 ppc mpc5xxx bc3450 + +cm5200_config: unconfig + @$(MKCONFIG) -a cm5200 ppc mpc5xxx cm5200 cpci5200_config: unconfig - @./mkconfig -a cpci5200 ppc mpc5xxx cpci5200 esd + @$(MKCONFIG) -a cpci5200 ppc mpc5xxx cpci5200 esd -hmi1001_config: unconfig - @./mkconfig hmi1001 ppc mpc5xxx hmi1001 +hmi1001_config: unconfig + @$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001 Lite5200_config \ Lite5200_LOWBOOT_config \ @@ -276,345 +656,440 @@ Lite5200_LOWBOOT08_config \ icecube_5200_config \ icecube_5200_LOWBOOT_config \ icecube_5200_LOWBOOT08_config \ -icecube_5200_DDR_config \ -icecube_5200_DDR_LOWBOOT_config \ +icecube_5200_DDR_config \ +icecube_5200_DDR_LOWBOOT_config \ icecube_5200_DDR_LOWBOOT08_config \ icecube_5100_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include + @mkdir -p $(obj)board/icecube @[ -z "$(findstring LOWBOOT_,$@)" ] || \ { if [ "$(findstring DDR,$@)" ] ; \ - then echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \ - else echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \ + then echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \ + else echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \ fi ; \ - echo "... with LOWBOOT configuration" ; \ + $(XECHO) "... with LOWBOOT configuration" ; \ } @[ -z "$(findstring LOWBOOT08,$@)" ] || \ - { echo "TEXT_BASE = 0xFF800000" >board/icecube/config.tmp ; \ + { echo "TEXT_BASE = 0xFF800000" >$(obj)board/icecube/config.tmp ; \ echo "... with 8 MB flash only" ; \ - echo "... with LOWBOOT configuration" ; \ + $(XECHO) "... with LOWBOOT configuration" ; \ } @[ -z "$(findstring DDR,$@)" ] || \ - { echo "#define CONFIG_MPC5200_DDR" >>include/config.h ; \ - echo "... DDR memory revision" ; \ + { echo "#define CONFIG_MPC5200_DDR" >>$(obj)include/config.h ; \ + $(XECHO) "... DDR memory revision" ; \ } @[ -z "$(findstring 5200,$@)" ] || \ - { echo "#define CONFIG_MPC5200" >>include/config.h ; \ - echo "... with MPC5200 processor" ; \ + { echo "#define CONFIG_MPC5200" >>$(obj)include/config.h ; \ + $(XECHO) "... with MPC5200 processor" ; \ } @[ -z "$(findstring 5100,$@)" ] || \ - { echo "#define CONFIG_MGT5100" >>include/config.h ; \ - echo "... with MGT5100 processor" ; \ + { echo "#define CONFIG_MGT5100" >>$(obj)include/config.h ; \ + $(XECHO) "... with MGT5100 processor" ; \ } - @./mkconfig -a IceCube ppc mpc5xxx icecube + @$(MKCONFIG) -a IceCube ppc mpc5xxx icecube + +jupiter_config: unconfig + @$(MKCONFIG) jupiter ppc mpc5xxx jupiter inka4x0_config: unconfig - @./mkconfig inka4x0 ppc mpc5xxx inka4x0 + @$(MKCONFIG) inka4x0 ppc mpc5xxx inka4x0 lite5200b_config \ +lite5200b_PM_config \ lite5200b_LOWBOOT_config: unconfig - @ >include/config.h - @ echo "#define CONFIG_MPC5200_DDR" >>include/config.h - @ echo "... DDR memory revision" - @ echo "#define CONFIG_MPC5200" >>include/config.h - @ echo "#define CONFIG_LITE5200B" >>include/config.h - @[ -z "$(findstring LOWBOOT_,$@)" ] || \ - { echo "TEXT_BASE = 0xFF000000" >board/icecube/config.tmp ; \ - echo "... with LOWBOOT configuration" ; \ + @mkdir -p $(obj)include + @mkdir -p $(obj)board/icecube + @ echo "#define CONFIG_MPC5200_DDR" >>$(obj)include/config.h + @ $(XECHO) "... DDR memory revision" + @ echo "#define CONFIG_MPC5200" >>$(obj)include/config.h + @ echo "#define CONFIG_LITE5200B" >>$(obj)include/config.h + @[ -z "$(findstring _PM_,$@)" ] || \ + { echo "#define CONFIG_LITE5200B_PM" >>$(obj)include/config.h ; \ + $(XECHO) "... with power management (low-power mode) support" ; \ } - @ echo "... with MPC5200B processor" - @./mkconfig -a IceCube ppc mpc5xxx icecube + @[ -z "$(findstring LOWBOOT_,$@)" ] || \ + { echo "TEXT_BASE = 0xFF000000" >$(obj)board/icecube/config.tmp ; \ + $(XECHO) "... with LOWBOOT configuration" ; \ + } + @ $(XECHO) "... with MPC5200B processor" + @$(MKCONFIG) -a IceCube ppc mpc5xxx icecube mcc200_config \ -mcc200_SDRAM \ -mcc200_highboot \ -mcc200_highboot_SDRAM: unconfig - @ >include/config.h +mcc200_SDRAM_config \ +mcc200_highboot_config \ +mcc200_COM12_config \ +mcc200_COM12_SDRAM_config \ +mcc200_COM12_highboot_config \ +mcc200_COM12_highboot_SDRAM_config \ +mcc200_highboot_SDRAM_config \ +prs200_config \ +prs200_DDR_config \ +prs200_highboot_config \ +prs200_highboot_DDR_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/mcc200 @[ -n "$(findstring highboot,$@)" ] || \ - { echo "... with lowboot configuration" ; \ + { $(XECHO) "... with lowboot configuration" ; \ } @[ -z "$(findstring highboot,$@)" ] || \ - { echo "TEXT_BASE = 0xFFF00000" >board/mcc200/config.tmp ; \ - echo "... with highboot configuration" ; \ + { echo "TEXT_BASE = 0xFFF00000" >$(obj)board/mcc200/config.tmp ; \ + $(XECHO) "... with highboot configuration" ; \ } @[ -n "$(findstring _SDRAM,$@)" ] || \ - { echo "... with DDR" ; \ + { if [ -n "$(findstring mcc200,$@)" ]; \ + then \ + $(XECHO) "... with DDR" ; \ + else \ + if [ -n "$(findstring _DDR,$@)" ];\ + then \ + $(XECHO) "... with DDR" ; \ + else \ + echo "#define CONFIG_MCC200_SDRAM" >>$(obj)include/config.h ;\ + $(XECHO) "... with SDRAM" ; \ + fi; \ + fi; \ } @[ -z "$(findstring _SDRAM,$@)" ] || \ - { echo "#define CONFIG_MCC200_SDRAM" >>include/config.h ; \ - echo "... with SDRAM" ; \ + { echo "#define CONFIG_MCC200_SDRAM" >>$(obj)include/config.h ; \ + $(XECHO) "... with SDRAM" ; \ } - @./mkconfig -a mcc200 ppc mpc5xxx mcc200 + @[ -z "$(findstring COM12,$@)" ] || \ + { echo "#define CONFIG_CONSOLE_COM12" >>$(obj)include/config.h ; \ + $(XECHO) "... with console on COM12" ; \ + } + @[ -z "$(findstring prs200,$@)" ] || \ + { echo "#define CONFIG_PRS200" >>$(obj)include/config.h ;\ + } + @$(MKCONFIG) -n $@ -a mcc200 ppc mpc5xxx mcc200 -o2dnt_config: - @./mkconfig o2dnt ppc mpc5xxx o2dnt +mecp5200_config: unconfig + @$(MKCONFIG) mecp5200 ppc mpc5xxx mecp5200 esd -pf5200_config: unconfig - @./mkconfig pf5200 ppc mpc5xxx pf5200 esd +motionpro_config: unconfig + @$(MKCONFIG) motionpro ppc mpc5xxx motionpro + +munices_config: unconfig + @$(MKCONFIG) munices ppc mpc5xxx munices + +MVBC_P_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/mvbc_p + @ >$(obj)include/config.h + @[ -z "$(findstring MVBC_P,$@)" ] || \ + { echo "#define CONFIG_MVBC_P" >>$(obj)include/config.h; } + @$(MKCONFIG) -n $@ -a MVBC_P ppc mpc5xxx mvbc_p matrix_vision + +o2dnt_config: unconfig + @$(MKCONFIG) o2dnt ppc mpc5xxx o2dnt + +pf5200_config: unconfig + @$(MKCONFIG) pf5200 ppc mpc5xxx pf5200 esd PM520_config \ PM520_DDR_config \ PM520_ROMBOOT_config \ PM520_ROMBOOT_DDR_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring DDR,$@)" ] || \ - { echo "#define CONFIG_MPC5200_DDR" >>include/config.h ; \ - echo "... DDR memory revision" ; \ + { echo "#define CONFIG_MPC5200_DDR" >>$(obj)include/config.h ; \ + $(XECHO) "... DDR memory revision" ; \ } @[ -z "$(findstring ROMBOOT,$@)" ] || \ - { echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \ - echo "... booting from 8-bit flash" ; \ + { echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \ + $(XECHO) "... booting from 8-bit flash" ; \ } - @./mkconfig -a PM520 ppc mpc5xxx pm520 + @$(MKCONFIG) -a PM520 ppc mpc5xxx pm520 smmaco4_config: unconfig - @./mkconfig -a smmaco4 ppc mpc5xxx tqm5200 + @$(MKCONFIG) -a smmaco4 ppc mpc5xxx tqm5200 tqc spieval_config: unconfig - @./mkconfig -a spieval ppc mpc5xxx tqm5200 + @$(MKCONFIG) -a spieval ppc mpc5xxx tqm5200 tqc TB5200_B_config \ TB5200_config: unconfig + @mkdir -p $(obj)include @[ -z "$(findstring _B,$@)" ] || \ - { echo "#define CONFIG_TQM5200_B" >>include/config.h ; \ - echo "... with MPC5200B processor" ; \ + { echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h ; \ + $(XECHO) "... with MPC5200B processor" ; \ } - @./mkconfig -n $@ -a TB5200 ppc mpc5xxx tqm5200 + @$(MKCONFIG) -n $@ -a TB5200 ppc mpc5xxx tqm5200 tqc MINI5200_config \ EVAL5200_config \ TOP5200_config: unconfig - @ echo "#define CONFIG_$(@:_config=) 1" >include/config.h - @./mkconfig -n $@ -a TOP5200 ppc mpc5xxx top5200 emk + @mkdir -p $(obj)include + @ echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h + @$(MKCONFIG) -n $@ -a TOP5200 ppc mpc5xxx top5200 emk Total5100_config \ Total5200_config \ Total5200_lowboot_config \ Total5200_Rev2_config \ Total5200_Rev2_lowboot_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include + @mkdir -p $(obj)board/total5200 @[ -z "$(findstring 5100,$@)" ] || \ - { echo "#define CONFIG_MGT5100" >>include/config.h ; \ - echo "... with MGT5100 processor" ; \ + { echo "#define CONFIG_MGT5100" >>$(obj)include/config.h ; \ + $(XECHO) "... with MGT5100 processor" ; \ } @[ -z "$(findstring 5200,$@)" ] || \ - { echo "#define CONFIG_MPC5200" >>include/config.h ; \ - echo "... with MPC5200 processor" ; \ + { echo "#define CONFIG_MPC5200" >>$(obj)include/config.h ; \ + $(XECHO) "... with MPC5200 processor" ; \ } @[ -n "$(findstring Rev,$@)" ] || \ - { echo "#define CONFIG_TOTAL5200_REV 1" >>include/config.h ; \ - echo "... revision 1 board" ; \ + { echo "#define CONFIG_TOTAL5200_REV 1" >>$(obj)include/config.h ; \ + $(XECHO) "... revision 1 board" ; \ } @[ -z "$(findstring Rev2_,$@)" ] || \ - { echo "#define CONFIG_TOTAL5200_REV 2" >>include/config.h ; \ - echo "... revision 2 board" ; \ + { echo "#define CONFIG_TOTAL5200_REV 2" >>$(obj)include/config.h ; \ + $(XECHO) "... revision 2 board" ; \ } @[ -z "$(findstring lowboot_,$@)" ] || \ - { echo "TEXT_BASE = 0xFE000000" >board/total5200/config.tmp ; \ - echo "... with lowboot configuration" ; \ + { echo "TEXT_BASE = 0xFE000000" >$(obj)board/total5200/config.tmp ; \ + $(XECHO) "... with lowboot configuration" ; \ } - @./mkconfig -a Total5200 ppc mpc5xxx total5200 + @$(MKCONFIG) -a Total5200 ppc mpc5xxx total5200 -TQM5200_config \ -TQM5200_B_config \ -TQM5200_B_HIGHBOOT_config \ +cam5200_config \ +cam5200_niosflash_config \ +fo300_config \ +MiniFAP_config \ TQM5200S_config \ TQM5200S_HIGHBOOT_config \ -TQM5200_STK100_config \ -cam5200_config \ -MiniFAP_config: unconfig - @ >include/config.h - @[ -z "$(findstring MiniFAP,$@)" ] || \ - { echo "#define CONFIG_MINIFAP" >>include/config.h ; \ - echo "... TQM5200_AC on MiniFAP" ; \ - } +TQM5200_B_config \ +TQM5200_B_HIGHBOOT_config \ +TQM5200_config \ +TQM5200_STK100_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/tqc/tqm5200 @[ -z "$(findstring cam5200,$@)" ] || \ - { echo "#define CONFIG_CAM5200" >>include/config.h ; \ - echo "#define CONFIG_TQM5200S" >>include/config.h ; \ - echo "#define CONFIG_TQM5200_B" >>include/config.h ; \ - echo "... TQM5200S on Cam5200" ; \ + { echo "#define CONFIG_CAM5200" >>$(obj)include/config.h ; \ + echo "#define CONFIG_TQM5200S" >>$(obj)include/config.h ; \ + echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h ; \ + $(XECHO) "... TQM5200S on Cam5200" ; \ + } + @[ -z "$(findstring niosflash,$@)" ] || \ + { echo "#define CONFIG_CAM5200_NIOSFLASH" >>$(obj)include/config.h ; \ + $(XECHO) "... with NIOS flash driver" ; \ + } + @[ -z "$(findstring fo300,$@)" ] || \ + { echo "#define CONFIG_FO300" >>$(obj)include/config.h ; \ + $(XECHO) "... TQM5200 on FO300" ; \ + } + @[ -z "$(findstring MiniFAP,$@)" ] || \ + { echo "#define CONFIG_MINIFAP" >>$(obj)include/config.h ; \ + $(XECHO) "... TQM5200_AC on MiniFAP" ; \ } @[ -z "$(findstring STK100,$@)" ] || \ - { echo "#define CONFIG_STK52XX_REV100" >>include/config.h ; \ - echo "... on a STK52XX.100 base board" ; \ + { echo "#define CONFIG_STK52XX_REV100" >>$(obj)include/config.h ; \ + $(XECHO) "... on a STK52XX.100 base board" ; \ } @[ -z "$(findstring TQM5200_B,$@)" ] || \ - { echo "#define CONFIG_TQM5200_B" >>include/config.h ; \ + { echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h ; \ } @[ -z "$(findstring TQM5200S,$@)" ] || \ - { echo "#define CONFIG_TQM5200S" >>include/config.h ; \ - echo "#define CONFIG_TQM5200_B" >>include/config.h ; \ + { echo "#define CONFIG_TQM5200S" >>$(obj)include/config.h ; \ + echo "#define CONFIG_TQM5200_B" >>$(obj)include/config.h ; \ } @[ -z "$(findstring HIGHBOOT,$@)" ] || \ - { echo "TEXT_BASE = 0xFFF00000" >board/tqm5200/config.tmp ; \ + { echo "TEXT_BASE = 0xFFF00000" >$(obj)board/tqm5200/config.tmp ; \ } - @./mkconfig -n $@ -a TQM5200 ppc mpc5xxx tqm5200 + @$(MKCONFIG) -n $@ -a TQM5200 ppc mpc5xxx tqm5200 tqc + +uc101_config: unconfig + @$(MKCONFIG) uc101 ppc mpc5xxx uc101 + +v38b_config: unconfig + @$(MKCONFIG) -a v38b ppc mpc5xxx v38b + +######################################################################### +## MPC512x Systems +######################################################################### + +ads5121_config \ +ads5121_rev2_config \ + : unconfig + @mkdir -p $(obj)include + @if [ "$(findstring rev2,$@)" ] ; then \ + echo "#define CONFIG_ADS5121_REV2 1" > $(obj)include/config.h; \ + fi + @$(MKCONFIG) -a ads5121 ppc mpc512x ads5121 + ######################################################################### ## MPC8xx Systems ######################################################################### -Adder_config \ +Adder_config \ Adder87x_config \ -AdderII_config \ +AdderII_config \ : unconfig + @mkdir -p $(obj)include $(if $(findstring AdderII,$@), \ - @echo "#define CONFIG_MPC852T" > include/config.h) - @./mkconfig -a Adder ppc mpc8xx adder + @echo "#define CONFIG_MPC852T" > $(obj)include/config.h) + @$(MKCONFIG) -a Adder ppc mpc8xx adder -ADS860_config \ -FADS823_config \ +AdderUSB_config: unconfig + @$(MKCONFIG) -a AdderUSB ppc mpc8xx adder + +ADS860_config \ +FADS823_config \ FADS850SAR_config \ MPC86xADS_config \ MPC885ADS_config \ FADS860T_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx fads + @$(MKCONFIG) $(@:_config=) ppc mpc8xx fads AMX860_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx amx860 westel + @$(MKCONFIG) $(@:_config=) ppc mpc8xx amx860 westel c2mon_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx c2mon + @$(MKCONFIG) $(@:_config=) ppc mpc8xx c2mon CCM_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx CCM siemens + @$(MKCONFIG) $(@:_config=) ppc mpc8xx CCM siemens cogent_mpc8xx_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx cogent + @$(MKCONFIG) $(@:_config=) ppc mpc8xx cogent ELPT860_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx elpt860 LEOX + @$(MKCONFIG) $(@:_config=) ppc mpc8xx elpt860 LEOX EP88x_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx ep88x + @$(MKCONFIG) $(@:_config=) ppc mpc8xx ep88x ESTEEM192E_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx esteem192e + @$(MKCONFIG) $(@:_config=) ppc mpc8xx esteem192e ETX094_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx etx094 + @$(MKCONFIG) $(@:_config=) ppc mpc8xx etx094 FLAGADM_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx flagadm + @$(MKCONFIG) $(@:_config=) ppc mpc8xx flagadm xtract_GEN860T = $(subst _SC,,$(subst _config,,$1)) GEN860T_SC_config \ GEN860T_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring _SC,$@)" ] || \ - { echo "#define CONFIG_SC" >>include/config.h ; \ - echo "With reduced H/W feature set (SC)..." ; \ + { echo "#define CONFIG_SC" >>$(obj)include/config.h ; \ + $(XECHO) "With reduced H/W feature set (SC)..." ; \ } - @./mkconfig -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t + @$(MKCONFIG) -a $(call xtract_GEN860T,$@) ppc mpc8xx gen860t GENIETV_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx genietv + @$(MKCONFIG) $(@:_config=) ppc mpc8xx genietv GTH_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx gth + @$(MKCONFIG) $(@:_config=) ppc mpc8xx gth hermes_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx hermes + @$(MKCONFIG) $(@:_config=) ppc mpc8xx hermes HMI10_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx + @$(MKCONFIG) $(@:_config=) ppc mpc8xx tqm8xx tqc IAD210_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx IAD210 siemens + @$(MKCONFIG) $(@:_config=) ppc mpc8xx IAD210 siemens xtract_ICU862 = $(subst _100MHz,,$(subst _config,,$1)) ICU862_100MHz_config \ ICU862_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring _100MHz,$@)" ] || \ - { echo "#define CONFIG_100MHz" >>include/config.h ; \ - echo "... with 100MHz system clock" ; \ + { echo "#define CONFIG_100MHz" >>$(obj)include/config.h ; \ + $(XECHO) "... with 100MHz system clock" ; \ } - @./mkconfig -a $(call xtract_ICU862,$@) ppc mpc8xx icu862 + @$(MKCONFIG) -a $(call xtract_ICU862,$@) ppc mpc8xx icu862 IP860_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx ip860 + @$(MKCONFIG) $(@:_config=) ppc mpc8xx ip860 IVML24_256_config \ IVML24_128_config \ IVML24_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring IVML24_config,$@)" ] || \ - { echo "#define CONFIG_IVML24_16M" >>include/config.h ; \ + { echo "#define CONFIG_IVML24_16M" >>$(obj)include/config.h ; \ } @[ -z "$(findstring IVML24_128_config,$@)" ] || \ - { echo "#define CONFIG_IVML24_32M" >>include/config.h ; \ + { echo "#define CONFIG_IVML24_32M" >>$(obj)include/config.h ; \ } @[ -z "$(findstring IVML24_256_config,$@)" ] || \ - { echo "#define CONFIG_IVML24_64M" >>include/config.h ; \ + { echo "#define CONFIG_IVML24_64M" >>$(obj)include/config.h ; \ } - @./mkconfig -a IVML24 ppc mpc8xx ivm + @$(MKCONFIG) -a IVML24 ppc mpc8xx ivm IVMS8_256_config \ IVMS8_128_config \ IVMS8_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring IVMS8_config,$@)" ] || \ - { echo "#define CONFIG_IVMS8_16M" >>include/config.h ; \ + { echo "#define CONFIG_IVMS8_16M" >>$(obj)include/config.h ; \ } @[ -z "$(findstring IVMS8_128_config,$@)" ] || \ - { echo "#define CONFIG_IVMS8_32M" >>include/config.h ; \ + { echo "#define CONFIG_IVMS8_32M" >>$(obj)include/config.h ; \ } @[ -z "$(findstring IVMS8_256_config,$@)" ] || \ - { echo "#define CONFIG_IVMS8_64M" >>include/config.h ; \ + { echo "#define CONFIG_IVMS8_64M" >>$(obj)include/config.h ; \ } - @./mkconfig -a IVMS8 ppc mpc8xx ivm + @$(MKCONFIG) -a IVMS8 ppc mpc8xx ivm KUP4K_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx kup4k kup + @$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4k kup -KUP4X_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx kup4x kup +KUP4X_config : unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc8xx kup4x kup LANTEC_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx lantec + @$(MKCONFIG) $(@:_config=) ppc mpc8xx lantec lwmon_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx lwmon + @$(MKCONFIG) $(@:_config=) ppc mpc8xx lwmon MBX_config \ MBX860T_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx mbx8xx + @$(MKCONFIG) $(@:_config=) ppc mpc8xx mbx8xx + +mgsuvd_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc8xx mgsuvd MHPC_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx mhpc eltec + @$(MKCONFIG) $(@:_config=) ppc mpc8xx mhpc eltec MVS1_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx mvs1 + @$(MKCONFIG) $(@:_config=) ppc mpc8xx mvs1 xtract_NETVIA = $(subst _V2,,$(subst _config,,$1)) NETVIA_V2_config \ NETVIA_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring NETVIA_config,$@)" ] || \ - { echo "#define CONFIG_NETVIA_VERSION 1" >>include/config.h ; \ - echo "... Version 1" ; \ + { echo "#define CONFIG_NETVIA_VERSION 1" >>$(obj)include/config.h ; \ + $(XECHO) "... Version 1" ; \ } @[ -z "$(findstring NETVIA_V2_config,$@)" ] || \ - { echo "#define CONFIG_NETVIA_VERSION 2" >>include/config.h ; \ - echo "... Version 2" ; \ + { echo "#define CONFIG_NETVIA_VERSION 2" >>$(obj)include/config.h ; \ + $(XECHO) "... Version 2" ; \ } - @./mkconfig -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia + @$(MKCONFIG) -a $(call xtract_NETVIA,$@) ppc mpc8xx netvia xtract_NETPHONE = $(subst _V2,,$(subst _config,,$1)) NETPHONE_V2_config \ NETPHONE_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring NETPHONE_config,$@)" ] || \ - { echo "#define CONFIG_NETPHONE_VERSION 1" >>include/config.h ; \ + { echo "#define CONFIG_NETPHONE_VERSION 1" >>$(obj)include/config.h ; \ } @[ -z "$(findstring NETPHONE_V2_config,$@)" ] || \ - { echo "#define CONFIG_NETPHONE_VERSION 2" >>include/config.h ; \ + { echo "#define CONFIG_NETPHONE_VERSION 2" >>$(obj)include/config.h ; \ } - @./mkconfig -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone + @$(MKCONFIG) -a $(call xtract_NETPHONE,$@) ppc mpc8xx netphone xtract_NETTA = $(subst _SWAPHOOK,,$(subst _6412,,$(subst _ISDN,,$(subst _config,,$1)))) @@ -626,143 +1101,143 @@ NETTA_ISDN_6412_config \ NETTA_ISDN_config \ NETTA_6412_config \ NETTA_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring ISDN_,$@)" ] || \ - { echo "#define CONFIG_NETTA_ISDN 1" >>include/config.h ; \ + { echo "#define CONFIG_NETTA_ISDN 1" >>$(obj)include/config.h ; \ } @[ -n "$(findstring ISDN_,$@)" ] || \ - { echo "#undef CONFIG_NETTA_ISDN" >>include/config.h ; \ + { echo "#undef CONFIG_NETTA_ISDN" >>$(obj)include/config.h ; \ } @[ -z "$(findstring 6412_,$@)" ] || \ - { echo "#define CONFIG_NETTA_6412 1" >>include/config.h ; \ + { echo "#define CONFIG_NETTA_6412 1" >>$(obj)include/config.h ; \ } @[ -n "$(findstring 6412_,$@)" ] || \ - { echo "#undef CONFIG_NETTA_6412" >>include/config.h ; \ + { echo "#undef CONFIG_NETTA_6412" >>$(obj)include/config.h ; \ } @[ -z "$(findstring SWAPHOOK_,$@)" ] || \ - { echo "#define CONFIG_NETTA_SWAPHOOK 1" >>include/config.h ; \ + { echo "#define CONFIG_NETTA_SWAPHOOK 1" >>$(obj)include/config.h ; \ } @[ -n "$(findstring SWAPHOOK_,$@)" ] || \ - { echo "#undef CONFIG_NETTA_SWAPHOOK" >>include/config.h ; \ + { echo "#undef CONFIG_NETTA_SWAPHOOK" >>$(obj)include/config.h ; \ } - @./mkconfig -a $(call xtract_NETTA,$@) ppc mpc8xx netta + @$(MKCONFIG) -a $(call xtract_NETTA,$@) ppc mpc8xx netta xtract_NETTA2 = $(subst _V2,,$(subst _config,,$1)) NETTA2_V2_config \ NETTA2_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring NETTA2_config,$@)" ] || \ - { echo "#define CONFIG_NETTA2_VERSION 1" >>include/config.h ; \ + { echo "#define CONFIG_NETTA2_VERSION 1" >>$(obj)include/config.h ; \ } @[ -z "$(findstring NETTA2_V2_config,$@)" ] || \ - { echo "#define CONFIG_NETTA2_VERSION 2" >>include/config.h ; \ + { echo "#define CONFIG_NETTA2_VERSION 2" >>$(obj)include/config.h ; \ } - @./mkconfig -a $(call xtract_NETTA2,$@) ppc mpc8xx netta2 + @$(MKCONFIG) -a $(call xtract_NETTA2,$@) ppc mpc8xx netta2 NC650_Rev1_config \ NC650_Rev2_config \ CP850_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring CP850,$@)" ] || \ - { echo "#define CONFIG_CP850 1" >>include/config.h ; \ - echo "#define CONFIG_IDS852_REV2 1" >>include/config.h ; \ + { echo "#define CONFIG_CP850 1" >>$(obj)include/config.h ; \ + echo "#define CONFIG_IDS852_REV2 1" >>$(obj)include/config.h ; \ } @[ -z "$(findstring Rev1,$@)" ] || \ - { echo "#define CONFIG_IDS852_REV1 1" >>include/config.h ; \ + { echo "#define CONFIG_IDS852_REV1 1" >>$(obj)include/config.h ; \ } @[ -z "$(findstring Rev2,$@)" ] || \ - { echo "#define CONFIG_IDS852_REV2 1" >>include/config.h ; \ + { echo "#define CONFIG_IDS852_REV2 1" >>$(obj)include/config.h ; \ } - @./mkconfig -a NC650 ppc mpc8xx nc650 + @$(MKCONFIG) -a NC650 ppc mpc8xx nc650 NX823_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx nx823 + @$(MKCONFIG) $(@:_config=) ppc mpc8xx nx823 pcu_e_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx pcu_e siemens + @$(MKCONFIG) $(@:_config=) ppc mpc8xx pcu_e siemens QS850_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc + @$(MKCONFIG) $(@:_config=) ppc mpc8xx qs850 snmc QS823_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx qs850 snmc + @$(MKCONFIG) $(@:_config=) ppc mpc8xx qs850 snmc QS860T_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx qs860t snmc + @$(MKCONFIG) $(@:_config=) ppc mpc8xx qs860t snmc quantum_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx quantum + @$(MKCONFIG) $(@:_config=) ppc mpc8xx quantum R360MPI_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx r360mpi + @$(MKCONFIG) $(@:_config=) ppc mpc8xx r360mpi RBC823_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx rbc823 + @$(MKCONFIG) $(@:_config=) ppc mpc8xx rbc823 RPXClassic_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx RPXClassic + @$(MKCONFIG) $(@:_config=) ppc mpc8xx RPXClassic RPXlite_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx RPXlite + @$(MKCONFIG) $(@:_config=) ppc mpc8xx RPXlite -RPXlite_DW_64_config \ -RPXlite_DW_LCD_config \ -RPXlite_DW_64_LCD_config \ +RPXlite_DW_64_config \ +RPXlite_DW_LCD_config \ +RPXlite_DW_64_LCD_config \ RPXlite_DW_NVRAM_config \ -RPXlite_DW_NVRAM_64_config \ +RPXlite_DW_NVRAM_64_config \ RPXlite_DW_NVRAM_LCD_config \ -RPXlite_DW_NVRAM_64_LCD_config \ -RPXlite_DW_config: unconfig - @ >include/config.h +RPXlite_DW_NVRAM_64_LCD_config \ +RPXlite_DW_config: unconfig + @mkdir -p $(obj)include @[ -z "$(findstring _64,$@)" ] || \ - { echo "#define RPXlite_64MHz" >>include/config.h ; \ - echo "... with 64MHz system clock ..."; \ + { echo "#define RPXlite_64MHz" >>$(obj)include/config.h ; \ + $(XECHO) "... with 64MHz system clock ..."; \ } @[ -z "$(findstring _LCD,$@)" ] || \ - { echo "#define CONFIG_LCD" >>include/config.h ; \ - echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \ - echo "... with LCD display ..."; \ + { echo "#define CONFIG_LCD" >>$(obj)include/config.h ; \ + echo "#define CONFIG_NEC_NL6448BC20" >>$(obj)include/config.h ; \ + $(XECHO) "... with LCD display ..."; \ } @[ -z "$(findstring _NVRAM,$@)" ] || \ - { echo "#define CFG_ENV_IS_IN_NVRAM" >>include/config.h ; \ - echo "... with ENV in NVRAM ..."; \ + { echo "#define CFG_ENV_IS_IN_NVRAM" >>$(obj)include/config.h ; \ + $(XECHO) "... with ENV in NVRAM ..."; \ } - @./mkconfig -a RPXlite_DW ppc mpc8xx RPXlite_dw + @$(MKCONFIG) -a RPXlite_DW ppc mpc8xx RPXlite_dw rmu_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx rmu + @$(MKCONFIG) $(@:_config=) ppc mpc8xx rmu RRvision_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx RRvision + @$(MKCONFIG) $(@:_config=) ppc mpc8xx RRvision RRvision_LCD_config: unconfig - @echo "#define CONFIG_LCD" >include/config.h - @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h - @./mkconfig -a RRvision ppc mpc8xx RRvision + @mkdir -p $(obj)include + @echo "#define CONFIG_LCD" >$(obj)include/config.h + @echo "#define CONFIG_SHARP_LQ104V7DS01" >>$(obj)include/config.h + @$(MKCONFIG) -a RRvision ppc mpc8xx RRvision SM850_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx tqm8xx + @$(MKCONFIG) $(@:_config=) ppc mpc8xx tqm8xx tqc -spc1920_config: - @./mkconfig $(@:_config=) ppc mpc8xx spc1920 +spc1920_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc8xx spc1920 SPD823TS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx spd8xx + @$(MKCONFIG) $(@:_config=) ppc mpc8xx spd8xx stxxtc_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx stxxtc + @$(MKCONFIG) $(@:_config=) ppc mpc8xx stxxtc svm_sc8xx_config: unconfig - @ >include/config.h - @./mkconfig $(@:_config=) ppc mpc8xx svm_sc8xx + @$(MKCONFIG) $(@:_config=) ppc mpc8xx svm_sc8xx SXNI855T_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx sixnet + @$(MKCONFIG) $(@:_config=) ppc mpc8xx sixnet # EMK MPC8xx based modules TOP860_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8xx top860 emk + @$(MKCONFIG) $(@:_config=) ppc mpc8xx top860 emk # Play some tricks for configuration selection # Only 855 and 860 boards may come with FEC @@ -785,179 +1260,270 @@ TQM860M_config \ TQM862M_config \ TQM866M_config \ TQM885D_config \ +TK885D_config \ virtlab2_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring _LCD,$@)" ] || \ - { echo "#define CONFIG_LCD" >>include/config.h ; \ - echo "#define CONFIG_NEC_NL6448BC20" >>include/config.h ; \ - echo "... with LCD display" ; \ + { echo "#define CONFIG_LCD" >>$(obj)include/config.h ; \ + echo "#define CONFIG_NEC_NL6448BC20" >>$(obj)include/config.h ; \ + $(XECHO) "... with LCD display" ; \ } - @./mkconfig -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx + @$(MKCONFIG) -a $(call xtract_8xx,$@) ppc mpc8xx tqm8xx tqc TTTech_config: unconfig - @echo "#define CONFIG_LCD" >include/config.h - @echo "#define CONFIG_SHARP_LQ104V7DS01" >>include/config.h - @./mkconfig -a TQM823L ppc mpc8xx tqm8xx + @mkdir -p $(obj)include + @echo "#define CONFIG_LCD" >$(obj)include/config.h + @echo "#define CONFIG_SHARP_LQ104V7DS01" >>$(obj)include/config.h + @$(MKCONFIG) -a TQM823L ppc mpc8xx tqm8xx tqc uc100_config : unconfig - @./mkconfig $(@:_config=) ppc mpc8xx uc100 + @$(MKCONFIG) $(@:_config=) ppc mpc8xx uc100 v37_config: unconfig - @echo "#define CONFIG_LCD" >include/config.h - @echo "#define CONFIG_SHARP_LQ084V1DG21" >>include/config.h - @./mkconfig $(@:_config=) ppc mpc8xx v37 + @mkdir -p $(obj)include + @echo "#define CONFIG_LCD" >$(obj)include/config.h + @echo "#define CONFIG_SHARP_LQ084V1DG21" >>$(obj)include/config.h + @$(MKCONFIG) $(@:_config=) ppc mpc8xx v37 wtk_config: unconfig - @echo "#define CONFIG_LCD" >include/config.h - @echo "#define CONFIG_SHARP_LQ065T9DR51U" >>include/config.h - @./mkconfig -a TQM823L ppc mpc8xx tqm8xx + @mkdir -p $(obj)include + @echo "#define CONFIG_LCD" >$(obj)include/config.h + @echo "#define CONFIG_SHARP_LQ065T9DR51U" >>$(obj)include/config.h + @$(MKCONFIG) -a TQM823L ppc mpc8xx tqm8xx tqc ######################################################################### ## PPC4xx Systems ######################################################################### xtract_4xx = $(subst _25,,$(subst _33,,$(subst _BA,,$(subst _ME,,$(subst _HI,,$(subst _config,,$1)))))) +acadia_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx acadia amcc + +acadia_nand_config: unconfig + @mkdir -p $(obj)include $(obj)board/amcc/acadia + @mkdir -p $(obj)nand_spl/board/amcc/acadia + @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h + @$(MKCONFIG) -n $@ -a acadia ppc ppc4xx acadia amcc + @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/acadia/config.tmp + @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk + ADCIOP_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx adciop esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx adciop esd + +alpr_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx alpr prodrive AP1000_config:unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ap1000 amirix + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ap1000 amirix APC405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx apc405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx apc405 esd AR405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ar405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ar405 esd ASH405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ash405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ash405 esd bamboo_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx bamboo amcc + @$(MKCONFIG) $(@:_config=) ppc ppc4xx bamboo amcc + +bamboo_nand_config: unconfig + @mkdir -p $(obj)include $(obj)board/amcc/bamboo + @mkdir -p $(obj)nand_spl/board/amcc/bamboo + @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h + @$(MKCONFIG) -n $@ -a bamboo ppc ppc4xx bamboo amcc + @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/bamboo/config.tmp + @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk bubinga_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx bubinga amcc + @$(MKCONFIG) $(@:_config=) ppc ppc4xx bubinga amcc CANBT_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx canbt esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx canbt esd + +# Canyonlands & Glacier use different U-Boot images +canyonlands_config \ +glacier_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \ + tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h + @$(MKCONFIG) -n $@ -a canyonlands ppc ppc4xx canyonlands amcc + +canyonlands_nand_config \ +glacier_nand_config: unconfig + @mkdir -p $(obj)include $(obj)board/amcc/canyonlands + @mkdir -p $(obj)nand_spl/board/amcc/canyonlands + @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h + @echo "#define CONFIG_$$(echo $(subst ,,$(@:_nand_config=)) | \ + tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h + @$(MKCONFIG) -n $@ -a canyonlands ppc ppc4xx canyonlands amcc + @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/canyonlands/config.tmp + @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk CATcenter_config \ CATcenter_25_config \ CATcenter_33_config: unconfig - @ echo "/* CATcenter uses PPChameleon Model ME */" > include/config.h - @ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> include/config.h + @mkdir -p $(obj)include + @ echo "/* CATcenter uses PPChameleon Model ME */" > $(obj)include/config.h + @ echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >> $(obj)include/config.h @[ -z "$(findstring _25,$@)" ] || \ - { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \ - echo "SysClk = 25MHz" ; \ + { echo "#define CONFIG_PPCHAMELEON_CLK_25" >> $(obj)include/config.h ; \ + $(XECHO) "SysClk = 25MHz" ; \ } @[ -z "$(findstring _33,$@)" ] || \ - { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \ - echo "SysClk = 33MHz" ; \ + { echo "#define CONFIG_PPCHAMELEON_CLK_33" >> $(obj)include/config.h ; \ + $(XECHO) "SysClk = 33MHz" ; \ } - @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave + @$(MKCONFIG) -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave + +CMS700_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx cms700 esd CPCI2DP_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx cpci2dp esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd CPCI405_config \ CPCI4052_config \ CPCI405DT_config \ CPCI405AB_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx cpci405 esd - @echo "BOARD_REVISION = $(@:_config=)" >>include/config.mk - -CPCI440_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx cpci440 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci405 esd + @echo "BOARD_REVISION = $(@:_config=)" >> $(obj)include/config.mk CPCIISER4_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx cpciiser4 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx cpciiser4 esd CRAYL1_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx L1 cray + @$(MKCONFIG) $(@:_config=) ppc ppc4xx L1 cray csb272_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx csb272 + @$(MKCONFIG) $(@:_config=) ppc ppc4xx csb272 csb472_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx csb472 + @$(MKCONFIG) $(@:_config=) ppc ppc4xx csb472 DASA_SIM_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx dasa_sim esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx dasa_sim esd DP405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx dp405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx dp405 esd DU405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx du405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx du405 esd + +DU440_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx du440 esd ebony_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ebony amcc + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ebony amcc ERIC_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx eric + @$(MKCONFIG) $(@:_config=) ppc ppc4xx eric EXBITGEN_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx exbitgen + @$(MKCONFIG) $(@:_config=) ppc ppc4xx exbitgen G2000_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx g2000 + @$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000 + +hcu4_config: unconfig + @mkdir -p $(obj)board/netstal/common + @$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu4 netstal + +hcu5_config: unconfig + @mkdir -p $(obj)board/netstal/common + @$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu5 netstal HH405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx hh405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx hh405 esd HUB405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx hub405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx hub405 esd JSE_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx jse + @$(MKCONFIG) $(@:_config=) ppc ppc4xx jse KAREF_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx karef sandburst + @$(MKCONFIG) $(@:_config=) ppc ppc4xx karef sandburst + +katmai_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx katmai amcc + +# Kilauea & Haleakala images are identical (recognized via PVR) +kilauea_config \ +haleakala_config: unconfig + @$(MKCONFIG) -n $@ -a kilauea ppc ppc4xx kilauea amcc + +kilauea_nand_config \ +haleakala_nand_config: unconfig + @mkdir -p $(obj)include $(obj)board/amcc/kilauea + @mkdir -p $(obj)nand_spl/board/amcc/kilauea + @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h + @$(MKCONFIG) -n $@ -a kilauea ppc ppc4xx kilauea amcc + @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/kilauea/config.tmp + @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk + +korat_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx korat luan_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx luan amcc + @$(MKCONFIG) $(@:_config=) ppc ppc4xx luan amcc + +lwmon5_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx lwmon5 + +makalu_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx makalu amcc + +mcu25_config: unconfig + @mkdir -p $(obj)board/netstal/common + @$(MKCONFIG) $(@:_config=) ppc ppc4xx mcu25 netstal METROBOX_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx metrobox sandburst + @$(MKCONFIG) $(@:_config=) ppc ppc4xx metrobox sandburst MIP405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx mip405 mpl + @$(MKCONFIG) $(@:_config=) ppc ppc4xx mip405 mpl MIP405T_config: unconfig - @echo "#define CONFIG_MIP405T" >include/config.h - @echo "Enable subset config for MIP405T" - @./mkconfig -a MIP405 ppc ppc4xx mip405 mpl + @mkdir -p $(obj)include + @echo "#define CONFIG_MIP405T" >$(obj)include/config.h + @$(XECHO) "Enable subset config for MIP405T" + @$(MKCONFIG) -a MIP405 ppc ppc4xx mip405 mpl ML2_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ml2 + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml2 ml300_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ml300 xilinx + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ml300 xilinx ocotea_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ocotea amcc + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ocotea amcc OCRTC_config \ ORSG_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx ocrtc esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx ocrtc esd p3p440_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx p3p440 prodrive + @$(MKCONFIG) $(@:_config=) ppc ppc4xx p3p440 prodrive PCI405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx pci405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx pci405 esd pcs440ep_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx pcs440ep + @$(MKCONFIG) $(@:_config=) ppc ppc4xx pcs440ep PIP405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx pip405 mpl + @$(MKCONFIG) $(@:_config=) ppc ppc4xx pip405 mpl PLU405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx plu405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx plu405 esd PMC405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx pmc405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx pmc405 esd + +PMC440_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx pmc440 esd PPChameleonEVB_config \ PPChameleonEVB_BA_25_config \ @@ -966,66 +1532,95 @@ PPChameleonEVB_HI_25_config \ PPChameleonEVB_BA_33_config \ PPChameleonEVB_ME_33_config \ PPChameleonEVB_HI_33_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring EVB_BA,$@)" ] || \ - { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>include/config.h ; \ - echo "... BASIC model" ; \ + { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 0" >>$(obj)include/config.h ; \ + $(XECHO) "... BASIC model" ; \ } @[ -z "$(findstring EVB_ME,$@)" ] || \ - { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>include/config.h ; \ - echo "... MEDIUM model" ; \ + { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 1" >>$(obj)include/config.h ; \ + $(XECHO) "... MEDIUM model" ; \ } @[ -z "$(findstring EVB_HI,$@)" ] || \ - { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>include/config.h ; \ - echo "... HIGH-END model" ; \ + { echo "#define CONFIG_PPCHAMELEON_MODULE_MODEL 2" >>$(obj)include/config.h ; \ + $(XECHO) "... HIGH-END model" ; \ } @[ -z "$(findstring _25,$@)" ] || \ - { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>include/config.h ; \ - echo "SysClk = 25MHz" ; \ + { echo "#define CONFIG_PPCHAMELEON_CLK_25" >>$(obj)include/config.h ; \ + $(XECHO) "SysClk = 25MHz" ; \ } @[ -z "$(findstring _33,$@)" ] || \ - { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>include/config.h ; \ - echo "SysClk = 33MHz" ; \ + { echo "#define CONFIG_PPCHAMELEON_CLK_33" >>$(obj)include/config.h ; \ + $(XECHO) "SysClk = 33MHz" ; \ } - @./mkconfig -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave + @$(MKCONFIG) -a $(call xtract_4xx,$@) ppc ppc4xx PPChameleonEVB dave + +quad100hd_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx quad100hd sbc405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx sbc405 + @$(MKCONFIG) $(@:_config=) ppc ppc4xx sbc405 -sycamore_config: unconfig - @echo "Configuring for sycamore board as subset of walnut..." - @./mkconfig -a walnut ppc ppc4xx walnut amcc +sc3_config:unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx sc3 + +sequoia_config \ +rainier_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \ + tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h + @$(MKCONFIG) -n $@ -a sequoia ppc ppc4xx sequoia amcc + +sequoia_nand_config \ +rainier_nand_config: unconfig + @mkdir -p $(obj)include $(obj)board/amcc/sequoia + @mkdir -p $(obj)nand_spl/board/amcc/sequoia + @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h + @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \ + tr '[:lower:]' '[:upper:]')" >> $(obj)include/config.h + @$(MKCONFIG) -n $@ -a sequoia ppc ppc4xx sequoia amcc + @echo "TEXT_BASE = 0x01000000" > $(obj)board/amcc/sequoia/config.tmp + @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk + +taihu_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx taihu amcc + +taishan_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx taishan amcc VOH405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx voh405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx voh405 esd VOM405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx vom405 esd - -CMS700_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx cms700 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx vom405 esd W7OLMC_config \ W7OLMG_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx w7o + @$(MKCONFIG) $(@:_config=) ppc ppc4xx w7o -walnut_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx walnut amcc +# Walnut & Sycamore images are identical (recognized via PVR) +walnut_config \ +sycamore_config: unconfig + @$(MKCONFIG) -n $@ -a walnut ppc ppc4xx walnut amcc WUH405_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx wuh405 esd + @$(MKCONFIG) $(@:_config=) ppc ppc4xx wuh405 esd XPEDITE1K_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx xpedite1k + @$(MKCONFIG) $(@:_config=) ppc ppc4xx xpedite1k -yosemite_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx yosemite amcc - -yellowstone_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx yellowstone amcc +yosemite_config \ +yellowstone_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \ + tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h + @$(MKCONFIG) -n $@ -a yosemite ppc ppc4xx yosemite amcc yucca_config: unconfig - @./mkconfig $(@:_config=) ppc ppc4xx yucca amcc + @$(MKCONFIG) $(@:_config=) ppc ppc4xx yucca amcc + +zeus_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc ppc4xx zeus ######################################################################### ## MPC8220 Systems @@ -1033,10 +1628,10 @@ yucca_config: unconfig Alaska8220_config \ Yukon8220_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8220 alaska + @$(MKCONFIG) $(@:_config=) ppc mpc8220 alaska sorcery_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8220 sorcery + @$(MKCONFIG) $(@:_config=) ppc mpc8220 sorcery ######################################################################### ## MPC824x Systems @@ -1044,133 +1639,152 @@ sorcery_config: unconfig xtract_82xx = $(subst _BIGFLASH,,$(subst _ROMBOOT,,$(subst _L2,,$(subst _266MHz,,$(subst _300MHz,,$(subst _config,,$1)))))) A3000_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x a3000 + @$(MKCONFIG) $(@:_config=) ppc mpc824x a3000 barco_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x barco + @$(MKCONFIG) $(@:_config=) ppc mpc824x barco BMW_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x bmw + @$(MKCONFIG) $(@:_config=) ppc mpc824x bmw CPC45_config \ CPC45_ROMBOOT_config: unconfig - @./mkconfig $(call xtract_82xx,$@) ppc mpc824x cpc45 - @cd ./include ; \ + @$(MKCONFIG) $(call xtract_82xx,$@) ppc mpc824x cpc45 + @cd $(obj)include ; \ if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ - echo "... booting from 8-bit flash" ; \ + $(XECHO) "... booting from 8-bit flash" ; \ else \ echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ - echo "... booting from 64-bit flash" ; \ + $(XECHO) "... booting from 64-bit flash" ; \ fi; \ echo "export CONFIG_BOOT_ROM" >> config.mk; CU824_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x cu824 + @$(MKCONFIG) $(@:_config=) ppc mpc824x cu824 debris_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x debris etin + @$(MKCONFIG) $(@:_config=) ppc mpc824x debris etin eXalion_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x eXalion + @$(MKCONFIG) $(@:_config=) ppc mpc824x eXalion HIDDEN_DRAGON_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x hidden_dragon + @$(MKCONFIG) $(@:_config=) ppc mpc824x hidden_dragon kvme080_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x kvme080 etin + @$(MKCONFIG) $(@:_config=) ppc mpc824x kvme080 etin + +# HDLAN is broken ATM. Should be fixed as soon as hardware is available and as +# time permits. +#linkstation_HDLAN_config \ +# Remove this line when HDLAN is fixed +linkstation_HGLAN_config: unconfig + @mkdir -p $(obj)include + @case $@ in \ + *HGLAN*) echo "#define CONFIG_HGLAN 1" >$(obj)include/config.h; ;; \ + *HDLAN*) echo "#define CONFIG_HLAN 1" >$(obj)include/config.h; ;; \ + esac + @$(MKCONFIG) -n $@ -a linkstation ppc mpc824x linkstation MOUSSE_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x mousse + @$(MKCONFIG) $(@:_config=) ppc mpc824x mousse MUSENKI_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x musenki + @$(MKCONFIG) $(@:_config=) ppc mpc824x musenki MVBLUE_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x mvblue + @$(MKCONFIG) $(@:_config=) ppc mpc824x mvblue OXC_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x oxc + @$(MKCONFIG) $(@:_config=) ppc mpc824x oxc PN62_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x pn62 + @$(MKCONFIG) $(@:_config=) ppc mpc824x pn62 Sandpoint8240_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x sandpoint + @$(MKCONFIG) $(@:_config=) ppc mpc824x sandpoint Sandpoint8245_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x sandpoint + @$(MKCONFIG) $(@:_config=) ppc mpc824x sandpoint sbc8240_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x sbc8240 + @$(MKCONFIG) $(@:_config=) ppc mpc824x sbc8240 SL8245_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x sl8245 + @$(MKCONFIG) $(@:_config=) ppc mpc824x sl8245 utx8245_config: unconfig - @./mkconfig $(@:_config=) ppc mpc824x utx8245 + @$(MKCONFIG) $(@:_config=) ppc mpc824x utx8245 ######################################################################### ## MPC8260 Systems ######################################################################### atc_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 atc + @$(MKCONFIG) $(@:_config=) ppc mpc8260 atc cogent_mpc8260_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 cogent + @$(MKCONFIG) $(@:_config=) ppc mpc8260 cogent CPU86_config \ CPU86_ROMBOOT_config: unconfig - @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu86 - @cd ./include ; \ + @$(MKCONFIG) $(call xtract_82xx,$@) ppc mpc8260 cpu86 + @cd $(obj)include ; \ if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ - echo "... booting from 8-bit flash" ; \ + $(XECHO) "... booting from 8-bit flash" ; \ else \ echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ - echo "... booting from 64-bit flash" ; \ + $(XECHO) "... booting from 64-bit flash" ; \ fi; \ echo "export CONFIG_BOOT_ROM" >> config.mk; CPU87_config \ CPU87_ROMBOOT_config: unconfig - @./mkconfig $(call xtract_82xx,$@) ppc mpc8260 cpu87 - @cd ./include ; \ + @$(MKCONFIG) $(call xtract_82xx,$@) ppc mpc8260 cpu87 + @cd $(obj)include ; \ if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ echo "CONFIG_BOOT_ROM = y" >> config.mk ; \ - echo "... booting from 8-bit flash" ; \ + $(XECHO) "... booting from 8-bit flash" ; \ else \ echo "CONFIG_BOOT_ROM = n" >> config.mk ; \ - echo "... booting from 64-bit flash" ; \ + $(XECHO) "... booting from 64-bit flash" ; \ fi; \ echo "export CONFIG_BOOT_ROM" >> config.mk; ep8248_config \ ep8248E_config : unconfig - @./mkconfig ep8248 ppc mpc8260 ep8248 + @$(MKCONFIG) ep8248 ppc mpc8260 ep8248 ep8260_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 ep8260 + @$(MKCONFIG) $(@:_config=) ppc mpc8260 ep8260 + +ep82xxm_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc8260 ep82xxm gw8260_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 gw8260 + @$(MKCONFIG) $(@:_config=) ppc mpc8260 gw8260 hymod_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 hymod + @$(MKCONFIG) $(@:_config=) ppc mpc8260 hymod IDS8247_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 ids8247 + @$(MKCONFIG) $(@:_config=) ppc mpc8260 ids8247 IPHASE4539_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 iphase4539 + @$(MKCONFIG) $(@:_config=) ppc mpc8260 iphase4539 ISPAN_config \ ISPAN_REVB_config: unconfig + @mkdir -p $(obj)include @if [ "$(findstring _REVB_,$@)" ] ; then \ - echo "#define CFG_REV_B" > include/config.h ; \ + echo "#define CFG_REV_B" > $(obj)include/config.h ; \ fi - @./mkconfig -a ISPAN ppc mpc8260 ispan + @$(MKCONFIG) -a ISPAN ppc mpc8260 ispan + +mgcoge_config : unconfig + @$(MKCONFIG) mgcoge ppc mpc8260 mgcoge MPC8260ADS_config \ MPC8260ADS_lowboot_config \ @@ -1189,21 +1803,23 @@ PQ2FADS-ZU_lowboot_config \ PQ2FADS-ZU_66MHz_config \ PQ2FADS-ZU_66MHz_lowboot_config \ : unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/mpc8260ads $(if $(findstring PQ2FADS,$@), \ - @echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > include/config.h, \ - @echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > include/config.h) + @echo "#define CONFIG_ADSTYPE CFG_PQ2FADS" > $(obj)include/config.h, \ + @echo "#define CONFIG_ADSTYPE CFG_"$(subst MPC,,$(word 1,$(subst _, ,$@))) > $(obj)include/config.h) $(if $(findstring MHz,$@), \ - @echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> include/config.h, \ + @echo "#define CONFIG_8260_CLKIN" $(subst MHz,,$(word 2,$(subst _, ,$@)))"000000" >> $(obj)include/config.h, \ $(if $(findstring VR,$@), \ - @echo "#define CONFIG_8260_CLKIN 66000000" >> include/config.h)) + @echo "#define CONFIG_8260_CLKIN 66000000" >> $(obj)include/config.h)) @[ -z "$(findstring lowboot_,$@)" ] || \ - { echo "TEXT_BASE = 0xFF800000" >board/mpc8260ads/config.tmp ; \ - echo "... with lowboot configuration" ; \ + { echo "TEXT_BASE = 0xFF800000" >$(obj)board/freescale/mpc8260ads/config.tmp ; \ + $(XECHO) "... with lowboot configuration" ; \ } - @./mkconfig -a MPC8260ADS ppc mpc8260 mpc8260ads + @$(MKCONFIG) -a MPC8260ADS ppc mpc8260 mpc8260ads freescale MPC8266ADS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 mpc8266ads + @$(MKCONFIG) $(@:_config=) ppc mpc8260 mpc8266ads freescale # PM825/PM826 default configuration: small (= 8 MB) Flash / boot from 64-bit flash PM825_config \ @@ -1214,71 +1830,74 @@ PM826_config \ PM826_ROMBOOT_config \ PM826_BIGFLASH_config \ PM826_ROMBOOT_BIGFLASH_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/pm826 @if [ "$(findstring PM825_,$@)" ] ; then \ - echo "#define CONFIG_PCI" >include/config.h ; \ + echo "#define CONFIG_PCI" >$(obj)include/config.h ; \ else \ - >include/config.h ; \ + >$(obj)include/config.h ; \ fi @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ - echo "... booting from 8-bit flash" ; \ - echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \ - echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \ + $(XECHO) "... booting from 8-bit flash" ; \ + echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \ + echo "TEXT_BASE = 0xFF800000" >$(obj)board/pm826/config.tmp ; \ if [ "$(findstring _BIGFLASH_,$@)" ] ; then \ - echo "... with 32 MB Flash" ; \ - echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \ + $(XECHO) "... with 32 MB Flash" ; \ + echo "#define CONFIG_FLASH_32MB" >>$(obj)include/config.h ; \ fi; \ else \ - echo "... booting from 64-bit flash" ; \ + $(XECHO) "... booting from 64-bit flash" ; \ if [ "$(findstring _BIGFLASH_,$@)" ] ; then \ - echo "... with 32 MB Flash" ; \ - echo "#define CONFIG_FLASH_32MB" >>include/config.h ; \ - echo "TEXT_BASE = 0x40000000" >board/pm826/config.tmp ; \ + $(XECHO) "... with 32 MB Flash" ; \ + echo "#define CONFIG_FLASH_32MB" >>$(obj)include/config.h ; \ + echo "TEXT_BASE = 0x40000000" >$(obj)board/pm826/config.tmp ; \ else \ - echo "TEXT_BASE = 0xFF000000" >board/pm826/config.tmp ; \ + echo "TEXT_BASE = 0xFF000000" >$(obj)board/pm826/config.tmp ; \ fi; \ fi - @./mkconfig -a PM826 ppc mpc8260 pm826 + @$(MKCONFIG) -a PM826 ppc mpc8260 pm826 PM828_config \ PM828_PCI_config \ PM828_ROMBOOT_config \ PM828_ROMBOOT_PCI_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/pm826 @if [ "$(findstring _PCI_,$@)" ] ; then \ - echo "#define CONFIG_PCI" >>include/config.h ; \ - echo "... with PCI enabled" ; \ - else \ - >include/config.h ; \ + echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \ + $(XECHO) "... with PCI enabled" ; \ fi @if [ "$(findstring _ROMBOOT_,$@)" ] ; then \ - echo "... booting from 8-bit flash" ; \ - echo "#define CONFIG_BOOT_ROM" >>include/config.h ; \ - echo "TEXT_BASE = 0xFF800000" >board/pm826/config.tmp ; \ + $(XECHO) "... booting from 8-bit flash" ; \ + echo "#define CONFIG_BOOT_ROM" >>$(obj)include/config.h ; \ + echo "TEXT_BASE = 0xFF800000" >$(obj)board/pm826/config.tmp ; \ fi - @./mkconfig -a PM828 ppc mpc8260 pm828 + @$(MKCONFIG) -a PM828 ppc mpc8260 pm828 ppmc8260_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 ppmc8260 + @$(MKCONFIG) $(@:_config=) ppc mpc8260 ppmc8260 Rattler8248_config \ Rattler_config: unconfig + @mkdir -p $(obj)include $(if $(findstring 8248,$@), \ - @echo "#define CONFIG_MPC8248" > include/config.h) - @./mkconfig -a Rattler ppc mpc8260 rattler + @echo "#define CONFIG_MPC8248" > $(obj)include/config.h) + @$(MKCONFIG) -a Rattler ppc mpc8260 rattler RPXsuper_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 rpxsuper + @$(MKCONFIG) $(@:_config=) ppc mpc8260 rpxsuper rsdproto_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 rsdproto + @$(MKCONFIG) $(@:_config=) ppc mpc8260 rsdproto sacsng_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 sacsng + @$(MKCONFIG) $(@:_config=) ppc mpc8260 sacsng sbc8260_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 sbc8260 + @$(MKCONFIG) $(@:_config=) ppc mpc8260 sbc8260 SCM_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 SCM siemens + @$(MKCONFIG) $(@:_config=) ppc mpc8260 SCM siemens TQM8255_AA_config \ TQM8260_AA_config \ @@ -1291,6 +1910,7 @@ TQM8260_AG_config \ TQM8260_AH_config \ TQM8260_AI_config \ TQM8265_AA_config: unconfig + @mkdir -p $(obj)include @case "$@" in \ TQM8255_AA_config) CTYPE=MPC8255; CFREQ=300; CACHE=no; BMODE=8260;; \ TQM8260_AA_config) CTYPE=MPC8260; CFREQ=200; CACHE=no; BMODE=8260;; \ @@ -1304,205 +1924,550 @@ TQM8265_AA_config: unconfig TQM8260_AI_config) CTYPE=MPC8260; CFREQ=300; CACHE=no; BMODE=60x;; \ TQM8265_AA_config) CTYPE=MPC8265; CFREQ=300; CACHE=no; BMODE=60x;; \ esac; \ - >include/config.h ; \ if [ "$${CTYPE}" != "MPC8260" ] ; then \ - echo "#define CONFIG_$${CTYPE}" >>include/config.h ; \ + echo "#define CONFIG_$${CTYPE}" >>$(obj)include/config.h ; \ fi; \ - echo "#define CONFIG_$${CFREQ}MHz" >>include/config.h ; \ + echo "#define CONFIG_$${CFREQ}MHz" >>$(obj)include/config.h ; \ echo "... with $${CFREQ}MHz system clock" ; \ - if [ "$${CACHE}" == "yes" ] ; then \ - echo "#define CONFIG_L2_CACHE" >>include/config.h ; \ - echo "... with L2 Cache support" ; \ + if [ "$${CACHE}" = "yes" ] ; then \ + echo "#define CONFIG_L2_CACHE" >>$(obj)include/config.h ; \ + $(XECHO) "... with L2 Cache support" ; \ else \ - echo "#undef CONFIG_L2_CACHE" >>include/config.h ; \ - echo "... without L2 Cache support" ; \ + echo "#undef CONFIG_L2_CACHE" >>$(obj)include/config.h ; \ + $(XECHO) "... without L2 Cache support" ; \ fi; \ - if [ "$${BMODE}" == "60x" ] ; then \ - echo "#define CONFIG_BUSMODE_60x" >>include/config.h ; \ - echo "... with 60x Bus Mode" ; \ + if [ "$${BMODE}" = "60x" ] ; then \ + echo "#define CONFIG_BUSMODE_60x" >>$(obj)include/config.h ; \ + $(XECHO) "... with 60x Bus Mode" ; \ else \ - echo "#undef CONFIG_BUSMODE_60x" >>include/config.h ; \ - echo "... without 60x Bus Mode" ; \ + echo "#undef CONFIG_BUSMODE_60x" >>$(obj)include/config.h ; \ + $(XECHO) "... without 60x Bus Mode" ; \ fi - @./mkconfig -a TQM8260 ppc mpc8260 tqm8260 + @$(MKCONFIG) -a TQM8260 ppc mpc8260 tqm8260 tqc + +TQM8272_config: unconfig + @$(MKCONFIG) TQM8272 ppc mpc8260 tqm8272 tqc VoVPN-GW_66MHz_config \ VoVPN-GW_100MHz_config: unconfig - @echo "#define CONFIG_CLKIN_$(word 2,$(subst _, ,$@))" > include/config.h - @./mkconfig -a VoVPN-GW ppc mpc8260 vovpn-gw funkwerk + @mkdir -p $(obj)include + @echo "#define CONFIG_CLKIN_$(word 2,$(subst _, ,$@))" > $(obj)include/config.h + @$(MKCONFIG) -a VoVPN-GW ppc mpc8260 vovpn-gw funkwerk ZPC1900_config: unconfig - @./mkconfig $(@:_config=) ppc mpc8260 zpc1900 + @$(MKCONFIG) $(@:_config=) ppc mpc8260 zpc1900 ######################################################################### ## Coldfire ######################################################################### +M52277EVB_config: unconfig + @$(MKCONFIG) -a M52277EVB m68k mcf5227x m52277evb freescale + +M5235EVB_config \ +M5235EVB_Flash16_config \ +M5235EVB_Flash32_config: unconfig + @case "$@" in \ + M5235EVB_config) FLASH=16;; \ + M5235EVB_Flash16_config) FLASH=16;; \ + M5235EVB_Flash32_config) FLASH=32;; \ + esac; \ + if [ "$${FLASH}" != "16" ] ; then \ + echo "#define NORFLASH_PS32BIT 1" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0xFFC00000" > $(obj)board/freescale/m5235evb/config.tmp ; \ + cp $(obj)board/freescale/m5235evb/u-boot.32 $(obj)board/freescale/m5235evb/u-boot.lds ; \ + else \ + echo "TEXT_BASE = 0xFFE00000" > $(obj)board/freescale/m5235evb/config.tmp ; \ + cp $(obj)board/freescale/m5235evb/u-boot.16 $(obj)board/freescale/m5235evb/u-boot.lds ; \ + fi + @$(MKCONFIG) -a M5235EVB m68k mcf523x m5235evb freescale + +M5249EVB_config : unconfig + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5249evb freescale + +M5253EVBE_config : unconfig + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5253evbe freescale + cobra5272_config : unconfig - @./mkconfig $(@:_config=) m68k mcf52x2 cobra5272 + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 cobra5272 EB+MCF-EV123_config : unconfig - @ >include/config.h - @echo "TEXT_BASE = 0xFFE00000"|tee board/BuS/EB+MCF-EV123/textbase.mk - @./mkconfig EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS + @mkdir -p $(obj)include + @mkdir -p $(obj)board/BuS/EB+MCF-EV123 + @echo "TEXT_BASE = 0xFFE00000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk + @$(MKCONFIG) EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS EB+MCF-EV123_internal_config : unconfig - @ >include/config.h - @echo "TEXT_BASE = 0xF0000000"|tee board/BuS/EB+MCF-EV123/textbase.mk - @./mkconfig EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS + @mkdir -p $(obj)include + @mkdir -p $(obj)board/BuS/EB+MCF-EV123 + @echo "TEXT_BASE = 0xF0000000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk + @$(MKCONFIG) EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS + +idmr_config : unconfig + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 idmr M5271EVB_config : unconfig - @./mkconfig $(@:_config=) m68k mcf52x2 m5271evb + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5271evb M5272C3_config : unconfig - @./mkconfig $(@:_config=) m68k mcf52x2 m5272c3 + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5272c3 + +M5275EVB_config : unconfig + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5275evb freescale M5282EVB_config : unconfig - @./mkconfig $(@:_config=) m68k mcf52x2 m5282evb + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5282evb + +M5329AFEE_config \ +M5329BFEE_config : unconfig + @case "$@" in \ + M5329AFEE_config) NAND=0;; \ + M5329BFEE_config) NAND=16;; \ + esac; \ + if [ "$${NAND}" != "0" ] ; then \ + echo "#define NANDFLASH_SIZE $${NAND}" > $(obj)include/config.h ; \ + fi + @$(MKCONFIG) -a M5329EVB m68k mcf532x m5329evb freescale + +M5373EVB_config : unconfig + @case "$@" in \ + M5373EVB_config) NAND=16;; \ + esac; \ + if [ "$${NAND}" != "0" ] ; then \ + echo "#define NANDFLASH_SIZE $${NAND}" > $(obj)include/config.h ; \ + fi + @$(MKCONFIG) -a M5373EVB m68k mcf532x m5373evb freescale + +M54455EVB_config \ +M54455EVB_atmel_config \ +M54455EVB_intel_config \ +M54455EVB_a33_config \ +M54455EVB_a66_config \ +M54455EVB_i33_config \ +M54455EVB_i66_config : unconfig + @case "$@" in \ + M54455EVB_config) FLASH=ATMEL; FREQ=33333333;; \ + M54455EVB_atmel_config) FLASH=ATMEL; FREQ=33333333;; \ + M54455EVB_intel_config) FLASH=INTEL; FREQ=33333333;; \ + M54455EVB_a33_config) FLASH=ATMEL; FREQ=33333333;; \ + M54455EVB_a66_config) FLASH=ATMEL; FREQ=66666666;; \ + M54455EVB_i33_config) FLASH=INTEL; FREQ=33333333;; \ + M54455EVB_i66_config) FLASH=INTEL; FREQ=66666666;; \ + esac; \ + if [ "$${FLASH}" = "INTEL" ] ; then \ + echo "#undef CFG_ATMEL_BOOT" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54455evb/config.tmp ; \ + cp $(obj)board/freescale/m54455evb/u-boot.int $(obj)board/freescale/m54455evb/u-boot.lds ; \ + $(XECHO) "... with INTEL boot..." ; \ + else \ + echo "#define CFG_ATMEL_BOOT" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x04000000" > $(obj)board/freescale/m54455evb/config.tmp ; \ + cp $(obj)board/freescale/m54455evb/u-boot.atm $(obj)board/freescale/m54455evb/u-boot.lds ; \ + $(XECHO) "... with ATMEL boot..." ; \ + fi; \ + echo "#define CFG_INPUT_CLKSRC $${FREQ}" >> $(obj)include/config.h ; \ + $(XECHO) "... with $${FREQ}Hz input clock" + @$(MKCONFIG) -a M54455EVB m68k mcf5445x m54455evb freescale + +M5475AFE_config \ +M5475BFE_config \ +M5475CFE_config \ +M5475DFE_config \ +M5475EFE_config \ +M5475FFE_config \ +M5475GFE_config : unconfig + @case "$@" in \ + M5475AFE_config) BOOT=2;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ + M5475BFE_config) BOOT=2;CODE=16;VID=0;USB=0;RAM=64;RAM1=0;; \ + M5475CFE_config) BOOT=2;CODE=16;VID=1;USB=1;RAM=64;RAM1=0;; \ + M5475DFE_config) BOOT=2;CODE=0;VID=0;USB=1;RAM=64;RAM1=0;; \ + M5475EFE_config) BOOT=2;CODE=0;VID=1;USB=1;RAM=64;RAM1=0;; \ + M5475FFE_config) BOOT=2;CODE=32;VID=1;USB=1;RAM=64;RAM1=64;; \ + M5475GFE_config) BOOT=4;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ + esac; \ + echo "#define CFG_BUSCLK 133333333" > $(obj)include/config.h ; \ + echo "#define CFG_BOOTSZ $${BOOT}" >> $(obj)include/config.h ; \ + echo "#define CFG_DRAMSZ $${RAM}" >> $(obj)include/config.h ; \ + if [ "$${RAM1}" != "0" ] ; then \ + echo "#define CFG_DRAMSZ1 $${RAM1}" >> $(obj)include/config.h ; \ + fi; \ + if [ "$${CODE}" != "0" ] ; then \ + echo "#define CFG_NOR1SZ $${CODE}" >> $(obj)include/config.h ; \ + fi; \ + if [ "$${VID}" == "1" ] ; then \ + echo "#define CFG_VIDEO" >> $(obj)include/config.h ; \ + fi; \ + if [ "$${USB}" == "1" ] ; then \ + echo "#define CFG_USBCTRL" >> $(obj)include/config.h ; \ + fi + @$(MKCONFIG) -a M5475EVB m68k mcf547x_8x m547xevb freescale + +M5485AFE_config \ +M5485BFE_config \ +M5485CFE_config \ +M5485DFE_config \ +M5485EFE_config \ +M5485FFE_config \ +M5485GFE_config \ +M5485HFE_config : unconfig + @case "$@" in \ + M5485AFE_config) BOOT=2;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ + M5485BFE_config) BOOT=2;CODE=16;VID=0;USB=0;RAM=64;RAM1=0;; \ + M5485CFE_config) BOOT=2;CODE=16;VID=1;USB=1;RAM=64;RAM1=0;; \ + M5485DFE_config) BOOT=2;CODE=0;VID=0;USB=1;RAM=64;RAM1=0;; \ + M5485EFE_config) BOOT=2;CODE=0;VID=1;USB=1;RAM=64;RAM1=0;; \ + M5485FFE_config) BOOT=2;CODE=32;VID=1;USB=1;RAM=64;RAM1=64;; \ + M5485GFE_config) BOOT=4;CODE=0;VID=0;USB=0;RAM=64;RAM1=0;; \ + M5485HFE_config) BOOT=2;CODE=16;VID=1;USB=0;RAM=64;RAM1=0;; \ + esac; \ + echo "#define CFG_BUSCLK 100000000" > $(obj)include/config.h ; \ + echo "#define CFG_BOOTSZ $${BOOT}" >> $(obj)include/config.h ; \ + echo "#define CFG_DRAMSZ $${RAM}" >> $(obj)include/config.h ; \ + if [ "$${RAM1}" != "0" ] ; then \ + echo "#define CFG_DRAMSZ1 $${RAM1}" >> $(obj)include/config.h ; \ + fi; \ + if [ "$${CODE}" != "0" ] ; then \ + echo "#define CFG_NOR1SZ $${CODE}" >> $(obj)include/config.h ; \ + fi; \ + if [ "$${VID}" == "1" ] ; then \ + echo "#define CFG_VIDEO" >> $(obj)include/config.h ; \ + fi; \ + if [ "$${USB}" == "1" ] ; then \ + echo "#define CFG_USBCTRL" >> $(obj)include/config.h ; \ + fi + @$(MKCONFIG) -a M5485EVB m68k mcf547x_8x m548xevb freescale TASREG_config : unconfig - @./mkconfig $(@:_config=) m68k mcf52x2 tasreg esd - -r5200_config : unconfig - @./mkconfig $(@:_config=) m68k mcf52x2 r5200 + @$(MKCONFIG) $(@:_config=) m68k mcf52x2 tasreg esd ######################################################################### ## MPC83xx Systems ######################################################################### -MPC8349ADS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc83xx mpc8349ads +MPC8313ERDB_33_config \ +MPC8313ERDB_66_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _33_,$@)" ] ; then \ + $(XECHO) -n "...33M ..." ; \ + echo "#define CFG_33MHZ" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _66_,$@)" ] ; then \ + $(XECHO) -n "...66M..." ; \ + echo "#define CFG_66MHZ" >>$(obj)include/config.h ; \ + fi ; + @$(MKCONFIG) -a MPC8313ERDB ppc mpc83xx mpc8313erdb freescale -TQM834x_config: unconfig - @./mkconfig $(@:_config=) ppc mpc83xx tqm834x +MPC8315ERDB_config: unconfig + @$(MKCONFIG) -a MPC8315ERDB ppc mpc83xx mpc8315erdb freescale + +MPC8323ERDB_config: unconfig + @$(MKCONFIG) -a MPC8323ERDB ppc mpc83xx mpc8323erdb freescale + +MPC832XEMDS_config \ +MPC832XEMDS_HOST_33_config \ +MPC832XEMDS_HOST_66_config \ +MPC832XEMDS_SLAVE_config \ +MPC832XEMDS_ATM_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _HOST_,$@)" ] ; then \ + $(XECHO) -n "... PCI HOST " ; \ + echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _SLAVE_,$@)" ] ; then \ + $(XECHO) "...PCI SLAVE 66M" ; \ + echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _33_,$@)" ] ; then \ + $(XECHO) -n "...33M ..." ; \ + echo "#define PCI_33M" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _66_,$@)" ] ; then \ + $(XECHO) -n "...66M..." ; \ + echo "#define PCI_66M" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _ATM_,$@)" ] ; then \ + $(XECHO) -n "...ATM..." ; \ + echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB_ATM 1" >>$(obj)include/config.h ; \ + fi ; + @$(MKCONFIG) -a MPC832XEMDS ppc mpc83xx mpc832xemds freescale MPC8349EMDS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc83xx mpc8349emds + @$(MKCONFIG) $(@:_config=) ppc mpc83xx mpc8349emds freescale + +MPC8349ITX_config \ +MPC8349ITX_LOWBOOT_config \ +MPC8349ITXGP_config: unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)board/freescale/mpc8349itx + @echo "#define CONFIG_$(subst _LOWBOOT,,$(@:_config=))" >> $(obj)include/config.h + @if [ "$(findstring GP,$@)" ] ; then \ + echo "TEXT_BASE = 0xFE000000" >$(obj)board/freescale/mpc8349itx/config.tmp ; \ + fi + @if [ "$(findstring LOWBOOT,$@)" ] ; then \ + echo "TEXT_BASE = 0xFE000000" >$(obj)board/freescale/mpc8349itx/config.tmp ; \ + fi + @$(MKCONFIG) -a -n $(@:_config=) MPC8349ITX ppc mpc83xx mpc8349itx freescale + +MPC8360EMDS_config \ +MPC8360EMDS_HOST_33_config \ +MPC8360EMDS_HOST_66_config \ +MPC8360EMDS_SLAVE_config \ +MPC8360EMDS_ATM_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _HOST_,$@)" ] ; then \ + $(XECHO) -n "... PCI HOST " ; \ + echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _SLAVE_,$@)" ] ; then \ + $(XECHO) "...PCI SLAVE 66M" ; \ + echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _33_,$@)" ] ; then \ + $(XECHO) -n "...33M ..." ; \ + echo "#define PCI_33M" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _66_,$@)" ] ; then \ + $(XECHO) -n "...66M..." ; \ + echo "#define PCI_66M" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ + fi ; \ + if [ "$(findstring _ATM_,$@)" ] ; then \ + $(XECHO) -n "...ATM..." ; \ + echo "#define CONFIG_PQ_MDS_PIB 1" >>$(obj)include/config.h ; \ + echo "#define CONFIG_PQ_MDS_PIB_ATM 1" >>$(obj)include/config.h ; \ + fi ; + @$(MKCONFIG) -a MPC8360EMDS ppc mpc83xx mpc8360emds freescale + +MPC8360ERDK_33_config \ +MPC8360ERDK_66_config \ +MPC8360ERDK_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _33_,$@)" ] ; then \ + $(XECHO) -n "... CLKIN 33MHz " ; \ + echo "#define CONFIG_CLKIN_33MHZ" >>$(obj)include/config.h ;\ + fi ; + @$(MKCONFIG) -a MPC8360ERDK ppc mpc83xx mpc8360erdk freescale + +MPC837XEMDS_config \ +MPC837XEMDS_HOST_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _HOST_,$@)" ] ; then \ + $(XECHO) -n "... PCI HOST " ; \ + echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \ + fi ; + @$(MKCONFIG) -a MPC837XEMDS ppc mpc83xx mpc837xemds freescale + +MPC837XERDB_config: unconfig + @$(MKCONFIG) -a MPC837XERDB ppc mpc83xx mpc837xerdb freescale + +MVBLM7_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc83xx mvblm7 + +sbc8349_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc83xx sbc8349 + +TQM834x_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc83xx tqm834x tqc + ######################################################################### ## MPC85xx Systems ######################################################################### +ATUM8548_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc85xx atum8548 + MPC8540ADS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx mpc8540ads + @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8540ads freescale MPC8540EVAL_config \ MPC8540EVAL_33_config \ MPC8540EVAL_66_config \ MPC8540EVAL_33_slave_config \ -MPC8540EVAL_66_slave_config: unconfig - @echo "" >include/config.h ; \ - if [ "$(findstring _33_,$@)" ] ; then \ - echo -n "... 33 MHz PCI" ; \ +MPC8540EVAL_66_slave_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _33_,$@)" ] ; then \ + $(XECHO) "... 33 MHz PCI" ; \ else \ - echo "#define CONFIG_SYSCLK_66M" >>include/config.h ; \ - echo -n "... 66 MHz PCI" ; \ + echo "#define CONFIG_SYSCLK_66M" >>$(obj)include/config.h ; \ + $(XECHO) "... 66 MHz PCI" ; \ fi ; \ if [ "$(findstring _slave_,$@)" ] ; then \ - echo "#define CONFIG_PCI_SLAVE" >>include/config.h ; \ - echo " slave" ; \ + echo "#define CONFIG_PCI_SLAVE" >>$(obj)include/config.h ; \ + $(XECHO) " slave" ; \ else \ - echo " host" ; \ + $(XECHO) " host" ; \ fi - @./mkconfig -a MPC8540EVAL ppc mpc85xx mpc8540eval + @$(MKCONFIG) -a MPC8540EVAL ppc mpc85xx mpc8540eval MPC8560ADS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx mpc8560ads + @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8560ads freescale +MPC8541CDS_legacy_config \ MPC8541CDS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx mpc8541cds cds + @mkdir -p $(obj)include + @if [ "$(findstring _legacy_,$@)" ] ; then \ + echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \ + $(XECHO) "... legacy" ; \ + fi + @$(MKCONFIG) -a MPC8541CDS ppc mpc85xx mpc8541cds freescale +MPC8544DS_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8544ds freescale + +MPC8548CDS_legacy_config \ MPC8548CDS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx mpc8548cds cds + @mkdir -p $(obj)include + @if [ "$(findstring _legacy_,$@)" ] ; then \ + echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \ + $(XECHO) "... legacy" ; \ + fi + @$(MKCONFIG) -a MPC8548CDS ppc mpc85xx mpc8548cds freescale +MPC8555CDS_legacy_config \ MPC8555CDS_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx mpc8555cds cds + @mkdir -p $(obj)include + @if [ "$(findstring _legacy_,$@)" ] ; then \ + echo "#define CONFIG_LEGACY" >>$(obj)include/config.h ; \ + $(XECHO) "... legacy" ; \ + fi + @$(MKCONFIG) -a MPC8555CDS ppc mpc85xx mpc8555cds freescale + +MPC8568MDS_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc85xx mpc8568mds freescale PM854_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx pm854 + @$(MKCONFIG) $(@:_config=) ppc mpc85xx pm854 PM856_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx pm856 + @$(MKCONFIG) $(@:_config=) ppc mpc85xx pm856 sbc8540_config \ sbc8540_33_config \ sbc8540_66_config: unconfig + @mkdir -p $(obj)include @if [ "$(findstring _66_,$@)" ] ; then \ - echo "#define CONFIG_PCI_66" >>include/config.h ; \ - echo "... 66 MHz PCI" ; \ + echo "#define CONFIG_PCI_66" >>$(obj)include/config.h ; \ + $(XECHO) "... 66 MHz PCI" ; \ else \ - >include/config.h ; \ - echo "... 33 MHz PCI" ; \ + $(XECHO) "... 33 MHz PCI" ; \ fi - @./mkconfig -a SBC8540 ppc mpc85xx sbc8560 + @$(MKCONFIG) -a SBC8540 ppc mpc85xx sbc8560 + +sbc8548_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc85xx sbc8548 sbc8560_config \ sbc8560_33_config \ -sbc8560_66_config: unconfig +sbc8560_66_config: unconfig + @mkdir -p $(obj)include @if [ "$(findstring _66_,$@)" ] ; then \ - echo "#define CONFIG_PCI_66" >>include/config.h ; \ - echo "... 66 MHz PCI" ; \ + echo "#define CONFIG_PCI_66" >>$(obj)include/config.h ; \ + $(XECHO) "... 66 MHz PCI" ; \ else \ - >include/config.h ; \ - echo "... 33 MHz PCI" ; \ + $(XECHO) "... 33 MHz PCI" ; \ fi - @./mkconfig -a sbc8560 ppc mpc85xx sbc8560 + @$(MKCONFIG) -a sbc8560 ppc mpc85xx sbc8560 + +socrates_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc85xx socrates stxgp3_config: unconfig - @./mkconfig $(@:_config=) ppc mpc85xx stxgp3 + @$(MKCONFIG) $(@:_config=) ppc mpc85xx stxgp3 + +stxssa_config \ +stxssa_4M_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring _4M_,$@)" ] ; then \ + echo "#define CONFIG_STXSSA_4M" >>$(obj)include/config.h ; \ + $(XECHO) "... with 4 MiB flash memory" ; \ + fi + @$(MKCONFIG) -a stxssa ppc mpc85xx stxssa TQM8540_config \ TQM8541_config \ +TQM8548_config \ TQM8555_config \ TQM8560_config: unconfig + @mkdir -p $(obj)include @CTYPE=$(subst TQM,,$(@:_config=)); \ - >include/config.h ; \ - echo "... TQM"$${CTYPE}; \ - echo "#define CONFIG_MPC$${CTYPE}">>include/config.h; \ - echo "#define CONFIG_TQM$${CTYPE}">>include/config.h; \ - echo "#define CONFIG_HOSTNAME tqm$${CTYPE}">>include/config.h; \ - echo "#define CONFIG_BOARDNAME \"TQM$${CTYPE}\"">>include/config.h; \ - echo "#define CFG_BOOTFILE \"bootfile=/tftpboot/tqm$${CTYPE}/uImage\0\"">>include/config.h - @./mkconfig -a TQM85xx ppc mpc85xx tqm85xx + $(XECHO) "... TQM"$${CTYPE}; \ + echo "#define CONFIG_MPC$${CTYPE}">>$(obj)include/config.h; \ + echo "#define CONFIG_TQM$${CTYPE}">>$(obj)include/config.h; \ + echo "#define CONFIG_HOSTNAME tqm$${CTYPE}">>$(obj)include/config.h; \ + echo "#define CONFIG_BOARDNAME \"TQM$${CTYPE}\"">>$(obj)include/config.h; + @$(MKCONFIG) -a TQM85xx ppc mpc85xx tqm85xx tqc + +######################################################################### +## MPC86xx Systems +######################################################################### + +MPC8610HPCD_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc86xx mpc8610hpcd freescale + +MPC8641HPCN_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc86xx mpc8641hpcn freescale + +sbc8641d_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc mpc86xx sbc8641d ######################################################################### ## 74xx/7xx Systems ######################################################################### AmigaOneG3SE_config: unconfig - @./mkconfig $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx AmigaOneG3SE MAI BAB7xx_config: unconfig - @./mkconfig $(@:_config=) ppc 74xx_7xx bab7xx eltec + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx bab7xx eltec -CPCI750_config: unconfig - @./mkconfig CPCI750 ppc 74xx_7xx cpci750 esd +CPCI750_config: unconfig + @$(MKCONFIG) CPCI750 ppc 74xx_7xx cpci750 esd -DB64360_config: unconfig - @./mkconfig DB64360 ppc 74xx_7xx db64360 Marvell +DB64360_config: unconfig + @$(MKCONFIG) DB64360 ppc 74xx_7xx db64360 Marvell -DB64460_config: unconfig - @./mkconfig DB64460 ppc 74xx_7xx db64460 Marvell +DB64460_config: unconfig + @$(MKCONFIG) DB64460 ppc 74xx_7xx db64460 Marvell ELPPC_config: unconfig - @./mkconfig $(@:_config=) ppc 74xx_7xx elppc eltec + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx elppc eltec EVB64260_config \ EVB64260_750CX_config: unconfig - @./mkconfig EVB64260 ppc 74xx_7xx evb64260 + @$(MKCONFIG) EVB64260 ppc 74xx_7xx evb64260 + +mpc7448hpc2_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx mpc7448hpc2 freescale P3G4_config: unconfig - @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260 + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx evb64260 + +p3m750_config \ +p3m7448_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring 750_,$@)" ] ; then \ + echo "#define CONFIG_P3M750" >>$(obj)include/config.h ; \ + else \ + echo "#define CONFIG_P3M7448" >>$(obj)include/config.h ; \ + fi + @$(MKCONFIG) -a p3mx ppc 74xx_7xx p3mx prodrive PCIPPC2_config \ PCIPPC6_config: unconfig - @./mkconfig $(@:_config=) ppc 74xx_7xx pcippc2 - -ZUMA_config: unconfig - @./mkconfig $(@:_config=) ppc 74xx_7xx evb64260 + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx pcippc2 ppmc7xx_config: unconfig - @./mkconfig $(@:_config=) ppc 74xx_7xx ppmc7xx + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx ppmc7xx + +ZUMA_config: unconfig + @$(MKCONFIG) $(@:_config=) ppc 74xx_7xx evb64260 #======================================================================== # ARM @@ -1512,42 +2477,64 @@ ppmc7xx_config: unconfig ######################################################################### assabet_config : unconfig - @./mkconfig $(@:_config=) arm sa1100 assabet + @$(MKCONFIG) $(@:_config=) arm sa1100 assabet dnp1110_config : unconfig - @./mkconfig $(@:_config=) arm sa1100 dnp1110 + @$(MKCONFIG) $(@:_config=) arm sa1100 dnp1110 gcplus_config : unconfig - @./mkconfig $(@:_config=) arm sa1100 gcplus + @$(MKCONFIG) $(@:_config=) arm sa1100 gcplus lart_config : unconfig - @./mkconfig $(@:_config=) arm sa1100 lart + @$(MKCONFIG) $(@:_config=) arm sa1100 lart shannon_config : unconfig - @./mkconfig $(@:_config=) arm sa1100 shannon + @$(MKCONFIG) $(@:_config=) arm sa1100 shannon ######################################################################### ## ARM92xT Systems ######################################################################### -xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1)))) - -xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1)))) - -xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1))) +######################################################################### +## Atmel AT91RM9200 Systems +######################################################################### at91rm9200dk_config : unconfig - @./mkconfig $(@:_config=) arm arm920t at91rm9200dk NULL at91rm9200 + @$(MKCONFIG) $(@:_config=) arm arm920t at91rm9200dk atmel at91rm9200 + +at91sam9261ek_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9261ek atmel at91sam9 + +at91sam9263ek_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9263ek atmel at91sam9 + +at91sam9rlek_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9rlek atmel at91sam9 cmc_pu2_config : unconfig - @./mkconfig $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200 + @$(MKCONFIG) $(@:_config=) arm arm920t cmc_pu2 NULL at91rm9200 csb637_config : unconfig - @./mkconfig $(@:_config=) arm arm920t csb637 NULL at91rm9200 + @$(MKCONFIG) $(@:_config=) arm arm920t csb637 NULL at91rm9200 + +kb9202_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t kb9202 NULL at91rm9200 + +m501sk_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t m501sk NULL at91rm9200 mp2usb_config : unconfig - @./mkconfig $(@:_config=) arm arm920t mp2usb NULL at91rm9200 + @$(MKCONFIG) $(@:_config=) arm arm920t mp2usb NULL at91rm9200 +######################################################################### +## Atmel ARM926EJ-S Systems +######################################################################### + +at91cap9adk_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs at91cap9adk atmel at91sam9 + +at91sam9260ek_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs at91sam9260ek atmel at91sam9 ######################################################################## ## ARM Integrator boards - see doc/README-integrator for more info. @@ -1557,7 +2544,7 @@ ap966_config \ ap922_config \ ap922_XA10_config \ ap7_config \ -ap720t_config \ +ap720t_config \ ap920t_config \ ap926ejs_config \ ap946es_config: unconfig @@ -1575,35 +2562,35 @@ cp922_XA10_config \ cp1026_config: unconfig @board/integratorcp/split_by_variant.sh $@ -kb9202_config : unconfig - @./mkconfig $(@:_config=) arm arm920t kb9202 NULL at91rm9200 +davinci_dvevm_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs dv-evm davinci davinci + +davinci_schmoogie_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs schmoogie davinci davinci + +davinci_sffsdr_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs sffsdr davinci davinci + +davinci_sonata_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs sonata davinci davinci lpd7a400_config \ lpd7a404_config: unconfig - @./mkconfig $(@:_config=) arm lh7a40x lpd7a40x + @$(MKCONFIG) $(@:_config=) arm lh7a40x lpd7a40x mx1ads_config : unconfig - @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx + @$(MKCONFIG) $(@:_config=) arm arm920t mx1ads NULL imx mx1fs2_config : unconfig - @./mkconfig $(@:_config=) arm arm920t mx1fs2 NULL imx + @$(MKCONFIG) $(@:_config=) arm arm920t mx1fs2 NULL imx -netstar_32_config \ netstar_config: unconfig - @if [ "$(findstring _32_,$@)" ] ; then \ - echo "... 32MB SDRAM" ; \ - echo "#define PHYS_SDRAM_1_SIZE SZ_32M" >>include/config.h ; \ - else \ - echo "... 64MB SDRAM" ; \ - echo "#define PHYS_SDRAM_1_SIZE SZ_64M" >>include/config.h ; \ - fi - @./mkconfig -a netstar arm arm925t netstar + @$(MKCONFIG) $(@:_config=) arm arm925t netstar omap1510inn_config : unconfig - @./mkconfig $(@:_config=) arm arm925t omap1510inn + @$(MKCONFIG) $(@:_config=) arm arm925t omap1510inn -omap5912osk_config : unconfig - @./mkconfig $(@:_config=) arm arm926ejs omap5912osk NULL omap +xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1)))) omap1610inn_config \ omap1610inn_cs0boot_config \ @@ -1613,255 +2600,353 @@ omap1610h2_config \ omap1610h2_cs0boot_config \ omap1610h2_cs3boot_config \ omap1610h2_cs_autoboot_config: unconfig + @mkdir -p $(obj)include @if [ "$(findstring _cs0boot_, $@)" ] ; then \ - echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \ - echo "... configured for CS0 boot"; \ + echo "#define CONFIG_CS0_BOOT" >> .$(obj)include/config.h ; \ + $(XECHO) "... configured for CS0 boot"; \ elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \ - echo "#define CONFIG_CS_AUTOBOOT" >> ./include/config.h ; \ - echo "... configured for CS_AUTO boot"; \ + echo "#define CONFIG_CS_AUTOBOOT" >> $(obj)include/config.h ; \ + $(XECHO) "... configured for CS_AUTO boot"; \ else \ - echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \ - echo "... configured for CS3 boot"; \ + echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \ + $(XECHO) "... configured for CS3 boot"; \ fi; - @./mkconfig -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn NULL omap + @$(MKCONFIG) -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn NULL omap -omap1710h3_config : unconfig - @./mkconfig $(@:_config=) arm arm926ejs omap1710h3 +omap5912osk_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs omap5912osk NULL omap -omapv1030gsample_config : unconfig - @./mkconfig $(@:_config=) arm arm926ejs omapv1030gsample +xtract_omap730p2 = $(subst _cs0boot,,$(subst _cs3boot,, $(subst _config,,$1))) omap730p2_config \ omap730p2_cs0boot_config \ omap730p2_cs3boot_config : unconfig + @mkdir -p $(obj)include @if [ "$(findstring _cs0boot_, $@)" ] ; then \ - echo "#define CONFIG_CS0_BOOT" >> ./include/config.h ; \ - echo "... configured for CS0 boot"; \ + echo "#define CONFIG_CS0_BOOT" >> $(obj)include/config.h ; \ + $(XECHO) "... configured for CS0 boot"; \ else \ - echo "#define CONFIG_CS3_BOOT" >> ./include/config.h ; \ - echo "... configured for CS3 boot"; \ + echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \ + $(XECHO) "... configured for CS3 boot"; \ fi; - @./mkconfig -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2 NULL omap + @$(MKCONFIG) -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2 NULL omap sbc2410x_config: unconfig - @./mkconfig $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 + @$(MKCONFIG) $(@:_config=) arm arm920t sbc2410x NULL s3c24x0 scb9328_config : unconfig - @./mkconfig $(@:_config=) arm arm920t scb9328 NULL imx + @$(MKCONFIG) $(@:_config=) arm arm920t scb9328 NULL imx smdk2400_config : unconfig - @./mkconfig $(@:_config=) arm arm920t smdk2400 NULL s3c24x0 + @$(MKCONFIG) $(@:_config=) arm arm920t smdk2400 NULL s3c24x0 smdk2410_config : unconfig - @./mkconfig $(@:_config=) arm arm920t smdk2410 NULL s3c24x0 + @$(MKCONFIG) $(@:_config=) arm arm920t smdk2410 NULL s3c24x0 + +tabla_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx tabla samsung mdirac3 + +smdk6400_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx smdk6400 samsung s3c6400 + +smdk6410_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx smdk6410 samsung s3c6410 + +smdk6430_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx smdk6430 samsung s3c6430 + +smdk2450_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s3c24xx smdk2450 samsung s3c2450 + +smdk2416_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s3c24xx smdk2416 samsung s3c2416 + +smdk_mp_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx-mp smdk_mp samsung s3c64xx-mp + +smdkc100_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s5pc1xx smdkc100 samsung s5pc100 + +smdk6440_nav2_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s5p64xx smdk6440 samsung s5p6440 SX1_config : unconfig - @./mkconfig $(@:_config=) arm arm925t sx1 + @$(MKCONFIG) $(@:_config=) arm arm925t sx1 + +seoul_nav2_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx smdk6430 samsung s3c6430 + +seoul_flasher_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx smdk6430 samsung s3c6430 + +beaumont_11_nav2_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx seoul tomtom s3c6430 + +torinos_config \ +torinos-debug_config \ +torinos_nav2_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx seoul tomtom s3c6430 + +torinos_flasher_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx smdk6430 samsung s3c6430 + +lima_config \ +lima-debug_config \ +lima_nav2_flasher_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx lima tomtom s3c6430 + +venice_config \ +venice-debug_config \ +venice_nav2_flasher_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s3c64xx venice tomtom s3c6430 + +cordoba_config \ +cordoba_nav2_config \ +cordoba_s5m8751_config \ +cordoba_s5m8751_nav2_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s5p64xx cordoba tomtom s5p6440 + +havana_config \ +havana-debug_config \ +havana_nav2_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s5p64xx havana tomtom s5p6440 + +catania_s_config \ +catania_s-debug_config: unconfig + @$(MKCONFIG) $(@:_config=) arm s5p64xx catania_s tomtom s5p6440 # TRAB default configuration: 8 MB Flash, 32 MB RAM +xtract_trab = $(subst _bigram,,$(subst _bigflash,,$(subst _old,,$(subst _config,,$1)))) + trab_config \ trab_bigram_config \ trab_bigflash_config \ trab_old_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include + @mkdir -p $(obj)board/trab @[ -z "$(findstring _bigram,$@)" ] || \ - { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \ - echo "#define CONFIG_RAM_32MB" >>include/config.h ; \ - echo "... with 8 MB Flash, 32 MB RAM" ; \ + { echo "#define CONFIG_FLASH_8MB" >>$(obj)include/config.h ; \ + echo "#define CONFIG_RAM_32MB" >>$(obj)include/config.h ; \ + $(XECHO) "... with 8 MB Flash, 32 MB RAM" ; \ } @[ -z "$(findstring _bigflash,$@)" ] || \ - { echo "#define CONFIG_FLASH_16MB" >>include/config.h ; \ - echo "#define CONFIG_RAM_16MB" >>include/config.h ; \ - echo "... with 16 MB Flash, 16 MB RAM" ; \ - echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \ + { echo "#define CONFIG_FLASH_16MB" >>$(obj)include/config.h ; \ + echo "#define CONFIG_RAM_16MB" >>$(obj)include/config.h ; \ + $(XECHO) "... with 16 MB Flash, 16 MB RAM" ; \ + echo "TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \ } @[ -z "$(findstring _old,$@)" ] || \ - { echo "#define CONFIG_FLASH_8MB" >>include/config.h ; \ - echo "#define CONFIG_RAM_16MB" >>include/config.h ; \ - echo "... with 8 MB Flash, 16 MB RAM" ; \ - echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \ + { echo "#define CONFIG_FLASH_8MB" >>$(obj)include/config.h ; \ + echo "#define CONFIG_RAM_16MB" >>$(obj)include/config.h ; \ + $(XECHO) "... with 8 MB Flash, 16 MB RAM" ; \ + echo "TEXT_BASE = 0x0CF40000" >$(obj)board/trab/config.tmp ; \ } - @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab NULL s3c24x0 + @$(MKCONFIG) -a $(call xtract_trab,$@) arm arm920t trab NULL s3c24x0 VCMA9_config : unconfig - @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0 + @$(MKCONFIG) $(@:_config=) arm arm920t vcma9 mpl s3c24x0 -#======================================================================== +######################################################################### # ARM supplied Versatile development boards -#======================================================================== +######################################################################### + +cm4008_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t cm4008 NULL ks8695 + +cm41xx_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm920t cm41xx NULL ks8695 + versatile_config \ versatileab_config \ versatilepb_config : unconfig @board/versatile/split_by_variant.sh $@ -voiceblue_smallflash_config \ voiceblue_config: unconfig - @if [ "$(findstring _smallflash_,$@)" ] ; then \ - echo "... boot from lower flash bank" ; \ - echo "#define VOICEBLUE_SMALL_FLASH" >>include/config.h ; \ - echo "VOICEBLUE_SMALL_FLASH=y" >board/voiceblue/config.tmp ; \ - else \ - echo "... boot from upper flash bank" ; \ - >include/config.h ; \ - echo "VOICEBLUE_SMALL_FLASH=n" >board/voiceblue/config.tmp ; \ - fi - @./mkconfig -a voiceblue arm arm925t voiceblue - -cm4008_config : unconfig - @./mkconfig $(@:_config=) arm arm920t cm4008 NULL ks8695 - -cm41xx_config : unconfig - @./mkconfig $(@:_config=) arm arm920t cm41xx NULL ks8695 - -gth2_config : unconfig - @ >include/config.h - @echo "#define CONFIG_GTH2 1" >>include/config.h - @./mkconfig -a gth2 mips mips gth2 + @$(MKCONFIG) $(@:_config=) arm arm925t voiceblue ######################################################################### ## S3C44B0 Systems ######################################################################### B2_config : unconfig - @./mkconfig $(@:_config=) arm s3c44b0 B2 dave + @$(MKCONFIG) $(@:_config=) arm s3c44b0 B2 dave ######################################################################### ## ARM720T Systems ######################################################################### armadillo_config: unconfig - @./mkconfig $(@:_config=) arm arm720t armadillo + @$(MKCONFIG) $(@:_config=) arm arm720t armadillo ep7312_config : unconfig - @./mkconfig $(@:_config=) arm arm720t ep7312 + @$(MKCONFIG) $(@:_config=) arm arm720t ep7312 impa7_config : unconfig - @./mkconfig $(@:_config=) arm arm720t impa7 + @$(MKCONFIG) $(@:_config=) arm arm720t impa7 modnet50_config : unconfig - @./mkconfig $(@:_config=) arm arm720t modnet50 + @$(MKCONFIG) $(@:_config=) arm arm720t modnet50 evb4510_config : unconfig - @./mkconfig $(@:_config=) arm arm720t evb4510 + @$(MKCONFIG) $(@:_config=) arm arm720t evb4510 + +lpc2292sodimm_config: unconfig + @$(MKCONFIG) $(@:_config=) arm arm720t lpc2292sodimm NULL lpc2292 + +SMN42_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm720t SMN42 siemens lpc2292 ######################################################################### ## XScale Systems ######################################################################### -adsvix_config : unconfig - @./mkconfig $(@:_config=) arm pxa adsvix +actux1_config : unconfig + @$(MKCONFIG) $(@:_config=) arm ixp actux1 + +actux2_config : unconfig + @$(MKCONFIG) $(@:_config=) arm ixp actux2 + +actux3_config : unconfig + @$(MKCONFIG) $(@:_config=) arm ixp actux3 + +actux4_config : unconfig + @$(MKCONFIG) $(@:_config=) arm ixp actux4 cerf250_config : unconfig - @./mkconfig $(@:_config=) arm pxa cerf250 + @$(MKCONFIG) $(@:_config=) arm pxa cerf250 cradle_config : unconfig - @./mkconfig $(@:_config=) arm pxa cradle + @$(MKCONFIG) $(@:_config=) arm pxa cradle csb226_config : unconfig - @./mkconfig $(@:_config=) arm pxa csb226 + @$(MKCONFIG) $(@:_config=) arm pxa csb226 -delta_config : - @./mkconfig $(@:_config=) arm pxa delta +delta_config : unconfig + @$(MKCONFIG) $(@:_config=) arm pxa delta innokom_config : unconfig - @./mkconfig $(@:_config=) arm pxa innokom + @$(MKCONFIG) $(@:_config=) arm pxa innokom ixdp425_config : unconfig - @./mkconfig $(@:_config=) arm ixp ixdp425 + @$(MKCONFIG) $(@:_config=) arm ixp ixdp425 ixdpg425_config : unconfig - @./mkconfig $(@:_config=) arm ixp ixdp425 + @$(MKCONFIG) $(@:_config=) arm ixp ixdp425 lubbock_config : unconfig - @./mkconfig $(@:_config=) arm pxa lubbock + @$(MKCONFIG) $(@:_config=) arm pxa lubbock pleb2_config : unconfig - @./mkconfig $(@:_config=) arm pxa pleb2 + @$(MKCONFIG) $(@:_config=) arm pxa pleb2 logodl_config : unconfig - @./mkconfig $(@:_config=) arm pxa logodl + @$(MKCONFIG) $(@:_config=) arm pxa logodl -pdnb3_config : unconfig - @./mkconfig $(@:_config=) arm ixp pdnb3 prodrive +pdnb3_config \ +scpu_config: unconfig + @mkdir -p $(obj)include + @if [ "$(findstring scpu_,$@)" ] ; then \ + echo "#define CONFIG_SCPU" >>$(obj)include/config.h ; \ + $(XECHO) "... on SCPU board variant" ; \ + fi + @$(MKCONFIG) -a pdnb3 arm ixp pdnb3 prodrive pxa255_idp_config: unconfig - @./mkconfig $(@:_config=) arm pxa pxa255_idp + @$(MKCONFIG) $(@:_config=) arm pxa pxa255_idp + +trizepsiv_config : unconfig + @$(MKCONFIG) $(@:_config=) arm pxa trizepsiv wepep250_config : unconfig - @./mkconfig $(@:_config=) arm pxa wepep250 + @$(MKCONFIG) $(@:_config=) arm pxa wepep250 xaeniax_config : unconfig - @./mkconfig $(@:_config=) arm pxa xaeniax + @$(MKCONFIG) $(@:_config=) arm pxa xaeniax xm250_config : unconfig - @./mkconfig $(@:_config=) arm pxa xm250 + @$(MKCONFIG) $(@:_config=) arm pxa xm250 xsengine_config : unconfig - @./mkconfig $(@:_config=) arm pxa xsengine + @$(MKCONFIG) $(@:_config=) arm pxa xsengine zylonite_config : - @./mkconfig $(@:_config=) arm pxa zylonite + @$(MKCONFIG) $(@:_config=) arm pxa zylonite ######################################################################### ## ARM1136 Systems ######################################################################### -xtract_omap2430 = $(subst _gdp,,$(subst _config,,$1)) -omap2420h4_config : unconfig - @./mkconfig $(@:_config=) arm arm1136 omap2420h4 +apollon_config : unconfig + @mkdir -p $(obj)include + @mkdir -p $(obj)onenand_ipl/board/apollon + @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h + @$(MKCONFIG) $(@:_config=) arm arm1136 apollon NULL omap24xx + @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk -omap2430sdp_gdp_config \ -omap2430sdp_config : unconfig - @if [ "$(findstring _gdp_, $@)" ] ; then \ - echo "#define OMAP2430_SDP_GDP_CONFIG" >> ./include/config.h ; \ - echo "Configuring for GDP and .. "; \ - fi; - @./mkconfig -a $(call xtract_omap2430,$@) arm arm1136 omap2430sdp - -######################################################################### -## ARM CORTEX Systems -######################################################################### -omap3430sdp_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3430sdp +BCM2153_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 BCM2153 Broadcom bcm2153 -omap3430labrador_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3430labrador +bcm4760_config bcm4760-debug_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 irvine tomtom bcm4760 -omap3430zoom2_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3430zoom2 +irvine_flasher_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 BCM4760 Broadcom bcm4760 -omap3630zoom3_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3630zoom3 +otavalo_nav2_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 BCM4760 Broadcom bcm4760 -omap3630zoom3_emmc_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3630zoom3 - echo "#define CONFIG_STORAGE_EMMC 1" > ./include/config-tmp.h; \ - cat ./include/config.h >> ./include/config-tmp.h; \ - mv ./include/config-tmp.h ./include/config.h; \ - sed -i -e 's/omap3630zoom3_emmc/omap3630zoom3/' ./include/config.h +otavalo_flasher_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 BCM4760 Broadcom bcm4760 +siena_flasher_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 BCM4760 Broadcom bcm4760 -omap3630sdp_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3630sdp +lucca_flasher_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 BCM4760 Broadcom bcm4760 -omap3530overo_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3530overo +imx31_litekit_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 imx31_litekit NULL mx31 -omap3730overo_config : unconfig - @./mkconfig $(@:_config=) arm omap3 omap3730overo +imx31_phycore_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 imx31_phycore NULL mx31 + +mx31ads_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads NULL mx31 + +taranto_config \ +taranto-debug_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s5p64xx halfweg tomtom s5p6450 + +valdez_config \ +valdez-debug_config : unconfig + @$(MKCONFIG) $(@:_config=) arm s5p64xx halfweg tomtom s5p6450 + +omap2420h4_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm1136 omap2420h4 NULL omap24xx strasbourg_config \ -strasbourg-debug_config: unconfig - @./mkconfig $(@:_config=) arm omap3 strasbourg - strasbourg_a2_config \ -strasbourg_a2-debug_config: unconfig - @./mkconfig $(@:_config=) arm omap3 strasbourg +strasbourg_a2-debug_config \ +strasbourg_b1_config \ +strasbourg_b1-debug_config \ +strasbourg_b2_config \ +strasbourg_b2-debug_config \ +rennes_a1_config \ +rennes_a1-debug_config \ +rennes_b1_config \ +rennes_b1-debug_config \ +stuttgart_b1_config \ +stuttgart_b1-debug_config \ +strasbourg-debug_config: unconfig + @./mkconfig $(@:_config=) arm omap3 strasbourg tomtom santiago_config \ -santiago-debug_config: unconfig - @./mkconfig $(@:_config=) arm omap3 santiago +santiago-debug_config: unconfig + @./mkconfig $(@:_config=) arm omap3 santiago tomtom +monopoli_config \ +monopoli-debug_config: unconfig + @./mkconfig $(@:_config=) arm omap3 monopoli tomtom #======================================================================== # i386 @@ -1870,13 +2955,13 @@ santiago-debug_config: unconfig ## AMD SC520 CDP ######################################################################### sc520_cdp_config : unconfig - @./mkconfig $(@:_config=) i386 i386 sc520_cdp + @$(MKCONFIG) $(@:_config=) i386 i386 sc520_cdp sc520_spunk_config : unconfig - @./mkconfig $(@:_config=) i386 i386 sc520_spunk + @$(MKCONFIG) $(@:_config=) i386 i386 sc520_spunk sc520_spunk_rel_config : unconfig - @./mkconfig $(@:_config=) i386 i386 sc520_spunk + @$(MKCONFIG) $(@:_config=) i386 i386 sc520_spunk #======================================================================== # MIPS @@ -1891,63 +2976,74 @@ incaip_100MHz_config \ incaip_133MHz_config \ incaip_150MHz_config \ incaip_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring _100MHz,$@)" ] || \ - { echo "#define CPU_CLOCK_RATE 100000000" >>include/config.h ; \ - echo "... with 100MHz system clock" ; \ + { echo "#define CPU_CLOCK_RATE 100000000" >>$(obj)include/config.h ; \ + $(XECHO) "... with 100MHz system clock" ; \ } @[ -z "$(findstring _133MHz,$@)" ] || \ - { echo "#define CPU_CLOCK_RATE 133000000" >>include/config.h ; \ - echo "... with 133MHz system clock" ; \ + { echo "#define CPU_CLOCK_RATE 133000000" >>$(obj)include/config.h ; \ + $(XECHO) "... with 133MHz system clock" ; \ } @[ -z "$(findstring _150MHz,$@)" ] || \ - { echo "#define CPU_CLOCK_RATE 150000000" >>include/config.h ; \ - echo "... with 150MHz system clock" ; \ + { echo "#define CPU_CLOCK_RATE 150000000" >>$(obj)include/config.h ; \ + $(XECHO) "... with 150MHz system clock" ; \ } - @./mkconfig -a $(call xtract_incaip,$@) mips mips incaip + @$(MKCONFIG) -a $(call xtract_incaip,$@) mips mips incaip tb0229_config: unconfig - @./mkconfig $(@:_config=) mips mips tb0229 + @$(MKCONFIG) $(@:_config=) mips mips tb0229 ######################################################################### ## MIPS32 AU1X00 ######################################################################### -dbau1000_config : unconfig - @ >include/config.h - @echo "#define CONFIG_DBAU1000 1" >>include/config.h - @./mkconfig -a dbau1x00 mips mips dbau1x00 -dbau1100_config : unconfig - @ >include/config.h - @echo "#define CONFIG_DBAU1100 1" >>include/config.h - @./mkconfig -a dbau1x00 mips mips dbau1x00 +dbau1000_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_DBAU1000 1" >$(obj)include/config.h + @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 -dbau1500_config : unconfig - @ >include/config.h - @echo "#define CONFIG_DBAU1500 1" >>include/config.h - @./mkconfig -a dbau1x00 mips mips dbau1x00 +dbau1100_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_DBAU1100 1" >$(obj)include/config.h + @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 + +dbau1500_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_DBAU1500 1" >$(obj)include/config.h + @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 dbau1550_config : unconfig - @ >include/config.h - @echo "#define CONFIG_DBAU1550 1" >>include/config.h - @./mkconfig -a dbau1x00 mips mips dbau1x00 + @mkdir -p $(obj)include + @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h + @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 dbau1550_el_config : unconfig - @ >include/config.h - @echo "#define CONFIG_DBAU1550 1" >>include/config.h - @./mkconfig -a dbau1x00 mips mips dbau1x00 + @mkdir -p $(obj)include + @echo "#define CONFIG_DBAU1550 1" >$(obj)include/config.h + @$(MKCONFIG) -a dbau1x00 mips mips dbau1x00 -pb1000_config : unconfig - @ >include/config.h - @echo "#define CONFIG_PB1000 1" >>include/config.h - @./mkconfig -a pb1x00 mips mips pb1x00 +gth2_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_GTH2 1" >$(obj)include/config.h + @$(MKCONFIG) -a gth2 mips mips gth2 + +pb1000_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_PB1000 1" >$(obj)include/config.h + @$(MKCONFIG) -a pb1x00 mips mips pb1x00 + +qemu_mips_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_QEMU_MIPS 1" >$(obj)include/config.h + @$(MKCONFIG) -a qemu-mips mips mips qemu-mips ######################################################################### ## MIPS64 5Kc ######################################################################### purple_config : unconfig - @./mkconfig $(@:_config=) mips mips purple + @$(MKCONFIG) $(@:_config=) mips mips purple #======================================================================== # Nios @@ -1956,149 +3052,286 @@ purple_config : unconfig ## Nios32 ######################################################################### +ADNPESC1_DNPEVA2_base_32_config \ +ADNPESC1_base_32_config \ +ADNPESC1_config: unconfig + @mkdir -p $(obj)include + @[ -z "$(findstring _DNPEVA2,$@)" ] || \ + { echo "#define CONFIG_DNPEVA2 1" >>$(obj)include/config.h ; \ + $(XECHO) "... DNP/EVA2 configuration" ; \ + } + @[ -z "$(findstring _base_32,$@)" ] || \ + { echo "#define CONFIG_NIOS_BASE_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'base_32' configuration" ; \ + } + @[ -z "$(findstring ADNPESC1_config,$@)" ] || \ + { echo "#define CONFIG_NIOS_BASE_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'base_32' configuration (DEFAULT)" ; \ + } + @$(MKCONFIG) -a ADNPESC1 nios nios adnpesc1 ssv + DK1C20_safe_32_config \ DK1C20_standard_32_config \ DK1C20_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring _safe_32,$@)" ] || \ - { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \ - echo "... NIOS 'safe_32' configuration" ; \ + { echo "#define CONFIG_NIOS_SAFE_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'safe_32' configuration" ; \ } @[ -z "$(findstring _standard_32,$@)" ] || \ - { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \ - echo "... NIOS 'standard_32' configuration" ; \ + { echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'standard_32' configuration" ; \ } @[ -z "$(findstring DK1C20_config,$@)" ] || \ - { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \ - echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \ + { echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'standard_32' configuration (DEFAULT)" ; \ } - @./mkconfig -a DK1C20 nios nios dk1c20 altera + @$(MKCONFIG) -a DK1C20 nios nios dk1c20 altera DK1S10_safe_32_config \ DK1S10_standard_32_config \ DK1S10_mtx_ldk_20_config \ DK1S10_config: unconfig - @ >include/config.h + @mkdir -p $(obj)include @[ -z "$(findstring _safe_32,$@)" ] || \ - { echo "#define CONFIG_NIOS_SAFE_32 1" >>include/config.h ; \ - echo "... NIOS 'safe_32' configuration" ; \ + { echo "#define CONFIG_NIOS_SAFE_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'safe_32' configuration" ; \ } @[ -z "$(findstring _standard_32,$@)" ] || \ - { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \ - echo "... NIOS 'standard_32' configuration" ; \ + { echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'standard_32' configuration" ; \ } @[ -z "$(findstring _mtx_ldk_20,$@)" ] || \ - { echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>include/config.h ; \ - echo "... NIOS 'mtx_ldk_20' configuration" ; \ + { echo "#define CONFIG_NIOS_MTX_LDK_20 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'mtx_ldk_20' configuration" ; \ } @[ -z "$(findstring DK1S10_config,$@)" ] || \ - { echo "#define CONFIG_NIOS_STANDARD_32 1" >>include/config.h ; \ - echo "... NIOS 'standard_32' configuration (DEFAULT)" ; \ + { echo "#define CONFIG_NIOS_STANDARD_32 1" >>$(obj)include/config.h ; \ + $(XECHO) "... NIOS 'standard_32' configuration (DEFAULT)" ; \ } - @./mkconfig -a DK1S10 nios nios dk1s10 altera - -ADNPESC1_DNPEVA2_base_32_config \ -ADNPESC1_base_32_config \ -ADNPESC1_config: unconfig - @ >include/config.h - @[ -z "$(findstring _DNPEVA2,$@)" ] || \ - { echo "#define CONFIG_DNPEVA2 1" >>include/config.h ; \ - echo "... DNP/EVA2 configuration" ; \ - } - @[ -z "$(findstring _base_32,$@)" ] || \ - { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \ - echo "... NIOS 'base_32' configuration" ; \ - } - @[ -z "$(findstring ADNPESC1_config,$@)" ] || \ - { echo "#define CONFIG_NIOS_BASE_32 1" >>include/config.h ; \ - echo "... NIOS 'base_32' configuration (DEFAULT)" ; \ - } - @./mkconfig -a ADNPESC1 nios nios adnpesc1 ssv + @$(MKCONFIG) -a DK1S10 nios nios dk1s10 altera ######################################################################### ## Nios-II ######################################################################### EP1C20_config : unconfig - @./mkconfig EP1C20 nios2 nios2 ep1c20 altera + @$(MKCONFIG) EP1C20 nios2 nios2 ep1c20 altera EP1S10_config : unconfig - @./mkconfig EP1S10 nios2 nios2 ep1s10 altera + @$(MKCONFIG) EP1S10 nios2 nios2 ep1s10 altera EP1S40_config : unconfig - @./mkconfig EP1S40 nios2 nios2 ep1s40 altera + @$(MKCONFIG) EP1S40 nios2 nios2 ep1s40 altera PK1C20_config : unconfig - @./mkconfig PK1C20 nios2 nios2 pk1c20 psyent + @$(MKCONFIG) PK1C20 nios2 nios2 pk1c20 psyent PCI5441_config : unconfig - @./mkconfig PCI5441 nios2 nios2 pci5441 psyent + @$(MKCONFIG) PCI5441 nios2 nios2 pci5441 psyent #======================================================================== -# MicroBlaze -#======================================================================== -######################################################################### ## Microblaze -######################################################################### +#======================================================================== + +ml401_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_ML401 1" > $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) microblaze microblaze ml401 xilinx + suzaku_config: unconfig - @ >include/config.h - @echo "#define CONFIG_SUZAKU 1" >> include/config.h - @./mkconfig -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno + @mkdir -p $(obj)include + @echo "#define CONFIG_SUZAKU 1" > $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) microblaze microblaze suzaku AtmarkTechno + +xupv2p_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_XUPV2P 1" > $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) microblaze microblaze xupv2p xilinx + +#======================================================================== +# Blackfin +#======================================================================== + +# Analog Devices boards +BFIN_BOARDS = bf533-ezkit bf533-stamp bf537-stamp bf561-ezkit + +$(BFIN_BOARDS:%=%_config) : unconfig + @$(MKCONFIG) $(@:_config=) blackfin blackfin $(@:_config=) + +$(BFIN_BOARDS): + $(MAKE) $@_config + $(MAKE) + +#======================================================================== +# AVR32 +#======================================================================== + +atngw100_config : unconfig + @$(MKCONFIG) $(@:_config=) avr32 at32ap atngw100 atmel at32ap700x + +atstk1002_config : unconfig + @$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x + +atstk1003_config : unconfig + @$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x + +atstk1004_config : unconfig + @$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x + +atstk1006_config : unconfig + @$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x + +#======================================================================== +# SH3 (SuperH) +#======================================================================== ######################################################################### -## Blackfin +## sh3 (Renesas SuperH) ######################################################################### -ezkit533_config : unconfig - @./mkconfig $(@:_config=) blackfin bf533 ezkit533 -stamp_config : unconfig - @./mkconfig $(@:_config=) blackfin bf533 stamp +mpr2_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_MPR2 1" > $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) sh sh3 mpr2 -dspstamp_config : unconfig - @./mkconfig $(@:_config=) blackfin bf533 dsp_stamp +ms7720se_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_MS7720SE 1" > $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) sh sh3 ms7720se + +######################################################################### +## sh4 (Renesas SuperH) +######################################################################### + +MigoR_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_MIGO_R 1" > $(obj)include/config.h + @./mkconfig -a $(@:_config=) sh sh4 MigoR + +ms7750se_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_MS7750SE 1" > $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) sh sh4 ms7750se + +ms7722se_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_MS7722SE 1" > $(obj)include/config.h + @$(MKCONFIG) -a $(@:_config=) sh sh4 ms7722se + +r2dplus_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_R2DPLUS 1" > $(obj)include/config.h + @./mkconfig -a $(@:_config=) sh sh4 r2dplus + +r7780mp_config: unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_R7780MP 1" > $(obj)include/config.h + @./mkconfig -a $(@:_config=) sh sh4 r7780mp + +sh7763rdp_config : unconfig + @mkdir -p $(obj)include + @echo "#define CONFIG_SH7763RDP 1" > $(obj)include/config.h + @./mkconfig -a $(@:_config=) sh sh4 sh7763rdp + +#======================================================================== +# SPARC +#======================================================================== + +######################################################################### +## LEON3 +######################################################################### + +# Gaisler GR-XC3S-1500 board +gr_xc3s_1500_config : unconfig + @$(MKCONFIG) $(@:_config=) sparc leon3 gr_xc3s_1500 gaisler + +# Gaisler GR-CPCI-AX2000 board, a General purpose FPGA-AX system +gr_cpci_ax2000_config : unconfig + @$(MKCONFIG) $(@:_config=) sparc leon3 gr_cpci_ax2000 gaisler + +# Gaisler GRLIB template design (GPL SPARC/LEON3) for Altera NIOS +# Development board Stratix II edition, FPGA Device EP2S60. +gr_ep2s60_config: unconfig + @$(MKCONFIG) $(@:_config=) sparc leon3 gr_ep2s60 gaisler + +# Gaisler LEON3 GRSIM simulator +grsim_config : unconfig + @$(MKCONFIG) $(@:_config=) sparc leon3 grsim gaisler + +######################################################################### +## LEON2 +######################################################################### + +# Gaisler LEON2 GRSIM simulator +grsim_leon2_config : unconfig + @$(MKCONFIG) $(@:_config=) sparc leon2 grsim_leon2 gaisler ######################################################################### ######################################################################### ######################################################################### clean: - find . -type f \ + @rm -f $(obj)examples/82559_eeprom $(obj)examples/eepro100_eeprom \ + $(obj)examples/hello_world $(obj)examples/interrupt \ + $(obj)examples/mem_to_mem_idma2intr \ + $(obj)examples/sched $(obj)examples/smc91111_eeprom \ + $(obj)examples/test_burst $(obj)examples/timer + @rm -f $(obj)tools/bmp_logo $(obj)tools/easylogo/easylogo \ + $(obj)tools/env/{fw_printenv,fw_setenv} \ + $(obj)tools/envcrc \ + $(obj)tools/gdb/{astest,gdbcont,gdbsend} \ + $(obj)tools/gen_eth_addr $(obj)tools/img2srec \ + $(obj)tools/mkimage $(obj)tools/mpc86x_clk \ + $(obj)tools/ncb $(obj)tools/ubsha1 + @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \ + $(obj)board/netstar/{eeprom,crcek,crcit,*.srec,*.bin} \ + $(obj)board/tomtom/*/*.image \ + $(obj)board/trab/trab_fkt $(obj)board/voiceblue/eeprom \ + $(obj)board/{integratorap,integratorcp}/u-boot.lds \ + $(obj)board/{bf533-ezkit,bf533-stamp,bf537-stamp,bf561-ezkit}/u-boot.lds \ + $(obj)cpu/blackfin/bootrom-asm-offsets.[chs] \ + $(obj)cpu/{s5p64xx,s3c64xx}/rsa_pubkey.h \ + $(obj)crypto/dsa_pubkey.h \ + $(obj)stage1.unsigned + + @rm -f $(obj)include/bmp_logo.h + @rm -f $(obj)nand_spl/{u-boot-spl,u-boot-spl.map,System.map} + @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl-2k.bin,ipl-4k.bin,ipl.map} + @rm -f $(obj)api_examples/demo $(VERSION_FILE) + @rm -f $(obj)example-scripts/*.image + @find $(OBJTREE) -type f \ \( -name 'core' -o -name '*.bak' -o -name '*~' \ - -o -name '*.o' -o -name '*.a' \) -print \ + -o -name '*.o' -o -name '*.a' \) -print \ | xargs rm -f - rm -f examples/hello_world examples/timer \ - examples/eepro100_eeprom examples/sched \ - examples/mem_to_mem_idma2intr examples/82559_eeprom \ - examples/smc91111_eeprom \ - examples/test_burst - rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr - rm -f tools/mpc86x_clk tools/ncb - rm -f tools/easylogo/easylogo tools/bmp_logo - rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend - rm -f tools/env/fw_printenv tools/env/fw_setenv - rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image - rm -f board/netstar/eeprom board/netstar/crcek - rm -f board/netstar/*.srec board/netstar/*.bin - rm -f board/strasbourg/*.image - rm -f board/santiago/*.image - rm -f board/trab/trab_fkt board/voiceblue/eeprom - rm -f board/integratorap/u-boot.lds board/integratorcp/u-boot.lds - rm -f include/bmp_logo.h clobber: clean - find . -type f \( -name .depend \ + @find $(OBJTREE) -type f \( -name .depend \ -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \ -print0 \ | xargs -0 rm -f - rm -f $(OBJS) *.bak tags TAGS include/version_autogenerated.h - rm -fr *.*~ - rm -f u-boot u-boot.map u-boot.hex $(ALL) - rm -f tools/crc32.c tools/environment.c tools/env/crc32.c - rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c - rm -f include/asm/proc include/asm/arch include/asm + @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ + $(obj)cscope.* $(obj)*.*~ + @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL) $(obj)u-boot.target \ + $(obj)u-boot.s3cmmc $(obj)u-boot.bcm4760 + @rm -f $(obj)tools/{crc32.c,environment.c,env/crc32.c,md5.c,sha1.c,inca-swap-bytes} + @rm -f $(obj)tools/{image.c,fdt.c,fdt_ro.c,fdt_rw.c,fdt_strerror.c,zlib.h} + @rm -f $(obj)tools/{fdt_wip.c,libfdt_internal.h} + @rm -f $(obj)cpu/mpc824x/bedbug_603e.c + @rm -f $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm + @rm -f $(obj)include/regs.h + @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -lname "*" -print | xargs rm -f + @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -lname "*" -print | xargs rm -f + @[ ! -d $(obj)api_examples ] || find $(obj)api_examples -lname "*" -print | xargs rm -f +ifeq ($(OBJTREE),$(SRCTREE)) mrproper \ distclean: clobber unconfig +else +mrproper \ +distclean: clobber unconfig + rm -rf $(obj)* +endif backup: F=`basename $(TOPDIR)` ; cd .. ; \ diff --git a/NOTICE b/NOTICE new file mode 100644 index 000000000..f616ab96c --- /dev/null +++ b/NOTICE @@ -0,0 +1,298 @@ + NOTE! This copyright does *not* cover the so-called "standalone" +applications that use U-Boot services by means of the jump table +provided by U-Boot exactly for this purpose - this is merely +considered normal use of U-Boot, and does *not* fall under the +heading of "derived work". + + The header files "include/image.h" and "include/asm-*/u-boot.h" +define interfaces to U-Boot. Including these (unmodified) header +files in another file is considered normal use of U-Boot, and does +*not* fall under the heading of "derived work". + + Also note that the GPL below is copyrighted by the Free Software +Foundation, but the instance of code that it refers to (the U-Boot +source code) is copyrighted by me and others who actually wrote it. +-- Wolfgang Denk + +======================================================================= + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/board/tomtom/strasbourg/Makefile b/board/tomtom/strasbourg/Makefile new file mode 100644 index 000000000..63006f621 --- /dev/null +++ b/board/tomtom/strasbourg/Makefile @@ -0,0 +1,80 @@ +# +# (C) Copyright 2009 Texas Instruments. +# +# See file CREDITS for list of people who contributed to this +# project. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA +# + +include $(TOPDIR)/config.mk + +COMMONDIR = ../common +PLAT_DIR = $(TOPDIR)/plat-tomtom/offenburg + +LIB = lib$(BOARD).a + +# Boot shell scripts +USHOBJS := bootcmd.o altbootcmd.o preboot.o preboot_plat.o + +# U-Boot 1.1.4 build system sucks :P +ifeq (,$(shell fgrep -q 'CONFIG_DEBUG_BUILD' \ + $(TOPDIR)/include/`sed -ne 's|.*<\(.*\)>.*|\1|p' $(TOPDIR)/include/config.h` \ + 2>/dev/null || echo x)) +USHOBJS += bootcmd_debug.o altbootcmd_debug.o preboot_debug.o +endif + +OBJS := strasbourg.o \ + ${PLAT_DIR}/board.o \ + ${PLAT_DIR}/security.o \ + ${PLAT_DIR}/sys_info.o \ + bricknum.o \ + mfd_feat.o \ + epic_fail.o + +OBJS += $(COMMONDIR)/bootcount.o \ + $(COMMONDIR)/env_init.o \ + +$(LIB): $(OBJS) $(USHOBJS) + $(AR) crv $@ $^ + +%.o: %.image + cd $( $@ + +-include .depend + +######################################################################### diff --git a/board/tomtom/strasbourg/mfd_feat.c b/board/tomtom/strasbourg/mfd_feat.c new file mode 100644 index 000000000..70b891fbe --- /dev/null +++ b/board/tomtom/strasbourg/mfd_feat.c @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2012 TomTom International BV + * Written by Domenico Andreoli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#include "mfd_feat.h" + +#include +DECLARE_GLOBAL_DATA_PTR; + +#if defined(__VARIANT_STUTTGART_B1) +# define MFD_VARIANT MFD_VARIANT_STUTTGART_B1 +#elif defined(__VARIANT_RENNES_B1) +# define MFD_VARIANT MFD_VARIANT_RENNES_B1 +#elif defined(__VARIANT_RENNES_A1) +# define MFD_VARIANT MFD_VARIANT_RENNES_A1 +#elif defined(__VARIANT_B2) +# define MFD_VARIANT MFD_VARIANT_STRASBOURG_B2 +#elif defined(__VARIANT_B1) +# define MFD_VARIANT MFD_VARIANT_STRASBOURG_B1 +#else +# define MFD_VARIANT MFD_VARIANT_STRASBOURG +#endif + +const struct mfd_feat *mfd_lookup(const struct mfd_feat *feat) +{ + for (; feat; feat++) { + if (feat->mach && feat->mach != gd->bd->bi_arch_number) + continue; + if (feat->rev && feat->rev != MFD_VARIANT) + continue; + + /* there must be a default (terminator) entry that breaks the loop */ + break; + } + + return feat; +} + +u32 get_board_rev(void) +{ + return MFD_VARIANT; +} diff --git a/board/tomtom/strasbourg/mfd_feat.h b/board/tomtom/strasbourg/mfd_feat.h new file mode 100644 index 000000000..6b2e3995f --- /dev/null +++ b/board/tomtom/strasbourg/mfd_feat.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2012 TomTom International BV + * Written by Domenico Andreoli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef TOMTOM_MFD_FEAT_H +#define TOMTOM_MFD_FEAT_H + +#define MFD_VARIANT_STRASBOURG_A2 0x10 +#define MFD_VARIANT_STRASBOURG_B1 0x11 +#define MFD_VARIANT_STRASBOURG_B2 0x12 +#define MFD_VARIANT_RENNES_A1 0x13 +#define MFD_VARIANT_RENNES_B1 0x14 +#define MFD_VARIANT_STUTTGART_B1 0x15 + +/* + * Helper struct to hold a TomTom MFD board specific feature in form + * of a pointer. Specific features are selected in base of the mach and + * rev fields. + */ +struct mfd_feat { + unsigned int mach; + unsigned int rev; + void *priv; +}; + +/* Helper macros to init arrays of MFD features */ +#define MFD_FEAT_INIT(_mach, _rev, _feat) { \ + .mach = _mach, \ + .rev = _rev, \ + .priv = _feat, \ +} + +/* + * The default entry is mandatory, it grants that mfd_lookup() is not + * an infinite loop. Entries after the default are ignored so normally + * it is last. It also provides a means to return a possibly meaningful + * value in case no MFD cadidate is found. + */ +#define MFD_DEFAULT(_feat) MFD_FEAT_INIT(0, 0, _feat) + +#define MFD_1_0_A1(_feat) MFD_FEAT_INIT(MACH_TYPE_STRASBOURG, 0, _feat) +#define MFD_1_0_A2(_feat) MFD_FEAT_INIT(MACH_TYPE_STRASBOURG_A2, MFD_VARIANT_STRASBOURG_A2, _feat) +#define MFD_1_0_B1(_feat) MFD_FEAT_INIT(MACH_TYPE_STRASBOURG_A2, MFD_VARIANT_STRASBOURG_B1, _feat) +#define MFD_1_0_B2(_feat) MFD_FEAT_INIT(MACH_TYPE_STRASBOURG_A2, MFD_VARIANT_STRASBOURG_B2, _feat) +#define MFD_1_05(_feat) MFD_FEAT_INIT(MACH_TYPE_STRASBOURG_A2, MFD_VARIANT_RENNES_A1, _feat) +#define MFD_1_1(_feat) MFD_FEAT_INIT(MACH_TYPE_STRASBOURG_A2, MFD_VARIANT_RENNES_B1, _feat) +#define MFD_2_0(_feat) MFD_FEAT_INIT(MACH_TYPE_STRASBOURG_A2, MFD_VARIANT_STUTTGART_B1, _feat) + +/* Lookup functions to find the first matching MFD feature */ +const struct mfd_feat *mfd_lookup(const struct mfd_feat *feat); + +static inline void *mfd_feature(const struct mfd_feat *feat) +{ + const struct mfd_feat *_f = mfd_lookup(feat); + return _f ? _f->priv : 0; +} + +#endif /* TOMTOM_MFD_FEAT_H */ diff --git a/board/tomtom/strasbourg/preboot.ush b/board/tomtom/strasbourg/preboot.ush new file mode 100644 index 000000000..fdf2324cd --- /dev/null +++ b/board/tomtom/strasbourg/preboot.ush @@ -0,0 +1,16 @@ +run preboot_plat +setenv autoscript no +setenv bootfile /zImage +setenv conf.file /uboot.conf +setenv conf.maxsize 0x80 +setenv flash.part.bootfs /dev/mmcblk${kernel.bootdev}p${flash.part.bootfs.num} +setenv flash.part.rootfs /dev/mmcblk${kernel.root.num}p${flash.part.rootfs.num} +setenv kernel.console.options ${baudrate} +setenv kernel.extrabootargs +setenv timeout 2 +setenv verify no +setenv no_trybooty no +setenv bootargs root=${flash.part.rootfs} ${kernel.root.options} console=${kernel.console},${kernel.console.options} ${kernel.extrabootargs} androidboot.console=${kernel.console} sysboot_mode=${sysboot_mode} init=/init videoout=omap24xxvout vram=3M,0x83000000 lpj=2334720 +mw.w ${fdaddr} 0x00000000 ${conf.maxsize} +ignore ext2load ${bootdev.class} ${bootdev}:${flash.part.bootfs.num} ${fdaddr} /uboot.conf ${conf.maxsize} +ignore bootconf ${fdaddr} diff --git a/board/tomtom/strasbourg/strasbourg.c b/board/tomtom/strasbourg/strasbourg.c new file mode 100644 index 000000000..888ea87f8 --- /dev/null +++ b/board/tomtom/strasbourg/strasbourg.c @@ -0,0 +1,677 @@ + +/* + * (C) Copyright 2004-2009 + * Texas Instruments, + * Richard Woodruff + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "logo.h" +#include "mfd_feat.h" +#include + +/* Before including the padconfig settings, we have to set proper config */ +#define BOOTLOADER_UBOOT_PADCONFIG +#if defined(__VARIANT_STUTTGART_B1) +# include +#elif defined( __VARIANT_RENNES_B1) +# include +#elif defined(__VARIANT_A1) +# include +#else +# include +#endif + +#define GPIO_LCD_UD (12) +#define GPIO_LCD_LR (19) +#define GPIO_LCM_PWR_ON (137) +#define GPIO_nLCD_RESET (156) +#define GPIO_BACKLIGHT_ON (65) +#define GPIO_SENSE_11V0 (17) +#define SENSE_11V0_MAX_RETRY (5) +DECLARE_GLOBAL_DATA_PTR; + +extern void detect_boot_mode(void); +extern void hw_watchdog_init(void); + +extern const uchar __diagsys_start; +#define DIAGSYS_ADDR_START (&__diagsys_start) +extern const uchar __diagsys_end; +#define DIAGSYS_ADDR_END (&__diagsys_end) +#define DIAGSYS_LEN ((size_t) (DIAGSYS_ADDR_END - \ + DIAGSYS_ADDR_START)) +#define DIAGSYS_ADDR_NOR ((uchar *) 0x08300000UL) + +#define DEFAULT_FDT_START ((uchar *) 0x81FE0000UL) +#define DEFAULT_FDT_LEN ((size_t) 0xe00U) /* 7 sectors */ + +unsigned exec_applet = 0; + +extern const int __framebuffer_start; +#define FRAMEBUFFER_ADDR_START 0x83000000 +extern const int __framebuffer_end; +#define FRAMEBUFFER_ADDR_END (&__framebuffer_end) +#define FRAMEBUFFER_LEN ((size_t) (FRAMEBUFFER_ADDR_END - \ + FRAMEBUFFER_ADDR_START)) +#define FDT_SCR_ROT_OFFSET (0x1150) +#define FDT_SCR_VCOM_OFFSET (0x124e) +#define EOL_SAT_TUN_OFFSET (0x0113) + +/* Timer related definitions */ +#define OMAP34XX_GPTIMER10_BASE (0x48086000) +#define TIMER_CTRL_GPOCFG (1 << 14) +#define TIMER_CTRL_CAPTMODE (1 << 13) +#define TIMER_CTRL_PT (1 << 12) +#define TIMER_CTRL_TRG_OVERFLOW (1 << 10) +#define TIMER_CTRL_TRG_OVERFLOW_MATCH (2 << 10) +#define TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) +#define TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) +#define TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) +#define TIMER_CTRL_SCPWM (1 << 7) +#define TIMER_CTRL_CE (1 << 6) /* compare enable */ +#define TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ +#define TIMER_CTRL_POSTED (1 << 2) +#define TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ +#define TIMER_CTRL_ST (1 << 0) /* start timer */ + +/* CONTROL_PROG_IO1 bit definitions */ +#define PRG_SDMMC1_SPEEDCTRL (1 << 20) + +void eth_init(void *); + +#ifdef __VARIANT_A1 +# define BOOTDEV_SDCARD 0 +# define BOOTDEV_MOVI 1 + +#else +# define BOOTDEV_MOVI 0 +#endif + +extern unsigned char __mmu_table_start; + +/* Fudge kernel bootdevice on A1 if sd card is present: + * - root=/dev/mmcblk0p2 if no SD card present OR if booting from SD + * - root=/dev/mmcblk1p2 if have SD card and booting from movi + */ +int kernel_root_num = 0; + +static unsigned char sat_tun = 0; + +/***************************************** + * Routine: board_init + * Description: Early hardware init. + *****************************************/ +int board_init(void) +{ + detect_boot_mode(); + + if (get_device_type() != GP_DEVICE) { + set_default_map((uint32_t) &__mmu_table_start); + } + dcache_enable(); + + if (SYSBOOT_MODE_COLD == gd->tomtom.sysboot_mode) + /* cold boot => initialize the flipflop, we can't rely on the + state of the scratchpad register */ + flipflop_set(0); + + /* In general, load the kernel from MoviNAND; on A1 the SD slot is useful for recovery */ + gd->tomtom.bootdev = BOOTDEV_MOVI; + + /* STRBDEV-2049 Reduce the drive strength on the MoviNand signals */ + __raw_writel(__raw_readl(CONTROL_PROG_IO1) & ~PRG_SDMMC1_SPEEDCTRL, CONTROL_PROG_IO1); + + mmc_init(BOOTDEV_MOVI); +#ifdef BOOTDEV_SDCARD + kernel_root_num = !mmc_init(BOOTDEV_SDCARD); + + if ((__raw_readl(0x480029c0) & 0xff) == 0x6) { /* Booted from the A1 SD slot? */ + gd->tomtom.bootdev = BOOTDEV_SDCARD; + kernel_root_num = 0; + } +#endif + + /* Enable GPIO4 clocks FCLK and ICLK */ + __raw_writel(__raw_readl(CM_FCLKEN_WKUP) | (1 << CLKEN_PER_EN_GPIO2_BIT), + CM_FCLKEN_WKUP); + __raw_writel(__raw_readl(CM_ICLKEN_WKUP) | (1 << CLKEN_PER_EN_GPIO2_BIT), + CM_ICLKEN_WKUP); + delay(10000); + +#if !defined(__VARIANT_A1) + if (!(__raw_readl(OMAP34XX_GPIO2_BASE + OMAP34XX_GPIO_DATAIN) & GPIO9)) { + memcpy(DIAGSYS_ADDR_START, DIAGSYS_ADDR_NOR, DIAGSYS_LEN); + memcpy(DEFAULT_FDT_START, DIAGSYS_ADDR_START+DIAGSYS_LEN-DEFAULT_FDT_LEN-512, DEFAULT_FDT_LEN); + exec_applet=1; + } +#endif + + gpmc_init(); /* in SRAM or SDRAM, finish GPMC */ +#if defined(__VARIANT_A1) + gd->bd->bi_arch_number = MACH_TYPE_STRASBOURG; /* Linux mach id */ +#else + gd->bd->bi_arch_number = MACH_TYPE_STRASBOURG_A2; /* Linux mach id */ +#endif + gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); /* boot param addr */ + + return 0; +} + +/********************************************************** + * Routine: dss_init + * Description: Initializes the display and fills the + framebuffer with the logo. + **********************************************************/ +void dss_init(void) +{ + unsigned long i, y; + unsigned long p = 0; + unsigned char pixel[3]; + + /* Draw logo into frame buffer */ + for (i = 0; i < header_data_rle_size; i++) { + for (y = 0; y < header_data_rle[i][0]; y++) { + HEADER_PIXEL(header_data_rle[i][1], pixel); + *((unsigned int *)(FRAMEBUFFER_ADDR_START + p*4)) = + (pixel[0] << 16) | + (pixel[1] << 8) | + (pixel[2]); + p++; + } + } + + /* Reset lcd */ + if (omap_request_gpio(GPIO_nLCD_RESET)) { + printf ("Error when requesting nLCD_RESET\n"); + return; + } + omap_set_gpio_dataout(GPIO_nLCD_RESET, 0); + omap_set_gpio_direction(GPIO_nLCD_RESET, 0); + + /* Enable lcm power */ + if (omap_request_gpio(GPIO_LCM_PWR_ON)) { + printf ("Error when requesting LCM_PWR_ON\n"); + return; + } + +#if defined(__VARIANT_B2) || defined(__VARIANT_RENNES_A1) || defined(__VARIANT_RENNES_B1) + if (omap_request_gpio(GPIO_SENSE_11V0)) { + printf ("Error when requesting LCM_PWR_ON\n"); + return; + } + omap_set_gpio_direction(GPIO_SENSE_11V0, 1); + omap_set_gpio_dataout(GPIO_LCM_PWR_ON, 0); + omap_set_gpio_direction(GPIO_LCM_PWR_ON, 0); + for (i = 0; i < SENSE_11V0_MAX_RETRY; i++) { + /* attempt to activate LCD power supply */ + omap_set_gpio_dataout(GPIO_LCM_PWR_ON, 1); + /* T8 */ + delay(600000); /* 2 ms */ + if (omap_get_gpio_datain(GPIO_SENSE_11V0)) + break; + } + if (i == SENSE_11V0_MAX_RETRY) + printf("Failed to power on the LCM!!!"); +#else + omap_set_gpio_dataout(GPIO_LCM_PWR_ON, 1); + omap_set_gpio_direction(GPIO_LCM_PWR_ON, 0); +#endif + delay (9000000); /* 30 ms */ + + /* Release Reset line */ + omap_set_gpio_dataout(GPIO_nLCD_RESET, 1); + delay (9000000); /* 30 ms */ + + /* Setup lcm */ + writel(0x00000001, 0x48050010); + writel(0x00000000, 0x48050040); + /* Enable RFBI set in bypass mode */ + writel(0x00000002, 0x48050840); + writel(0x00310000, 0x48050860); + /* Config display controller */ + writel(0x05F05F00, 0x48050464); + writel(0x00a00a00, 0x48050468); + writel(0x00000000, 0x4805046c); + writel(0x00010006, 0x48050470); + writel(0x000000ff, 0x48050474); + writel(0x00000000, 0x48050478); + writel(0x01DF031F, 0x4805047c); + writel(FRAMEBUFFER_ADDR_START, 0x48050480); + writel(0x01df031f, 0x4805048c); + writel(0x000000b1, 0x480504a0); + writel(0x03ff03c0, 0x480504a4); + writel(0x08018309, 0x48050440);//DISPC_CONTROL enable disp +} + +/********************************************************** + * Routine: config_screen_rotation + * Description: Configure the screen rotation based on the + EEPROM setting + **********************************************************/ +static void config_screen_rotation(void) +{ + unsigned char fdt_rotation; + + /* Request the rotation GPIOs */ + if (omap_request_gpio(GPIO_LCD_UD)) { + printf ("Error when requesting LCD_UD\n"); + return; + } + if (omap_request_gpio(GPIO_LCD_LR)) { + printf ("Error when requesting LCD_LR\n"); + return; + } + + /* Read the rotation value from EEPROM */ + select_bus(CFG_I2C_EEPROM_BUS, OMAP_I2C_FAST_MODE); + if (eeprom_read (CFG_DEF_EEPROM_ADDR, FDT_SCR_ROT_OFFSET, &fdt_rotation, 1)) { + printf("** Error reading screen rotation from EEPROM\n"); + fdt_rotation = 0; + } + select_bus(CFG_I2C_BUS, CFG_I2C_SPEED); + + /* Set the rotation GPIOs accordingly */ + if (fdt_rotation == '1') { + omap_set_gpio_dataout(GPIO_LCD_UD, 0); + omap_set_gpio_dataout(GPIO_LCD_LR, 1); + } + else { + omap_set_gpio_dataout(GPIO_LCD_UD, 1); + omap_set_gpio_dataout(GPIO_LCD_LR, 0); + } + omap_set_gpio_direction(GPIO_LCD_UD, 0); + omap_set_gpio_direction(GPIO_LCD_LR, 0); +} + +static unsigned char vcom_to_pwmaoff_rennes_b1(unsigned char vcom) +{ + unsigned char pwmaoff; + + if (vcom >= 0x80) + pwmaoff = 0x3f; + else if (vcom == 0x7f) + pwmaoff = 0x01; + else if (vcom == 0x00) + pwmaoff = 0x00; + else + pwmaoff = vcom + 1; + + return pwmaoff; +} + +static void config_screen_vcom_rennes_b1(void) +{ + unsigned char vcom, data; + + /* Read the vcom value from EEPROM */ + select_bus(CFG_I2C_EEPROM_BUS, OMAP_I2C_FAST_MODE); + if (eeprom_read (CFG_DEF_EEPROM_ADDR, FDT_SCR_VCOM_OFFSET, &vcom, 1)) { + printf("** Error reading screen VCOM from EEPROM\n"); + vcom = 0xff; + } + select_bus(CFG_I2C_BUS, CFG_I2C_SPEED); + + /* clear VIBRA_CTL[0] - VIBRA_EN */ + i2c_read(0x49, 0x45, 1, &data, 1); + data &= ~1; + i2c_write(0x49, 0x45, 1, &data, 1); + + /* set LEDEN[0] - LEDAON */ + i2c_read(0x4a, 0xee, 1, &data, 1); + data |= 1; + i2c_write(0x4a, 0xee, 1, &data, 1); + + /* set LEDEN[4] - LEDAPWM */ + i2c_read(0x4a, 0xee, 1, &data, 1); + data |= (1 << 4); + i2c_write(0x4a, 0xee, 1, &data, 1); + + /* clear LEDEN[2] - LEDAEXT */ + i2c_read(0x4a, 0xee, 1, &data, 1); + data &= ~(1 << 2); + i2c_write(0x4a, 0xee, 1, &data, 1); + + /* set PWMAON */ + data = 1; + i2c_write(0x4a, 0xef, 1, &data, 1); + + /* set PWMAOFF */ + data = vcom_to_pwmaoff_rennes_b1(vcom); + i2c_write(0x4a, 0xf0, 1, &data, 1); +} + +static void switch_on_bl_pmic_pwm(void) +{ + unsigned char data; + + /* PWM0ON */ + data = 0x2; + i2c_write(0x4a, 0xF8, 1, &data, 1); + /* PWM0OFF */ + data = 0x44; + i2c_write(0x4a, 0xF9, 1, &data, 1); + /* PMBR1 */ + i2c_read(0x49, 0x92, 1, &data, 1); + data |= (1<<2); + i2c_write(0x49, 0x92, 1, &data, 1); + /* GPBR1 */ + i2c_read(0x49, 0x91, 1, &data, 1); + data |= ((1<<2) | (1)); + i2c_write(0x49, 0x91, 1, &data, 1); + + /* Set GPIO13 (BL enable) output high*/ + data = 0x0; + i2c_read(0x49, 0x9c, 1, &data, 1); + data |= 0x20; + i2c_write(0x49, 0x9c, 1, &data, 1); + data = 0x0; + i2c_read(0x49, 0x9f, 1, &data, 1); + data |= 0x20; + i2c_write(0x49, 0x9f, 1, &data, 1); +} + +static void switch_on_bl_omap_pwm(void) +{ + /* Configure GPT10 source (1: sys_clk, 0: 32K_clk) */ + sr32(CM_CLKSEL_CORE, 6, 1, 1); + + /* TSICR register: non-posted mode */ + writel(0x0, OMAP34XX_GPTIMER10_BASE + TSICR); + + /* Timer load register */ + writel(0xfffcd37e, OMAP34XX_GPTIMER10_BASE + TLDR); + + /* Trigger register */ + writel(0x0, OMAP34XX_GPTIMER10_BASE + TTGR); + + /* Match register */ + writel(0xfffdc5a7, OMAP34XX_GPTIMER10_BASE + TMAR); + + /* Timer counter register */ + writel(0xfffffffe, OMAP34XX_GPTIMER10_BASE + TCRR); + + /* Start the timer */ + writel(TIMER_CTRL_ST | TIMER_CTRL_AR | TIMER_CTRL_CE | + TIMER_CTRL_PT | TIMER_CTRL_TRG_OVERFLOW_MATCH, + OMAP34XX_GPTIMER10_BASE + TCLR); + + /* Enable the backlight */ + if (omap_request_gpio(GPIO_BACKLIGHT_ON)) { + printf ("Error when requesting BACKLIGHT_ON gpio\n"); + return; + } + omap_set_gpio_dataout(GPIO_BACKLIGHT_ON, 1); + omap_set_gpio_direction(GPIO_BACKLIGHT_ON, 0); +} + +static void switch_on_bl_omap_pwm_rennes_b1(void) +{ + unsigned char data; + + /* + * switch off VDD_1V8_AUX2 so to hide the otherwise visible + * white flash on reboot + */ + i2c_read(0x4b, 0x76, 1, &data, 1); + data &= ~0x20; + i2c_write(0x4b, 0x76, 1, &data, 1); + + /* Configure the screen VCOM based on the EEPROM value */ + config_screen_vcom_rennes_b1(); + + /* continue with the usual omap pwm configuration */ + switch_on_bl_omap_pwm(); +} + +static struct mfd_feat bl_feats[] = { + MFD_1_0_A2(switch_on_bl_pmic_pwm), + MFD_1_0_B1(switch_on_bl_pmic_pwm), + MFD_1_0_B2(switch_on_bl_omap_pwm), + MFD_1_05(switch_on_bl_omap_pwm), + MFD_1_1(switch_on_bl_omap_pwm_rennes_b1), + MFD_2_0(switch_on_bl_omap_pwm_rennes_b1), + MFD_DEFAULT(NULL), +}; + +/********************************************************** + * Routine: switch_on_bl + * Description: Switches on the display backlight + **********************************************************/ +static void switch_on_bl(void) +{ + void (*switch_mfd_bl)(void) = mfd_feature(bl_feats); + + /* Configure the screen rotation based on the EEPROM value */ + config_screen_rotation(); + + if (switch_mfd_bl) + switch_mfd_bl(); + + /* Print out APTS tag */ + printf ("\n[APTS Logo/]\n\n"); +} + +static void detect_sat_tuner_stuttgart_b1(void) +{ + select_bus(CFG_I2C_EEPROM_BUS, OMAP_I2C_FAST_MODE); + if (eeprom_read(CFG_DEF_EEPROM_ADDR, EOL_SAT_TUN_OFFSET, &sat_tun, 1)) + printf("** Error reading Diags_conf_13 Satellite Tuner\n"); + select_bus(CFG_I2C_BUS, CFG_I2C_SPEED); + + /* check bit 2 (SAT_CNF) */ + sat_tun = (sat_tun != 0xff) && (sat_tun & 0x4); +} + +static struct mfd_feat sat_tun_feats[] = { + MFD_2_0(detect_sat_tuner_stuttgart_b1), + MFD_DEFAULT(NULL), +}; + +/******************************************************* + * Routine: misc_init_r + * Description: Init ethernet (done here so udelay works) + ********************************************************/ +int misc_init_r(void) +{ + void (*detect_mfd_sat_tun)(void) = mfd_feature(sat_tun_feats); + +#ifdef CONFIG_DRIVER_OMAP34XX_I2C + unsigned char data; + + i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); + + twl4030_usb_init(); + + /* Disable the PMU watchdog. The main SoC watchdog + * is enabled by this time */ + data = 0; + i2c_write(0x4b, 0x5e, 1, &data, 1); +#endif + + if (detect_mfd_sat_tun) + detect_mfd_sat_tun(); + + switch_on_bl(); + dieid_num_r(); + + return (0); +} + +/* + * IEN - Input Enable + * IDIS - Input Disable + * PTD - Pull type Down + * PTU - Pull type Up + * DIS - Pull type selection is inactive + * EN - Pull type selection is active + * M0 - Mode 0 + * The commented string gives the final mux configuration for that pin + */ +#define MUX_DEFAULT_ES2()\ + /*Die to Die */\ + MUX_VAL(CP(d2d_mcad0), (IEN | PTD | EN | M0)) /*d2d_mcad0*/\ + MUX_VAL(CP(d2d_mcad1), (IEN | PTD | EN | M0)) /*d2d_mcad1*/\ + MUX_VAL(CP(d2d_mcad2), (IEN | PTD | EN | M0)) /*d2d_mcad2*/\ + MUX_VAL(CP(d2d_mcad3), (IEN | PTD | EN | M0)) /*d2d_mcad3*/\ + MUX_VAL(CP(d2d_mcad4), (IEN | PTD | EN | M0)) /*d2d_mcad4*/\ + MUX_VAL(CP(d2d_mcad5), (IEN | PTD | EN | M0)) /*d2d_mcad5*/\ + MUX_VAL(CP(d2d_mcad6), (IEN | PTD | EN | M0)) /*d2d_mcad6*/\ + MUX_VAL(CP(d2d_mcad7), (IEN | PTD | EN | M0)) /*d2d_mcad7*/\ + MUX_VAL(CP(d2d_mcad8), (IEN | PTD | EN | M0)) /*d2d_mcad8*/\ + MUX_VAL(CP(d2d_mcad9), (IEN | PTD | EN | M0)) /*d2d_mcad9*/\ + MUX_VAL(CP(d2d_mcad10), (IEN | PTD | EN | M0)) /*d2d_mcad10*/\ + MUX_VAL(CP(d2d_mcad11), (IEN | PTD | EN | M0)) /*d2d_mcad11*/\ + MUX_VAL(CP(d2d_mcad12), (IEN | PTD | EN | M0)) /*d2d_mcad12*/\ + MUX_VAL(CP(d2d_mcad13), (IEN | PTD | EN | M0)) /*d2d_mcad13*/\ + MUX_VAL(CP(d2d_mcad14), (IEN | PTD | EN | M0)) /*d2d_mcad14*/\ + MUX_VAL(CP(d2d_mcad15), (IEN | PTD | EN | M0)) /*d2d_mcad15*/\ + MUX_VAL(CP(d2d_mcad16), (IEN | PTD | EN | M0)) /*d2d_mcad16*/\ + MUX_VAL(CP(d2d_mcad17), (IEN | PTD | EN | M0)) /*d2d_mcad17*/\ + MUX_VAL(CP(d2d_mcad18), (IEN | PTD | EN | M0)) /*d2d_mcad18*/\ + MUX_VAL(CP(d2d_mcad19), (IEN | PTD | EN | M0)) /*d2d_mcad19*/\ + MUX_VAL(CP(d2d_mcad20), (IEN | PTD | EN | M0)) /*d2d_mcad20*/\ + MUX_VAL(CP(d2d_mcad21), (IEN | PTD | EN | M0)) /*d2d_mcad21*/\ + MUX_VAL(CP(d2d_mcad22), (IEN | PTD | EN | M0)) /*d2d_mcad22*/\ + MUX_VAL(CP(d2d_mcad23), (IEN | PTD | EN | M0)) /*d2d_mcad23*/\ + MUX_VAL(CP(d2d_mcad24), (IEN | PTD | EN | M0)) /*d2d_mcad24*/\ + MUX_VAL(CP(d2d_mcad25), (IEN | PTD | EN | M0)) /*d2d_mcad25*/\ + MUX_VAL(CP(d2d_mcad26), (IEN | PTD | EN | M0)) /*d2d_mcad26*/\ + MUX_VAL(CP(d2d_mcad27), (IEN | PTD | EN | M0)) /*d2d_mcad27*/\ + MUX_VAL(CP(d2d_mcad28), (IEN | PTD | EN | M0)) /*d2d_mcad28*/\ + MUX_VAL(CP(d2d_mcad29), (IEN | PTD | EN | M0)) /*d2d_mcad29*/\ + MUX_VAL(CP(d2d_mcad30), (IEN | PTD | EN | M0)) /*d2d_mcad30*/\ + MUX_VAL(CP(d2d_mcad31), (IEN | PTD | EN | M0)) /*d2d_mcad31*/\ + MUX_VAL(CP(d2d_mcad32), (IEN | PTD | EN | M0)) /*d2d_mcad32*/\ + MUX_VAL(CP(d2d_mcad33), (IEN | PTD | EN | M0)) /*d2d_mcad33*/\ + MUX_VAL(CP(d2d_mcad34), (IEN | PTD | EN | M0)) /*d2d_mcad34*/\ + MUX_VAL(CP(d2d_mcad35), (IEN | PTD | EN | M0)) /*d2d_mcad35*/\ + MUX_VAL(CP(d2d_mcad36), (IEN | PTD | EN | M0)) /*d2d_mcad36*/\ + MUX_VAL(CP(d2d_clk26mi), (IEN | PTD | DIS | M0)) /*d2d_clk26mi */\ + MUX_VAL(CP(d2d_nrespwron ), (IEN | PTD | EN | M0)) /*d2d_nrespwron*/\ + MUX_VAL(CP(d2d_nreswarm), (IEN | PTU | EN | M0)) /*d2d_nreswarm */\ + MUX_VAL(CP(d2d_arm9nirq), (IEN | PTD | DIS | M0)) /*d2d_arm9nirq */\ + MUX_VAL(CP(d2d_uma2p6fiq ), (IEN | PTD | DIS | M0)) /*d2d_uma2p6fiq*/\ + MUX_VAL(CP(d2d_spint), (IEN | PTD | EN | M0)) /*d2d_spint*/\ + MUX_VAL(CP(d2d_frint), (IEN | PTD | EN | M0)) /*d2d_frint*/\ + MUX_VAL(CP(d2d_dmareq0), (IEN | PTD | DIS | M0)) /*d2d_dmareq0 */\ + MUX_VAL(CP(d2d_dmareq1), (IEN | PTD | DIS | M0)) /*d2d_dmareq1 */\ + MUX_VAL(CP(d2d_dmareq2), (IEN | PTD | DIS | M0)) /*d2d_dmareq2 */\ + MUX_VAL(CP(d2d_dmareq3), (IEN | PTD | DIS | M0)) /*d2d_dmareq3 */\ + MUX_VAL(CP(d2d_n3gtrst), (IEN | PTD | DIS | M0)) /*d2d_n3gtrst */\ + MUX_VAL(CP(d2d_n3gtdi), (IEN | PTD | DIS | M0)) /*d2d_n3gtdi*/\ + MUX_VAL(CP(d2d_n3gtdo), (IEN | PTD | DIS | M0)) /*d2d_n3gtdo*/\ + MUX_VAL(CP(d2d_n3gtms), (IEN | PTD | DIS | M0)) /*d2d_n3gtms*/\ + MUX_VAL(CP(d2d_n3gtck), (IEN | PTD | DIS | M0)) /*d2d_n3gtck*/\ + MUX_VAL(CP(d2d_n3grtck), (IEN | PTD | DIS | M0)) /*d2d_n3grtck */\ + MUX_VAL(CP(d2d_mstdby), (IEN | PTU | EN | M0)) /*d2d_mstdby*/\ + MUX_VAL(CP(d2d_swakeup), (IEN | PTD | EN | M0)) /*d2d_swakeup */\ + MUX_VAL(CP(d2d_idlereq), (IEN | PTD | DIS | M0)) /*d2d_idlereq */\ + MUX_VAL(CP(d2d_idleack), (IEN | PTU | EN | M0)) /*d2d_idleack */\ + MUX_VAL(CP(d2d_mwrite), (IEN | PTD | DIS | M0)) /*d2d_mwrite*/\ + MUX_VAL(CP(d2d_swrite), (IEN | PTD | DIS | M0)) /*d2d_swrite*/\ + MUX_VAL(CP(d2d_mread), (IEN | PTD | DIS | M0)) /*d2d_mread*/\ + MUX_VAL(CP(d2d_sread), (IEN | PTD | DIS | M0)) /*d2d_sread*/\ + MUX_VAL(CP(d2d_mbusflag), (IEN | PTD | DIS | M0)) /*d2d_mbusflag */\ + MUX_VAL(CP(d2d_sbusflag), (IEN | PTD | DIS | M0)) /*d2d_sbusflag */\ + MUX_VAL(CP(sdrc_cke0), (IDIS | PTU | EN | M0)) /*sdrc_cke0 */\ + MUX_VAL(CP(sdrc_cke1), (IDIS | PTD | DIS | M7)) /*sdrc_cke1 unused*/ + +/********************************************************** + * Routine: set_muxconf_regs + * Description: Setting up the configuration Mux registers + * specific to the hardware. Many pins need + * to be moved from protect to primary mode. + *********************************************************/ +void set_muxconf_regs(void) +{ + PADCONFIG_SETTINGS_UBOOT + PADCONFIG_SETTINGS_COMMON + MUX_DEFAULT_ES2(); +} + +/****************************************************************************** + * Routine: update_mux() + * Description:Update balls which are different between boards. All should be + * updated to match functionality. However, I'm only updating ones + * which I'll be using for now. When power comes into play they + * all need updating. + *****************************************************************************/ +void update_mux(u32 btype, u32 mtype) +{ + /* NOTHING as of now... */ +} + +void board_env_init(void) +{ + char ulong_str[16]; /* Needs to be as long as "0x12345678" + '\0' */ + + /* Replace with factory data when available */ + switch(gd->bd->bi_arch_number) { + case MACH_TYPE_STRASBOURG_A2: + setenv("kernel.console", "ttyO2"); + break; + case MACH_TYPE_STRASBOURG: + default: + setenv("kernel.console", "ttyO0"); + break; + } + + /* disable the console in case of satellite tuner */ + if (sat_tun) { + printf("## Silent boot due to SAT_CNF\n\n"); + setenv("kernel.console", ""); + } + + sprintf(ulong_str, "%u", kernel_root_num); + setenv("kernel.root.num", ulong_str); + + sprintf(ulong_str, "%#lx", (unsigned long) DIAGSYS_ADDR_START); + setenv("applet.addr", ulong_str); + + if (exec_applet) { + sprintf(ulong_str, "%u", DIAGSYS_LEN-44); /* 44 byte DSA sig at end */ + setenv("applet.size", ulong_str); + + sprintf(ulong_str, "%lx", DEFAULT_FDT_START); + setenv("fdt.default.addr", ulong_str); + + setenv("exec_applet", "yes"); + } else { + setenv("exec_applet", "no"); + } +} diff --git a/board/tomtom/strasbourg/u-boot.lds b/board/tomtom/strasbourg/u-boot.lds new file mode 100644 index 000000000..18f8cb02d --- /dev/null +++ b/board/tomtom/strasbourg/u-boot.lds @@ -0,0 +1,118 @@ +/* + * January 2004 - Changed to support H4 device + * Copyright (c) 2004 Texas Instruments + * + * (C) Copyright 2002 + * Gary Jennejohn, DENX Software Engineering, + * + * 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 + */ + +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") +OUTPUT_ARCH(arm) +ENTRY(_start) +SECTIONS +{ + . = 0x00000000; + + /* NOBITS section to contain the kernel */ + . = 0x80008000; + .xkern . (COPY) : + { + __xkern_start = .; + . = . + 8M; + __xkern_end = .; + } + + .text : + { + cpu/omap3/start.o (.text) + *(.text) + } + + . = ALIGN(4); + .rodata : { *(.rodata) } + + . = ALIGN(4); + .data : { *(.data) } + + . = ALIGN(4); + .bootscript : { *(.bootscript) } + + . = ALIGN(4); + .got : { *(.got) } + + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + . = ALIGN(4); + __bss_start = .; + .bss : { *(.bss) } + . = ALIGN(4); + _end = .; + + /* NOBITS section to contain the MMU page table */ + . = ALIGN(0x4000); + .mmu_table . (COPY) : + { + __mmu_table_start = .; + . = . + 16K; /* ARM page table is always 16K */ + } + + . = 0x83300000; + /* NOBITS section to contain the FDT */ + .fdt . (COPY) : + { + __fdt_start = .; + . = . + 128K; /* Max FDT len is 128K */ + __fdt_end = .; + } + + . = ALIGN(128); + /* NOBITS section to contain the kernel */ + .kern . (COPY) : + { + . = . + 16K; /* For the decompressor page table */ + __kern_start = .; + . = . + 4M; + __kern_end = .; + } + + . = 0x82000000; + .diagsys . (COPY) : + { + __diagsys_start = .; + . = . + 1M; + __diagsys_end = .; + } + + . = ALIGN(4); + + . = 0x83000000; + .framebuffer . (COPY) : + { + __framebuffer_start = .; + . = . + 3M; + __framebuffer_end = .; + } + + . = ALIGN(4); +} + diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 8dfa337ae..4d80f005e 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2002 + * (C) Copyright 2000-2006 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -21,23 +21,32 @@ * MA 02111-1307 USA */ + /* * Boot support */ #include +#include #include #include #include +#include #include #include #include #include +#include #include +#include - /*cmd_boot.c*/ - extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +#include +#include -#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) +#if defined(CONFIG_CMD_USB) +#include +#endif + +#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP) #include #endif @@ -45,55 +54,42 @@ #include #endif -#ifdef CONFIG_SHOW_BOOT_PROGRESS -# include -# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg) -#else -# define SHOW_BOOT_PROGRESS(arg) +DECLARE_GLOBAL_DATA_PTR; + +extern int gunzip (void *dst, int dstlen, unsigned char *src, unsigned long *lenp); +#ifndef CFG_BOOTM_LEN +#define CFG_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */ #endif -#ifdef CFG_INIT_RAM_LOCK -#include +#ifdef CONFIG_BZIP2 +extern void bz_internal_error(int); #endif -#ifdef CONFIG_LOGBUFFER -#include -#endif - -#ifdef CONFIG_HAS_DATAFLASH -#include -#endif - -/* - * Some systems (for example LWMON) have very short watchdog periods; - * we must make sure to split long operations like memmove() or - * crc32() into reasonable chunks. - */ -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) -# define CHUNKSZ (64 * 1024) -#endif - -int gunzip (void *, int, unsigned char *, unsigned long *); - -static void *zalloc(void *, unsigned, unsigned); -static void zfree(void *, void *, unsigned); - -#if (CONFIG_COMMANDS & CFG_CMD_IMI) +#if defined(CONFIG_CMD_IMI) static int image_info (unsigned long addr); #endif -#if (CONFIG_COMMANDS & CFG_CMD_IMLS) +#if defined(CONFIG_CMD_IMLS) #include -extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ +extern flash_info_t flash_info[]; /* info for FLASH chips */ static int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); #endif static void print_type (image_header_t *hdr); -#ifdef __I386__ -image_header_t *fake_header(image_header_t *hdr, void *ptr, int size); +#ifdef CONFIG_SILENT_CONSOLE +void fixup_silent_linux (void); #endif +static image_header_t *image_get_kernel (ulong img_addr, int verify); +#if defined(CONFIG_FIT) +static int fit_check_kernel (const void *fit, int os_noffset, int verify); +#endif + +static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag,int argc, char *argv[], + bootm_headers_t *images, ulong *os_data, ulong *os_len); +extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); + /* * Continue booting an OS image; caller already has: * - copied image header to global variable `header' @@ -102,198 +98,196 @@ image_header_t *fake_header(image_header_t *hdr, void *ptr, int size); * - loaded (first part of) image to header load address, * - disabled interrupts. */ -typedef void boot_os_Fcn (cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[], - ulong addr, /* of image to boot */ - ulong *len_ptr, /* multi-file image length table */ - int verify); /* getenv("verify")[0] != 'n' */ +typedef void boot_os_fn (cmd_tbl_t *cmdtp, int flag, + int argc, char *argv[], + bootm_headers_t *images); /* pointers to os/initrd/fdt */ -#ifdef DEBUG -extern int do_bdinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +extern boot_os_fn do_bootm_linux; +static boot_os_fn do_bootm_netbsd; +#if defined(CONFIG_LYNXKDI) +static boot_os_fn do_bootm_lynxkdi; +extern void lynxkdi_boot (image_header_t *); #endif - -#ifdef CONFIG_PPC -static boot_os_Fcn do_bootm_linux; -#else -extern boot_os_Fcn do_bootm_linux; +static boot_os_fn do_bootm_rtems; +#if defined(CONFIG_CMD_ELF) +static boot_os_fn do_bootm_vxworks; +static boot_os_fn do_bootm_qnxelf; +int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); +int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); #endif -#ifdef CONFIG_SILENT_CONSOLE -static void fixup_silent_linux (void); -#endif -static boot_os_Fcn do_bootm_netbsd; -static boot_os_Fcn do_bootm_rtems; -#if (CONFIG_COMMANDS & CFG_CMD_ELF) -static boot_os_Fcn do_bootm_vxworks; -static boot_os_Fcn do_bootm_qnxelf; -int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ); -int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ); -#endif /* CFG_CMD_ELF */ #if defined(CONFIG_ARTOS) && defined(CONFIG_PPC) -static boot_os_Fcn do_bootm_artos; -#endif -#ifdef CONFIG_LYNXKDI -static boot_os_Fcn do_bootm_lynxkdi; -extern void lynxkdi_boot( image_header_t * ); +static boot_os_fn do_bootm_artos; #endif -ulong load_addr = CFG_LOAD_ADDR; /* Default Load Address */ +ulong load_addr = (ulong) CFG_LOAD_ADDR; /* Default Load Address */ ulong load_size = 0; -image_header_t header; +static bootm_headers_t images; /* pointers to os/initrd/fdt images */ -#ifndef CFG_BOOTM_LEN -#define CFG_BOOTM_LEN 0x800000 /* use 8MByte as default max gunzip size */ +#ifdef CONFIG_ZIMAGE_BOOT +static image_header_t zimage_hdr; #endif +void __board_lmb_reserve(struct lmb *lmb) +{ + /* please define platform specific board_lmb_reserve() */ +} +void board_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__board_lmb_reserve"))); + +/*******************************************************************/ +/* bootm - boot application image from image in memory */ +/*******************************************************************/ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - ulong iflag; - ulong addr; - ulong data, len, checksum; - ulong *len_ptr; - uint unc_len = CFG_BOOTM_LEN; - int i, verify; - char *name, *s; - int (*appl)(int, char *[]); - image_header_t *hdr = &header; + ulong *addr; + ulong iflag = 0; + const char *type_name; + uint unc_len = CFG_BOOTM_LEN; + uint8_t comp, type, os; - s = getenv ("verify"); - verify = (s && (*s == 'n')) ? 0 : 1; + void *os_hdr; + ulong os_data, os_len; + ulong image_start, image_end; + ulong load_start, load_end; + ulong mem_start; + phys_size_t mem_size; + struct lmb lmb; + + memset ((void *)&images, 0, sizeof (images)); + images.verify = getenv_yesno ("verify"); + images.lmb = &lmb; + + lmb_init(&lmb); + + mem_start = getenv_bootm_low(); + mem_size = getenv_bootm_size(); + + lmb_add(&lmb, (phys_addr_t)mem_start, mem_size); + + board_lmb_reserve(&lmb); + +#ifdef CONFIG_ZIMAGE_BOOT +#define LINUX_ZIMAGE_MAGIC 0x016f2818 + /* find out kernel image address */ if (argc < 2) { - addr = load_addr; + addr = (ulong *)load_addr; + debug ("* kernel: default image load address = 0x%08lx\n", + load_addr); + } else { - addr = simple_strtoul(argv[1], NULL, 16); + addr = (ulong *)simple_strtoul(argv[1], NULL, 16); + debug ("* kernel: cmdline image address = 0x%08p\n", addr); } - SHOW_BOOT_PROGRESS (1); - printf ("## Booting image at %08lx ...\n", addr); + if (addr[9] == LINUX_ZIMAGE_MAGIC) { - /* Copy header so we can blank CRC field for re-calculation */ -#ifdef CONFIG_HAS_DATAFLASH - if (addr_dataflash(addr)){ - read_dataflash(addr, sizeof(image_header_t), (char *)&header); - } else -#endif - memmove (&header, (char *)addr, sizeof(image_header_t)); + printf("Boot with zImage\n"); - if (ntohl(hdr->ih_magic) != IH_MAGIC) { -#ifdef __I386__ /* correct image format not implemented yet - fake it */ - if (fake_header(hdr, (void*)addr, -1) != NULL) { - /* to compensate for the addition below */ - addr -= sizeof(image_header_t); - /* turnof verify, - * fake_header() does not fake the data crc - */ - verify = 0; - } else -#endif /* __I386__ */ - { - puts ("Bad Magic Number\n"); - SHOW_BOOT_PROGRESS (-1); - return 1; - } - } - SHOW_BOOT_PROGRESS (2); + if (verify_image(addr)) + return 1; - data = (ulong)&header; - len = sizeof(image_header_t); + memset(&zimage_hdr, 0, sizeof(image_header_t)); + zimage_hdr.ih_type = IH_TYPE_KERNEL, + zimage_hdr.ih_os = os = IH_OS_LINUX, + zimage_hdr.ih_ep = ntohl((uint32_t)addr), - checksum = ntohl(hdr->ih_hcrc); - hdr->ih_hcrc = 0; + memmove (&images.legacy_hdr_os_copy, &zimage_hdr, sizeof(image_header_t)); - if (crc32 (0, (unsigned char *)data, len) != checksum) { - puts ("Bad Header Checksum\n"); - SHOW_BOOT_PROGRESS (-2); - return 1; - } - SHOW_BOOT_PROGRESS (3); + /* save pointer to image header */ + images.legacy_hdr_os = &zimage_hdr; + images.legacy_hdr_valid = 1; - /* for multi-file images we need the data part, too */ - print_image_hdr ((image_header_t *)addr); - - data = addr + sizeof(image_header_t); - len = ntohl(hdr->ih_size); - -#ifdef CONFIG_HAS_DATAFLASH - if (addr_dataflash(addr)){ - read_dataflash(data, len, (char *)CFG_LOAD_ADDR); - data = CFG_LOAD_ADDR; + goto after_header_check; } #endif - if (verify) { - puts (" Verifying Checksum ... "); - if (crc32 (0, (unsigned char *)data, len) != ntohl(hdr->ih_dcrc)) { - printf ("Bad Data CRC\n"); - SHOW_BOOT_PROGRESS (-3); + /* get kernel image header, start address and length */ + os_hdr = boot_get_kernel (cmdtp, flag, argc, argv, + &images, &os_data, &os_len); + if (os_len == 0) { + puts ("ERROR: can't get kernel image!\n"); + return 1; + } + + /* get image parameters */ + switch (genimg_get_format (os_hdr)) { + case IMAGE_FORMAT_LEGACY: + type = image_get_type (os_hdr); + comp = image_get_comp (os_hdr); + os = image_get_os (os_hdr); + + image_end = image_get_image_end (os_hdr); + load_start = image_get_load (os_hdr); + break; +#if defined(CONFIG_FIT) + case IMAGE_FORMAT_FIT: + if (fit_image_get_type (images.fit_hdr_os, + images.fit_noffset_os, &type)) { + puts ("Can't get image type!\n"); + show_boot_progress (-109); return 1; } - puts ("OK\n"); - } - SHOW_BOOT_PROGRESS (4); - len_ptr = (ulong *)data; + if (fit_image_get_comp (images.fit_hdr_os, + images.fit_noffset_os, &comp)) { + puts ("Can't get image compression!\n"); + show_boot_progress (-110); + return 1; + } -#if defined(__PPC__) - if (hdr->ih_arch != IH_CPU_PPC) -#elif defined(__ARM__) - if (hdr->ih_arch != IH_CPU_ARM) -#elif defined(__I386__) - if (hdr->ih_arch != IH_CPU_I386) -#elif defined(__mips__) - if (hdr->ih_arch != IH_CPU_MIPS) -#elif defined(__nios__) - if (hdr->ih_arch != IH_CPU_NIOS) -#elif defined(__M68K__) - if (hdr->ih_arch != IH_CPU_M68K) -#elif defined(__microblaze__) - if (hdr->ih_arch != IH_CPU_MICROBLAZE) -#elif defined(__nios2__) - if (hdr->ih_arch != IH_CPU_NIOS2) -#else -# error Unknown CPU type -#endif - { - printf ("Unsupported Architecture 0x%x\n", hdr->ih_arch); - SHOW_BOOT_PROGRESS (-4); - return 1; - } - SHOW_BOOT_PROGRESS (5); + if (fit_image_get_os (images.fit_hdr_os, + images.fit_noffset_os, &os)) { + puts ("Can't get image OS!\n"); + show_boot_progress (-111); + return 1; + } - switch (hdr->ih_type) { - case IH_TYPE_STANDALONE: - name = "Standalone Application"; - /* A second argument overwrites the load address */ - if (argc > 2) { - hdr->ih_load = simple_strtoul(argv[2], NULL, 16); + image_end = fit_get_end (images.fit_hdr_os); + + if (fit_image_get_load (images.fit_hdr_os, images.fit_noffset_os, + &load_start)) { + puts ("Can't get image load address!\n"); + show_boot_progress (-112); + return 1; } break; - case IH_TYPE_KERNEL: - name = "Kernel Image"; - break; - case IH_TYPE_MULTI: - name = "Multi-File Image"; - len = ntohl(len_ptr[0]); - /* OS kernel is always the first image */ - data += 8; /* kernel_len + terminator */ - for (i=1; len_ptr[i]; ++i) - data += 4; - break; - default: printf ("Wrong Image Type for %s command\n", cmdtp->name); - SHOW_BOOT_PROGRESS (-5); +#endif + default: + puts ("ERROR: unknown image format type!\n"); return 1; } - SHOW_BOOT_PROGRESS (6); + + /* TODO: Verify __after__ it's been copied to RAM */ + load_size = os_len; /* uImage is in memory-mapped ROM */ + if (verify_image(os_data)) + return 1; + + image_start = (ulong)os_hdr; + load_end = 0; + type_name = genimg_get_type_name (type); /* * We have reached the point of no return: we are going to * overwrite all exception vector code, so we cannot easily * recover from any failures any more... */ - iflag = disable_interrupts(); +#if defined(CONFIG_CMD_USB) + /* + * turn off USB to prevent the host controller from writing to the + * SDRAM while Linux is booting. This could happen (at least for OHCI + * controller), because the HCCA (Host Controller Communication Area) + * lies within the SDRAM and the host controller writes continously to + * this area (as busmaster!). The HccaFrameNumber is for example + * updated every 1 ms within the HCCA structure in SDRAM! For more + * details see the OpenHCI specification. + */ + usb_stop(); +#endif + + #ifdef CONFIG_AMIGAONEG3SE /* * We've possible left the caches enabled during @@ -305,171 +299,683 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) dcache_disable(); #endif - switch (hdr->ih_comp) { + switch (comp) { case IH_COMP_NONE: - if(ntohl(hdr->ih_load) == addr) { - printf (" XIP %s ... ", name); + if (load_start == (ulong)os_hdr) { + printf (" XIP %s ... ", type_name); } else { -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - size_t l = len; - void *to = (void *)ntohl(hdr->ih_load); - void *from = (void *)data; + printf (" Loading %s ... ", type_name); - printf (" Loading %s ... ", name); +#ifdef ENABLE_DCHACE_FOR_BOOTM_CMD + dcache_enable(); +#endif - while (l > 0) { - size_t tail = (l > CHUNKSZ) ? CHUNKSZ : l; - WATCHDOG_RESET(); - memmove (to, from, tail); - to += tail; - from += tail; - l -= tail; - } -#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ - memmove ((void *) ntohl(hdr->ih_load), (uchar *)data, len); -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ + memmove_wd ((void *)load_start, + (void *)os_data, os_len, CHUNKSZ); +#ifdef ENABLE_DCHACE_FOR_BOOTM_CMD + dcache_disable(); +#endif } + load_end = load_start + os_len; + puts("OK\n"); break; case IH_COMP_GZIP: - printf (" Uncompressing %s ... ", name); - if (gunzip ((void *)ntohl(hdr->ih_load), unc_len, - (uchar *)data, &len) != 0) { - puts ("GUNZIP ERROR - must RESET board to recover\n"); - SHOW_BOOT_PROGRESS (-6); + printf (" Uncompressing %s ... ", type_name); + if (gunzip ((void *)load_start, unc_len, + (uchar *)os_data, &os_len) != 0) { + puts ("GUNZIP: uncompress or overwrite error " + "- must RESET board to recover\n"); + show_boot_progress (-6); do_reset (cmdtp, flag, argc, argv); } + + load_end = load_start + os_len; break; #ifdef CONFIG_BZIP2 case IH_COMP_BZIP2: - printf (" Uncompressing %s ... ", name); + printf (" Uncompressing %s ... ", type_name); /* * If we've got less than 4 MB of malloc() space, * use slower decompression algorithm which requires * at most 2300 KB of memory. */ - i = BZ2_bzBuffToBuffDecompress ((char*)ntohl(hdr->ih_load), - &unc_len, (char *)data, len, - CFG_MALLOC_LEN < (4096 * 1024), 0); + int i = BZ2_bzBuffToBuffDecompress ((char*)load_start, + &unc_len, (char *)os_data, os_len, + CFG_MALLOC_LEN < (4096 * 1024), 0); if (i != BZ_OK) { - printf ("BUNZIP2 ERROR %d - must RESET board to recover\n", i); - SHOW_BOOT_PROGRESS (-6); - udelay(100000); + printf ("BUNZIP2: uncompress or overwrite error %d " + "- must RESET board to recover\n", i); + show_boot_progress (-6); do_reset (cmdtp, flag, argc, argv); } + + load_end = load_start + unc_len; break; #endif /* CONFIG_BZIP2 */ default: if (iflag) enable_interrupts(); - printf ("Unimplemented compression type %d\n", hdr->ih_comp); - SHOW_BOOT_PROGRESS (-7); + printf ("Unimplemented compression type %d\n", comp); + show_boot_progress (-7); return 1; } puts ("OK\n"); - SHOW_BOOT_PROGRESS (7); + debug (" kernel loaded at 0x%08lx, end = 0x%08lx\n", load_start, load_end); + show_boot_progress (7); - switch (hdr->ih_type) { - case IH_TYPE_STANDALONE: - if (iflag) - enable_interrupts(); + if ((load_start < image_end) && (load_end > image_start)) { + debug ("image_start = 0x%lX, image_end = 0x%lx\n", image_start, image_end); + debug ("load_start = 0x%lx, load_end = 0x%lx\n", load_start, load_end); - /* load (and uncompress), but don't start if "autostart" - * is set to "no" - */ - if (((s = getenv("autostart")) != NULL) && (strcmp(s,"no") == 0)) { - char buf[32]; - sprintf(buf, "%lX", len); - setenv("filesize", buf); - return 0; + if (images.legacy_hdr_valid) { + if (image_get_type (&images.legacy_hdr_os_copy) == IH_TYPE_MULTI) + puts ("WARNING: legacy format multi component " + "image overwritten\n"); + } else { + puts ("ERROR: new format image overwritten - " + "must RESET the board to recover\n"); + show_boot_progress (-113); + do_reset (cmdtp, flag, argc, argv); } - appl = (int (*)(int, char *[]))ntohl(hdr->ih_ep); - (*appl)(argc-1, &argv[1]); - return 0; - case IH_TYPE_KERNEL: - case IH_TYPE_MULTI: - /* handled below */ - break; - default: - if (iflag) - enable_interrupts(); - printf ("Can't boot image type %d\n", hdr->ih_type); - SHOW_BOOT_PROGRESS (-8); - return 1; } - SHOW_BOOT_PROGRESS (8); - switch (hdr->ih_os) { + show_boot_progress (8); + + lmb_reserve(&lmb, load_start, (load_end - load_start)); + +after_header_check: + +#if defined(CONFIG_DEBUG_BUILD) && defined(CONFIG_OF_LIBFDT) + /* Set the device type in DTS to 'debug' */ + if (addr_fd && size_fd) { + ulong v = htonl(DEVCLASS_DEVELOPMENT); + + int nodeoffset = fdt_path_offset(addr_fd, "/features"); + if (nodeoffset < 0) { + eprintf ("Could not find features in fdt [%s]\n", + fdt_strerror(nodeoffset)); + } else { + int r = fdt_setprop_inplace(addr_fd, nodeoffset, + "device-class", &v, 4); + if (r) { + eprintf ("Could not set device-class to 'debug' [%s]\n", + fdt_strerror(r)); + } else { + printf ("Debug u-boot: setting device-class to 'debug'\n"); + } + } + } +#endif + + switch (os) { default: /* handled by (original) Linux case */ case IH_OS_LINUX: #ifdef CONFIG_SILENT_CONSOLE fixup_silent_linux(); #endif - do_bootm_linux (cmdtp, flag, argc, argv, - addr, len_ptr, verify); + do_bootm_linux (cmdtp, flag, argc, argv, &images); break; + case IH_OS_NETBSD: - do_bootm_netbsd (cmdtp, flag, argc, argv, - addr, len_ptr, verify); + do_bootm_netbsd (cmdtp, flag, argc, argv, &images); break; #ifdef CONFIG_LYNXKDI case IH_OS_LYNXOS: - do_bootm_lynxkdi (cmdtp, flag, argc, argv, - addr, len_ptr, verify); + do_bootm_lynxkdi (cmdtp, flag, argc, argv, &images); break; #endif case IH_OS_RTEMS: - do_bootm_rtems (cmdtp, flag, argc, argv, - addr, len_ptr, verify); + do_bootm_rtems (cmdtp, flag, argc, argv, &images); break; -#if (CONFIG_COMMANDS & CFG_CMD_ELF) +#if defined(CONFIG_CMD_ELF) case IH_OS_VXWORKS: - do_bootm_vxworks (cmdtp, flag, argc, argv, - addr, len_ptr, verify); + do_bootm_vxworks (cmdtp, flag, argc, argv, &images); break; + case IH_OS_QNX: - do_bootm_qnxelf (cmdtp, flag, argc, argv, - addr, len_ptr, verify); + do_bootm_qnxelf (cmdtp, flag, argc, argv, &images); break; -#endif /* CFG_CMD_ELF */ +#endif + #ifdef CONFIG_ARTOS case IH_OS_ARTOS: - do_bootm_artos (cmdtp, flag, argc, argv, - addr, len_ptr, verify); + do_bootm_artos (cmdtp, flag, argc, argv, &images); break; #endif } - SHOW_BOOT_PROGRESS (-9); + show_boot_progress (-9); #ifdef DEBUG puts ("\n## Control returned to monitor - resetting...\n"); do_reset (cmdtp, flag, argc, argv); #endif + if (iflag) + enable_interrupts(); + + return 1; +} + +/** + * image_get_kernel - verify legacy format kernel image + * @img_addr: in RAM address of the legacy format image to be verified + * @verify: data CRC verification flag + * + * image_get_kernel() verifies legacy image integrity and returns pointer to + * legacy image header if image verification was completed successfully. + * + * returns: + * pointer to a legacy image header if valid image was found + * otherwise return NULL + */ +static image_header_t *image_get_kernel (ulong img_addr, int verify) +{ + image_header_t *hdr = (image_header_t *)img_addr; + + if (!image_check_magic(hdr)) { + puts ("Bad Magic Number\n"); + show_boot_progress (-1); + return NULL; + } + show_boot_progress (2); + + if (!image_check_hcrc (hdr)) { + puts ("Bad Header Checksum\n"); + show_boot_progress (-2); + return NULL; + } + + show_boot_progress (3); + image_print_contents (hdr); + + if (verify) { + puts (" Verifying Checksum ... "); + if (!image_check_dcrc (hdr)) { + printf ("Bad Data CRC\n"); + show_boot_progress (-3); + return NULL; + } + puts ("OK\n"); + } + show_boot_progress (4); + + if (!image_check_target_arch (hdr)) { + printf ("Unsupported Architecture 0x%x\n", image_get_arch (hdr)); + show_boot_progress (-4); + return NULL; + } + return hdr; +} + +/** + * fit_check_kernel - verify FIT format kernel subimage + * @fit_hdr: pointer to the FIT image header + * os_noffset: kernel subimage node offset within FIT image + * @verify: data CRC verification flag + * + * fit_check_kernel() verifies integrity of the kernel subimage and from + * specified FIT image. + * + * returns: + * 1, on success + * 0, on failure + */ +#if defined (CONFIG_FIT) +static int fit_check_kernel (const void *fit, int os_noffset, int verify) +{ + fit_image_print (fit, os_noffset, " "); + + if (verify) { + puts (" Verifying Hash Integrity ... "); + if (!fit_image_check_hashes (fit, os_noffset)) { + puts ("Bad Data Hash\n"); + show_boot_progress (-104); + return 0; + } + puts ("OK\n"); + } + show_boot_progress (105); + + if (!fit_image_check_target_arch (fit, os_noffset)) { + puts ("Unsupported Architecture\n"); + show_boot_progress (-105); + return 0; + } + + show_boot_progress (106); + if (!fit_image_check_type (fit, os_noffset, IH_TYPE_KERNEL)) { + puts ("Not a kernel image\n"); + show_boot_progress (-106); + return 0; + } + + show_boot_progress (107); + return 1; +} +#endif /* CONFIG_FIT */ + +/** + * boot_get_kernel - find kernel image + * @os_data: pointer to a ulong variable, will hold os data start address + * @os_len: pointer to a ulong variable, will hold os data length + * + * boot_get_kernel() tries to find a kernel image, verifies its integrity + * and locates kernel data. + * + * returns: + * pointer to image header if valid image was found, plus kernel start + * address and length, otherwise NULL + */ +static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], + bootm_headers_t *images, ulong *os_data, ulong *os_len) +{ + image_header_t *hdr; + ulong img_addr; +#if defined(CONFIG_FIT) + void *fit_hdr; + const char *fit_uname_config = NULL; + const char *fit_uname_kernel = NULL; + const void *data; + size_t len; + int cfg_noffset; + int os_noffset; +#endif + + /* find out kernel image address */ + if (argc < 2) { + img_addr = load_addr; + debug ("* kernel: default image load address = 0x%08lx\n", + load_addr); +#if defined(CONFIG_FIT) + } else if (fit_parse_conf (argv[1], load_addr, &img_addr, + &fit_uname_config)) { + debug ("* kernel: config '%s' from image at 0x%08lx\n", + fit_uname_config, img_addr); + } else if (fit_parse_subimage (argv[1], load_addr, &img_addr, + &fit_uname_kernel)) { + debug ("* kernel: subimage '%s' from image at 0x%08lx\n", + fit_uname_kernel, img_addr); +#endif + } else { + img_addr = simple_strtoul(argv[1], NULL, 16); + debug ("* kernel: cmdline image address = 0x%08lx\n", img_addr); + } + + show_boot_progress (1); + + /* copy from dataflash if needed */ + img_addr = genimg_get_image (img_addr); + + /* check image type, for FIT images get FIT kernel node */ + *os_data = *os_len = 0; + switch (genimg_get_format ((void *)img_addr)) { + case IMAGE_FORMAT_LEGACY: + printf ("## Booting kernel from Legacy Image at %08lx ...\n", + img_addr); + hdr = image_get_kernel (img_addr, images->verify); + if (!hdr) + return NULL; + show_boot_progress (5); + + /* get os_data and os_len */ + switch (image_get_type (hdr)) { + case IH_TYPE_KERNEL: + *os_data = image_get_data (hdr); + *os_len = image_get_data_size (hdr); + break; + case IH_TYPE_MULTI: + image_multi_getimg (hdr, 0, os_data, os_len); + break; + default: + printf ("Wrong Image Type for %s command\n", cmdtp->name); + show_boot_progress (-5); + return NULL; + } + + /* + * copy image header to allow for image overwrites during kernel + * decompression. + */ + memmove (&images->legacy_hdr_os_copy, hdr, sizeof(image_header_t)); + + /* save pointer to image header */ + images->legacy_hdr_os = hdr; + + images->legacy_hdr_valid = 1; + show_boot_progress (6); + break; +#if defined(CONFIG_FIT) + case IMAGE_FORMAT_FIT: + fit_hdr = (void *)img_addr; + printf ("## Booting kernel from FIT Image at %08lx ...\n", + img_addr); + + if (!fit_check_format (fit_hdr)) { + puts ("Bad FIT kernel image format!\n"); + show_boot_progress (-100); + return NULL; + } + show_boot_progress (100); + + if (!fit_uname_kernel) { + /* + * no kernel image node unit name, try to get config + * node first. If config unit node name is NULL + * fit_conf_get_node() will try to find default config node + */ + show_boot_progress (101); + cfg_noffset = fit_conf_get_node (fit_hdr, fit_uname_config); + if (cfg_noffset < 0) { + show_boot_progress (-101); + return NULL; + } + /* save configuration uname provided in the first + * bootm argument + */ + images->fit_uname_cfg = fdt_get_name (fit_hdr, cfg_noffset, NULL); + printf (" Using '%s' configuration\n", images->fit_uname_cfg); + show_boot_progress (103); + + os_noffset = fit_conf_get_kernel_node (fit_hdr, cfg_noffset); + fit_uname_kernel = fit_get_name (fit_hdr, os_noffset, NULL); + } else { + /* get kernel component image node offset */ + show_boot_progress (102); + os_noffset = fit_image_get_node (fit_hdr, fit_uname_kernel); + } + if (os_noffset < 0) { + show_boot_progress (-103); + return NULL; + } + + printf (" Trying '%s' kernel subimage\n", fit_uname_kernel); + + show_boot_progress (104); + if (!fit_check_kernel (fit_hdr, os_noffset, images->verify)) + return NULL; + + /* get kernel image data address and length */ + if (fit_image_get_data (fit_hdr, os_noffset, &data, &len)) { + puts ("Could not find kernel subimage data!\n"); + show_boot_progress (-107); + return NULL; + } + show_boot_progress (108); + + *os_len = len; + *os_data = (ulong)data; + images->fit_hdr_os = fit_hdr; + images->fit_uname_os = fit_uname_kernel; + images->fit_noffset_os = os_noffset; + break; +#endif + default: + printf ("Wrong Image Format for %s command\n", cmdtp->name); + show_boot_progress (-108); + return NULL; + } + + debug (" kernel data at 0x%08lx, len = 0x%08lx (%ld)\n", + *os_data, *os_len, *os_len); + + return (void *)img_addr; +} + +U_BOOT_CMD( + bootm, CFG_MAXARGS, 1, do_bootm, + "bootm - boot application image from memory\n", + "[addr [arg ...]]\n - boot application image stored in memory\n" + "\tpassing arguments 'arg ...'; when booting a Linux kernel,\n" + "\t'arg' can be the address of an initrd image\n" +#if defined(CONFIG_OF_LIBFDT) + "\tWhen booting a Linux kernel which requires a flat device-tree\n" + "\ta third argument is required which is the address of the\n" + "\tdevice-tree blob. To boot that kernel without an initrd image,\n" + "\tuse a '-' for the second argument. If you do not pass a third\n" + "\ta bd_info struct will be passed instead\n" +#endif +#if defined(CONFIG_FIT) + "\t\nFor the new multi component uImage format (FIT) addresses\n" + "\tmust be extened to include component or configuration unit name:\n" + "\taddr: - direct component image specification\n" + "\taddr# - configuration specification\n" + "\tUse iminfo command to get the list of existing component\n" + "\timages and configurations.\n" +#endif +); + +/*******************************************************************/ +/* bootd - boot default image */ +/*******************************************************************/ +#if defined(CONFIG_CMD_BOOTD) +int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int rcode = 0; + +#ifndef CFG_HUSH_PARSER + if (run_command (getenv ("bootcmd"), flag) < 0) + rcode = 1; +#else + if (parse_string_outer (getenv ("bootcmd"), + FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0) + rcode = 1; +#endif + return rcode; +} + +U_BOOT_CMD( + boot, 1, 1, do_bootd, + "boot - boot default, i.e., run 'bootcmd'\n", + NULL +); + +/* keep old command name "bootd" for backward compatibility */ +U_BOOT_CMD( + bootd, 1, 1, do_bootd, + "bootd - boot default, i.e., run 'bootcmd'\n", + NULL +); + +#endif + +/*******************************************************************/ +/* altboot - boot alternative image */ +/*******************************************************************/ +#if defined(CONFIG_CMD_ALTBOOT) +int do_altboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int rcode = 0; + +extern int get_bootlimit(void); + bootcount_store(get_bootlimit()+1); +#ifndef CFG_HUSH_PARSER + if (run_command (getenv ("altbootcmd"), flag) < 0) + rcode = 1; +#else + if (parse_string_outer (getenv ("altbootcmd"), + FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0) + rcode = 1; +#endif + return rcode; +} + +U_BOOT_CMD( + altboot, 1, 1, do_altboot, + "altboot - boot alternative, i.e., run 'altbootcmd'\n", + NULL +); +#endif /* CONFIG_CMD_ALTBOOT */ + +/*******************************************************************/ +/* iminfo - print header info for a requested image */ +/*******************************************************************/ +#if defined(CONFIG_CMD_IMI) +int do_iminfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) +{ + int arg; + ulong addr; + int rcode = 0; + + if (argc < 2) { + return image_info (load_addr); + } + + for (arg = 1; arg < argc; ++arg) { + addr = simple_strtoul (argv[arg], NULL, 16); + if (image_info (addr) != 0) + rcode = 1; + } + return rcode; +} + +static int image_info (ulong addr) +{ + void *hdr = (void *)addr; + + printf ("\n## Checking Image at %08lx ...\n", addr); + + switch (genimg_get_format (hdr)) { + case IMAGE_FORMAT_LEGACY: + puts (" Legacy image found\n"); + if (!image_check_magic (hdr)) { + puts (" Bad Magic Number\n"); + return 1; + } + + if (!image_check_hcrc (hdr)) { + puts (" Bad Header Checksum\n"); + return 1; + } + + image_print_contents (hdr); + + puts (" Verifying Checksum ... "); + if (!image_check_dcrc (hdr)) { + puts (" Bad Data CRC\n"); + return 1; + } + puts ("OK\n"); + return 0; +#if defined(CONFIG_FIT) + case IMAGE_FORMAT_FIT: + puts (" FIT image found\n"); + + if (!fit_check_format (hdr)) { + puts ("Bad FIT image format!\n"); + return 1; + } + + fit_print_contents (hdr); + return 0; +#endif + default: + puts ("Unknown image format!\n"); + break; + } + return 1; } U_BOOT_CMD( - bootm, CFG_MAXARGS, 1, do_bootm, - "bootm - boot application image from memory\n", - "[addr [arg ...]]\n - boot application image stored in memory\n" - "\tpassing arguments 'arg ...'; when booting a Linux kernel,\n" - "\t'arg' can be the address of an initrd image\n" + iminfo, CFG_MAXARGS, 1, do_iminfo, + "iminfo - print header information for application image\n", + "addr [addr ...]\n" + " - print header information for application image starting at\n" + " address 'addr' in memory; this includes verification of the\n" + " image contents (magic number, header and payload checksums)\n" ); +#endif -#ifdef CONFIG_SILENT_CONSOLE -static void -fixup_silent_linux () + +/*******************************************************************/ +/* imls - list all images found in flash */ +/*******************************************************************/ +#if defined(CONFIG_CMD_IMLS) +int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { - DECLARE_GLOBAL_DATA_PTR; + flash_info_t *info; + int i, j; + void *hdr; + + for (i = 0, info = &flash_info[0]; + i < CFG_MAX_FLASH_BANKS; ++i, ++info) { + + if (info->flash_id == FLASH_UNKNOWN) + goto next_bank; + for (j = 0; j < info->sector_count; ++j) { + + hdr = (void *)info->start[j]; + if (!hdr) + goto next_sector; + + switch (genimg_get_format (hdr)) { + case IMAGE_FORMAT_LEGACY: + if (!image_check_hcrc (hdr)) + goto next_sector; + + printf ("Legacy Image at %08lX:\n", (ulong)hdr); + image_print_contents (hdr); + + puts (" Verifying Checksum ... "); + if (!image_check_dcrc (hdr)) { + puts ("Bad Data CRC\n"); + } else { + puts ("OK\n"); + } + break; +#if defined(CONFIG_FIT) + case IMAGE_FORMAT_FIT: + if (!fit_check_format (hdr)) + goto next_sector; + + printf ("FIT Image at %08lX:\n", (ulong)hdr); + fit_print_contents (hdr); + break; +#endif + default: + goto next_sector; + } + +next_sector: ; + } +next_bank: ; + } + + return (0); +} + +U_BOOT_CMD( + imls, 1, 1, do_imls, + "imls - list all images found in flash\n", + "\n" + " - Prints information about all images found at sector\n" + " boundaries in flash.\n" +); +#endif + +/*******************************************************************/ +/* helper routines */ +/*******************************************************************/ +#ifdef CONFIG_SILENT_CONSOLE +void fixup_silent_linux () +{ +#ifdef CONFIG_SILENT_CONSOLE_MODIFY_KERNEL_BOOTARGS char buf[256], *start, *end; char *cmdline = getenv ("bootargs"); + char *silent = getenv ("silent"); + int silent_boot; + + silent_boot = silent && !strcmp(silent, "yes"); + silent_boot |= gd->flags & GD_FLG_SILENT; /* Only fix cmdline when requested */ - if (!(gd->flags & GD_FLG_SILENT)) + if (!silent_boot) return; + printf("Silent boot...\n"); + debug ("before silent fix-up: %s\n", cmdline); if (cmdline) { if ((start = strstr (cmdline, "console=")) != NULL) { @@ -489,367 +995,32 @@ fixup_silent_linux () setenv ("bootargs", buf); debug ("after silent fix-up: %s\n", buf); +#endif } #endif /* CONFIG_SILENT_CONSOLE */ -#ifdef CONFIG_PPC -static void -do_bootm_linux (cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[], - ulong addr, - ulong *len_ptr, - int verify) -{ - DECLARE_GLOBAL_DATA_PTR; - - ulong sp; - ulong len, checksum; - ulong initrd_start, initrd_end; - ulong cmd_start, cmd_end; - ulong initrd_high; - ulong data; - int initrd_copy_to_ram = 1; - char *cmdline; - char *s; - bd_t *kbd; - void (*kernel)(bd_t *, ulong, ulong, ulong, ulong); - image_header_t *hdr = &header; - - if ((s = getenv ("initrd_high")) != NULL) { - /* a value of "no" or a similar string will act like 0, - * turning the "load high" feature off. This is intentional. - */ - initrd_high = simple_strtoul(s, NULL, 16); - if (initrd_high == ~0) - initrd_copy_to_ram = 0; - } else { /* not set, no restrictions to load high */ - initrd_high = ~0; - } - -#ifdef CONFIG_LOGBUFFER - kbd=gd->bd; - /* Prevent initrd from overwriting logbuffer */ - if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD)) - initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD; - debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN); -#endif - - /* - * Booting a (Linux) kernel image - * - * Allocate space for command line and board info - the - * address should be as high as possible within the reach of - * the kernel (see CFG_BOOTMAPSZ settings), but in unused - * memory, which means far enough below the current stack - * pointer. - */ - - asm( "mr %0,1": "=r"(sp) : ); - - debug ("## Current stack ends at 0x%08lX ", sp); - - sp -= 2048; /* just to be sure */ - if (sp > CFG_BOOTMAPSZ) - sp = CFG_BOOTMAPSZ; - sp &= ~0xF; - - debug ("=> set upper limit to 0x%08lX\n", sp); - - cmdline = (char *)((sp - CFG_BARGSIZE) & ~0xF); - kbd = (bd_t *)(((ulong)cmdline - sizeof(bd_t)) & ~0xF); - - if ((s = getenv("bootargs")) == NULL) - s = ""; - - strcpy (cmdline, s); - - cmd_start = (ulong)&cmdline[0]; - cmd_end = cmd_start + strlen(cmdline); - - *kbd = *(gd->bd); - -#ifdef DEBUG - printf ("## cmdline at 0x%08lX ... 0x%08lX\n", cmd_start, cmd_end); - - do_bdinfo (NULL, 0, 0, NULL); -#endif - - if ((s = getenv ("clocks_in_mhz")) != NULL) { - /* convert all clock information to MHz */ - kbd->bi_intfreq /= 1000000L; - kbd->bi_busfreq /= 1000000L; -#if defined(CONFIG_MPC8220) - kbd->bi_inpfreq /= 1000000L; - kbd->bi_pcifreq /= 1000000L; - kbd->bi_pevfreq /= 1000000L; - kbd->bi_flbfreq /= 1000000L; - kbd->bi_vcofreq /= 1000000L; -#endif -#if defined(CONFIG_8260) || defined(CONFIG_MPC8560) - kbd->bi_cpmfreq /= 1000000L; - kbd->bi_brgfreq /= 1000000L; - kbd->bi_sccfreq /= 1000000L; - kbd->bi_vco /= 1000000L; -#endif /* CONFIG_8260 */ -#if defined(CONFIG_MPC5xxx) - kbd->bi_ipbfreq /= 1000000L; - kbd->bi_pcifreq /= 1000000L; -#endif /* CONFIG_MPC5xxx */ - } - - kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))hdr->ih_ep; - - /* - * Check if there is an initrd image - */ - if (argc >= 3) { - SHOW_BOOT_PROGRESS (9); - - addr = simple_strtoul(argv[2], NULL, 16); - - printf ("## Loading RAMDisk Image at %08lx ...\n", addr); - - /* Copy header so we can blank CRC field for re-calculation */ - memmove (&header, (char *)addr, sizeof(image_header_t)); - - if (hdr->ih_magic != IH_MAGIC) { - puts ("Bad Magic Number\n"); - SHOW_BOOT_PROGRESS (-10); - do_reset (cmdtp, flag, argc, argv); - } - - data = (ulong)&header; - len = sizeof(image_header_t); - - checksum = hdr->ih_hcrc; - hdr->ih_hcrc = 0; - - if (crc32 (0, (char *)data, len) != checksum) { - puts ("Bad Header Checksum\n"); - SHOW_BOOT_PROGRESS (-11); - do_reset (cmdtp, flag, argc, argv); - } - - SHOW_BOOT_PROGRESS (10); - - print_image_hdr (hdr); - - data = addr + sizeof(image_header_t); - len = hdr->ih_size; - - if (verify) { - ulong csum = 0; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - ulong cdata = data, edata = cdata + len; -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ - - puts (" Verifying Checksum ... "); - -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - - while (cdata < edata) { - ulong chunk = edata - cdata; - - if (chunk > CHUNKSZ) - chunk = CHUNKSZ; - csum = crc32 (csum, (char *)cdata, chunk); - cdata += chunk; - - WATCHDOG_RESET(); - } -#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ - csum = crc32 (0, (char *)data, len); -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ - - if (csum != hdr->ih_dcrc) { - puts ("Bad Data CRC\n"); - SHOW_BOOT_PROGRESS (-12); - do_reset (cmdtp, flag, argc, argv); - } - puts ("OK\n"); - } - - SHOW_BOOT_PROGRESS (11); - - if ((hdr->ih_os != IH_OS_LINUX) || - (hdr->ih_arch != IH_CPU_PPC) || - (hdr->ih_type != IH_TYPE_RAMDISK) ) { - puts ("No Linux PPC Ramdisk Image\n"); - SHOW_BOOT_PROGRESS (-13); - do_reset (cmdtp, flag, argc, argv); - } - - /* - * Now check if we have a multifile image - */ - } else if ((hdr->ih_type==IH_TYPE_MULTI) && (len_ptr[1])) { - u_long tail = ntohl(len_ptr[0]) % 4; - int i; - - SHOW_BOOT_PROGRESS (13); - - /* skip kernel length and terminator */ - data = (ulong)(&len_ptr[2]); - /* skip any additional image length fields */ - for (i=1; len_ptr[i]; ++i) - data += 4; - /* add kernel length, and align */ - data += ntohl(len_ptr[0]); - if (tail) { - data += 4 - tail; - } - - len = ntohl(len_ptr[1]); - - } else { - /* - * no initrd image - */ - SHOW_BOOT_PROGRESS (14); - - len = data = 0; - } - - if (!data) { - debug ("No initrd\n"); - } - - if (data) { - if (!initrd_copy_to_ram) { /* zero-copy ramdisk support */ - initrd_start = data; - initrd_end = initrd_start + len; - } else { - initrd_start = (ulong)kbd - len; - initrd_start &= ~(4096 - 1); /* align on page */ - - if (initrd_high) { - ulong nsp; - - /* - * the inital ramdisk does not need to be within - * CFG_BOOTMAPSZ as it is not accessed until after - * the mm system is initialised. - * - * do the stack bottom calculation again and see if - * the initrd will fit just below the monitor stack - * bottom without overwriting the area allocated - * above for command line args and board info. - */ - asm( "mr %0,1": "=r"(nsp) : ); - nsp -= 2048; /* just to be sure */ - nsp &= ~0xF; - if (nsp > initrd_high) /* limit as specified */ - nsp = initrd_high; - nsp -= len; - nsp &= ~(4096 - 1); /* align on page */ - if (nsp >= sp) - initrd_start = nsp; - } - - SHOW_BOOT_PROGRESS (12); - - debug ("## initrd at 0x%08lX ... 0x%08lX (len=%ld=0x%lX)\n", - data, data + len - 1, len, len); - - initrd_end = initrd_start + len; - printf (" Loading Ramdisk to %08lx, end %08lx ... ", - initrd_start, initrd_end); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - { - size_t l = len; - void *to = (void *)initrd_start; - void *from = (void *)data; - - while (l > 0) { - size_t tail = (l > CHUNKSZ) ? CHUNKSZ : l; - WATCHDOG_RESET(); - memmove (to, from, tail); - to += tail; - from += tail; - l -= tail; - } - } -#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ - memmove ((void *)initrd_start, (void *)data, len); -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ - puts ("OK\n"); - } - } else { - initrd_start = 0; - initrd_end = 0; - } - - - debug ("## Transferring control to Linux (at address %08lx) ...\n", - (ulong)kernel); - - SHOW_BOOT_PROGRESS (15); - -#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500) - unlock_ram_in_cache(); -#endif - /* - * Linux Kernel Parameters: - * r3: ptr to board info data - * r4: initrd_start or 0 if no initrd - * r5: initrd_end - unused if r4 is 0 - * r6: Start of command line string - * r7: End of command line string - */ - (*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end); -} -#endif /* CONFIG_PPC */ /*******************************************************************/ -/* altboot - boot alternative image */ +/* OS booting routines */ /*******************************************************************/ -#if defined(CONFIG_CMD_ALTBOOT) -int do_altboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) + +static void do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag, + int argc, char *argv[], + bootm_headers_t *images) { - int rcode = 0; + void (*loader)(bd_t *, image_header_t *, char *, char *); + image_header_t *os_hdr, *hdr; + ulong kernel_data, kernel_len; + char *consdev; + char *cmdline; -#ifndef __DONT_INTEGRATE_ME_TO_1_3_4__ - /* Temporary hack for temporary update system. The correct behaviour is: - 1) Try Movi - 2) Try recovery on NOR - 3) Kill power - */ +#if defined(CONFIG_FIT) + if (!images->legacy_hdr_valid) { + fit_unsupported_reset ("NetBSD"); + do_reset (cmdtp, flag, argc, argv); + } #endif - -#ifndef CFG_HUSH_PARSER - if (run_command (getenv ("altbootcmd"), flag) < 0) - rcode = 1; -#else - if (parse_string_outer (getenv ("altbootcmd"), - FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0) - rcode = 1; -#endif - return rcode; -} - -U_BOOT_CMD( - altboot, 1, 1, do_altboot, - "altboot - boot alternative, i.e., run 'altbootcmd'\n", - NULL -); -#endif /* CONFIG_CMD_ALTBOOT */ - -static void -do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[], - ulong addr, - ulong *len_ptr, - int verify) -{ - DECLARE_GLOBAL_DATA_PTR; - - image_header_t *hdr = &header; - - void (*loader)(bd_t *, image_header_t *, char *, char *); - image_header_t *img_addr; - char *consdev; - char *cmdline; - + hdr = images->legacy_hdr_os; /* * Booting a (NetBSD) kernel image @@ -862,11 +1033,12 @@ do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag, * line, the name of the console device, and (optionally) the * address of the original image header. */ - - img_addr = 0; - if ((hdr->ih_type==IH_TYPE_MULTI) && (len_ptr[1])) - img_addr = (image_header_t *) addr; - + os_hdr = NULL; + if (image_check_type (&images->legacy_hdr_os_copy, IH_TYPE_MULTI)) { + image_multi_getimg (hdr, 1, &kernel_data, &kernel_len); + if (kernel_len) + os_hdr = hdr; + } consdev = ""; #if defined (CONFIG_8xx_CONS_SMC1) @@ -883,26 +1055,26 @@ do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag, ulong len; int i; - for (i=2, len=0 ; i 2) cmdline[len++] = ' '; strcpy (&cmdline[len], argv[i]); len += strlen (argv[i]); } - } else if ((cmdline = getenv("bootargs")) == NULL) { + } else if ((cmdline = getenv ("bootargs")) == NULL) { cmdline = ""; } - loader = (void (*)(bd_t *, image_header_t *, char *, char *)) hdr->ih_ep; + loader = (void (*)(bd_t *, image_header_t *, char *, char *))image_get_ep (hdr); printf ("## Transferring control to NetBSD stage-2 loader (at address %08lx) ...\n", (ulong)loader); - SHOW_BOOT_PROGRESS (15); + show_boot_progress (15); /* * NetBSD Stage-2 Loader Parameters: @@ -911,29 +1083,116 @@ do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag, * r5: console device * r6: boot args string */ - (*loader) (gd->bd, img_addr, consdev, cmdline); + (*loader) (gd->bd, os_hdr, consdev, cmdline); } -#if defined(CONFIG_ARTOS) && defined(CONFIG_PPC) - -/* Function that returns a character from the environment */ -extern uchar (*env_get_char)(int); - -static void -do_bootm_artos (cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[], - ulong addr, - ulong *len_ptr, - int verify) +#ifdef CONFIG_LYNXKDI +static void do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag, + int argc, char *argv[], + bootm_headers_t *images) +{ + image_header_t *hdr = &images->legacy_hdr_os_copy; + +#if defined(CONFIG_FIT) + if (!images->legacy_hdr_valid) { + fit_unsupported_reset ("Lynx"); + do_reset (cmdtp, flag, argc, argv); + } +#endif + + lynxkdi_boot ((image_header_t *)hdr); +} +#endif /* CONFIG_LYNXKDI */ + +static void do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, + int argc, char *argv[], + bootm_headers_t *images) +{ + image_header_t *hdr = &images->legacy_hdr_os_copy; + void (*entry_point)(bd_t *); + +#if defined(CONFIG_FIT) + if (!images->legacy_hdr_valid) { + fit_unsupported_reset ("RTEMS"); + do_reset (cmdtp, flag, argc, argv); + } +#endif + + entry_point = (void (*)(bd_t *))image_get_ep (hdr); + + printf ("## Transferring control to RTEMS (at address %08lx) ...\n", + (ulong)entry_point); + + show_boot_progress (15); + + /* + * RTEMS Parameters: + * r3: ptr to board info data + */ + (*entry_point)(gd->bd); +} + +#if defined(CONFIG_CMD_ELF) +static void do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, + int argc, char *argv[], + bootm_headers_t *images) +{ + char str[80]; + image_header_t *hdr = &images->legacy_hdr_os_copy; + +#if defined(CONFIG_FIT) + if (!images->legacy_hdr_valid) { + fit_unsupported_reset ("VxWorks"); + do_reset (cmdtp, flag, argc, argv); + } +#endif + + sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */ + setenv("loadaddr", str); + do_bootvx(cmdtp, 0, 0, NULL); +} + +static void do_bootm_qnxelf(cmd_tbl_t *cmdtp, int flag, + int argc, char *argv[], + bootm_headers_t *images) +{ + char *local_args[2]; + char str[16]; + image_header_t *hdr = &images->legacy_hdr_os_copy; + +#if defined(CONFIG_FIT) + if (!images->legacy_hdr_valid) { + fit_unsupported_reset ("QNX"); + do_reset (cmdtp, flag, argc, argv); + } +#endif + + sprintf(str, "%x", image_get_ep (hdr)); /* write entry-point into string */ + local_args[0] = argv[0]; + local_args[1] = str; /* and provide it via the arguments */ + do_bootelf(cmdtp, 0, 2, local_args); +} +#endif + +#if defined(CONFIG_ARTOS) && defined(CONFIG_PPC) +static void do_bootm_artos (cmd_tbl_t *cmdtp, int flag, + int argc, char *argv[], + bootm_headers_t *images) { - DECLARE_GLOBAL_DATA_PTR; ulong top; char *s, *cmdline; char **fwenv, **ss; int i, j, nxt, len, envno, envsz; bd_t *kbd; void (*entry)(bd_t *bd, char *cmdline, char **fwenv, ulong top); - image_header_t *hdr = &header; + image_header_t *hdr = &images->legacy_hdr_os_copy; + +#if defined(CONFIG_FIT) + if (!images->legacy_hdr_valid) { + fit_unsupported_reset ("ARTOS"); + do_reset (cmdtp, flag, argc, argv); + } +#endif /* * Booting an ARTOS kernel image + application @@ -954,27 +1213,27 @@ do_bootm_artos (cmd_tbl_t *cmdtp, int flag, debug ("=> set upper limit to 0x%08lX\n", top); /* first check the artos specific boot args, then the linux args*/ - if ((s = getenv("abootargs")) == NULL && (s = getenv("bootargs")) == NULL) + if ((s = getenv( "abootargs")) == NULL && (s = getenv ("bootargs")) == NULL) s = ""; /* get length of cmdline, and place it */ - len = strlen(s); + len = strlen (s); top = (top - (len + 1)) & ~0xF; cmdline = (char *)top; debug ("## cmdline at 0x%08lX ", top); - strcpy(cmdline, s); + strcpy (cmdline, s); /* copy bdinfo */ - top = (top - sizeof(bd_t)) & ~0xF; + top = (top - sizeof (bd_t)) & ~0xF; debug ("## bd at 0x%08lX ", top); kbd = (bd_t *)top; - memcpy(kbd, gd->bd, sizeof(bd_t)); + memcpy (kbd, gd->bd, sizeof (bd_t)); /* first find number of env entries, and their size */ envno = 0; envsz = 0; - for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) { - for (nxt = i; env_get_char(nxt) != '\0'; ++nxt) + for (i = 0; env_get_char (i) != '\0'; i = nxt + 1) { + for (nxt = i; env_get_char (nxt) != '\0'; ++nxt) ; envno++; envsz += (nxt - i) + 1; /* plus trailing zero */ @@ -982,7 +1241,7 @@ do_bootm_artos (cmd_tbl_t *cmdtp, int flag, envno++; /* plus the terminating zero */ debug ("## %u envvars total size %u ", envno, envsz); - top = (top - sizeof(char **)*envno) & ~0xF; + top = (top - sizeof (char **) * envno) & ~0xF; fwenv = (char **)top; debug ("## fwenv at 0x%08lX ", top); @@ -991,193 +1250,35 @@ do_bootm_artos (cmd_tbl_t *cmdtp, int flag, ss = fwenv; /* now copy them */ - for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) { - for (nxt = i; env_get_char(nxt) != '\0'; ++nxt) + for (i = 0; env_get_char (i) != '\0'; i = nxt + 1) { + for (nxt = i; env_get_char (nxt) != '\0'; ++nxt) ; *ss++ = s; for (j = i; j < nxt; ++j) - *s++ = env_get_char(j); + *s++ = env_get_char (j); *s++ = '\0'; } *ss++ = NULL; /* terminate */ - entry = (void (*)(bd_t *, char *, char **, ulong))ntohl(hdr->ih_ep); - (*entry)(kbd, cmdline, fwenv, top); + entry = (void (*)(bd_t *, char *, char **, ulong))image_get_ep (hdr); + (*entry) (kbd, cmdline, fwenv, top); } #endif - - -#if (CONFIG_COMMANDS & CFG_CMD_BOOTD) -int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -{ - int rcode = 0; -#ifndef CFG_HUSH_PARSER - if (run_command (getenv ("bootcmd"), flag) < 0) rcode = 1; -#else - if (parse_string_outer(getenv("bootcmd"), - FLAG_PARSE_SEMICOLON | FLAG_EXIT_FROM_LOOP) != 0 ) rcode = 1; -#endif - return rcode; -} - -U_BOOT_CMD( - boot, 1, 1, do_bootd, - "boot - boot default, i.e., run 'bootcmd'\n", - NULL -); - -/* keep old command name "bootd" for backward compatibility */ -U_BOOT_CMD( - bootd, 1, 1, do_bootd, - "bootd - boot default, i.e., run 'bootcmd'\n", - NULL -); - -#endif - -#if (CONFIG_COMMANDS & CFG_CMD_IMI) -int do_iminfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -{ - int arg; - ulong addr; - int rcode=0; - - if (argc < 2) { - return image_info (load_addr); - } - - for (arg=1; arg ih_magic) != IH_MAGIC) { - puts (" Bad Magic Number\n"); - return 1; - } - - data = (ulong)&header; - len = sizeof(image_header_t); - - checksum = ntohl(hdr->ih_hcrc); - hdr->ih_hcrc = 0; - - if (crc32 (0, (unsigned char *)data, len) != checksum) { - puts (" Bad Header Checksum\n"); - return 1; - } - - /* for multi-file images we need the data part, too */ - print_image_hdr ((image_header_t *)addr); - - data = addr + sizeof(image_header_t); - len = ntohl(hdr->ih_size); - - puts (" Verifying Checksum ... "); - if (crc32 (0, (unsigned char *)data, len) != ntohl(hdr->ih_dcrc)) { - puts (" Bad Data CRC\n"); - return 1; - } - puts ("OK\n"); - return 0; -} - -U_BOOT_CMD( - iminfo, CFG_MAXARGS, 1, do_iminfo, - "iminfo - print header information for application image\n", - "addr [addr ...]\n" - " - print header information for application image starting at\n" - " address 'addr' in memory; this includes verification of the\n" - " image contents (magic number, header and payload checksums)\n" -); - -#endif /* CFG_CMD_IMI */ - -#if (CONFIG_COMMANDS & CFG_CMD_IMLS) -/*----------------------------------------------------------------------- - * List all images found in flash. - */ -int do_imls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) -{ - flash_info_t *info; - int i, j; - image_header_t *hdr; - ulong data, len, checksum; - - for (i=0, info=&flash_info[0]; iflash_id == FLASH_UNKNOWN) - goto next_bank; - for (j=0; jstart[j]) || - (ntohl(hdr->ih_magic) != IH_MAGIC)) - goto next_sector; - - /* Copy header so we can blank CRC field for re-calculation */ - memmove (&header, (char *)hdr, sizeof(image_header_t)); - - checksum = ntohl(header.ih_hcrc); - header.ih_hcrc = 0; - - if (crc32 (0, (unsigned char *)&header, sizeof(image_header_t)) - != checksum) - goto next_sector; - - printf ("Image at %08lX:\n", (ulong)hdr); - print_image_hdr( hdr ); - - data = (ulong)hdr + sizeof(image_header_t); - len = ntohl(hdr->ih_size); - - puts (" Verifying Checksum ... "); - if (crc32 (0, (unsigned char *)data, len) != ntohl(hdr->ih_dcrc)) { - puts (" Bad Data CRC\n"); - } - puts ("OK\n"); -next_sector: ; - } -next_bank: ; - } - - return (0); -} - -U_BOOT_CMD( - imls, 1, 1, do_imls, - "imls - list all images found in flash\n", - "\n" - " - Prints information about all images found at sector\n" - " boundaries in flash.\n" -); -#endif /* CFG_CMD_IMLS */ - void print_image_hdr (image_header_t *hdr) { -#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) +#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP) time_t timestamp = (time_t)ntohl(hdr->ih_time); struct rtc_time tm; #endif printf (" Image Name: %.*s\n", IH_NMLEN, hdr->ih_name); -#if (CONFIG_COMMANDS & CFG_CMD_DATE) || defined(CONFIG_TIMESTAMP) +#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP) to_tm (timestamp, &tm); printf (" Created: %4d-%02d-%02d %2d:%02d:%02d UTC\n", tm.tm_year, tm.tm_mon, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); -#endif /* CFG_CMD_DATE, CONFIG_TIMESTAMP */ +#endif /* CONFIG_CMD_DATE, CONFIG_TIMESTAMP */ puts (" Image Type: "); print_type(hdr); printf ("\n Data Size: %d Bytes = ", ntohl(hdr->ih_size)); print_size (ntohl(hdr->ih_size), "\n"); @@ -1198,7 +1299,6 @@ print_image_hdr (image_header_t *hdr) } } - static void print_type (image_header_t *hdr) { @@ -1222,20 +1322,23 @@ print_type (image_header_t *hdr) } switch (hdr->ih_arch) { - case IH_CPU_INVALID: arch = "Invalid CPU"; break; - case IH_CPU_ALPHA: arch = "Alpha"; break; - case IH_CPU_ARM: arch = "ARM"; break; - case IH_CPU_I386: arch = "Intel x86"; break; - case IH_CPU_IA64: arch = "IA64"; break; - case IH_CPU_MIPS: arch = "MIPS"; break; - case IH_CPU_MIPS64: arch = "MIPS 64 Bit"; break; - case IH_CPU_PPC: arch = "PowerPC"; break; - case IH_CPU_S390: arch = "IBM S390"; break; - case IH_CPU_SH: arch = "SuperH"; break; - case IH_CPU_SPARC: arch = "SPARC"; break; - case IH_CPU_SPARC64: arch = "SPARC 64 Bit"; break; - case IH_CPU_M68K: arch = "M68K"; break; - case IH_CPU_MICROBLAZE: arch = "Microblaze"; break; + case IH_ARCH_INVALID: arch = "Invalid CPU"; break; + case IH_ARCH_ALPHA: arch = "Alpha"; break; + case IH_ARCH_ARM: arch = "ARM"; break; + case IH_ARCH_AVR32: arch = "AVR32"; break; + case IH_ARCH_I386: arch = "Intel x86"; break; + case IH_ARCH_IA64: arch = "IA64"; break; + case IH_ARCH_MIPS: arch = "MIPS"; break; + case IH_ARCH_MIPS64: arch = "MIPS 64 Bit"; break; + case IH_ARCH_PPC: arch = "PowerPC"; break; + case IH_ARCH_S390: arch = "IBM S390"; break; + case IH_ARCH_SH: arch = "SuperH"; break; + case IH_ARCH_SPARC: arch = "SPARC"; break; + case IH_ARCH_SPARC64: arch = "SPARC 64 Bit"; break; + case IH_ARCH_M68K: arch = "M68K"; break; + case IH_ARCH_MICROBLAZE: arch = "Microblaze"; break; + case IH_ARCH_NIOS: arch = "Nios"; break; + case IH_ARCH_NIOS2: arch = "Nios-II"; break; default: arch = "Unknown Architecture"; break; } @@ -1247,6 +1350,7 @@ print_type (image_header_t *hdr) case IH_TYPE_MULTI: type = "Multi-File Image"; break; case IH_TYPE_FIRMWARE: type = "Firmware"; break; case IH_TYPE_SCRIPT: type = "Script"; break; + case IH_TYPE_FLATDT: type = "Flat Device Tree"; break; default: type = "Unknown Image"; break; } @@ -1259,156 +1363,3 @@ print_type (image_header_t *hdr) printf ("%s %s %s (%s)", arch, os, type, comp); } - -#define ZALLOC_ALIGNMENT 16 - -static void *zalloc(void *x, unsigned items, unsigned size) -{ - void *p; - - size *= items; - size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1); - - p = malloc (size); - - return (p); -} - -static void zfree(void *x, void *addr, unsigned nb) -{ - free (addr); -} - -#define HEAD_CRC 2 -#define EXTRA_FIELD 4 -#define ORIG_NAME 8 -#define COMMENT 0x10 -#define RESERVED 0xe0 - -#define DEFLATED 8 - -int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp) -{ - z_stream s; - int r, i, flags; - - /* skip header */ - i = 10; - flags = src[3]; - if (src[2] != DEFLATED || (flags & RESERVED) != 0) { - puts ("Error: Bad gzipped data\n"); - return (-1); - } - if ((flags & EXTRA_FIELD) != 0) - i = 12 + src[10] + (src[11] << 8); - if ((flags & ORIG_NAME) != 0) - while (src[i++] != 0) - ; - if ((flags & COMMENT) != 0) - while (src[i++] != 0) - ; - if ((flags & HEAD_CRC) != 0) - i += 2; - if (i >= *lenp) { - puts ("Error: gunzip out of data in header\n"); - return (-1); - } - - s.zalloc = zalloc; - s.zfree = zfree; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - s.outcb = (cb_func)WATCHDOG_RESET; -#else - s.outcb = Z_NULL; -#endif /* CONFIG_HW_WATCHDOG */ - - r = inflateInit2(&s, -MAX_WBITS); - if (r != Z_OK) { - printf ("Error: inflateInit2() returned %d\n", r); - return (-1); - } - s.next_in = src + i; - s.avail_in = *lenp - i; - s.next_out = dst; - s.avail_out = dstlen; - r = inflate(&s, Z_FINISH); - if (r != Z_OK && r != Z_STREAM_END) { - printf ("Error: inflate() returned %d\n", r); - return (-1); - } - *lenp = s.next_out - (unsigned char *) dst; - inflateEnd(&s); - - return (0); -} - -#ifdef CONFIG_BZIP2 -void bz_internal_error(int errcode) -{ - printf ("BZIP2 internal error %d\n", errcode); -} -#endif /* CONFIG_BZIP2 */ - -static void -do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], - ulong addr, ulong *len_ptr, int verify) -{ - DECLARE_GLOBAL_DATA_PTR; - image_header_t *hdr = &header; - void (*entry_point)(bd_t *); - - entry_point = (void (*)(bd_t *)) hdr->ih_ep; - - printf ("## Transferring control to RTEMS (at address %08lx) ...\n", - (ulong)entry_point); - - SHOW_BOOT_PROGRESS (15); - - /* - * RTEMS Parameters: - * r3: ptr to board info data - */ - - (*entry_point ) ( gd->bd ); -} - -#if (CONFIG_COMMANDS & CFG_CMD_ELF) -static void -do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], - ulong addr, ulong *len_ptr, int verify) -{ - image_header_t *hdr = &header; - char str[80]; - - sprintf(str, "%x", hdr->ih_ep); /* write entry-point into string */ - setenv("loadaddr", str); - do_bootvx(cmdtp, 0, 0, NULL); -} - -static void -do_bootm_qnxelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[], - ulong addr, ulong *len_ptr, int verify) -{ - image_header_t *hdr = &header; - char *local_args[2]; - char str[16]; - - sprintf(str, "%x", hdr->ih_ep); /* write entry-point into string */ - local_args[0] = argv[0]; - local_args[1] = str; /* and provide it via the arguments */ - do_bootelf(cmdtp, 0, 2, local_args); -} -#endif /* CFG_CMD_ELF */ - -#ifdef CONFIG_LYNXKDI -static void -do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag, - int argc, char *argv[], - ulong addr, - ulong *len_ptr, - int verify) -{ - lynxkdi_boot( &header ); -} - -#endif /* CONFIG_LYNXKDI */ diff --git a/include/asm-arm/arch-omap3/mem.h b/include/asm-arm/arch-omap3/mem.h index de8272fb3..80e687597 100644 --- a/include/asm-arm/arch-omap3/mem.h +++ b/include/asm-arm/arch-omap3/mem.h @@ -128,12 +128,6 @@ typedef enum { #define SDP_SDRC_MR_0_DDR 0x00000032 -#ifdef CONFIG_STRASBOURG -#define SDP_SDRC_EMR2_0_DDR 0x00000020 -#else -#define SDP_SDRC_EMR2_0_DDR 0x00000000 -#endif - /* optimized timings good for current shipping parts */ #define SDP_3430_SDRC_RFR_CTRL_100MHz 0x0002da01 #define SDP_3430_SDRC_RFR_CTRL_133MHz 0x0003de01 /* 7.8us/7.5ns - 50=0x3de */ @@ -261,7 +255,7 @@ typedef enum { #elif defined(CONFIG_3430ZOOM2_512M) ||\ defined(CONFIG_3630ZOOM3) || defined(CONFIG_3630SDP)\ || defined(CONFIG_3630SDP_1G) || defined(CONFIG_3630ZOOM3_1G) \ - || defined(CONFIG_3730OVERO) || (defined(CONFIG_STRASBOURG) && defined(DDR_MT46H64M32)) + || defined(CONFIG_3730OVERO) /* Hynix part of 3430 Zoom2 (166MHz optimized) 6.02ns * ACTIMA @@ -454,25 +448,25 @@ typedef enum { # define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_100 # define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_100 # if !defined(SDP_SDRC_RFR_CTRL) -# define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_100MHz +# define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_100MHz # endif #elif defined(L3_133MHZ) # define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_133 # define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_133 # if !defined(SDP_SDRC_RFR_CTRL) -# define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_133MHz +# define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_133MHz # endif #elif defined(L3_165MHZ) # define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_165 # define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_165 # if !defined(SDP_SDRC_RFR_CTRL) -# define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz +# define SDP_SDRC_RFR_CTRL SDP_3430_SDRC_RFR_CTRL_165MHz # endif #elif defined(L3_200MHZ) # define SDP_SDRC_ACTIM_CTRLA_0 V_ACTIMA_200 # define SDP_SDRC_ACTIM_CTRLB_0 V_ACTIMB_200 # if !defined(SDP_SDRC_RFR_CTRL) -# define SDP_SDRC_RFR_CTRL ZOOM3_3630_RFR_CTRL_200MHz +# define SDP_SDRC_RFR_CTRL ZOOM3_3630_RFR_CTRL_200MHz # endif #endif diff --git a/include/configs/rennes_b1-debug.h b/include/configs/rennes_b1-debug.h new file mode 100644 index 000000000..ffdefc1e2 --- /dev/null +++ b/include/configs/rennes_b1-debug.h @@ -0,0 +1,27 @@ +/* + * DEBUG Configuration for Strasbourg + * + * Copyright (C) 2010 TomTom International B.V. + * + ************************************************************************ + * 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., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + ************************************************************************ + */ + +#define CONFIG_DEBUG_BUILD +#include "rennes_b1.h" + +/* EOF */ diff --git a/include/configs/rennes_b1.h b/include/configs/rennes_b1.h new file mode 100644 index 000000000..9e9e88ad4 --- /dev/null +++ b/include/configs/rennes_b1.h @@ -0,0 +1,42 @@ +/* + * U-Boot configuration for Strasbourg + * + * Copyright (C) 2010 TomTom International B.V. + * + ************************************************************************ + * 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., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + ************************************************************************ + */ + +#ifndef __BOARD_CONFIG_H +#define __BOARD_CONFIG_H + +#define __VARIANT_RENNES_B1 +//#define CFG_NS16550_COM1 OMAP34XX_UART1 +//#define CFG_NS16550_COM2 OMAP34XX_UART2 +#define CFG_NS16550_COM3 OMAP34XX_UART3 + +/* select serial console configuration */ +#define CONFIG_SERIAL3 3 +#define CONFIG_CONS_INDEX 3 + +/* DDR chip */ +#define DDR_MT46H128M16 + +#include "strasbourg_core.h" + +#endif /* __BOARD_CONFIG_H */ + diff --git a/include/configs/stuttgart_b1-debug.h b/include/configs/stuttgart_b1-debug.h new file mode 100644 index 000000000..8482aee24 --- /dev/null +++ b/include/configs/stuttgart_b1-debug.h @@ -0,0 +1,27 @@ +/* + * DEBUG Configuration for Stuttgart + * + * Copyright (C) 2012 TomTom International B.V. + * + ************************************************************************ + * 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., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + ************************************************************************ + */ + +#define CONFIG_DEBUG_BUILD +#include "stuttgart_b1.h" + +/* EOF */ diff --git a/include/configs/stuttgart_b1.h b/include/configs/stuttgart_b1.h new file mode 100644 index 000000000..6cb9614d1 --- /dev/null +++ b/include/configs/stuttgart_b1.h @@ -0,0 +1,43 @@ +/* + * U-Boot configuration for Stuttgart + * + * Copyright (C) 2012 TomTom International B.V. + * + ************************************************************************ + * 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., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + ************************************************************************ + */ + +#ifndef __BOARD_CONFIG_H +#define __BOARD_CONFIG_H + +#define __VARIANT_STUTTGART_B1 +#define __VARIANT_RENNES_B1 +//#define CFG_NS16550_COM1 OMAP34XX_UART1 +//#define CFG_NS16550_COM2 OMAP34XX_UART2 +#define CFG_NS16550_COM3 OMAP34XX_UART3 + +/* select serial console configuration */ +#define CONFIG_SERIAL3 3 +#define CONFIG_CONS_INDEX 3 + +/* DDR chip */ +#define DDR_MT46H128M16 + +#include "strasbourg_core.h" + +#endif /* __BOARD_CONFIG_H */ + diff --git a/include/linux/padconfig_common.h b/include/linux/padconfig_common.h new file mode 100644 index 000000000..542a217ae --- /dev/null +++ b/include/linux/padconfig_common.h @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2009 TomTom BV + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef PADCONFIG_COMMON_H +#define PADCONFIG_COMMON_H + +/* + * INFO: this file was created to clean up the mux config settings which were + * at the time of the creation of this file in the x-loader, u-boot and kernel. + * All modules initialized all PADCONFIG. This ofcourse is overdone, but besides + * being initialized three times, all the settings were defined three times, + * using different defines each time. This modules first step will be to make + * one single table with all the PADCONFIG configuration which can be used in + * all three modules. + */ + +/* To keep the names short: PC = PADCONF */ + +/* First the defines which allow the table to be mapped to the header files */ +/* from TI. These defines have to be copied into the module using this table */ +/* So all following defines are between #if 0 and #endif statement but should */ +/* not be removed. */ + +/********************************************/ +/************* SAMPLE DEFINES ***************/ +/********************************************/ +#if 0 +/*********** BIT DEFINES, never used, just for info, but could be used :-) ****/ +#define PC_MODE0 (0 << 0) +#define PC_MODE1 (1 << 0) +#define PC_MODE2 (2 << 0) +#define PC_MODE3 (3 << 0) +#define PC_MODE4 (4 << 0) +#define PC_MODE5 (5 << 0) +#define PC_MODE6 (6 << 0) +#define PC_MODE7 (7 << 0) + +#define PC_INPUT (1 << 8) +#define PC_OUTPUT (0 << 8) + +#define PC_PULL_ENA (1 << 3) +#define PC_PULL_DIS (0 << 3) + +#define PC_PULL_UP (1 << 4) +#define PC_PULL_DOWN (0 << 4) +/********************************************/ +/*********** END SAMPLE DEFINES *************/ +/********************************************/ +#endif // 0 + +/*********** BOOTLOADER/U-BOOT, used in case of bootloader or u-boot **********/ +#ifdef BOOTLOADER_UBOOT_PADCONFIG + +/* Brilliantly enough the naming of the PADs are different between the */ +/* x-loader and kernel. So we use defines to overcome the problem */ + +#define CONTROL_PADCONF_SYS_NIRQ CONTROL_PADCONF_SYS_nIRQ +#define CONTROL_PADCONF_SYS_NRESWARM 0x0A08 +#define CONTROL_PADCONF_MCBSP3_CLKX CONTROL_PADCONF_McBSP3_CLKX +#define CONTROL_PADCONF_MCBSP3_DR CONTROL_PADCONF_McBSP3_DR +#define CONTROL_PADCONF_MCBSP3_DX CONTROL_PADCONF_McBSP3_DX +#define CONTROL_PADCONF_MCBSP3_FSX CONTROL_PADCONF_McBSP3_FSX +#define CONTROL_PADCONF_MCBSP4_FSX CONTROL_PADCONF_McBSP4_FSX +#define CONTROL_PADCONF_MCBSP1_CLKX CONTROL_PADCONF_McBSP1_CLKX +#define CONTROL_PADCONF_MCBSP1_DR CONTROL_PADCONF_McBSP1_DR +#define CONTROL_PADCONF_MCBSP1_DX CONTROL_PADCONF_McBSP1_DX +#define CONTROL_PADCONF_MCBSP1_FSX CONTROL_PADCONF_McBSP1_FSX +#define CONTROL_PADCONF_MCBSP2_CLKX CONTROL_PADCONF_McBSP2_CLKX +#define CONTROL_PADCONF_MCBSP2_DR CONTROL_PADCONF_McBSP2_DR +#define CONTROL_PADCONF_MCBSP2_DX CONTROL_PADCONF_McBSP2_DX +#define CONTROL_PADCONF_MCBSP2_FSX CONTROL_PADCONF_McBSP2_FSX +#define CONTROL_PADCONF_MCSPI1_CLK CONTROL_PADCONF_McSPI1_CLK +#define CONTROL_PADCONF_MCSPI1_SIMO CONTROL_PADCONF_McSPI1_SIMO +#define CONTROL_PADCONF_MCSPI1_SOMI CONTROL_PADCONF_McSPI1_SOMI +#define CONTROL_PADCONF_MCSPI1_CS0 CONTROL_PADCONF_McSPI1_CS0 +#define CONTROL_PADCONF_MCSPI1_CS1 CONTROL_PADCONF_McSPI1_CS1 +#define CONTROL_PADCONF_MCSPI1_CS2 CONTROL_PADCONF_McSPI1_CS2 +#define CONTROL_PADCONF_MCSPI1_CS3 CONTROL_PADCONF_McSPI1_CS3 +#define CONTROL_PADCONF_MCSPI2_CLK CONTROL_PADCONF_McSPI2_CLK +#define CONTROL_PADCONF_MCSPI2_SIMO CONTROL_PADCONF_McSPI2_SIMO +#define CONTROL_PADCONF_MCSPI2_SOMI CONTROL_PADCONF_McSPI2_SOMI +#define CONTROL_PADCONF_MCSPI2_CS0 CONTROL_PADCONF_McSPI2_CS0 +#define CONTROL_PADCONF_MCSPI2_CS1 CONTROL_PADCONF_McSPI2_CS1 +#define CONTROL_PADCONF_SDMMC1_CLK CONTROL_PADCONF_MMC1_CLK +#define CONTROL_PADCONF_SDMMC1_CMD CONTROL_PADCONF_MMC1_CMD +#define CONTROL_PADCONF_SDMMC1_DAT0 CONTROL_PADCONF_MMC1_DAT0 +#define CONTROL_PADCONF_SDMMC1_DAT1 CONTROL_PADCONF_MMC1_DAT1 +#define CONTROL_PADCONF_SDMMC1_DAT2 CONTROL_PADCONF_MMC1_DAT2 +#define CONTROL_PADCONF_SDMMC1_DAT3 CONTROL_PADCONF_MMC1_DAT3 +#define CONTROL_PADCONF_SDMMC1_DAT6 CONTROL_PADCONF_MMC1_DAT6 +#define CONTROL_PADCONF_SDMMC2_CLK CONTROL_PADCONF_MMC2_CLK +#define CONTROL_PADCONF_SDMMC2_CMD CONTROL_PADCONF_MMC2_CMD +#define CONTROL_PADCONF_SDMMC2_DAT0 CONTROL_PADCONF_MMC2_DAT0 +#define CONTROL_PADCONF_SDMMC2_DAT1 CONTROL_PADCONF_MMC2_DAT1 +#define CONTROL_PADCONF_SDMMC2_DAT2 CONTROL_PADCONF_MMC2_DAT2 +#define CONTROL_PADCONF_SDMMC2_DAT3 CONTROL_PADCONF_MMC2_DAT3 +#define CONTROL_PADCONF_SDMMC2_DAT4 CONTROL_PADCONF_MMC2_DAT4 +#define CONTROL_PADCONF_SDMMC2_DAT5 CONTROL_PADCONF_MMC2_DAT5 +#define CONTROL_PADCONF_SDMMC2_DAT6 CONTROL_PADCONF_MMC2_DAT6 +#define CONTROL_PADCONF_SDMMC2_DAT7 CONTROL_PADCONF_MMC2_DAT7 +#define CONTROL_PADCONF_GPMC_NCS0 CONTROL_PADCONF_GPMC_nCS0 +#define CONTROL_PADCONF_GPMC_NCS6 CONTROL_PADCONF_GPMC_nCS6 +#define CONTROL_PADCONF_GPMC_NCS7 CONTROL_PADCONF_GPMC_nCS7 +#define CONTROL_PADCONF_GPMC_NWE CONTROL_PADCONF_GPMC_nWE +#define CONTROL_PADCONF_GPMC_NOE CONTROL_PADCONF_GPMC_nOE +#define CONTROL_PADCONF_GPMC_NADV_ALE CONTROL_PADCONF_GPMC_nADV_ALE +#define CONTROL_PADCONF_GPMC_NWP CONTROL_PADCONF_GPMC_nWP +#define CONTROL_PADCONF_MCBSP4_CLKX CONTROL_PADCONF_McBSP4_CLKX +#define CONTROL_PADCONF_MCBSP4_DR CONTROL_PADCONF_McBSP4_DR +#define CONTROL_PADCONF_MCBSP4_DX CONTROL_PADCONF_McBSP4_DX +#define CONTROL_PADCONF_MCBSP1_CLKR CONTROL_PADCONF_McBSP1_CLKR +#define CONTROL_PADCONF_MCBSP1_FSR CONTROL_PADCONF_McBSP1_FSR +#define CONTROL_PADCONF_MCBSP_CLKS CONTROL_PADCONF_McBSP_CLKS +#define CONTROL_PADCONF_SDMMC1_DAT4 CONTROL_PADCONF_MMC1_DAT4 +#define CONTROL_PADCONF_SDMMC1_DAT5 CONTROL_PADCONF_MMC1_DAT5 +#define CONTROL_PADCONF_SDMMC1_DAT7 CONTROL_PADCONF_MMC1_DAT7 +#define CONTROL_PADCONF_GPMC_NCS1 CONTROL_PADCONF_GPMC_nCS1 +#define CONTROL_PADCONF_GPMC_NCS2 CONTROL_PADCONF_GPMC_nCS2 +#define CONTROL_PADCONF_GPMC_NCS3 CONTROL_PADCONF_GPMC_nCS3 +#define CONTROL_PADCONF_GPMC_NCS4 CONTROL_PADCONF_GPMC_nCS4 +#define CONTROL_PADCONF_GPMC_NCS5 CONTROL_PADCONF_GPMC_nCS5 +#define CONTROL_PADCONF_GPMC_NBE0_CLE CONTROL_PADCONF_GPMC_nBE0_CLE +#define CONTROL_PADCONF_GPMC_NBE1 CONTROL_PADCONF_GPMC_nBE1 + +#define PC_DEFINE MUX_VAL +#define PC_MODE0 M0 +#define PC_MODE1 M1 +#define PC_MODE2 M2 +#define PC_MODE3 M3 +#define PC_MODE4 M4 +#define PC_MODE5 M5 +#define PC_MODE6 M6 +#define PC_MODE7 M7 +#define PC_INPUT IEN +#define PC_OUTPUT IDIS +#define PC_PULL_ENA EN +#define PC_PULL_DIS DIS +#define PC_PULL_UP PTU +#define PC_PULL_DOWN PTD +#define PC_WAKEUP_EN (1 << 14) +#define PC_OFF_EN (1 << 9) +#define PC_OFFOUT_EN (1 << 10) +#define PC_OFF_PULL_EN (1 << 12) +#define PC_OFF_PULL_UP (1 << 13) +#define PC_OFF_OUT_LOW (PC_OFF_EN) +#define PC_OFF_IN_NOPULL (PC_OFF_EN | PC_OFFOUT_EN) +#define PC_OFF_IN_PULLUP (PC_OFF_IN_NOPULL | PC_OFF_PULL_EN | PC_OFF_PULL_UP) +#define PC_OFF_IN_PULLDOWN (PC_OFF_IN_NOPULL | PC_OFF_PULL_EN) + +#endif // BOOTLOADER_UBOOT_PADCONFIG + +/*********** KERNEL, used in case of kernel build, board-santiago.c ***********/ +#ifdef KERNEL_PADCONFIG + +#define PC_DEFINE(x,y) OMAP3_MUX(x,y), +#define CP(x) x +#define PC_MODE0 OMAP_MUX_MODE0 +#define PC_MODE1 OMAP_MUX_MODE1 +#define PC_MODE2 OMAP_MUX_MODE2 +#define PC_MODE3 OMAP_MUX_MODE3 +#define PC_MODE4 OMAP_MUX_MODE4 +#define PC_MODE5 OMAP_MUX_MODE5 +#define PC_MODE6 OMAP_MUX_MODE6 +#define PC_MODE7 OMAP_MUX_MODE7 +#define PC_INPUT OMAP_PIN_INPUT +#define PC_OUTPUT OMAP_PIN_OUTPUT +#define PC_PULL_ENA OMAP_PULL_ENA +#define PC_PULL_DIS (0 << 3) +#define PC_PULL_UP OMAP_PULL_UP +#define PC_PULL_DOWN (0 << 4) +#define PC_WAKEUP_EN OMAP_WAKEUP_EN +#define PC_OFF_EN OMAP_OFF_EN +#define PC_OFFOUT_EN OMAP_OFFOUT_EN +#define PC_OFFOUT_VAL OMAP_OFFOUT_VAL +#define PC_OFF_PULL_EN OMAP_OFF_PULL_EN +#define PC_OFF_PULL_UP OMAP_OFF_PULL_UP +#define PC_OFF_OUT_LOW OMAP_PIN_OFF_OUTPUT_LOW +#define PC_OFF_OUT_HIGH OMAP_PIN_OFF_OUTPUT_HIGH +#define PC_OFF_IN_NOPULL OMAP_PIN_OFF_INPUT_NOPULL +#define PC_OFF_IN_PULLUP OMAP_PIN_OFF_INPUT_PULLUP +#define PC_OFF_IN_PULLDOWN OMAP_PIN_OFF_INPUT_PULLDOWN + +#endif // KERNEL_PADCONFIG + +#endif diff --git a/include/linux/padconfig_monopoli.h b/include/linux/padconfig_monopoli.h new file mode 100644 index 000000000..89b8d7b8d --- /dev/null +++ b/include/linux/padconfig_monopoli.h @@ -0,0 +1,327 @@ +/* + * Copyright (C) 2009 TomTom BV + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef PADCONFIG_SANTIAGO_H +#define PADCONFIG_SANTIAGO_H + +#include "padconfig_common.h" + +/*******************************/ +/*********** TABLES ************/ +/*******************************/ + + +#define PADCONFIG_SETTINGS_XLOADER \ + /*SDRC*/ \ + PC_DEFINE(CP(SDRC_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D0*/ \ + PC_DEFINE(CP(SDRC_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D1*/ \ + PC_DEFINE(CP(SDRC_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D2*/ \ + PC_DEFINE(CP(SDRC_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D3*/ \ + PC_DEFINE(CP(SDRC_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D4*/ \ + PC_DEFINE(CP(SDRC_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D5*/ \ + PC_DEFINE(CP(SDRC_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D6*/ \ + PC_DEFINE(CP(SDRC_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D7*/ \ + PC_DEFINE(CP(SDRC_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D8*/ \ + PC_DEFINE(CP(SDRC_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D9*/ \ + PC_DEFINE(CP(SDRC_D10), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D10*/ \ + PC_DEFINE(CP(SDRC_D11), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D11*/ \ + PC_DEFINE(CP(SDRC_D12), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D12*/ \ + PC_DEFINE(CP(SDRC_D13), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D13*/ \ + PC_DEFINE(CP(SDRC_D14), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D14*/ \ + PC_DEFINE(CP(SDRC_D15), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D15*/ \ + PC_DEFINE(CP(SDRC_D16), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D16*/ \ + PC_DEFINE(CP(SDRC_D17), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D17*/ \ + PC_DEFINE(CP(SDRC_D18), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D18*/ \ + PC_DEFINE(CP(SDRC_D19), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D19*/ \ + PC_DEFINE(CP(SDRC_D20), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D20*/ \ + PC_DEFINE(CP(SDRC_D21), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D21*/ \ + PC_DEFINE(CP(SDRC_D22), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D22*/ \ + PC_DEFINE(CP(SDRC_D23), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D23*/ \ + PC_DEFINE(CP(SDRC_D24), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D24*/ \ + PC_DEFINE(CP(SDRC_D25), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D25*/ \ + PC_DEFINE(CP(SDRC_D26), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D26*/ \ + PC_DEFINE(CP(SDRC_D27), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D27*/ \ + PC_DEFINE(CP(SDRC_D28), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D28*/ \ + PC_DEFINE(CP(SDRC_D29), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D29*/ \ + PC_DEFINE(CP(SDRC_D30), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D30*/ \ + PC_DEFINE(CP(SDRC_D31), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D31*/ \ + PC_DEFINE(CP(SDRC_CLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_CLK*/ \ + PC_DEFINE(CP(SDRC_DQS0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS0*/ \ + PC_DEFINE(CP(SDRC_DQS1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS1*/ \ + PC_DEFINE(CP(SDRC_DQS2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS2*/ \ + PC_DEFINE(CP(SDRC_DQS3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS3*/ \ + \ + /* MMC lines */ \ + PC_DEFINE(CP(SDMMC1_CLK), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_CMD), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT0), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT2), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_CLK), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_CMD), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT0), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT2), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT4), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT5), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT6), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC2_DAT7), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + \ + /* UART4 lines */ \ + PC_DEFINE(CP(GPMC_WAIT2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE2) /* DEBUG_TX */ \ + PC_DEFINE(CP(GPMC_WAIT3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2) /* DEBUG_RX */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(ETK_D13), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 27: AUX_MOVI */ \ + PC_DEFINE(CP(ETK_D14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 28: AUX_SD */ \ + +#define PADCONFIG_SETTINGS_UBOOT \ + + + +#define PADCONFIG_SETTINGS_KERNEL \ + /* GPIO lines */ \ + PC_DEFINE(CP(GPIO126), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 126: GSM_SYS_RST */ \ + PC_DEFINE(CP(GPIO127), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 127: GSM_SYS_EN */ \ + \ + /* UART1 lines */ \ + PC_DEFINE(CP(UART1_TX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART1_TX */ \ + PC_DEFINE(CP(UART1_RTS), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART1_RTS */ \ + PC_DEFINE(CP(UART1_CTS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART1_CTS */ \ + PC_DEFINE(CP(UART1_RX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART1_RX */ \ + \ + /* UART2 lines */ \ + PC_DEFINE(CP(UART2_CTS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_HIGH) /* uP_UART2_CTS */ \ + PC_DEFINE(CP(UART2_RTS), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_HIGH) /* uP_UART2_RTS */ \ + PC_DEFINE(CP(UART2_TX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_HIGH) /* uP_UART2_TX */ \ + PC_DEFINE(CP(UART2_RX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_HIGH) /* uP_UART2_RX */ \ + \ + /* UART3 lines */ \ + PC_DEFINE(CP(UART3_CTS_RCTX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART3_CTS */ \ + PC_DEFINE(CP(UART3_RTS_SD), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART3_RTS */ \ + PC_DEFINE(CP(UART3_RX_IRRX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART3_RX */ \ + PC_DEFINE(CP(UART3_TX_IRTX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* uP_UART3_TX */ \ + \ + /* UART4 lines */ \ + PC_DEFINE(CP(GPMC_WAIT2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* DEBUG_TX */ \ + PC_DEFINE(CP(GPMC_WAIT3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* DEBUG_RX */ \ + \ + /* PCM BT lines */ \ + PC_DEFINE(CP(MCBSP1_CLKX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* BT_PCM_CLK */ \ + PC_DEFINE(CP(MCBSP1_DR), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* BT_PCM_OUT */ \ + PC_DEFINE(CP(MCBSP1_DX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* BT_PCM_IN */ \ + PC_DEFINE(CP(MCBSP1_FSX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* BT_PCM_SYNC */ \ + \ + /* PCM PMIC lines */ \ + PC_DEFINE(CP(MCBSP3_CLKX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* PCM_VDX */ \ + PC_DEFINE(CP(MCBSP3_DR), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* PCM_VFS */ \ + PC_DEFINE(CP(MCBSP3_DX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* PCM_VCK */ \ + PC_DEFINE(CP(MCBSP3_FSX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* PCM_VDR */ \ + \ + /* PMIC I2S lines */ \ + PC_DEFINE(CP(MCBSP2_CLKX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* MCBSP2_CLK */ \ + PC_DEFINE(CP(MCBSP2_DR), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* MCBSP2_DR */ \ + PC_DEFINE(CP(MCBSP2_DX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* MCBSP2_DX */ \ + PC_DEFINE(CP(MCBSP2_FSX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* MCBSP2_FSX */ \ + \ + /* MCSPI1 lines */ \ + PC_DEFINE(CP(MCSPI1_CLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* DR_SCLK */ \ + PC_DEFINE(CP(MCSPI1_SIMO), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* DR_SDI */ \ + PC_DEFINE(CP(MCSPI1_SOMI), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* DR_SDO */ \ + PC_DEFINE(CP(MCSPI1_CS0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* ACC_CS0 */ \ + PC_DEFINE(CP(MCSPI1_CS1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* TP196 */ \ + PC_DEFINE(CP(MCSPI1_CS2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* BARO_Csn */ \ + PC_DEFINE(CP(MCSPI1_CS3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7 | OMAP_PIN_OFF_OUTPUT_LOW) /* TP181 */ \ + \ + /* MCSPI2 (LCM) lines */ \ + PC_DEFINE(CP(MCSPI2_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* SPI_LCM_CLK */ \ + PC_DEFINE(CP(MCSPI2_SIMO), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* SPI_LCM_OUT */ \ + PC_DEFINE(CP(MCSPI2_SOMI), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7 | OMAP_PIN_OFF_OUTPUT_LOW) /* TP182 */ \ + PC_DEFINE(CP(MCSPI2_CS0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | OMAP_PIN_OFF_OUTPUT_LOW) /* SPI_LCM_CS0 */ \ + PC_DEFINE(CP(MCSPI2_CS1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7 | OMAP_PIN_OFF_OUTPUT_LOW) /* TP186 */ \ + \ + /* WiFi lines */ \ + PC_DEFINE(CP(ETK_CLK), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* WIFI_CLK */ \ + PC_DEFINE(CP(ETK_CTL), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* WIFI_CMD */ \ + PC_DEFINE(CP(ETK_D3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* WIFI_DATA3 */ \ + PC_DEFINE(CP(ETK_D4), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* WIFI_DATA0 */ \ + PC_DEFINE(CP(ETK_D5), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* WIFI_DATA1 */ \ + PC_DEFINE(CP(ETK_D6), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE2 | OMAP_PIN_OFF_OUTPUT_LOW) /* WIFI_DATA2 */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(MCBSP1_CLKR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 156: nLCD_RESET */ \ + PC_DEFINE(CP(GPMC_NCS3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 54: nTP_IRQ */ \ + PC_DEFINE(CP(GPMC_A6), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 39: nCD_SD_micro */\ + PC_DEFINE(CP(GPMC_D15), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 51: HPDETECTn */ \ + PC_DEFINE(CP(GPMC_NCS1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 52: USB_DETECTn */ \ + PC_DEFINE(CP(GPMC_A4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 37: AMP_PWR_EN */ \ + PC_DEFINE(CP(ETK_D13), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 27: AUX_MOVI */ \ + PC_DEFINE(CP(ETK_D14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 28: AUX_SD */ \ + PC_DEFINE(CP(MCBSP1_FSR), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 157: TSP_RST */ \ + PC_DEFINE(CP(ETK_D10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 24: DR_POWER_EN */ \ + PC_DEFINE(CP(GPMC_NBE0_CLE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 60: nBT_RST */ \ + PC_DEFINE(CP(ETK_D15), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 29: WIFI_RSTn */ \ + PC_DEFINE(CP(ETK_D1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_LOW) /* 15: WIFI_EN */ \ + + +#define PADCONFIG_SETTINGS_COMMON \ + /* CAM lines */ \ + PC_DEFINE(CP(CAM_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D0 */ \ + PC_DEFINE(CP(CAM_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D1 */ \ + PC_DEFINE(CP(CAM_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D2 */ \ + PC_DEFINE(CP(CAM_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D3 */ \ + PC_DEFINE(CP(CAM_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D4 */ \ + PC_DEFINE(CP(CAM_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D5 */ \ + PC_DEFINE(CP(CAM_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D6 */ \ + PC_DEFINE(CP(CAM_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D7 */ \ + PC_DEFINE(CP(CAM_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D8 */ \ + PC_DEFINE(CP(CAM_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D9 */ \ + PC_DEFINE(CP(CAM_XCLKB), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* h_CAM_XCLKB */ \ + PC_DEFINE(CP(CAM_PCLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_PCLK */ \ + PC_DEFINE(CP(CAM_VS), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_VS */ \ + PC_DEFINE(CP(CAM_HS), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_HS */ \ + PC_DEFINE(CP(CAM_FLD), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE2) /* CAM_nRESET */ \ + PC_DEFINE(CP(CSI2_DX0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CSI1_DX0 */ \ + PC_DEFINE(CP(CSI2_DY0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CSI1_DX0 */ \ + PC_DEFINE(CP(CSI2_DX1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CSI1_DX0 */ \ + PC_DEFINE(CP(CSI2_DY1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CSI1_DX0 */ \ + \ + /* LCD lines */ \ + PC_DEFINE(CP(DSS_ACBIAS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_DAT_EN */ \ + PC_DEFINE(CP(DSS_DATA0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D0 */ \ + PC_DEFINE(CP(DSS_DATA1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D1 */ \ + PC_DEFINE(CP(DSS_DATA2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D2 */ \ + PC_DEFINE(CP(DSS_DATA3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D3 */ \ + PC_DEFINE(CP(DSS_DATA4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D4 */ \ + PC_DEFINE(CP(DSS_DATA5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D5 */ \ + PC_DEFINE(CP(DSS_DATA6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D6 */ \ + PC_DEFINE(CP(DSS_DATA7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D7 */ \ + PC_DEFINE(CP(DSS_DATA8), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D8 */ \ + PC_DEFINE(CP(DSS_DATA9), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D9 */ \ + PC_DEFINE(CP(DSS_DATA10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D10 */ \ + PC_DEFINE(CP(DSS_DATA11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D11 */ \ + PC_DEFINE(CP(DSS_DATA12), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D12 */ \ + PC_DEFINE(CP(DSS_DATA13), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D13 */ \ + PC_DEFINE(CP(DSS_DATA14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D14 */ \ + PC_DEFINE(CP(DSS_DATA15), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D15 */ \ + PC_DEFINE(CP(DSS_DATA16), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D16 */ \ + PC_DEFINE(CP(DSS_DATA17), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D17 */ \ + PC_DEFINE(CP(DSS_DATA18), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D18 */ \ + PC_DEFINE(CP(DSS_DATA19), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D19 */ \ + PC_DEFINE(CP(DSS_DATA20), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D20 */ \ + PC_DEFINE(CP(DSS_DATA21), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D21 */ \ + PC_DEFINE(CP(DSS_DATA22), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D22 */ \ + PC_DEFINE(CP(DSS_DATA23), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_D23 */ \ + PC_DEFINE(CP(DSS_PCLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_DCLK */ \ + PC_DEFINE(CP(DSS_HSYNC), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_HSYNC */ \ + PC_DEFINE(CP(DSS_VSYNC), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* LCD_VSYNC */ \ + \ + /* WiFi lines */ \ + PC_DEFINE(CP(ETK_D9), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + PC_DEFINE(CP(ETK_D10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + PC_DEFINE(CP(ETK_D11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + PC_DEFINE(CP(ETK_D12), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + \ + /* USB0 lines */ \ + PC_DEFINE(CP(HSUSB0_DATA0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA0 */ \ + PC_DEFINE(CP(HSUSB0_DATA1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA1 */ \ + PC_DEFINE(CP(HSUSB0_DATA2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA2 */ \ + PC_DEFINE(CP(HSUSB0_DATA3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA3 */ \ + PC_DEFINE(CP(HSUSB0_DATA4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA4 */ \ + PC_DEFINE(CP(HSUSB0_DATA5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA5 */ \ + PC_DEFINE(CP(HSUSB0_DATA6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA6 */ \ + PC_DEFINE(CP(HSUSB0_DATA7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DATA7 */ \ + PC_DEFINE(CP(HSUSB0_CLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_CLK */ \ + PC_DEFINE(CP(HSUSB0_STP), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_STP */ \ + PC_DEFINE(CP(HSUSB0_DIR), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_DIR */ \ + PC_DEFINE(CP(HSUSB0_NXT), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* USB0_ULPI_NXT */ \ + \ + /* SYS lines */ \ + PC_DEFINE(CP(SYS_BOOT0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT0 */ \ + PC_DEFINE(CP(SYS_BOOT1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT1 */ \ + PC_DEFINE(CP(SYS_BOOT2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT2 */ \ + PC_DEFINE(CP(SYS_BOOT3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT3 */ \ + PC_DEFINE(CP(SYS_BOOT4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT4 */ \ + PC_DEFINE(CP(SYS_BOOT5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT5 */ \ + PC_DEFINE(CP(SYS_BOOT6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT6 */ \ + PC_DEFINE(CP(SYS_CLKREQ), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_CLKREQ */ \ + PC_DEFINE(CP(SYS_NIRQ), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_WAKEUP_EN) /* SYS_NIRQ */ \ + PC_DEFINE(CP(SYS_NRESWARM), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) /* SYS_NRESWARM */ \ + PC_DEFINE(CP(SYS_OFF_MODE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_OFF_MODE */ \ + PC_DEFINE(CP(SYS_CLKOUT1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP32 */ \ + \ + /* Unused GPMC lines (no mode7 for d0..d7 !) */ \ + PC_DEFINE(CP(GPMC_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D0 */ \ + PC_DEFINE(CP(GPMC_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D1 */ \ + PC_DEFINE(CP(GPMC_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D2 */ \ + PC_DEFINE(CP(GPMC_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D3 */ \ + PC_DEFINE(CP(GPMC_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D4 */ \ + PC_DEFINE(CP(GPMC_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D5 */ \ + PC_DEFINE(CP(GPMC_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D6 */ \ + PC_DEFINE(CP(GPMC_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D7 */ \ + PC_DEFINE(CP(GPMC_A5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP183 */ \ + PC_DEFINE(CP(GPMC_NCS0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* TP144 */ \ + PC_DEFINE(CP(GPMC_NCS6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP145 */ \ + PC_DEFINE(CP(GPMC_NCS7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP146 */ \ + PC_DEFINE(CP(GPMC_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP2 */ \ + PC_DEFINE(CP(GPMC_NWE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP4 */ \ + PC_DEFINE(CP(GPMC_NOE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP10 */ \ + PC_DEFINE(CP(GPMC_NADV_ALE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP3 */ \ + PC_DEFINE(CP(GPMC_NWP), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP7 */ \ + PC_DEFINE(CP(GPMC_WAIT0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* TP23 */ \ + PC_DEFINE(CP(GPMC_WAIT1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP19 */ \ + \ + /* I2C lines */ \ + PC_DEFINE(CP(I2C2_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C2_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C3_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C3_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C4_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C4_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + \ + /* Unused JTAG lines */ \ + PC_DEFINE(CP(JTAG_EMU0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP24 */ \ + PC_DEFINE(CP(JTAG_EMU1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) /* TP29 */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(CAM_XCLKA), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 96: CAM_PWR_ON */ \ + PC_DEFINE(CP(CAM_WEN), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 167: TP33 */ \ + PC_DEFINE(CP(CAM_D10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 109: DISP_ON */ \ + PC_DEFINE(CP(CAM_D11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 110: LCM_PWR_ENn_1 */ \ + PC_DEFINE(CP(ETK_D0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 14: BT_EN */ \ + PC_DEFINE(CP(ETK_D2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 16: BT_WAKE */ \ + PC_DEFINE(CP(ETK_D7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 21: HPWR */ \ + PC_DEFINE(CP(ETK_D8), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 22: USB_SUSP */ \ + PC_DEFINE(CP(MCBSP4_CLKX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 152: BT_HOST_WAKE */\ + PC_DEFINE(CP(MCBSP4_DR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 153: nGPS_TCXO_ON */\ + PC_DEFINE(CP(MCBSP4_DX), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 154: LCM_ID */ \ + PC_DEFINE(CP(MCBSP_CLKS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 160: nGPS_RESET */ \ + PC_DEFINE(CP(GPMC_A1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 34: RDS_IRQ */ \ + PC_DEFINE(CP(GPMC_A2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 35: RDS_RSTn */ \ + PC_DEFINE(CP(GPMC_A3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 36: MUTE */ \ + PC_DEFINE(CP(GPMC_A7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 40: LCD_PWR_ON */ \ + PC_DEFINE(CP(GPMC_A8), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 41: nLCD_STBY */ \ + PC_DEFINE(CP(GPMC_A9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 42: GPS_1PPS */ \ + PC_DEFINE(CP(GPMC_A10), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 43: CPU_WAKE */ \ + PC_DEFINE(CP(GPMC_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 44: DOCK_DET1 */ \ + PC_DEFINE(CP(GPMC_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 45: DOCK_DET0 */ \ + PC_DEFINE(CP(GPMC_D10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 46: EEPROM_WP */ \ + PC_DEFINE(CP(GPMC_D11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 47: AR_BTRSTOUTn */\ + PC_DEFINE(CP(GPMC_D12), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 48: TILT_PWR */ \ + PC_DEFINE(CP(GPMC_D13), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 49: TILT_OUT */ \ + PC_DEFINE(CP(GPMC_D14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 50: ACCESSORY_PWREN */ \ + PC_DEFINE(CP(GPMC_NCS2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* 53: USB_CHRG_DET */\ + PC_DEFINE(CP(GPMC_NCS4), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* 55: nON_OFF */ \ + PC_DEFINE(CP(GPMC_NCS5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 56: LCM_nCS */ \ + PC_DEFINE(CP(GPMC_NBE1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* 61: LOW_DC_VDD */ \ + PC_DEFINE(CP(SYS_CLKOUT2), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* 186: WALL_SENSE_CONNECT */ +#endif // PADCONFIG_SANTIAGO_H + diff --git a/include/linux/padconfig_rennes_b1.h b/include/linux/padconfig_rennes_b1.h new file mode 100644 index 000000000..cb93c811b --- /dev/null +++ b/include/linux/padconfig_rennes_b1.h @@ -0,0 +1,407 @@ +/* + * Copyright (C) 2009 TomTom BV + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef PADCONFIG_RENNES_B1_H +#define PADCONFIG_RENNES_B1_H + +#include "padconfig_common.h" + +/*******************************/ +/*********** TABLES ************/ +/*******************************/ + +#define PADCONFIG_SETTINGS_XLOADER_RENNES_B1 \ + /*SDRC*/ \ + PC_DEFINE(CP(SDRC_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D0*/ \ + PC_DEFINE(CP(SDRC_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D1*/ \ + PC_DEFINE(CP(SDRC_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D2*/ \ + PC_DEFINE(CP(SDRC_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D3*/ \ + PC_DEFINE(CP(SDRC_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D4*/ \ + PC_DEFINE(CP(SDRC_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D5*/ \ + PC_DEFINE(CP(SDRC_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D6*/ \ + PC_DEFINE(CP(SDRC_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D7*/ \ + PC_DEFINE(CP(SDRC_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D8*/ \ + PC_DEFINE(CP(SDRC_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D9*/ \ + PC_DEFINE(CP(SDRC_D10), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D10*/ \ + PC_DEFINE(CP(SDRC_D11), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D11*/ \ + PC_DEFINE(CP(SDRC_D12), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D12*/ \ + PC_DEFINE(CP(SDRC_D13), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D13*/ \ + PC_DEFINE(CP(SDRC_D14), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D14*/ \ + PC_DEFINE(CP(SDRC_D15), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D15*/ \ + PC_DEFINE(CP(SDRC_D16), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D16*/ \ + PC_DEFINE(CP(SDRC_D17), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D17*/ \ + PC_DEFINE(CP(SDRC_D18), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D18*/ \ + PC_DEFINE(CP(SDRC_D19), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D19*/ \ + PC_DEFINE(CP(SDRC_D20), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D20*/ \ + PC_DEFINE(CP(SDRC_D21), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D21*/ \ + PC_DEFINE(CP(SDRC_D22), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D22*/ \ + PC_DEFINE(CP(SDRC_D23), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D23*/ \ + PC_DEFINE(CP(SDRC_D24), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D24*/ \ + PC_DEFINE(CP(SDRC_D25), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D25*/ \ + PC_DEFINE(CP(SDRC_D26), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D26*/ \ + PC_DEFINE(CP(SDRC_D27), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D27*/ \ + PC_DEFINE(CP(SDRC_D28), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D28*/ \ + PC_DEFINE(CP(SDRC_D29), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D29*/ \ + PC_DEFINE(CP(SDRC_D30), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D30*/ \ + PC_DEFINE(CP(SDRC_D31), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D31*/ \ + PC_DEFINE(CP(SDRC_CLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_CLK*/ \ + PC_DEFINE(CP(SDRC_DQS0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS0*/ \ + PC_DEFINE(CP(SDRC_DQS1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS1*/ \ + PC_DEFINE(CP(SDRC_DQS2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS2*/ \ + PC_DEFINE(CP(SDRC_DQS3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS3*/ \ + \ + /* MMC lines */ \ + PC_DEFINE(CP(SDMMC1_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_CMD), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT0), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT2), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + \ + /* USB0 lines */ \ + PC_DEFINE(CP(HSUSB0_CLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DIR), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_NXT), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_STP), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + \ + /* USB1 lines */ \ + PC_DEFINE(CP(ETK_D0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_RXRCV */ \ + PC_DEFINE(CP(ETK_D1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXSE0 */ \ + PC_DEFINE(CP(ETK_D2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXDAT */ \ + PC_DEFINE(CP(ETK_D7), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXEN */ \ + PC_DEFINE(CP(MCBSP3_DR), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* USB1_SPEED */ \ + PC_DEFINE(CP(MCBSP3_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* USB1_SUSPEND */ \ + \ + /* USB2 lines - TI CSR ticket OMAPS00262728: HSUSB2_DATA2 and HSUSB2_DATA6 */ \ + PC_DEFINE(CP(MCSPI1_CS3), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA2 */ \ + PC_DEFINE(CP(MCSPI2_CS0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA6 */ \ + \ + /* The following settings are there to overcome TS problem */ \ + \ + /* UART1 lines */ \ + PC_DEFINE(CP(UART1_CTS), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_RTS_SOC_CTS */ \ + PC_DEFINE(CP(UART1_RTS), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_CTS_SOC_RTS */ \ + PC_DEFINE(CP(UART1_RX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_TX_SOC_RX */ \ + PC_DEFINE(CP(UART1_TX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_RX_SOC_TX */ \ + \ + /* UART2 lines */ \ + PC_DEFINE(CP(MCBSP3_CLKX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_RX */ \ + PC_DEFINE(CP(MCBSP3_FSX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_TX */ \ + \ + /* SDARS lines */ \ + PC_DEFINE(CP(ETK_D8), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* nTUN_PWREN_UB */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(CAM_WEN), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_CORE_PWR_EN */ \ + PC_DEFINE(CP(GPMC_NBE0_CLE), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* nBT_RST */ \ + PC_DEFINE(CP(CAM_XCLKA), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* CAM_PWR_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* nCAM_RST */ \ + PC_DEFINE(CP(MCBSP_CLKS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* nGPS2_RESET */ \ + PC_DEFINE(CP(UART3_RTS_SD), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_HOST_REQ */ \ + \ + /* MCBSP1 lines */ \ + PC_DEFINE(CP(MCBSP1_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_CLK */ \ + PC_DEFINE(CP(MCBSP1_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_OUT */ \ + PC_DEFINE(CP(MCBSP1_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_IN */ \ + PC_DEFINE(CP(MCBSP1_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_SYNC */ \ + +#ifndef PADCONFIG_SETTINGS_XLOADER +#define PADCONFIG_SETTINGS_XLOADER PADCONFIG_SETTINGS_XLOADER_RENNES_B1 +#endif /* PADCONFIG_SETTINGS_XLOADER */ + +#define PADCONFIG_SETTINGS_UBOOT_RENNES_B1 \ +/* LCD lines */ \ + PC_DEFINE(CP(DSS_ACBIAS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_DAT_EN */ \ + PC_DEFINE(CP(DSS_DATA0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D0 */ \ + PC_DEFINE(CP(DSS_DATA1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D1 */ \ + PC_DEFINE(CP(DSS_DATA2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D2 */ \ + PC_DEFINE(CP(DSS_DATA3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D3 */ \ + PC_DEFINE(CP(DSS_DATA4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D4 */ \ + PC_DEFINE(CP(DSS_DATA5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D5 */ \ + PC_DEFINE(CP(DSS_DATA6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D6 */ \ + PC_DEFINE(CP(DSS_DATA7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D7 */ \ + PC_DEFINE(CP(DSS_DATA8), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D8 */ \ + PC_DEFINE(CP(DSS_DATA9), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D9 */ \ + PC_DEFINE(CP(DSS_DATA10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D10 */ \ + PC_DEFINE(CP(DSS_DATA11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D11 */ \ + PC_DEFINE(CP(DSS_DATA12), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D12 */ \ + PC_DEFINE(CP(DSS_DATA13), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D13 */ \ + PC_DEFINE(CP(DSS_DATA14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D14 */ \ + PC_DEFINE(CP(DSS_DATA15), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D15 */ \ + PC_DEFINE(CP(DSS_DATA16), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D16 */ \ + PC_DEFINE(CP(DSS_DATA17), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D17 */ \ + PC_DEFINE(CP(DSS_DATA18), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D18 */ \ + PC_DEFINE(CP(DSS_DATA19), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D19 */ \ + PC_DEFINE(CP(DSS_DATA20), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D20 */ \ + PC_DEFINE(CP(DSS_DATA21), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D21 */ \ + PC_DEFINE(CP(DSS_DATA22), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D22 */ \ + PC_DEFINE(CP(DSS_DATA23), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D23 */ \ + PC_DEFINE(CP(DSS_PCLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_PCLK */ \ + PC_DEFINE(CP(SDMMC2_DAT5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* LCM_PWR_ON */ \ + PC_DEFINE(CP(MCBSP1_CLKR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* nLCD_RESET */ \ + \ + +#ifndef PADCONFIG_SETTINGS_UBOOT +#define PADCONFIG_SETTINGS_UBOOT PADCONFIG_SETTINGS_UBOOT_RENNES_B1 +#endif /* PADCONFIG_SETTINGS_UBOOT */ + +#define PADCONFIG_SETTINGS_KERNEL_RENNES_B1 \ + /* UART1 lines */ \ + PC_DEFINE(CP(UART1_CTS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_RTS_SOC_CTS */ \ + PC_DEFINE(CP(UART1_RTS), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_CTS_SOC_RTS */ \ + PC_DEFINE(CP(UART1_RX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_TX_SOC_RX */ \ + PC_DEFINE(CP(UART1_TX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_RX_SOC_TX */ \ + \ + /* UART2 lines */ \ + PC_DEFINE(CP(MCBSP3_CLKX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE1 | PC_OFF_OUT_LOW) /* BT_RX */ \ + PC_DEFINE(CP(MCBSP3_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE1 | PC_OFF_OUT_LOW) /* BT_TX */ \ + \ + /* SDARS lines */ \ + PC_DEFINE(CP(ETK_D8), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_OUT_HIGH) /* nTUN_PWREN_UB */ \ + \ + /* MCBSP1 lines */ \ + PC_DEFINE(CP(MCBSP1_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_CLK */ \ + PC_DEFINE(CP(MCBSP1_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_OUT */ \ + PC_DEFINE(CP(MCBSP1_DX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_IN */ \ + PC_DEFINE(CP(MCBSP1_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_SYNC */ \ + \ + /* USB1 lines */ \ + PC_DEFINE(CP(ETK_D0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_RXRCV */ \ + PC_DEFINE(CP(ETK_D1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXSE0 */ \ + PC_DEFINE(CP(ETK_D2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXDAT */ \ + PC_DEFINE(CP(ETK_D7), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MM1_TXEN */ \ + PC_DEFINE(CP(MCBSP3_DR), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* USB1_SPEED */ \ + PC_DEFINE(CP(MCBSP3_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_OUT_HIGH) /* USB1_SUSPEND */ \ + \ + /* USB2 lines - TI CSR ticket OMAPS00262728: HSUSB2_DATA2 and HSUSB2_DATA6 */ \ + PC_DEFINE(CP(MCSPI1_CS3), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA2 */ \ + PC_DEFINE(CP(MCSPI2_CS0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA6 */ \ + \ + /* LCD lines */ \ + PC_DEFINE(CP(DSS_ACBIAS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_DAT_EN */ \ + PC_DEFINE(CP(DSS_DATA0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D0 */ \ + PC_DEFINE(CP(DSS_DATA1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D1 */ \ + PC_DEFINE(CP(DSS_DATA2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D2 */ \ + PC_DEFINE(CP(DSS_DATA3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D3 */ \ + PC_DEFINE(CP(DSS_DATA4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D4 */ \ + PC_DEFINE(CP(DSS_DATA5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D5 */ \ + PC_DEFINE(CP(DSS_DATA6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D6 */ \ + PC_DEFINE(CP(DSS_DATA7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D7 */ \ + PC_DEFINE(CP(DSS_DATA8), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D8 */ \ + PC_DEFINE(CP(DSS_DATA9), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D9 */ \ + PC_DEFINE(CP(DSS_DATA10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D10 */ \ + PC_DEFINE(CP(DSS_DATA11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D11 */ \ + PC_DEFINE(CP(DSS_DATA12), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D12 */ \ + PC_DEFINE(CP(DSS_DATA13), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D13 */ \ + PC_DEFINE(CP(DSS_DATA14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D14 */ \ + PC_DEFINE(CP(DSS_DATA15), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D15 */ \ + PC_DEFINE(CP(DSS_DATA16), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D16 */ \ + PC_DEFINE(CP(DSS_DATA17), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D17 */ \ + PC_DEFINE(CP(DSS_DATA18), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D18 */ \ + PC_DEFINE(CP(DSS_DATA19), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D19 */ \ + PC_DEFINE(CP(DSS_DATA20), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D20 */ \ + PC_DEFINE(CP(DSS_DATA21), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D21 */ \ + PC_DEFINE(CP(DSS_DATA22), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D22 */ \ + PC_DEFINE(CP(DSS_DATA23), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D23 */ \ + PC_DEFINE(CP(DSS_PCLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_PCLK */ \ + \ + /* JTAG lines */ \ + PC_DEFINE(CP(JTAG_NTRST), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_nTRST */ \ + PC_DEFINE(CP(JTAG_TCK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_TCK */ \ + PC_DEFINE(CP(JTAG_TMS_TMSC), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_nTMS */ \ + PC_DEFINE(CP(JTAG_RTCK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* uP_nRTCK */ \ + PC_DEFINE(CP(JTAG_NTRST), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_nTRST */ \ + PC_DEFINE(CP(JTAG_TDI), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_TDI */ \ + PC_DEFINE(CP(JTAG_TDO), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_TDO */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(CAM_WEN), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* GPS_CORE_PWR_EN */ \ + PC_DEFINE(CP(CAM_XCLKA), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAM_PWR_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nCAM_RST */ \ + PC_DEFINE(CP(GPMC_NBE0_CLE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nBT_RST */ \ + PC_DEFINE(CP(MCBSP_CLKS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nGPS_RESET */ \ + PC_DEFINE(CP(UART3_RTS_SD), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* GPS_HOST_REQ */ \ + PC_DEFINE(CP(GPIO126), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nAUTH_RST */ \ + PC_DEFINE(CP(GPIO129), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAM_ON */ \ + PC_DEFINE(CP(GPMC_NBE1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_HIGH)/* PWR_HOLD */ \ + +#ifndef PADCONFIG_SETTINGS_KERNEL +#define PADCONFIG_SETTINGS_KERNEL PADCONFIG_SETTINGS_KERNEL_RENNES_B1 +#endif /* PADCONFIG_SETTINGS_KERNEL */ + +#define PADCONFIG_SETTINGS_COMMON_RENNES_B1 \ + /* CAM lines */ \ + PC_DEFINE(CP(CAM_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D0 */ \ + PC_DEFINE(CP(CAM_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D1 */ \ + PC_DEFINE(CP(CAM_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D2 */ \ + PC_DEFINE(CP(CAM_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D3 */ \ + PC_DEFINE(CP(CAM_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D4 */ \ + PC_DEFINE(CP(CAM_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D5 */ \ + PC_DEFINE(CP(CAM_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D6 */ \ + PC_DEFINE(CP(CAM_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D7 */ \ + PC_DEFINE(CP(CAM_FLD), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_FLD */ \ + PC_DEFINE(CP(CAM_HS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_HS */ \ + PC_DEFINE(CP(CAM_PCLK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_PCLK */ \ + PC_DEFINE(CP(CAM_VS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_VS */ \ + \ + /* GPMC lines */ \ + PC_DEFINE(CP(GPMC_A1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A1 */ \ + PC_DEFINE(CP(GPMC_A2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A2 */ \ + PC_DEFINE(CP(GPMC_A3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A3 */ \ + PC_DEFINE(CP(GPMC_A4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A4 */ \ + PC_DEFINE(CP(GPMC_A5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A5 */ \ + PC_DEFINE(CP(GPMC_A6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A6 */ \ + PC_DEFINE(CP(GPMC_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_CLK */ \ + PC_DEFINE(CP(GPMC_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D0 */ \ + PC_DEFINE(CP(GPMC_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D1 */ \ + PC_DEFINE(CP(GPMC_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D2 */ \ + PC_DEFINE(CP(GPMC_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D3 */ \ + PC_DEFINE(CP(GPMC_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D4 */ \ + PC_DEFINE(CP(GPMC_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D5 */ \ + PC_DEFINE(CP(GPMC_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D6 */ \ + PC_DEFINE(CP(GPMC_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D7 */ \ + PC_DEFINE(CP(GPMC_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D8 */ \ + PC_DEFINE(CP(GPMC_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D9 */ \ + PC_DEFINE(CP(GPMC_D10), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D10 */ \ + PC_DEFINE(CP(GPMC_D11), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D11 */ \ + PC_DEFINE(CP(GPMC_D12), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D12 */ \ + PC_DEFINE(CP(GPMC_D13), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D13 */ \ + PC_DEFINE(CP(GPMC_D14), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D14 */ \ + PC_DEFINE(CP(GPMC_D15), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D15 */ \ + PC_DEFINE(CP(GPMC_NWP), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nWP */ \ + PC_DEFINE(CP(GPMC_NCS0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nCS0 */ \ + PC_DEFINE(CP(GPMC_NCS1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS1 */ \ + PC_DEFINE(CP(GPMC_NCS2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS2 */ \ + PC_DEFINE(CP(GPMC_NOE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nOE */ \ + PC_DEFINE(CP(GPMC_NADV_ALE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nADV_ALE */ \ + PC_DEFINE(CP(GPMC_NWE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nWE */ \ + \ + /* MCBSP4 lines */ \ + PC_DEFINE(CP(GPMC_NCS4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE2 | PC_OFF_OUT_LOW) /* MCBSP4_CLK */ \ + PC_DEFINE(CP(GPMC_NCS6), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE2 | PC_OFF_OUT_LOW) /* MCBSP4_DX */ \ + PC_DEFINE(CP(GPMC_NCS7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE2 | PC_OFF_OUT_LOW) /* MCBSP4_FSX */ \ + \ + /* I2C lines */ \ + PC_DEFINE(CP(I2C2_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C2_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C3_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C3_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C4_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + PC_DEFINE(CP(I2C4_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + PC_DEFINE(CP(I2C1_SCL), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(I2C1_SDA), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + \ + /* MCBSP2 lines */ \ + PC_DEFINE(CP(MCBSP2_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_NOPULL) /* MCBSP2_CLK */ \ + PC_DEFINE(CP(MCBSP2_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_NOPULL) /* MCBSP2_DR */ \ + PC_DEFINE(CP(MCBSP2_DX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* MCBSP2_DX */ \ + PC_DEFINE(CP(MCBSP2_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_NOPULL) /* MCBSP2_FSX */ \ + \ + /* MCSPI1 lines */ \ + PC_DEFINE(CP(MCSPI1_CLK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_CLK */ \ + PC_DEFINE(CP(MCSPI1_SIMO), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_SIMO */ \ + PC_DEFINE(CP(MCSPI1_SOMI), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_SOMI */ \ + PC_DEFINE(CP(MCSPI1_CS0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_CS0 */ \ + \ + /* SYS lines */ \ + PC_DEFINE(CP(SYS_BOOT0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT0 */ \ + PC_DEFINE(CP(SYS_BOOT1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT1 */ \ + PC_DEFINE(CP(SYS_BOOT2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT2 */ \ + PC_DEFINE(CP(SYS_BOOT3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT3 */ \ + PC_DEFINE(CP(SYS_BOOT4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT4 */ \ + PC_DEFINE(CP(SYS_BOOT5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT5 */ \ + PC_DEFINE(CP(SYS_BOOT6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT6 */ \ + PC_DEFINE(CP(SYS_CLKREQ), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_CLKREQ */ \ + PC_DEFINE(CP(SYS_NIRQ), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_WAKEUP_EN) /* SYS_NIRQ */ \ + PC_DEFINE(CP(SYS_NRESWARM), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) /* SYS_NRESWARM */ \ + PC_DEFINE(CP(SYS_OFF_MODE), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_OFF_MODE */ \ + \ + /* UART3 lines */ \ + PC_DEFINE(CP(UART3_RX_IRRX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* DEBUG_RX */ \ + PC_DEFINE(CP(UART3_TX_IRTX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* DEBUG_TX */ \ + \ + /* BACKLIGHT lines */ \ + PC_DEFINE(CP(GPMC_NCS5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE3 | PC_OFF_IN_NOPULL) /* BACKLIGHT_PWM */ \ + PC_DEFINE(CP(GPMC_WAIT3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* BACKLIGHT_ON */ \ + \ + /* nACCEL_IRQ and nGYRO_IRQ lines */ \ + PC_DEFINE(CP(ETK_D5), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nGYRO_IRQ */ \ + PC_DEFINE(CP(CAM_D10), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nACCEL_IRQ */ \ + \ + /* Unused lines set as GPIOs */ \ + PC_DEFINE(CP(UART2_CTS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_CTS as GPIO */ \ + PC_DEFINE(CP(UART2_RTS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_RTS as GPIO */ \ + PC_DEFINE(CP(UART2_RX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_RX as GPIO */ \ + PC_DEFINE(CP(UART2_TX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_TX as GPIO */ \ + PC_DEFINE(CP(GPMC_A7), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_A7 as GPIO */ \ + PC_DEFINE(CP(GPMC_A10), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_A10 as GPIO */ \ + PC_DEFINE(CP(SDMMC2_CLK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_CLK */ \ + PC_DEFINE(CP(SDMMC2_CMD), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_SIMO */ \ + PC_DEFINE(CP(SDMMC2_DAT0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_SOMI */ \ + PC_DEFINE(CP(SDMMC2_DAT2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* SDMMC2_DAT2 as GPIO */\ + PC_DEFINE(CP(SDMMC2_DAT3), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_CS0 */ \ + PC_DEFINE(CP(SDMMC2_DAT6), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* SDMMC2_DAT6 as GPIO */\ + PC_DEFINE(CP(CAM_STROBE), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CAM_STROBE as GPIO */\ + PC_DEFINE(CP(DSS_HSYNC), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* LCD_HSYNC as GPIO */ \ + PC_DEFINE(CP(DSS_VSYNC), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* LCD_VSYNC as GPIO */ \ + PC_DEFINE(CP(ETK_CTL), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_CTL as GPIO */ \ + PC_DEFINE(CP(ETK_D4), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_D4 as GPIO */ \ + PC_DEFINE(CP(ETK_D6), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_D6 as GPIO */ \ + PC_DEFINE(CP(ETK_D9), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_D9 as GPIO */ \ + PC_DEFINE(CP(MCBSP4_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCBSP4_CLKX as GPIO */\ + PC_DEFINE(CP(MCBSP4_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCBSP4_DR as GPIO */ \ + PC_DEFINE(CP(MCBSP4_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCBSP4_DX as GPIO */ \ + PC_DEFINE(CP(MCBSP4_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCBSP4_FSX as GPIO */ \ + PC_DEFINE(CP(MCSPI1_CS1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCSPI1_CS1 as GPIO */ \ + PC_DEFINE(CP(MCSPI1_CS2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCSPI1_CS2 as GPIO */ \ + PC_DEFINE(CP(GPMC_NCS1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS1 as GPIO */ \ + PC_DEFINE(CP(GPMC_NCS2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS2 as GPIO */ \ + PC_DEFINE(CP(GPMC_WAIT1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_WAIT1 as GPIO */ \ + PC_DEFINE(CP(GPMC_WAIT2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_WAIT2 as GPIO */ \ + PC_DEFINE(CP(CSI2_DX0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DX0 as GPIO */ \ + PC_DEFINE(CP(CSI2_DY0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DY0 as GPIO */ \ + PC_DEFINE(CP(CSI2_DX1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DX1 as GPIO */ \ + PC_DEFINE(CP(CSI2_DY1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DY1 as GPIO */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(CAM_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_IN_PULLDOWN) /* nCAM_IRQ */ \ + PC_DEFINE(CP(CAM_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* nGPS_ANT_SHORT */ \ + PC_DEFINE(CP(CAM_D11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nUSB2_RESET */ \ + PC_DEFINE(CP(CAM_XCLKB), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MIC_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nCAN_RST */ \ + PC_DEFINE(CP(SDMMC2_DAT5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* LCM_PWR_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nCAN_IRQ */ \ + PC_DEFINE(CP(GPMC_A8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_IN_NOPULL) /* nDIAGSYS_BOOT */ \ + PC_DEFINE(CP(GPMC_A9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* GPS_1PPS */ \ + PC_DEFINE(CP(GPMC_NCS3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_OUT_LOW) /* nTP_IRQ */ \ + PC_DEFINE(CP(HDQ_SIO), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_IN_PULLDOWN) /* CAN_RST_MON */ \ + PC_DEFINE(CP(JTAG_EMU0), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_IN_NOPULL) /* nUSB3_POWER_FAULT */\ + PC_DEFINE(CP(JTAG_EMU1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_IN_NOPULL) /* nUSB1_POWER_FAULT */\ + PC_DEFINE(CP(MCBSP1_CLKR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nLCD_RESET */ \ + PC_DEFINE(CP(MCBSP1_FSR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nTP_RESET */ \ + PC_DEFINE(CP(SYS_CLKOUT1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* nON_OFF */ \ + PC_DEFINE(CP(SYS_CLKOUT2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAN_BT_MD */ \ + PC_DEFINE(CP(UART3_CTS_RCTX),PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAN_SYNC */ \ + PC_DEFINE(CP(ETK_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* LCD_UD */ \ + PC_DEFINE(CP(ETK_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* SENSE_11V0 */ \ + +#ifndef PADCONFIG_SETTINGS_COMMON +#define PADCONFIG_SETTINGS_COMMON PADCONFIG_SETTINGS_COMMON_RENNES_B1 +#endif /* PADCONFIG_SETTINGS_COMMON */ + +#endif // PADCONFIG_RENNES_B1_H + diff --git a/include/linux/padconfig_stuttgart_b1.h b/include/linux/padconfig_stuttgart_b1.h new file mode 100644 index 000000000..8887e10cb --- /dev/null +++ b/include/linux/padconfig_stuttgart_b1.h @@ -0,0 +1,407 @@ +/* + * Copyright (C) 2009 TomTom BV + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef PADCONFIG_STUTTGART_B1_H +#define PADCONFIG_STUTTGART_B1_H + +#include "padconfig_common.h" + +/*******************************/ +/*********** TABLES ************/ +/*******************************/ + +#define PADCONFIG_SETTINGS_XLOADER_STUTTGART_B1 \ + /*SDRC*/ \ + PC_DEFINE(CP(SDRC_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D0*/ \ + PC_DEFINE(CP(SDRC_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D1*/ \ + PC_DEFINE(CP(SDRC_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D2*/ \ + PC_DEFINE(CP(SDRC_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D3*/ \ + PC_DEFINE(CP(SDRC_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D4*/ \ + PC_DEFINE(CP(SDRC_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D5*/ \ + PC_DEFINE(CP(SDRC_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D6*/ \ + PC_DEFINE(CP(SDRC_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D7*/ \ + PC_DEFINE(CP(SDRC_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D8*/ \ + PC_DEFINE(CP(SDRC_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D9*/ \ + PC_DEFINE(CP(SDRC_D10), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D10*/ \ + PC_DEFINE(CP(SDRC_D11), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D11*/ \ + PC_DEFINE(CP(SDRC_D12), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D12*/ \ + PC_DEFINE(CP(SDRC_D13), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D13*/ \ + PC_DEFINE(CP(SDRC_D14), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D14*/ \ + PC_DEFINE(CP(SDRC_D15), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D15*/ \ + PC_DEFINE(CP(SDRC_D16), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D16*/ \ + PC_DEFINE(CP(SDRC_D17), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D17*/ \ + PC_DEFINE(CP(SDRC_D18), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D18*/ \ + PC_DEFINE(CP(SDRC_D19), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D19*/ \ + PC_DEFINE(CP(SDRC_D20), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D20*/ \ + PC_DEFINE(CP(SDRC_D21), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D21*/ \ + PC_DEFINE(CP(SDRC_D22), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D22*/ \ + PC_DEFINE(CP(SDRC_D23), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D23*/ \ + PC_DEFINE(CP(SDRC_D24), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D24*/ \ + PC_DEFINE(CP(SDRC_D25), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D25*/ \ + PC_DEFINE(CP(SDRC_D26), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D26*/ \ + PC_DEFINE(CP(SDRC_D27), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D27*/ \ + PC_DEFINE(CP(SDRC_D28), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D28*/ \ + PC_DEFINE(CP(SDRC_D29), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D29*/ \ + PC_DEFINE(CP(SDRC_D30), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D30*/ \ + PC_DEFINE(CP(SDRC_D31), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_D31*/ \ + PC_DEFINE(CP(SDRC_CLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_CLK*/ \ + PC_DEFINE(CP(SDRC_DQS0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS0*/ \ + PC_DEFINE(CP(SDRC_DQS1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS1*/ \ + PC_DEFINE(CP(SDRC_DQS2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS2*/ \ + PC_DEFINE(CP(SDRC_DQS3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /*SDRC_DQS3*/ \ + \ + /* MMC lines */ \ + PC_DEFINE(CP(SDMMC1_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_CMD), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT0), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT2), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(SDMMC1_DAT3), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + \ + /* USB0 lines */ \ + PC_DEFINE(CP(HSUSB0_CLK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DATA7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_DIR), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_NXT), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(HSUSB0_STP), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + \ + /* USB1 lines */ \ + PC_DEFINE(CP(ETK_D0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_RXRCV */ \ + PC_DEFINE(CP(ETK_D1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXSE0 */ \ + PC_DEFINE(CP(ETK_D2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXDAT */ \ + PC_DEFINE(CP(ETK_D7), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXEN */ \ + PC_DEFINE(CP(MCBSP3_DR), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* USB1_SPEED */ \ + PC_DEFINE(CP(MCBSP3_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* USB1_SUSPEND */ \ + \ + /* USB2 lines - TI CSR ticket OMAPS00262728: HSUSB2_DATA2 and HSUSB2_DATA6 */ \ + PC_DEFINE(CP(MCSPI1_CS3), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA2 */ \ + PC_DEFINE(CP(MCSPI2_CS0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA6 */ \ + \ + /* The following settings are there to overcome TS problem */ \ + \ + /* UART1 lines */ \ + PC_DEFINE(CP(UART1_CTS), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_RTS_SOC_CTS */ \ + PC_DEFINE(CP(UART1_RTS), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_CTS_SOC_RTS */ \ + PC_DEFINE(CP(UART1_RX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_TX_SOC_RX */ \ + PC_DEFINE(CP(UART1_TX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_RX_SOC_TX */ \ + \ + /* UART2 lines */ \ + PC_DEFINE(CP(MCBSP3_CLKX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_RX */ \ + PC_DEFINE(CP(MCBSP3_FSX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_TX */ \ + \ + /* SDARS lines */ \ + PC_DEFINE(CP(ETK_D8), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* nTUN_PWREN_UB */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(CAM_WEN), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_CORE_PWR_EN */ \ + PC_DEFINE(CP(GPMC_NBE0_CLE), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* nBT_RST */ \ + PC_DEFINE(CP(CAM_XCLKA), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* CAM_PWR_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4) /* nCAM_RST */ \ + PC_DEFINE(CP(MCBSP_CLKS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* nGPS2_RESET */ \ + PC_DEFINE(CP(UART3_RTS_SD), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPS_HOST_REQ */ \ + \ + /* MCBSP1 lines */ \ + PC_DEFINE(CP(MCBSP1_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_CLK */ \ + PC_DEFINE(CP(MCBSP1_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_OUT */ \ + PC_DEFINE(CP(MCBSP1_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_IN */ \ + PC_DEFINE(CP(MCBSP1_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* BT_PCM_SYNC */ \ + +#ifndef PADCONFIG_SETTINGS_XLOADER +#define PADCONFIG_SETTINGS_XLOADER PADCONFIG_SETTINGS_XLOADER_STUTTGART_B1 +#endif /* PADCONFIG_SETTINGS_XLOADER */ + +#define PADCONFIG_SETTINGS_UBOOT_STUTTGART_B1 \ +/* LCD lines */ \ + PC_DEFINE(CP(DSS_ACBIAS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_DAT_EN */ \ + PC_DEFINE(CP(DSS_DATA0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D0 */ \ + PC_DEFINE(CP(DSS_DATA1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D1 */ \ + PC_DEFINE(CP(DSS_DATA2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D2 */ \ + PC_DEFINE(CP(DSS_DATA3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D3 */ \ + PC_DEFINE(CP(DSS_DATA4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D4 */ \ + PC_DEFINE(CP(DSS_DATA5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D5 */ \ + PC_DEFINE(CP(DSS_DATA6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D6 */ \ + PC_DEFINE(CP(DSS_DATA7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D7 */ \ + PC_DEFINE(CP(DSS_DATA8), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D8 */ \ + PC_DEFINE(CP(DSS_DATA9), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D9 */ \ + PC_DEFINE(CP(DSS_DATA10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D10 */ \ + PC_DEFINE(CP(DSS_DATA11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D11 */ \ + PC_DEFINE(CP(DSS_DATA12), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D12 */ \ + PC_DEFINE(CP(DSS_DATA13), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D13 */ \ + PC_DEFINE(CP(DSS_DATA14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D14 */ \ + PC_DEFINE(CP(DSS_DATA15), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D15 */ \ + PC_DEFINE(CP(DSS_DATA16), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D16 */ \ + PC_DEFINE(CP(DSS_DATA17), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D17 */ \ + PC_DEFINE(CP(DSS_DATA18), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D18 */ \ + PC_DEFINE(CP(DSS_DATA19), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D19 */ \ + PC_DEFINE(CP(DSS_DATA20), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D20 */ \ + PC_DEFINE(CP(DSS_DATA21), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D21 */ \ + PC_DEFINE(CP(DSS_DATA22), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D22 */ \ + PC_DEFINE(CP(DSS_DATA23), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D23 */ \ + PC_DEFINE(CP(DSS_PCLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_PCLK */ \ + PC_DEFINE(CP(SDMMC2_DAT5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* LCM_PWR_ON */ \ + PC_DEFINE(CP(MCBSP1_CLKR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* nLCD_RESET */ \ + \ + +#ifndef PADCONFIG_SETTINGS_UBOOT +#define PADCONFIG_SETTINGS_UBOOT PADCONFIG_SETTINGS_UBOOT_STUTTGART_B1 +#endif /* PADCONFIG_SETTINGS_UBOOT */ + +#define PADCONFIG_SETTINGS_KERNEL_STUTTGART_B1 \ + /* UART1 lines */ \ + PC_DEFINE(CP(UART1_CTS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_RTS_SOC_CTS */ \ + PC_DEFINE(CP(UART1_RTS), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_CTS_SOC_RTS */ \ + PC_DEFINE(CP(UART1_RX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_TX_SOC_RX */ \ + PC_DEFINE(CP(UART1_TX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* GPS_RX_SOC_TX */ \ + \ + /* UART2 lines */ \ + PC_DEFINE(CP(MCBSP3_CLKX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE1 | PC_OFF_OUT_LOW) /* BT_RX */ \ + PC_DEFINE(CP(MCBSP3_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE1 | PC_OFF_OUT_LOW) /* BT_TX */ \ + \ + /* SDARS lines */ \ + PC_DEFINE(CP(ETK_D8), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_OUT_HIGH) /* nTUN_PWREN_UB */ \ + \ + /* MCBSP1 lines */ \ + PC_DEFINE(CP(MCBSP1_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_CLK */ \ + PC_DEFINE(CP(MCBSP1_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_OUT */ \ + PC_DEFINE(CP(MCBSP1_DX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_IN */ \ + PC_DEFINE(CP(MCBSP1_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* BT_PCM_SYNC */ \ + \ + /* USB1 lines */ \ + PC_DEFINE(CP(ETK_D0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_RXRCV */ \ + PC_DEFINE(CP(ETK_D1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXSE0 */ \ + PC_DEFINE(CP(ETK_D2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MM1_TXDAT */ \ + PC_DEFINE(CP(ETK_D7), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MM1_TXEN */ \ + PC_DEFINE(CP(MCBSP3_DR), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* USB1_SPEED */ \ + PC_DEFINE(CP(MCBSP3_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_OUT_HIGH) /* USB1_SUSPEND */ \ + \ + /* USB2 lines - TI CSR ticket OMAPS00262728: HSUSB2_DATA2 and HSUSB2_DATA6 */ \ + PC_DEFINE(CP(MCSPI1_CS3), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA2 */ \ + PC_DEFINE(CP(MCSPI2_CS0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* HSUSB2_DATA6 */ \ + \ + /* LCD lines */ \ + PC_DEFINE(CP(DSS_ACBIAS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_DAT_EN */ \ + PC_DEFINE(CP(DSS_DATA0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D0 */ \ + PC_DEFINE(CP(DSS_DATA1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D1 */ \ + PC_DEFINE(CP(DSS_DATA2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D2 */ \ + PC_DEFINE(CP(DSS_DATA3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D3 */ \ + PC_DEFINE(CP(DSS_DATA4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D4 */ \ + PC_DEFINE(CP(DSS_DATA5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D5 */ \ + PC_DEFINE(CP(DSS_DATA6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D6 */ \ + PC_DEFINE(CP(DSS_DATA7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D7 */ \ + PC_DEFINE(CP(DSS_DATA8), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D8 */ \ + PC_DEFINE(CP(DSS_DATA9), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D9 */ \ + PC_DEFINE(CP(DSS_DATA10), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D10 */ \ + PC_DEFINE(CP(DSS_DATA11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D11 */ \ + PC_DEFINE(CP(DSS_DATA12), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D12 */ \ + PC_DEFINE(CP(DSS_DATA13), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D13 */ \ + PC_DEFINE(CP(DSS_DATA14), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D14 */ \ + PC_DEFINE(CP(DSS_DATA15), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D15 */ \ + PC_DEFINE(CP(DSS_DATA16), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D16 */ \ + PC_DEFINE(CP(DSS_DATA17), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D17 */ \ + PC_DEFINE(CP(DSS_DATA18), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D18 */ \ + PC_DEFINE(CP(DSS_DATA19), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D19 */ \ + PC_DEFINE(CP(DSS_DATA20), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D20 */ \ + PC_DEFINE(CP(DSS_DATA21), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D21 */ \ + PC_DEFINE(CP(DSS_DATA22), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D22 */ \ + PC_DEFINE(CP(DSS_DATA23), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_D23 */ \ + PC_DEFINE(CP(DSS_PCLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* LCD_PCLK */ \ + \ + /* JTAG lines */ \ + PC_DEFINE(CP(JTAG_NTRST), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_nTRST */ \ + PC_DEFINE(CP(JTAG_TCK), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_TCK */ \ + PC_DEFINE(CP(JTAG_TMS_TMSC), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_nTMS */ \ + PC_DEFINE(CP(JTAG_RTCK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* uP_nRTCK */ \ + PC_DEFINE(CP(JTAG_NTRST), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_nTRST */ \ + PC_DEFINE(CP(JTAG_TDI), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_TDI */ \ + PC_DEFINE(CP(JTAG_TDO), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* uP_TDO */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(CAM_WEN), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* GPS_CORE_PWR_EN */ \ + PC_DEFINE(CP(CAM_XCLKA), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAM_PWR_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nCAM_RST */ \ + PC_DEFINE(CP(GPMC_NBE0_CLE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nBT_RST */ \ + PC_DEFINE(CP(MCBSP_CLKS), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nGPS_RESET */ \ + PC_DEFINE(CP(UART3_RTS_SD), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* GPS_HOST_REQ */ \ + PC_DEFINE(CP(GPIO126), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nAUTH_RST */ \ + PC_DEFINE(CP(GPIO129), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAM_ON */ \ + PC_DEFINE(CP(GPMC_NBE1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | OMAP_PIN_OFF_OUTPUT_HIGH)/* PWR_HOLD */ \ + +#ifndef PADCONFIG_SETTINGS_KERNEL +#define PADCONFIG_SETTINGS_KERNEL PADCONFIG_SETTINGS_KERNEL_STUTTGART_B1 +#endif /* PADCONFIG_SETTINGS_KERNEL */ + +#define PADCONFIG_SETTINGS_COMMON_STUTTGART_B1 \ + /* CAM lines */ \ + PC_DEFINE(CP(CAM_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D0 */ \ + PC_DEFINE(CP(CAM_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D1 */ \ + PC_DEFINE(CP(CAM_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D2 */ \ + PC_DEFINE(CP(CAM_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D3 */ \ + PC_DEFINE(CP(CAM_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D4 */ \ + PC_DEFINE(CP(CAM_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D5 */ \ + PC_DEFINE(CP(CAM_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D6 */ \ + PC_DEFINE(CP(CAM_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* CAM_D7 */ \ + PC_DEFINE(CP(CAM_FLD), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_FLD */ \ + PC_DEFINE(CP(CAM_HS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_HS */ \ + PC_DEFINE(CP(CAM_PCLK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_PCLK */ \ + PC_DEFINE(CP(CAM_VS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0) /* CAM_VS */ \ + \ + /* GPMC lines */ \ + PC_DEFINE(CP(GPMC_A1), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A1 */ \ + PC_DEFINE(CP(GPMC_A2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A2 */ \ + PC_DEFINE(CP(GPMC_A3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A3 */ \ + PC_DEFINE(CP(GPMC_A4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A4 */ \ + PC_DEFINE(CP(GPMC_A5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A5 */ \ + PC_DEFINE(CP(GPMC_A6), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_A6 */ \ + PC_DEFINE(CP(GPMC_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_CLK */ \ + PC_DEFINE(CP(GPMC_D0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D0 */ \ + PC_DEFINE(CP(GPMC_D1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D1 */ \ + PC_DEFINE(CP(GPMC_D2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D2 */ \ + PC_DEFINE(CP(GPMC_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D3 */ \ + PC_DEFINE(CP(GPMC_D4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D4 */ \ + PC_DEFINE(CP(GPMC_D5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D5 */ \ + PC_DEFINE(CP(GPMC_D6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D6 */ \ + PC_DEFINE(CP(GPMC_D7), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D7 */ \ + PC_DEFINE(CP(GPMC_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D8 */ \ + PC_DEFINE(CP(GPMC_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D9 */ \ + PC_DEFINE(CP(GPMC_D10), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D10 */ \ + PC_DEFINE(CP(GPMC_D11), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D11 */ \ + PC_DEFINE(CP(GPMC_D12), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D12 */ \ + PC_DEFINE(CP(GPMC_D13), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D13 */ \ + PC_DEFINE(CP(GPMC_D14), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D14 */ \ + PC_DEFINE(CP(GPMC_D15), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_D15 */ \ + PC_DEFINE(CP(GPMC_NWP), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nWP */ \ + PC_DEFINE(CP(GPMC_NCS0), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nCS0 */ \ + PC_DEFINE(CP(GPMC_NCS1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS1 */ \ + PC_DEFINE(CP(GPMC_NCS2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS2 */ \ + PC_DEFINE(CP(GPMC_NOE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nOE */ \ + PC_DEFINE(CP(GPMC_NADV_ALE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nADV_ALE */ \ + PC_DEFINE(CP(GPMC_NWE), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* GPMC_nWE */ \ + \ + /* MCBSP4 lines */ \ + PC_DEFINE(CP(GPMC_NCS4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE2 | PC_OFF_OUT_LOW) /* MCBSP4_CLK */ \ + PC_DEFINE(CP(GPMC_NCS6), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE2 | PC_OFF_OUT_LOW) /* MCBSP4_DX */ \ + PC_DEFINE(CP(GPMC_NCS7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE2 | PC_OFF_OUT_LOW) /* MCBSP4_FSX */ \ + \ + /* I2C lines */ \ + PC_DEFINE(CP(I2C2_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C2_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C3_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C3_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) \ + PC_DEFINE(CP(I2C4_SCL), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + PC_DEFINE(CP(I2C4_SDA), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE7) \ + PC_DEFINE(CP(I2C1_SCL), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + PC_DEFINE(CP(I2C1_SDA), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) \ + \ + /* MCBSP2 lines */ \ + PC_DEFINE(CP(MCBSP2_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_NOPULL) /* MCBSP2_CLK */ \ + PC_DEFINE(CP(MCBSP2_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_NOPULL) /* MCBSP2_DR */ \ + PC_DEFINE(CP(MCBSP2_DX), PC_OUTPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* MCBSP2_DX */ \ + PC_DEFINE(CP(MCBSP2_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_NOPULL) /* MCBSP2_FSX */ \ + \ + /* MCSPI1 lines */ \ + PC_DEFINE(CP(MCSPI1_CLK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_CLK */ \ + PC_DEFINE(CP(MCSPI1_SIMO), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_SIMO */ \ + PC_DEFINE(CP(MCSPI1_SOMI), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_SOMI */ \ + PC_DEFINE(CP(MCSPI1_CS0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* SPI_CAN_CS0 */ \ + \ + /* SYS lines */ \ + PC_DEFINE(CP(SYS_BOOT0), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT0 */ \ + PC_DEFINE(CP(SYS_BOOT1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT1 */ \ + PC_DEFINE(CP(SYS_BOOT2), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT2 */ \ + PC_DEFINE(CP(SYS_BOOT3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT3 */ \ + PC_DEFINE(CP(SYS_BOOT4), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT4 */ \ + PC_DEFINE(CP(SYS_BOOT5), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT5 */ \ + PC_DEFINE(CP(SYS_BOOT6), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_BOOT6 */ \ + PC_DEFINE(CP(SYS_CLKREQ), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_CLKREQ */ \ + PC_DEFINE(CP(SYS_NIRQ), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_WAKEUP_EN) /* SYS_NIRQ */ \ + PC_DEFINE(CP(SYS_NRESWARM), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0) /* SYS_NRESWARM */ \ + PC_DEFINE(CP(SYS_OFF_MODE), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0) /* SYS_OFF_MODE */ \ + \ + /* UART3 lines */ \ + PC_DEFINE(CP(UART3_RX_IRRX), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE0 | PC_OFF_IN_PULLDOWN) /* DEBUG_RX */ \ + PC_DEFINE(CP(UART3_TX_IRTX), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE0 | PC_OFF_OUT_LOW) /* DEBUG_TX */ \ + \ + /* BACKLIGHT lines */ \ + PC_DEFINE(CP(GPMC_NCS5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE3 | PC_OFF_IN_NOPULL) /* BACKLIGHT_PWM */ \ + PC_DEFINE(CP(GPMC_WAIT3), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* BACKLIGHT_ON */ \ + \ + /* nACCEL_IRQ and nGYRO_IRQ lines */ \ + PC_DEFINE(CP(ETK_D5), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nGYRO_IRQ */ \ + PC_DEFINE(CP(CAM_D10), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nACCEL_IRQ */ \ + \ + /* Unused lines set as GPIOs */ \ + PC_DEFINE(CP(UART2_CTS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_CTS as GPIO */ \ + PC_DEFINE(CP(UART2_RTS), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_RTS as GPIO */ \ + PC_DEFINE(CP(UART2_RX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_RX as GPIO */ \ + PC_DEFINE(CP(UART2_TX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* UART_TX as GPIO */ \ + PC_DEFINE(CP(GPMC_A7), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_A7 as GPIO */ \ + PC_DEFINE(CP(GPMC_A10), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_A10 as GPIO */ \ + PC_DEFINE(CP(SDMMC2_CLK), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_CLK */ \ + PC_DEFINE(CP(SDMMC2_CMD), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_SIMO */ \ + PC_DEFINE(CP(SDMMC2_DAT0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_SOMI */ \ + PC_DEFINE(CP(SDMMC2_DAT2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* SDMMC2_DAT2 as GPIO */\ + PC_DEFINE(CP(SDMMC2_DAT3), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCSPI3_CS0 */ \ + PC_DEFINE(CP(SDMMC2_DAT6), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* SDMMC2_DAT6 as GPIO */\ + PC_DEFINE(CP(CAM_STROBE), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CAM_STROBE as GPIO */\ + PC_DEFINE(CP(DSS_HSYNC), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* LCD_HSYNC as GPIO */ \ + PC_DEFINE(CP(DSS_VSYNC), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* LCD_VSYNC as GPIO */ \ + PC_DEFINE(CP(ETK_CTL), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_CTL as GPIO */ \ + PC_DEFINE(CP(ETK_D4), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_D4 as GPIO */ \ + PC_DEFINE(CP(ETK_D6), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_D6 as GPIO */ \ + PC_DEFINE(CP(ETK_D9), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* ETK_D9 as GPIO */ \ + PC_DEFINE(CP(MCBSP4_CLKX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCBSP4_CLKX as GPIO */\ + PC_DEFINE(CP(MCBSP4_DR), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCBSP4_DR as GPIO */ \ + PC_DEFINE(CP(MCBSP4_DX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCBSP4_DX as GPIO */ \ + PC_DEFINE(CP(MCBSP4_FSX), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MCBSP4_FSX as GPIO */ \ + PC_DEFINE(CP(MCSPI1_CS1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCSPI1_CS1 as GPIO */ \ + PC_DEFINE(CP(MCSPI1_CS2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* MCSPI1_CS2 as GPIO */ \ + PC_DEFINE(CP(GPMC_NCS1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS1 as GPIO */ \ + PC_DEFINE(CP(GPMC_NCS2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_nCS2 as GPIO */ \ + PC_DEFINE(CP(GPMC_WAIT1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_WAIT1 as GPIO */ \ + PC_DEFINE(CP(GPMC_WAIT2), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* GPMC_WAIT2 as GPIO */ \ + PC_DEFINE(CP(CSI2_DX0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DX0 as GPIO */ \ + PC_DEFINE(CP(CSI2_DY0), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DY0 as GPIO */ \ + PC_DEFINE(CP(CSI2_DX1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DX1 as GPIO */ \ + PC_DEFINE(CP(CSI2_DY1), PC_INPUT | PC_PULL_ENA | PC_PULL_DOWN | PC_MODE4) /* CSI2_DY1 as GPIO */ \ + \ + /* GPIO lines */ \ + PC_DEFINE(CP(CAM_D8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_IN_PULLDOWN) /* nCAM_IRQ */ \ + PC_DEFINE(CP(CAM_D9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* nGPS_ANT_SHORT */ \ + PC_DEFINE(CP(CAM_D11), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nUSB2_RESET */ \ + PC_DEFINE(CP(CAM_XCLKB), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* MIC_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT4), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nCAN_RST */ \ + PC_DEFINE(CP(SDMMC2_DAT5), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* LCM_PWR_ON */ \ + PC_DEFINE(CP(SDMMC2_DAT7), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nCAN_IRQ */ \ + PC_DEFINE(CP(GPMC_A8), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_IN_NOPULL) /* nDIAGSYS_BOOT */ \ + PC_DEFINE(CP(GPMC_A9), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* GPS_1PPS */ \ + PC_DEFINE(CP(GPMC_NCS3), PC_INPUT | PC_PULL_DIS | PC_PULL_UP | PC_MODE4 | PC_OFF_OUT_LOW) /* nTP_IRQ */ \ + PC_DEFINE(CP(HDQ_SIO), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_IN_PULLDOWN) /* CAN_RST_MON */ \ + PC_DEFINE(CP(JTAG_EMU0), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_IN_NOPULL) /* nUSB3_POWER_FAULT */\ + PC_DEFINE(CP(JTAG_EMU1), PC_INPUT | PC_PULL_ENA | PC_PULL_UP | PC_MODE4 | PC_OFF_IN_NOPULL) /* nUSB1_POWER_FAULT */\ + PC_DEFINE(CP(MCBSP1_CLKR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nLCD_RESET */ \ + PC_DEFINE(CP(MCBSP1_FSR), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* nTP_RESET */ \ + PC_DEFINE(CP(SYS_CLKOUT1), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* nON_OFF */ \ + PC_DEFINE(CP(SYS_CLKOUT2), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAN_BT_MD */ \ + PC_DEFINE(CP(UART3_CTS_RCTX),PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* CAN_SYNC */ \ + PC_DEFINE(CP(ETK_CLK), PC_OUTPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4) /* LCD_UD */ \ + PC_DEFINE(CP(ETK_D3), PC_INPUT | PC_PULL_DIS | PC_PULL_DOWN | PC_MODE4 | PC_OFF_OUT_LOW) /* SENSE_11V0 */ \ + +#ifndef PADCONFIG_SETTINGS_COMMON +#define PADCONFIG_SETTINGS_COMMON PADCONFIG_SETTINGS_COMMON_STUTTGART_B1 +#endif /* PADCONFIG_SETTINGS_COMMON */ + +#endif // PADCONFIG_STUTTGART_B1_H + diff --git a/lib_arm/board.c b/lib_arm/board.c index 7af9eff85..9a522ec26 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -43,7 +43,33 @@ #include #include #include -#include +#if defined(CONFIG_CMD_NET) + #include +#endif +#include +#if defined(CONFIG_SMDK6410) || defined(CONFIG_SMDK6430) || defined(CONFIG_SMDK6440) ||\ + defined(CONFIG_SEOUL) || defined(CONFIG_LIMA) || defined(CONFIG_VENICE)||\ + defined(CONFIG_HAVANA) || defined(CONFIG_CORDOBA) || defined(CONFIG_CATANIA_S) +#include +#include +#elif defined(CONFIG_SMDK6450) || defined(CONFIG_VALDEZ) +#include +#endif +#include + +#ifdef CONFIG_TT_HEADER +# include +#endif + +#ifdef CONFIG_CMD_NAND +#include +#endif +#ifdef CONFIG_CMD_ONENAND +#include +#endif + + +#undef DEBUG #ifdef CONFIG_DRIVER_SMC91111 #include "../drivers/smc91111.h" @@ -54,25 +80,8 @@ DECLARE_GLOBAL_DATA_PTR; -#if (CONFIG_COMMANDS & CFG_CMD_NAND) -#ifdef ENV_IS_VARIABLE -extern u8 is_nand; -#endif void nand_init (void); -#endif - -#if (CONFIG_COMMANDS & CFG_CMD_FLASH) -#ifdef ENV_IS_VARIABLE -extern u8 is_flash; -#endif -#endif - -#if (CONFIG_COMMANDS & CFG_CMD_ONENAND) -#ifdef ENV_IS_VARIABLE -extern u8 is_onenand; -#endif void onenand_init(void); -#endif ulong monitor_flash_len; @@ -93,14 +102,17 @@ const char version_string[] = U_BOOT_VERSION" (" __DATE__ " - " __TIME__ ")"CONFIG_IDENT_STRING; #ifdef CONFIG_DRIVER_CS8900 -extern void cs8900_get_enetaddr (uchar * addr); +extern int cs8900_get_enetaddr (uchar * addr); #endif #ifdef CONFIG_DRIVER_RTL8019 extern void rtl8019_get_enetaddr (uchar * addr); #endif -extern void tomtom_env_init(void); +#if defined(CONFIG_HARD_I2C) || \ + defined(CONFIG_SOFT_I2C) +#include +#endif /* * Begin and End of memory area for malloc(), and current "brk" @@ -109,8 +121,7 @@ static ulong mem_malloc_start = 0; static ulong mem_malloc_end = 0; static ulong mem_malloc_brk = 0; -static -void mem_malloc_init (ulong dest_addr) +static void mem_malloc_init (ulong dest_addr) { mem_malloc_start = dest_addr; mem_malloc_end = dest_addr + CFG_MALLOC_LEN; @@ -133,6 +144,40 @@ void *sbrk (ptrdiff_t increment) return ((void *) old); } +char *strmhz(char *buf, long hz) +{ + long l, n; + long m; + + n = hz / 1000000L; + l = sprintf (buf, "%ld", n); + m = (hz % 1000000L) / 1000L; + if (m != 0) + sprintf (buf + l, ".%03ld", m); + return (buf); +} + + +/************************************************************************ + * Coloured LED functionality + ************************************************************************ + * May be supplied by boards if desired + */ +void inline __coloured_LED_init (void) {} +void inline coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init"))); +void inline __red_LED_on (void) {} +void inline red_LED_on (void) __attribute__((weak, alias("__red_LED_on"))); +void inline __red_LED_off(void) {} +void inline red_LED_off(void) __attribute__((weak, alias("__red_LED_off"))); +void inline __green_LED_on(void) {} +void inline green_LED_on(void) __attribute__((weak, alias("__green_LED_on"))); +void inline __green_LED_off(void) {} +void inline green_LED_off(void)__attribute__((weak, alias("__green_LED_off"))); +void inline __yellow_LED_on(void) {} +void inline yellow_LED_on(void)__attribute__((weak, alias("__yellow_LED_on"))); +void inline __yellow_LED_off(void) {} +void inline yellow_LED_off(void)__attribute__((weak, alias("__yellow_LED_off"))); + /************************************************************************ * Init Utilities * ************************************************************************ @@ -155,8 +200,14 @@ static int init_baudrate (void) static int display_banner (void) { printf ("\n\n%s\n\n", version_string); + debug ("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n", _armboot_start, _bss_start, _bss_end); +#ifdef CONFIG_MEMORY_UPPER_CODE /* by scsuh */ + debug("\t\bMalloc and Stack is above the U-Boot Code.\n"); +#else + debug("\t\bMalloc and Stack is below the U-Boot Code.\n"); +#endif #ifdef CONFIG_MODEM_SUPPORT debug ("Modem Support enabled\n"); #endif @@ -192,7 +243,8 @@ static int display_dram_config (void) for (i=0; ibd->bi_dram[i].size; } - puts("DRAM: "); + + puts("DRAM: "); print_size(size, "\n"); #endif @@ -202,11 +254,32 @@ static int display_dram_config (void) #ifndef CFG_NO_FLASH static void display_flash_config (ulong size) { - puts ("Flash: "); + puts ("Flash: "); print_size (size, "\n"); } #endif /* CFG_NO_FLASH */ +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) +static int init_func_i2c (void) +{ + puts ("I2C: "); + i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE); + puts ("ready\n"); + return (0); +} +#endif + +#ifdef CONFIG_SKIP_RELOCATE_UBOOT +/* + * This routine sets the relocation done flag, because even if + * relocation is skipped, the flag is used by other generic code. + */ +static int reloc_init(void) +{ + gd->flags |= GD_FLG_RELOC; + return 0; +} +#endif /* * Breathe some life into the board... @@ -237,6 +310,11 @@ int print_cpuinfo (void); /* test-only */ init_fnc_t *init_sequence[] = { cpu_init, /* basic cpu dependent setup */ +#if defined(CONFIG_SKIP_RELOCATE_UBOOT) + reloc_init, /* Set the relocation done flag, must + do this AFTER cpu_init(), but as soon + as possible */ +#endif board_init, /* basic board dependent setup */ interrupt_init, /* set up exceptions */ env_init, /* initialize environment */ @@ -249,9 +327,15 @@ init_fnc_t *init_sequence[] = { #endif #if defined(CONFIG_DISPLAY_BOARDINFO) checkboard, /* display board info */ +#endif +#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) + init_func_i2c, #endif dram_init, /* configure available RAM banks */ display_dram_config, +#if defined(CONFIG_TT_HEADER) + check_bricknum, /* is this release allowed to run? */ +#endif NULL, }; @@ -259,15 +343,35 @@ void start_armboot (void) { init_fnc_t **init_fnc_ptr; char *s; -#ifndef CFG_NO_FLASH - ulong size = 0; +#if !defined(CFG_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD) + ulong size; #endif + #if defined(CONFIG_VFD) || defined(CONFIG_LCD) unsigned long addr; #endif +#if defined(CONFIG_BOOT_MOVINAND) + uint *magic = (uint *) (PHYS_SDRAM_1); +#endif + +#ifdef CONFIG_S3C_MMC_BOOT + clear_bss(); +#endif + /* Pointer is writable since we allocated a register for it */ +#ifdef CONFIG_MEMORY_UPPER_CODE /* by scsuh */ + ulong gd_base; + + gd_base = CFG_UBOOT_BASE + CFG_UBOOT_SIZE - CFG_MALLOC_LEN - CFG_STACK_SIZE - sizeof(gd_t); +#ifdef CONFIG_USE_IRQ + gd_base -= (CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ); +#endif + gd = (gd_t*)gd_base; +#else gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t)); +#endif + /* compiler optimization barrier needed for GCC >= 3.4 */ __asm__ __volatile__("": : :"memory"); @@ -275,6 +379,8 @@ void start_armboot (void) gd->bd = (bd_t*)((char*)gd - sizeof(bd_t)); memset (gd->bd, 0, sizeof (bd_t)); + gd->flags |= GD_FLG_RELOC; + monitor_flash_len = _bss_start - _armboot_start; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { @@ -285,9 +391,6 @@ void start_armboot (void) #ifndef CFG_NO_FLASH /* configure available FLASH banks */ -#ifdef ENV_IS_VARIABLE - if (is_flash) -#endif size = flash_init (); display_flash_config (size); #endif /* CFG_NO_FLASH */ @@ -306,36 +409,164 @@ void start_armboot (void) #endif /* CONFIG_VFD */ #ifdef CONFIG_LCD -# ifndef PAGE_SIZE -# define PAGE_SIZE 4096 -# endif - /* - * reserve memory for LCD display (always full pages) - */ - /* bss_end is defined in the board-specific linker script */ - addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); - size = lcd_setmem (addr); - gd->fb_base = addr; + /* board init may have inited fb_base */ + if (!gd->fb_base) { +# ifndef PAGE_SIZE +# define PAGE_SIZE 4096 +# endif + /* + * reserve memory for LCD display (always full pages) + */ + /* bss_end is defined in the board-specific linker script */ + addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); + size = lcd_setmem (addr); + gd->fb_base = addr; + } #endif /* CONFIG_LCD */ /* armboot_start is defined in the board-specific linker script */ +#ifdef CONFIG_MEMORY_UPPER_CODE /* by scsuh */ + mem_malloc_init (CFG_UBOOT_BASE + CFG_UBOOT_SIZE - CFG_MALLOC_LEN - CFG_STACK_SIZE); +#else mem_malloc_init (_armboot_start - CFG_MALLOC_LEN); - -#if (CONFIG_COMMANDS & CFG_CMD_NAND) -#ifdef ENV_IS_VARIABLE - if (is_nand) #endif + +/* samsung socs: auto-detect devices */ +#if defined(CONFIG_SMDK6410) || defined(CONFIG_SMDK6430) || defined(CONFIG_SMDKC100) ||\ + defined(CONFIG_SEOUL) || defined(CONFIG_LIMA) || defined(CONFIG_VENICE) + +#if defined(CONFIG_MMC) +#if 0 /* TODO ? (not required for PND??) */ +#if defined(CONFIG_S3C_MMC_BL0) + /* Use S3C64xx BL0 gathered information to set INF_REG3_REG */ + /* refer to location of global variable set by S3C64xx IROM (BL0, from IROM spec)*/ + #define S3C6400_IROM_HSMMC_BASE_ADDR (* (unsigned int*) (((void *)0) + (TCM_BASE-0x14))) + + if (S3C6400_IROM_HSMMC_BASE_ADDR == ELFIN_HSMMC_0_BASE) { - puts ("NAND:"); - nand_init(); /* go init the NAND */ + /* booted from mmc ch0 */ + INF_REG3_REG = 0; + } + else if (S3C6400_IROM_HSMMC_BASE_ADDR == ELFIN_HSMMC_1_BASE) + { + /* booted from mmc ch1 */ + INF_REG3_REG = 7; + } +#endif /* defined(CONFIG_S3C_MMC_BL0) */ +#endif /* 0 */ + puts("SD/MMC: "); + +#if !defined(CONFIG_SMDKC100) + if (INF_REG3_REG == 0) + movi_ch = 0; + else + movi_ch = 1; +#else /* CONFIG_SMDKC100 */ + movi_ch = 0; +#endif /* CONFIG_SMDKC100 */ + + movi_set_capacity(); + movi_set_ofs(MOVI_TOTAL_BLKCNT); + movi_init(); +#endif + +#if !defined(CONFIG_SEOUL) && !defined(CONFIG_LIMA) && !defined(CONFIG_VENICE) + if (INF_REG3_REG == 1) { + puts("OneNAND: "); + onenand_init(); + /*setenv("bootcmd", "onenand read c0008000 80000 380000;bootm c0008000");*/ + } else { + puts("NAND: "); + nand_init(); + +#if !defined(CONFIG_SMDKC100) + if (INF_REG3_REG == 0 || INF_REG3_REG == 7) +// setenv("bootcmd", "movi read kernel c0008000;movi read rootfs c0800000;bootm c0008000"); + setenv("bootcmd", CONFIG_BOOTCOMMAND); + else + setenv("bootcmd", "nand read c0008000 80000 380000;bootm c0008000"); +#endif /* CONFIG_SMDKC100 */ + } +#endif /* CONFIG_SEOUL && CONFIG_LIMA && CONFIG_VENICE */ + +/* samsung socs: another auto-detect devices */ +#elif defined(CONFIG_SMDK6440) || defined(CONFIG_HAVANA) || defined(CONFIG_CORDOBA) || defined(CONFIG_CATANIA_S) + +#if defined(CONFIG_MMC) + if (INF_REG3_REG == 1) { /* eMMC_4.3 */ + puts("eMMC: "); + movi_ch = 1; + movi_emmc = 1; + + movi_set_ofs(0); + movi_init(); + } else if (INF_REG3_REG == 7 || INF_REG3_REG == 0) { /* SD/MMC */ + if (INF_REG3_REG & 0x1) + movi_ch = 1; + else + movi_ch = 0; + + puts("SD/MMC: "); + + movi_set_capacity(); + movi_set_ofs(MOVI_TOTAL_BLKCNT); + movi_init(); + } else { + + } +#endif /* CONFIG_MMC */ + +#ifdef CONFIG_SMDK6440 + if (INF_REG3_REG == 2) { + ; /* N/A */ + } else { + puts("NAND: "); + nand_init(); + + //setenv("bootcmd", "nand read c0008000 80000 380000;bootm c0008000"); } #endif -#if (CONFIG_COMMANDS & CFG_CMD_ONENAND) -#ifdef ENV_IS_VARIABLE - if (is_onenand) -#endif +/* samsung socs: no auto-detect devices */ +#elif defined(CONFIG_SMDK6400) || defined(CONFIG_SMDK2450) || defined(CONFIG_SMDK2416) + +#if defined(CONFIG_NAND) + puts("NAND: "); + nand_init(); +#endif /* CONFIG_NAND */ + +#if defined(CONFIG_ONENAND) + puts("OneNAND: "); onenand_init(); +#endif /* CONFIG_ONENAND */ + +#if defined(CONFIG_BOOT_MOVINAND) + puts("SD/MMC: "); + + if ((0x24564236 == magic[0]) && (0x20764316 == magic[1])) { + printf("Boot up for burning\n"); + } else { + movi_set_capacity(); + movi_set_ofs(MOVI_TOTAL_BLKCNT); + movi_init(); + } +#endif /* CONFIG_BOOT_MOVINAND */ + +/* others */ +#else /* defined(CONFIG_SMDK6400) || defined(CONFIG_SMDK2450) || defined(CONFIG_SMDK2416) */ + +#if defined(CONFIG_CMD_NAND) + puts ("NAND: "); + nand_init(); +#endif /* CONFIG_CMD_NAND */ + +/* CONFIG_SMDK6450, CONFIG_VALDEZ use this */ +#if defined(CONFIG_GENERIC_MMC) + puts("SD/MMC: "); + if (mmc_initialize(gd->bd)) + puts ("0 MB\n"); +#endif /* CONFIG_GENERIC_MMC */ + #endif #ifdef CONFIG_HAS_DATAFLASH @@ -351,14 +582,17 @@ void start_armboot (void) /* initialize environment */ env_relocate (); - /* set TomTom specific environment variables */ - tomtom_env_init(); - #ifdef CONFIG_VFD /* must do this after the framebuffer is allocated */ drv_vfd_init(); #endif /* CONFIG_VFD */ +#ifdef CONFIG_SERIAL_MULTI + serial_initialize(); +#endif + +#ifdef CONFIG_NET + /* IP Address */ gd->bd->bi_ip_addr = getenv_IPaddr ("ipaddr"); @@ -389,7 +623,7 @@ void start_armboot (void) } #endif } - +#endif devices_init (); /* get the devices list going. */ #ifdef CONFIG_CMC_PU2 @@ -409,6 +643,13 @@ void start_armboot (void) enable_interrupts (); /* Perform network card initialisation if necessary */ +#ifdef CONFIG_DRIVER_TI_EMAC +extern void dm644x_eth_set_mac_addr (const u_int8_t *addr); + if (getenv ("ethaddr")) { + dm644x_eth_set_mac_addr(gd->bd->bi_enetaddr); + } +#endif + #ifdef CONFIG_DRIVER_CS8900 cs8900_get_enetaddr (gd->bd->bi_enetaddr); #endif @@ -423,20 +664,24 @@ void start_armboot (void) if ((s = getenv ("loadaddr")) != NULL) { load_addr = simple_strtoul (s, NULL, 16); } -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#if defined(CONFIG_CMD_NET) if ((s = getenv ("bootfile")) != NULL) { copy_filename (BootFile, s, sizeof (BootFile)); } -#endif /* CFG_CMD_NET */ +#endif #ifdef BOARD_LATE_INIT board_late_init (); #endif -#if (CONFIG_COMMANDS & CFG_CMD_NET) +#if defined(CONFIG_CMD_NET) #if defined(CONFIG_NET_MULTI) puts ("Net: "); #endif eth_initialize(gd->bd); +#if defined(CONFIG_RESET_PHY_R) + debug ("Reset Ethernet PHY\n"); + reset_phy(); +#endif #endif /* main_loop() can return to retry autoboot, if so just run it again. */ for (;;) { @@ -450,11 +695,18 @@ extern void epicfail(void); void hang (void) { - puts ("### ERROR ### Please RESET the board ###\n"); #ifdef EPICFAIL_POWEROFF + puts ("ERROR: volountary epic fail\n"); epicfail(); #endif + +#ifdef CONFIG_CMD_BOOTWATCHDOG + /* Tell bootwatchdog the signature check failed */ + bootwatchdog_pulse(20000, 0); + puts ("### ERROR ### Please RESET the board ###\n"); +#else for (;;); +#endif } #ifdef CONFIG_MODEM_SUPPORT diff --git a/plat-tomtom/offenburg/sys_info.c b/plat-tomtom/offenburg/sys_info.c new file mode 100644 index 000000000..af64cd280 --- /dev/null +++ b/plat-tomtom/offenburg/sys_info.c @@ -0,0 +1,334 @@ +/* + * (C) Copyright 2009 + * Texas Instruments, + * Richard Woodruff + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#include +#include +#include +#include +#include /* get mem tables */ +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +u32 get_board_rev(void); + +/**************************************************** + * get_cpu_type() - low level get cpu type + * - no C globals yet. + ****************************************************/ +u32 get_cpu_type(void) +{ + // fixme, need to get register defines for 3430 + return (CPU_3430); +} + +/* + * cpu_is_3410(void) - returns true for 3410 + */ +u32 cpu_is_3410(void) +{ + int status; + if (get_cpu_rev() < CPU_3XX_ES20) { + return 0; + } else { + /* read scalability status and return 1 for 3410*/ + status = __raw_readl(CONTROL_SCALABLE_OMAP_STATUS); + /* + * Check whether MPU frequency is set to 266 MHz which + * is nominal for 3410. If yes return true else false + */ + if (((status >> 8) & 0x3) == 0x2) + return 1; + else + return 0; + } +} + +/**************************************************** + * is_mem_sdr() - return 1 if mem type in use is SDR + ****************************************************/ +u32 is_mem_sdr(void) +{ + volatile u32 *burst = (volatile u32 *)(SDRC_MR_0 + SDRC_CS0_OSET); + if (*burst == SDP_SDRC_MR_0_SDR) + return (1); + return (0); +} + +/*********************************************************** + * get_mem_type() - identify type of mDDR part used. + ***********************************************************/ +u32 get_mem_type(void) +{ +#if (defined(CONFIG_STRASBOURG) && defined(__VARIANT_RENNES_A1)) + return (DDR_STACKED); +#else + return (DDR_DISCRETE); +#endif +} + +/*********************************************************************** + * get_cs0_size() - get size of chip select 0/1 + ************************************************************************/ +u32 get_sdr_cs_size(u32 offset) +{ + u32 size; + + /* get ram size field */ + size = __raw_readl(SDRC_MCFG_0 + offset) >> 8; + size &= 0x3FF; /* remove unwanted bits */ + size *= SZ_2M; /* find size in MB */ + return (size); +} + +/* + * get_board_type() - get board type based on current production stats. + * - NOTE-1-: 2 I2C EEPROMs will someday be populated with proper info. + * when they are available we can get info from there. This should + * be correct of all known boards up until today. + * - NOTE-2- EEPROMs are populated but they are updated very slowly. To + * avoid waiting on them we will use ES version of the chip to get info. + * A later version of the FPGA migth solve their speed issue. + */ +u32 get_board_type(void) +{ + if (get_cpu_rev() >= CPU_3XX_ES20) + return SDP_3430_V2; + else + return SDP_3430_V1; +} + +/****************************************************************** + * get_sysboot_value() - get init word settings + ******************************************************************/ +inline u32 get_sysboot_value(void) +{ + return (0x0000003F & __raw_readl(CONTROL_STATUS)); +} + +/*************************************************************************** + * get_gpmc0_base() - Return current address hardware will be + * fetching from. The below effectively gives what is correct, its a bit + * mis-leading compared to the TRM. For the most general case the mask + * needs to be also taken into account this does work in practice. + * - for u-boot we currently map: + * -- 0 to nothing, + * -- 4 to flash + * -- 8 to enent + * -- c to wifi + ****************************************************************************/ +u32 get_gpmc0_base(void) +{ + u32 b; + + b = __raw_readl(GPMC_CONFIG_CS0 + GPMC_CONFIG7); + b &= 0x1F; /* keep base [5:0] */ + b = b << 24; /* ret 0x0b000000 */ + return (b); +} + +/******************************************************************* + * get_gpmc0_width() - See if bus is in x8 or x16 (mainly for nand) + *******************************************************************/ +u32 get_gpmc0_width(void) +{ + return (WIDTH_16BIT); +} + +/********************************************************************* + * display_board_info() - print banner with board info. + *********************************************************************/ +void display_board_info(u32 btype) +{ + enum { + BOOTMODE_NOR, + BOOTMODE_ONND, + BOOTMODE_NAND, + BOOTMODE_MMC + }; + + char *bootmode[] = { + "NOR", + "ONND", + "NAND", + "MMC" + }; + u32 brev = get_board_rev(); + char cpu_3430s[] = CONFIG_OMAP3_SOC_NAME; + char db_ver[] = "0.0"; /* board type */ + char mem_sdr[] = "mSDR"; /* memory type */ + char mem_ddr[] = "mDDR"; + char t_tst[] = "TST"; /* security level */ + char t_emu[] = "EMU"; + char t_hs[] = "HS"; + char t_gp[] = "GP"; + char unk[] = "?"; +#ifdef CONFIG_LED_INFO + char led_string[CONFIG_LED_LEN] = { 0 }; +#endif + +#if defined(L3_200MHZ) + char p_l3[] = "200"; +#elif defined(L3_165MHZ) + char p_l3[] = "165"; +#elif defined(L3_110MHZ) + char p_l3[] = "110"; +#elif defined(L3_133MHZ) + char p_l3[] = "133"; +#elif defined(L3_100MHZ) + char p_l3[] = "100"; +#endif + +#if defined(PRCM_PCLK_OPP1) + char p_cpu[] = "1"; +#elif defined(PRCM_PCLK_OPP2) + char p_cpu[] = "2"; +#elif defined(PRCM_PCLK_OPP3) + char p_cpu[] = "3"; +#elif defined(PRCM_PCLK_OPP4) + char p_cpu[] = "4"; +#endif + char *cpu_s, *db_s, *mem_s, *sec_s; + u32 cpu, rev, sec; + + rev = get_cpu_rev(); + cpu = get_cpu_type(); + sec = get_device_type(); + + if (is_mem_sdr()) + mem_s = mem_sdr; + else + mem_s = mem_ddr; + + cpu_s = cpu_3430s; + + db_s = db_ver; + db_s[0] += (brev >> 4) & 0xF; + db_s[2] += brev & 0xF; + + switch (sec) { + case TST_DEVICE: + sec_s = t_tst; + break; + case EMU_DEVICE: + sec_s = t_emu; + break; + case HS_DEVICE: + sec_s = t_hs; + break; + case GP_DEVICE: + sec_s = t_gp; + break; + default: + sec_s = unk; + } + + printf("OMAP%s-%s rev %d, CPU-OPP%s L3-%sMHz\n", cpu_s, sec_s, rev, + p_cpu, p_l3); + printf("OMAP" CONFIG_OMAP3_SOC_NAME " " CONFIG_BOARD_NAME " %s Version + %s (Boot %s)\n", db_s, + mem_s, bootmode[BOOTMODE_MMC]); + printf("Machine: %lu, Revision: %x\n", gd->bd->bi_arch_number, get_board_rev()); +#ifdef CONFIG_LED_INFO + /* Format: 0123456789ABCDEF + * 3430C GP L3-100 NAND + */ + sprintf(led_string, "%5s%3s%3s %4s", cpu_s, sec_s, p_l3, + bootmode[2]); + /* reuse sec */ + for (sec = 0; sec < CONFIG_LED_LEN; sec += 2) { + /* invert byte loc */ + u16 val = led_string[sec] << 8; + val |= led_string[sec + 1]; + __raw_writew(val, LED_REGISTER + sec); + } +#endif + +} + +/******************************************************** + * get_base(); get upper addr of current execution + *******************************************************/ +u32 get_base(void) +{ + u32 val; + __asm__ __volatile__("mov %0, pc \n":"=r"(val)::"memory"); + val &= 0xF0000000; + val >>= 28; + return (val); +} + +/******************************************************** + * running_in_flash() - tell if currently running in + * flash. + *******************************************************/ +u32 running_in_flash(void) +{ + if (get_base() < 4) + return (1); /* in flash */ + return (0); /* running in SRAM or SDRAM */ +} + +/******************************************************** + * running_in_sram() - tell if currently running in + * sram. + *******************************************************/ +u32 running_in_sram(void) +{ + if (get_base() == 4) + return (1); /* in SRAM */ + return (0); /* running in FLASH or SDRAM */ +} + +/******************************************************** + * running_in_sdram() - tell if currently running in + * sdram. + *******************************************************/ +u32 running_in_sdram(void) +{ + if (get_base() > 4) + return (1); /* in sdram */ + return (0); /* running in SRAM or FLASH */ +} + +/*************************************************************** + * get_boot_type() - Is this an XIP type device or a stream one + * bits 4-0 specify type. Bit 5 sys mem/perif + ***************************************************************/ +u32 get_boot_type(void) +{ + u32 v; + + v = get_sysboot_value() & (BIT4 | BIT3 | BIT2 | BIT1 | BIT0); + return v; +} + +/************************************************************* + * get_device_type(): tell if GP/HS/EMU/TST + *************************************************************/ +u32 get_device_type(void) +{ + int mode; + mode = __raw_readl(CONTROL_STATUS) & (DEVICE_MASK); + return (mode >>= 8); +}