Wolfgang Denk [Thu, 28 Oct 2010 18:52:49 +0000 (20:52 +0200)]
Drop support for CONFIG_SKIP_RELOCATE_UBOOT
For ARM systems, before ELF relocation was introduced,
CONFIG_SKIP_RELOCATE_UBOOT coul be used to prevent *COPYING* the
U-Boot image from whereever it was loaded to it's link address
(CONFIG_SYS_TEXT_BASE). The name was badly chosen, as no relocation
was performed at all, it was just a memcpy().
With ELF relocation, this does not work like that any more, and
related boards need to be fixed anyway. So don't keep this relict any
longer.
Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
Wolfgang Denk [Thu, 28 Oct 2010 18:35:36 +0000 (20:35 +0200)]
Drop support for CONFIG_SYS_ARM_WITHOUT_RELOC
When this define was introduced, the idea was to provide a soft
migration path for ARM boards to get adapted to the new relocation
support. However, other recent changes led to a different
implementation (ELF relocation), where this no longer works. By now
CONFIG_SYS_ARM_WITHOUT_RELOC does not only not help any more, but it
actually hurts because it obfuscates the actual code by sprinkling it
with lots of dead and non-working debris.
So let's make a clean cut and drop CONFIG_SYS_ARM_WITHOUT_RELOC.
Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
Wolfgang Denk [Thu, 28 Oct 2010 18:00:11 +0000 (20:00 +0200)]
Replace CONFIG_RELOC_FIXUP_WORKS by CONFIG_NEEDS_MANUAL_RELOC
By now, the majority of architectures have working relocation
support, so the few remaining architectures have become exceptions.
To make this more obvious, we make working relocation now the default
case, and flag the remaining cases with CONFIG_NEEDS_MANUAL_RELOC.
Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Reinhard Meyer <u-boot@emk-elektronik.de>
Tanmay Upadhyay [Thu, 28 Oct 2010 14:36:22 +0000 (20:06 +0530)]
Kirkwood: bugfix: DRAM size initialization
If start of any DRAM bank is greater than total DDR size, remaining DDR banks' start address & size were left un-initialized in dram_init function. This could break other functions who uses array 'gd->bd->bi_dram'. Kirkwood network driver is one example. This also stops Linux kernel from booting.
v2 - Set start address also to 0. Without this Linux kernel couldn't
boot up
After moving the definition of CONFIG_SYS_TEXT_BASE to the respective
board config files, all Marvell kirkwood board have just a single and
common entry in their config.mk files:
Replace the only reference to KWD_CONFIG in the top level Makefile by
an equivalent setting, and remove all kirkwood config.mk files.
Signed-off-by: Wolfgang Denk <wd at denx.de> Cc: Prafulla Wadaskar <prafulla at marvell.com> Cc: Siddarth Gore <gores at marvell.com> Cc: Simon Kagstrom <simon.kagstrom at netinsight.net> Cc: Heiko Schocher <hs at denx.de> Cc: Eric Cooper <ecc at cmu.edu> Acked-by: Wolfgang Denk <wd at denx.de> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Shawn Guo [Wed, 27 Oct 2010 15:36:04 +0000 (23:36 +0800)]
mx51evk: Fix 2 hours reset issue
The mx51evk u-boot has an issue that system will get reset
every 2 hours.
MC13892 has an inside charge timer which expires in 120 minutes.
If ICHRG and CHGAUTOB are not set properly, this timer expiration
will get system power recycled.
Since mx51evk has no Li-Ion battery on board, the patch sets
ICHRG in externally powered mode and sets CHGAUTOB bit to avoid
automatic charging, so that system will not get reset by this
timer expiration.
The patch also corrects the bit field definition of register 48
(Charger 0) per latest MC13892 Reference Manual.
Matthias Weisser [Wed, 27 Oct 2010 14:34:38 +0000 (16:34 +0200)]
imx25: Fix reset
This patch fixes the reset command on imx25. The watchdog registers are 16
bits in size and not 32. This patch also adds the service register codes as
constants.
Jason Liu [Thu, 21 Oct 2010 01:11:47 +0000 (09:11 +0800)]
MX5:use common u-boot.lds of cpu layer
Remove u-boot.lds from mx5 and use the common u-boot.lds
of cpu layer. This patch also fix the building errors:
arch/arm/cpu/armv7/start.o: In function `_rel_dyn_start_ofs':
arch/arm/cpu/armv7/start.S:283: undefined reference to `__rel_dyn_start'
arch/arm/cpu/armv7/start.o: In function `_rel_dyn_end_ofs':
arch/arm/cpu/armv7/start.S:283: undefined reference to `__rel_dyn_end'
arch/arm/cpu/armv7/start.o: In function `_dynsym_start_ofs':
arch/arm/cpu/armv7/start.S:283: undefined reference to `__dynsym_start'
Mike Frysinger [Tue, 19 Oct 2010 06:48:34 +0000 (02:48 -0400)]
Blackfin: config.mk: drop manual stripping of config vars
Now that the common code takes care of stripping away quotes and such
from numeric options, we no longer need to do so ourselves. So drop
the custom code we have in the Blackfin config.mk.
Mike Frysinger [Thu, 28 Oct 2010 01:10:58 +0000 (21:10 -0400)]
Blackfin: fix building after asm-offsets.h intro
Since some of the defines in our config.h use the generated defines, we
need to include the generated header. This fixes building of the Blackfin
start.S file (where the stack is setup).
Lei Wen [Thu, 14 Oct 2010 05:38:11 +0000 (13:38 +0800)]
mmc: seperate block number into small parts for multi-write cmd
Constraint the mmc framework to only send no more than 65535
blocks in one go during the multi-write command. This constraint
comes due to the limitation of 16bit width block counter register
at some hardware.
Signed-off-by: Lei Wen <leiwen@marvell.com> Cc: Reinhard Meyer <u-boot@emk-elektronik.de>
Stefano Babic [Wed, 27 Oct 2010 09:06:20 +0000 (11:06 +0200)]
env_sf: updated to the new environment code
Functions to store/retrieve the environment from a SPI flash was not updated
to the new environment code. The non-redundant case was
not working correctly, reporting ""Environment SPI flash not initialized"
and the code was not compiled clean in the redundant case.
The patch fixes these issue and makes the code more coherent
with other environment storage (nand, flash).
Wolfgang Denk [Wed, 27 Oct 2010 06:31:42 +0000 (08:31 +0200)]
make-asm-offsets: fix sed script
When copying the "sed" script to generate the asm-offsets.h file from
the Linux Kbuild script into the make-asm-offsets file I missed the
fact that the former runs in a "make" context and thus uses double
"$$" to escape a single "$", while the latter is a shell script, where
this must not be done. Unfortunately the problem did not show up
during the initial tests on Power Architecture systems, but on ARM the
generated asm-offsets.h was not correct.
Signed-off-by: Wolfgang Denk <wd@denx.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
Wolfgang Denk [Wed, 27 Oct 2010 08:29:56 +0000 (10:29 +0200)]
mcu25: fix out of tree building
Out of tree building of the Netstal mcu25 board failed like
that:
Configuring for mcu25 board...
Assembler messages: Fatal error: can't create /work/wd/tmp-ppc/board/netstal/mcu25/../common/fixed_sdram.o: No such file or directory
Assembler messages: Fatal error: can't create /work/wd/tmp-ppc/board/netstal/mcu25/../common/nm_bsp.o: No such file or directory
Adapt (and simplify) the Makefile.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Niklaus Giger <niklaus.giger@netstal.com>
Wolfgang Denk [Tue, 26 Oct 2010 21:42:23 +0000 (23:42 +0200)]
Revert "cmd_net: drop spurious comma in U_BOOT_CMD"
This commit causes build errors like this:
cmd_net.c:301:1: error: macro "U_BOOT_CMD" requires 6 arguments, but only 5 given
cmd_net.c:298: warning: data definition has no type or storage class
cmd_net.c:298: warning: type defaults to 'int' in declaration of 'U_BOOT_CMD'
Wolfgang Denk [Tue, 26 Oct 2010 21:22:36 +0000 (23:22 +0200)]
post/drivers/i2c.c: fix compile error
Commit 7e263ce "post/i2c: Clean up detection logic" added a "const"
qualifier to the declaration of i2c_addr_list[], missing the fact that
the list gets modified later in the code, which results in build
errors like these:
i2c.c: In function 'i2c_post_test':
i2c.c:88: error: assignment of read-only location
Remove the incorrect "const".
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
Wolfgang Denk [Sat, 23 Oct 2010 21:22:38 +0000 (23:22 +0200)]
ARM: use the same branch insn on all architectures
For the "fixloop" implementation in start.S a number of different
instructions was used. Unify code so all architectures use "blo"
here because it is more robust in case of incorrect alignments.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Albert ARIBAUD <albert.aribaud@free.fr> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Sandeep Paulraj <s-paulraj@ti.com> Cc: Prafulla Wadaskar <prafulla@marvell.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Acked-by: Heiko Schocher <hs@denx.de>
Darius Augulis [Mon, 25 Oct 2010 10:48:03 +0000 (13:48 +0300)]
arm1176: fix relocation
Fix relocation code for arm1176, do it like other ARM
CPU's are doing.
Tested only with CONFIG_SKIP_RELOCATE_UBOOT defined
and using nand_spl (booting from nand). Test done on
s3c6410 based board (not yet supported in main line).
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Wolfgang Denk [Tue, 26 Oct 2010 12:34:52 +0000 (14:34 +0200)]
Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated value
CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not
being able to use "sizeof(struct global_data)" in assembler files.
Recent experience has shown that manual synchronization is not
reliable enough. This patch renames CONFIG_SYS_GBL_DATA_SIZE into
GENERATED_GBL_DATA_SIZE which gets automatically generated by the
asm-offsets tool. In the result, all definitions of this value can be
deleted from the board config files. We have to make sure that all
files that reference such data include the new <asm-offsets.h> file.
No other changes have been done yet, but it is obvious that similar
changes / simplifications can be done for other, related macro
definitions as well.
Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
A recurrent issue is that certain C level constructs like sizeof() or
offsetof() cannot be used in assembler files, which is inconvenient
when such constructs are used in the definition of macro names etc.
To avoid duplication of such definitions (and thus another cause of
problems), we adapt the Linux way to automatically generate the
respective definitions from the respective C header files.
In Linux, this is implemented in include/linux/kbuild.h, Kbuild, and
arch/*/kernel/asm-offsets.c; we adapt the code from the Linux v2.6.36
kernel tree.
We also copy the concept of the include/generated/ directory which can
be used to hold other automatically generated files as well.
We start with an architecture-independent lib/asm-offsets.c which
generates include/generated/generic-asm-offsets.h (included by
include/asm-offsets.h, which is what will be referred to in the actual
source code). Later this may be extended by architecture-specific
arch/*/lib/asm-offsets.c files that will generate a
include/generated/asm-offsets.h.
Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
Wolfgang Denk [Tue, 26 Oct 2010 11:32:32 +0000 (13:32 +0200)]
Rename CONFIG_SYS_INIT_RAM_END into CONFIG_SYS_INIT_RAM_SIZE
CONFIG_SYS_INIT_RAM_END was a misnomer as it suggests this might be
some end address; to make the meaning more clear we rename it into
CONFIG_SYS_INIT_RAM_SIZE
No other code changes are performed in this patch, only minor editing
of white space (due to the changed length) and the comments was done,
where noticed.
Note that the code for the PATI and cmi_mpc5xx board configurations
looks seriously broken. Last known maintainers on Cc:
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Denis Peter <d.peter@mpl.ch> Cc: Martin Winistoerfer <martinwinistoerfer@gmx.ch> Acked-by: Kumar Gala <galak@kernel.crashing.org>
Steve Sakoman [Fri, 22 Oct 2010 20:48:00 +0000 (13:48 -0700)]
ARMV7: OMAP: I2C driver: Fix bug found in 37XX testing
On OMAP36/37XX the standard on chip pullups are not sufficient to
ensure proper i2c operation without external pullups or switching
to high speed mode and enabling special on chip pullups.
This is an issue for Beagle xM, which does not have external pullups
on the expansion board i2c lines.
The issue manifests itself as an AL (arbitration lost) error when
probing for a non-existent device (i.e. on a Beagle xM with no expansion
boards attached). This issue does not occur on expansion boards that
include pullups or on Overo 37XX COM's since they include pull-ups.
This patch fixes the issue by checking for the AL bit in the i2c_probe
function.
Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Wolfgang Denk [Sun, 24 Oct 2010 14:49:12 +0000 (16:49 +0200)]
hcu4, hcu5: fix out of tree building
Out of tree building of the Netstal hcu4 and hcu5 boards failed like
that:
Assembler messages:
Fatal error: can't create /work/wd/tmp-ppc/board/netstal/hcu4/../common/fixed_sdram.o: No such file or directory
Assembler messages:
Fatal error: can't create /work/wd/tmp-ppc/board/netstal/hcu4/../common/nm_bsp.o: No such file or directory
make[1]: *** [/work/wd/tmp-ppc/board/netstal/hcu4/../common/fixed_sdram.o] Error 2
Adapt (and simplify) the respective Makefiles.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Niklaus Giger <niklaus.giger@netstal.com>
Wolfgang Denk [Sun, 24 Oct 2010 14:07:23 +0000 (16:07 +0200)]
MPC8315ERD: fix build error
Commit 29c6fbe "MPC5121: Add USB EHCI support" renamed
CONFIG_SYS_MPC8xxx_USB_ADDR into CONFIG_SYS_FSL_USB_ADDR but missed
to update arch/powerpc/cpu/mpc83xx/cpu_init.c, resulting in:
cpu_init.c: In function 'cpu_init_f':
cpu_init.c:332: error: 'CONFIG_SYS_MPC8xxx_USB_ADDR' undeclared (first use in this function)
cpu_init.c:332: error: (Each undeclared identifier is reported only once
cpu_init.c:332: error: for each function it appears in.)
make[1]: *** [/work/wd/tmp-ppc/arch/powerpc/cpu/mpc83xx/cpu_init.o] Error 1
Fix this.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Kim Phillips <kim.phillips@freescale.com>
Wolfgang Denk [Sun, 24 Oct 2010 13:37:12 +0000 (15:37 +0200)]
lite5200b_PM: fix compile warning
Fix warning:
icecube.c: In function 'lite5200b_wakeup':
icecube.c:83: warning: format '%08lx' expects type 'long unsigned int', but argument 2 has type 'void (*)(void)'
Kumar Gala [Fri, 22 Oct 2010 08:18:13 +0000 (03:18 -0500)]
hwconfig: Utilize getenv_f before relocation to allow for larger buffer
Since we use hwconfig in cases before relocation (like getting DDR
params on FSL PPC systems), we can have strings that exceed the early
small (32 byte) buffer size that getenv will handle.
So we explicitly allocate our own buffer on the stack and use if to
handle getting the hwconfig env string. We currently utilize a string
length of 128 bytes.
This allows us to get rid of boot messages like:
env_buf too small [32]
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Peter Tyser [Fri, 22 Oct 2010 05:24:52 +0000 (00:24 -0500)]
env_flash: Disable debug print statements
With debug the follow is printed:
=> saveenv
Saving Environment to Flash...
Data to save 0x18000
Data (start 0xfff48000, len 0x18000) saved at 0x7fe63f20
Protect off FFF40000 ... FFF5FFFF
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... Restoring the rest of data to 0xfff48000 len 0x18000
done
Protected 1 sectors
=>
Without debug:
=> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
=>
Ilya Yanok [Thu, 21 Oct 2010 15:20:13 +0000 (17:20 +0200)]
a4m072: add CONFIG_SYS_FLASH_BANKS_SIZES define
This patch adds CONFIG_SYS_FLASH_BANKS_SIZES define to make use of new
cfi_flash driver ability to detect flash chips that are bigger than a
corresponding address window (we have such situation on some revs of
a4m072).
On some boards we have flash mapped high in the address space with
considerably small window (say 0xFE000000 and 32MB). When we install
bigger chip (say 64MB) on such a board strange things happen
(flash_write() doesn't work at all, for ex). That's because cfi_flash
driver doesn't care about window size at all.
Of course, cleanest solution would probably be to just extend address
window to be able to map the whole flash but for legacy/compatibility
reasons some people prefer just truncate the flash size and never use
the upper part.
This patch adds an option for cfi_flash driver to handle this situation
properly. To achieve this we add the new function cfi_flash_bank_size()
which can be provided by the board code and weak-aliased to default
implementation that returns value from the CONFIG_SYS_FLASH_BANKS_SIZES
array if it's defined or 0 otherwise (the last case is added for
compatibility).
If non-zero flash bank size is provided and detected chip size is bigger
than provided address window size the warning will be displayed and
flash chip will be truncated.
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Changed cfi_flash_bank_size() return type to unsigned long
to match caller function. Signed-off-by: Wolfgang Denk <wd@denx.de>
Wolfgang Denk [Fri, 22 Oct 2010 12:23:00 +0000 (14:23 +0200)]
ehci-hcd.c: fix hanging under higher load
This patch solves a problem with USB hanging under higher load on a
i.MX31 board. It falls into class of typical USB problems and fixes:
if you don't understand the real cause, add a delay somewhere.
The problem appeared after introduction of ELF relocation, which
results in smaller code, which appears to run faster (probably because
it fits better in the cache); turning off the instruction cache,
adding debug printf()s and increasing the delay have all been found to
make the problem go away.
Moving the original "udelay(1)" up in the code to it's new place made
the problem appear much less frequently. Increasing the delay to 2
microseconds then made the code run reliably in all (hour-long) tests.
To be on the safe side, we set it to 5 microseconds here.
Signed-off-by: Heiko schocher <hs@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Stefano Babic <sbabic@denx.de>
Wolfgang Denk [Wed, 20 Oct 2010 19:08:17 +0000 (21:08 +0200)]
USB: fix Queue Element Transfer Descriptor changes
Commit 3ed1607 "USB: sync Queue Element Transfer Descriptor against
EHCI spec" added an "__attribute__ ((aligned (32)))" to the
declaration of struct qTD, as used for example in the Linux kernel as
well.
However, it turns out that this attribute causes errors in "usb start"
(like "ERROR: NOT USB_CONFIG_DESC 7b" and similar). Drop the attribute
again.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Dan Lykowski <lykowdk@gmail.com> Cc: Remy Bohmer <linux@bohmer.net> Cc: Stefano Babic <sbabic@denx.de>
Wolfgang Denk [Fri, 22 Oct 2010 12:08:13 +0000 (14:08 +0200)]
ehci-hcd.c: fix hanging under higher load
This patch solves a problem with USB hanging under higher load on a
i.MX31 board. It falls into class of typical USB problems and fixes:
if you don't understand the real cause, add a delay somewhere.
The problem appeared after introduction of ELF relocation, which
results in smaller code, which appears to run faster (probably because
it fits better in the cache); turning off the instruction cache,
adding debug printf()s and increasing the delay have all been found to
make the problem go away.
Moving the original "udelay(1)" up in the code to it's new place made
the problem appear much less frequently. Increasing the delay to 2
microseconds then made the code run reliably in all (hour-long) tests.
To be on the safe side, we set it to 5 microseconds here.
Signed-off-by: Heiko schocher <hs@denx.de> Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Stefano Babic <sbabic@denx.de>
John Schmoller [Fri, 22 Oct 2010 05:20:34 +0000 (00:20 -0500)]
XPedite5500 board support
Initial support for Extreme Engineering Solutions XPedite5500 -
a P2020-based PMC/XMC single board computer.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Peter Tyser [Fri, 22 Oct 2010 05:20:31 +0000 (00:20 -0500)]
post/i2c: Add ability to ignore I2C devices
Add the ability to not report an I2C POST error for a set of given I2C
addresses on bootup. This is useful for cases when a device may or may
not be present, and neither case is considered an error. For example:
- Some form factors such as XMC and Compact PCI Express have an I2C
EEPROM whose address changes based on geographical address. Eg
installed in one slot its EEPROM address is, 0x50, in another its
0x51, etc. This allows multiple devices to have their EEPROMs present
on the same I2C bus. Thus the I2C devices present for an XMC or
CPCIe card depend on if and where other cards are installed in the
same system.
- Some cards have optional I2C devices. Eg one hardware build
configuration has different I2C devices than another and software
can't determine if the optional device should be present or not.
- Some cards have optional daughtercards with I2C devices on them.
- I2C EEPROMs address range depends on their size. Its possible to
support differently size EEPROMs by only probing the EEPROM's base
address and ignoring the other addresses that are impacted by its
size.
A new CONFIG_SYS_POST_I2C_IGNORES define has been added which specifies
a list of I2C addresses for the I2C POST to ignore.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Peter Tyser [Fri, 22 Oct 2010 05:20:30 +0000 (00:20 -0500)]
post/i2c: Rename I2C_ADDR_LIST to CONFIG_SYS_POST_I2C_ADDRS
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Peter Tyser [Fri, 22 Oct 2010 05:20:29 +0000 (00:20 -0500)]
post/i2c: Don't probe address 0
According to the I2C specification device address 0 is the "general call
address", ie a broadcast address. The I2C specification states that the
format of a general call uses at least 2 bytes, which U-Boot's probing
routine does not adhere to.
Not probing device address 0 will prevent possible issues with devices
that accept general calls. Additionally, this change shouldn't reduce
POST coverage since each I2C device should still be accessed via its
own, unique address.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Peter Tyser [Fri, 22 Oct 2010 05:20:28 +0000 (00:20 -0500)]
post/i2c: Clean up detection logic
The logic previously used in the I2C post was a bit convoluted.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Peter Tyser [Fri, 22 Oct 2010 05:20:27 +0000 (00:20 -0500)]
post/i2c: General clean up
- Clean up ifdeffery
- Update coding style
No functional change should have occurred.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Peter Tyser [Fri, 22 Oct 2010 05:20:26 +0000 (00:20 -0500)]
xes: Make X-ES board names more generic
Some U-Boot images for X-ES boards support multiple products in the same
family. For example, the XPedite5370, XPedite5371, and XPedite5372 are
similar enough that one U-Boot image can work on all 3 cards. To make it
clear that a U-Boot image can work on boards of the same family, rename
the boards with the least significant digit of 'x'.
While we're at it, change the board config file and make targets to be
lowercase.
Also change the default uImage and fdt filenames to "board.uImage" and
"board.dtb" to be more generic.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
John Schmoller [Fri, 22 Oct 2010 05:20:25 +0000 (00:20 -0500)]
xes: Add board_flash_wp_on()
Add board_flash_wp_on() to check a pca9557 gpio pin to see
if non-volatile memory write protection is enabled.
Previously, write protected NOR flashes would fail initialization which
resulted in a bootup error such as:
...
DTT: 53 C local / 64 C remote (adt7461@4c)
DTT: 54 C local (ds1621@48)
FLASH: Executed from FLASH1
POST memory PASSED
FLASH: ## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
## Unknown FLASH on Bank 2 - Size = 0x00000000 = 0 MB
*** failed ***
### ERROR ### Please RESET the board ###
With this patch, NOR flash initialization is skipped:
...
DTT: 53 C local / 64 C remote (adt7461@4c)
DTT: 54 C local (ds1621@48)
FLASH: Executed from FLASH1
POST memory PASSED
FLASH: Uninitialized - Write Protect On
L2: 1024 KB enabled
NAND: 1024 MiB
...
Note that flash related commands such as flinfo and saveenv will error
out when flash write protection is enabled.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
John Schmoller [Fri, 22 Oct 2010 05:20:24 +0000 (00:20 -0500)]
xes: Consolidate checkboard()
Create a common checkboard() function to support all X-ES's Freescale
boards.
Also, add a get_board_derivative() function which reads hardware
strapping resistors to determine what model a board is. This allows one
U-Boot image to support multiple boards.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
John Schmoller [Fri, 22 Oct 2010 05:20:23 +0000 (00:20 -0500)]
pci: Add ability to re-enumerate PCI buses
Add a new 'pci enum' command which re-enumerates the PCI buses. This
command is enabled via the CONFIG_CMD_PCI_ENUM define and can be useful
in boards with FPGAs connected via PCI/PCIe, boards that support PCI
hot-plugging, or during PCI debug.
Also enable the 'pci enum' command for X-ES's Freescale-based boards.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Wolfgang Denk <wd@denx.de>