Stefan Roese [Thu, 7 Oct 2010 12:16:25 +0000 (14:16 +0200)]
ppc4xx/POST: Add board specific UART POST test to lwmon5
Add CONFIG_POST_UART to implement a board specific UART POST test.
This is done since lwmon5 needs to set POST_ALWAYS to run this
test on each reboot. And we don't want to change the default
behavious of this this.
Stefano Babic [Wed, 20 Oct 2010 06:51:45 +0000 (08:51 +0200)]
FAT: buffer overflow with FAT12/16
Last commit 3831530dcb7b71329c272ccd6181f8038b6a6dd0a was intended
"explicitly specify FAT12/16 root directory parsing buffer size, instead
of relying on cluster size". Howver, the underlying function requires
the size of the buffer in blocks, not in bytes, and instead of passing
a double sector size a request for 1024 blocks is sent. This generates
a buffer overflow with overwriting of other structure (in the case seen,
USB structures were overwritten).
Wolfgang Denk [Wed, 20 Oct 2010 06:59:16 +0000 (08:59 +0200)]
common/fdt_support.c: Fix compile warnings
Commit a6bd9e8 "FDT: Add fixup support for multiple banks of memory"
removed code but forgot to remove the variables used by it, resulting
in warnings:
fdt_support.c: In function 'fdt_fixup_memory_banks':
fdt_support.c:399: warning: unused variable 'sizecell'
fdt_support.c:399: warning: unused variable 'addrcell'
Wolfgang Denk [Tue, 19 Oct 2010 14:13:15 +0000 (16:13 +0200)]
USB: sync Queue Element Transfer Descriptor against EHCI spec
Appendix B "EHCI 64-Bit Data Structures" of the "Enhanced Host
Controller Interface Specification for Universal Serial Bus" (Rev.
1.0, March 12, 2002) defines additional fields which were missing in
U-Boot's struct qTD; as these are also present in recent versions of
struct ehci_qtd in the Linux kernel, we add them here, too.
This fixes some nasty memory corruption problems.
Reported-by: Dan Lykowski <lykowdk@gmail.com>
See http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/76942
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Dan Lykowski <lykowdk@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Tested-by: Stefano Babic <sbabic@denx.de>
This patch adds support for the HP Jornada flashboards
that were made in 2008. Older flashroms should work if
memory registers are adjusted.
Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Adpted for TEXT_BASE -> CONFIG_SYS_TEXT_BASE rename.
Removed now redundant board/jornada/config.mk file.
Removed unused empty jornada_init() function to silence
"jornada.c:35: warning: 'jornada_init' defined but not used"
Mike Frysinger [Thu, 14 Oct 2010 02:58:23 +0000 (22:58 -0400)]
Makefile: allow boards to check file size limits
Boards often have a reserved size limit on the flash where they're stored.
Sometimes during upgrades or config changes, those limits are exceeded,
but no one notices until they try to upgrade and the limit screws things
up. Either not enough of U-Boot is written to flash (and so the reboot
fails), or too much is written (and so things after it get clobbered).
So allow boards to declare a size limit (in bytes) and have the build
system check it while building.
Marek Vasut [Tue, 28 Sep 2010 13:44:10 +0000 (15:44 +0200)]
PXA: Fix reloc, Push lowlevel init into C code
Firstly, this fixes relocation issues. I had to use part of Dcache as RAM for a
while. I also moved around the lowlevel init code. It turned out so most of the
lowlevel init code ended in cpu.c (and eventually was rewritten into C).
This will also allow easier operation with FDT, multi-CPU-model support etc. in
later releases.
NOTE: This breaks most of the PXA boards (actually, the reloc stuff did already,
this only finishes the doom).
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
pxa_mem_setup macro use r6 to store CONFIG_SYS_MDREFR_VAL during memory
initialization. This reg is modified during execution of pxa_wait_ticks.
Later we use r6 to setup MDREFR[APD] bit. As result MDREFR[APD] is always
zero.
Marek Vasut [Thu, 22 Jul 2010 14:51:52 +0000 (16:51 +0200)]
PXA: Voipac270 improvements
128MB NOR module support.
Define __io to get harddrive working.
Fix saving of environment into OneNAND.
Boot from harddrive when possible.
Add missing MAINTAINERS entry.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
York Sun [Tue, 28 Sep 2010 22:20:31 +0000 (15:20 -0700)]
Expand POST memory test to support arch-depended implementation.
Add weak functions to enable architecture depended preparation, address
advancing, cleaning up and error handling.
These weak functions provides the framwork to implemente arch/platform
dependent code for initializing/maintenance/restore the start address, size,
physical address as well as memory mapping before/between/after memory test.
arch_memory_failure_handle can also be implemented in case more care is needed
for arch/platform.
Wolfgang Denk [Tue, 19 Oct 2010 19:46:25 +0000 (21:46 +0200)]
doc/README.scrapyard: add documentation for abandoned boards
Add a document to maintain a list of boards removed from the current
source tree, so archeologists can check more easily if here is
something they might want to dig for...
Reinhard Meyer [Tue, 5 Oct 2010 14:54:35 +0000 (16:54 +0200)]
AT91 clock/timer: move static data to global_data struct
clock.c / timer.c used static data and are called before relocation.
Move all static variables into global_data structure. Also cleanup
timer.c from unused stubs and make it truly use 64 bit tick values.
Andreas Bießmann [Mon, 18 Oct 2010 20:58:29 +0000 (22:58 +0200)]
at91rm9200ek: convert to at91
This patch removes some functionality from at91rm9200ek board but the
remaining functionality does now work with newer at91 code and
arm-relocation.
Currently missing features are:
- dataflash booting (due to missing HW for testing)
- MMC/SD-Card
- first stage bootloader support is completely removed (not needed for
NOR)
Cause this board was (some days ago) reference for all at91rm9200 based
boards this should be a good starting point to convert all remaining
at91rm9200 borads to at91 code. Aside from that this is a good base to
get some drivers between at91sam/at91rm/avr32 merged.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
Wolfgang Denk [Tue, 19 Oct 2010 09:27:05 +0000 (11:27 +0200)]
NC650/CP850: remove code for yet another corpse
The NC650 / CP850 boards have long been unmaintained and left broken.
As obviously nobody is interested in that code any more, we may as
well remove it.
Wolfgang Denk [Mon, 18 Oct 2010 21:43:37 +0000 (23:43 +0200)]
Rename TEXT_BASE: fix merge conflicts
Commit 14d0a02a "Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE" missed a
few places, especially for boards that were added inbetween. Fix the
remaining issues.
John Rigby [Wed, 13 Oct 2010 19:57:35 +0000 (13:57 -0600)]
boot: change some arch ifdefs to feature ifdefs
The routines boot_ramdisk_high, boot_get_cmdline and boot_get_kbd
are currently enabled by various combinations of CONFIG_M68K,
CONFIG_POWERPC and CONFIG_SPARC.
John Rigby [Wed, 13 Oct 2010 19:57:34 +0000 (13:57 -0600)]
FDT: only call boot_get_fdt from generic code
All arches except nios2 and microblaze call boot_get_fdt
from bootm_start in common/cmd_bootm.c.
Having nios2 and microblaze do so as well removes code from
their respective do_bootm_linux routines and allows removal of
a nasty ifdef from bootm_start.
In the case where boot_get_fdt returns an error bootm_start
returns and the platform specific do_bootm_linux routines
will never get called.
Also only check argv[3] for an fdt addr if argc > 3 first.
This is already the case for nios2.
Signed-off-by: John Rigby <john.rigby@linaro.org> CC: Scott McNutt <smcnutt@psyent.com> CC: Michal Simek <monstr@monstr.eu> CC: Thomas Chou <thomas@wytron.com.tw> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> Tested-by: Thomas Chou <thomas@wytron.com.tw>
John Rigby [Wed, 13 Oct 2010 19:57:32 +0000 (13:57 -0600)]
common/image.c remove extra calls to be32_to_cpu in boot_get_fdt
fdt_totalsize returns size in cpu endian so don't call be32_to_cpu
on the result. This was harmless on big endian platforms but not
on little endian ARMs.
John Rigby [Wed, 13 Oct 2010 19:57:31 +0000 (13:57 -0600)]
common/image.c fix length calculation in boot_relocate_fdt
boot_relocate_fdt is called on platforms with CONFIG_SYS_BOOTMAPSZ
defined to relocate the device tree blob to be inside the
boot map area between bootmap_base and bootmap_base+CONFIG_SYS_BOOTMAPSZ.
For the case where the blob needs to be relocated, space is
allocated inside the bootmap by calling lmb_alloc_base with
size passed in plus some padding:
of_len = *of_size + CONFIG_SYS_FDT_PAD;
For the case where the blob is already inside the bounds of the boot map
area, lmb_reserve is called to reserve the the space where the blob is
already residing. The calculation for this case is currently:
This is wrong because it reserves all the space in the boot map area
from the blob to the end ignoring completely the actual size. The
worst case is where the blob is at the beginning and the entire boot map
area get reserved. Fix this by changing the length calculation to this:
of_len = *of_size + CONFIG_SYS_FDT_PAD;
This bug has likely never manifested itself because bootm has never
been called with the fdt blob already in the bootmap area. In my
testing on an OMAP3 beagle board I initially worked around the bug
by simply moving the initial location of the fdt blob. I have tested
with the new calculation with the fdt blob both inside and outside
the boot map area.
Joakim Tjernlund [Thu, 14 Oct 2010 06:51:34 +0000 (08:51 +0200)]
dlmalloc.c: Fix gcc alias warning
Fix these warnings:
dlmalloc.c: In function 'free':
dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
Some page(http://blog.worldofcoding.com/2010/02/solving-gcc-44-strict-aliasing-problems.html)
suggests adding __attribute__((__may_alias__)). Doing so makes the warnings go away.
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Mike Frysinger <vapier@gentoo.org>
Peter Tyser [Fri, 15 Oct 2010 04:33:24 +0000 (23:33 -0500)]
powerpc: Cleanup BOOTFLAG_* references
Now that warm booting is not supported, there isn't a need for the
BOOTFLAG_COLD and BOOTFLAG_WARM defines, so remove them.
Note that this change makes the board info bd_bootflags field useless.
It will always be set to 0, but we leave it around so that we don't
break the board info structure that some OSes are expecting to be passed
from U-Boot.
MAINTAINERS: Fix alphabetical order in ARM subsection
I'm noticed that IGEP maintainer isn't in the correct place within
the ARM subsection: it's supposed to be in alphabetical order by
maintainer. This patch fix this.
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Wolfgang Denk [Sun, 17 Oct 2010 15:31:59 +0000 (17:31 +0200)]
config.mk cleanup: drop "-I$(TOPDIR)/board" entries
After the recent cleanups, a number of config.mk files consist only of
a "PLATFORM_CPPFLAGS += -I$(TOPDIR)/board" entry whih is not needed.
Remove such entries. In most cases, that means that the whole
config.mk file can be removed.
Wolfgang Denk [Wed, 6 Oct 2010 07:05:45 +0000 (09:05 +0200)]
Makefile: move all Power Architecture boards into boards.cfg
Clean up Makefile, and drop a lot of the config.mk files on the way.
We now also automatically pick all boards that are listed in
boards.cfg (and with all configurations), so we can drop the redundant
entries from MAKEALL to avoid building these twice.
Wolfgang Denk [Sat, 16 Oct 2010 21:50:51 +0000 (23:50 +0200)]
autoconfig.mk: avoid apostophes around hex values
When generating include/autoconfig.mk, hex numbers would be quoted.
This caused some false positives during automatic testing of the
builds, and is known to cause some real issues for some Blackfin
configurations. Don't use apostophes for decimal and hex numbers (nor
for octal numbers).
Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Wolfgang Denk [Thu, 7 Oct 2010 19:51:12 +0000 (21:51 +0200)]
Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE
The change is currently needed to be able to remove the board
configuration scripting from the top level Makefile and replace it by
a simple, table driven script.
Moving this configuration setting into the "CONFIG_*" name space is
also desirable because it is needed if we ever should move forward to
a Kconfig driven configuration system.
Wolfgang Denk [Mon, 4 Oct 2010 17:58:00 +0000 (19:58 +0200)]
mkconfig: change CONFIG_MK_ prefix into plain CONFIG_
When planning for more generalization and Makefile cleanup it became
obvious that the introduction of a separate CONFIG_MK_ name space for
config options that were set through scripting in the Makefile was
not a good idea.
Originally the idea was to provide a script-free approach to supply
configuration options - there was no real need for a separate name
space. But when we now convert the existing Makefile entries to make
use of this approach, it would mean that we have to touch a large
number of board config files and add #ifdef / #define sequences to
"convert" from the CONFIG_MK_ to the CONFIG_ name space.
It seems much cleaner to get rid of this somewhat arbitrary _MK
string now for the few boards that actually use it.
Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
Marek Vasut [Sun, 3 Oct 2010 22:34:17 +0000 (00:34 +0200)]
Build: Add "board options" column to boards.cfg
There are some boards where it's currently not possible to detect all
board information at runtime, therefore a new column was added to
boards.cfg .
This column can contain multiple options: a board configuration name,
optionally followed by a colon (':') and a list of options, which are
separated by comma (',').
In case of simple options like '256M_U_BOOT', these expand to
"#define CONFIG_MK_256M_U_BOOT 1" in config.h . In case of
assignments like 'RAM=8192', these expand to "#define CONFIG_MK_RAM
8192" in config.h .
Example:
FOO:HAS_BAR,BAZ=64
means:
- the name of the board config file is include/configs/FOO.h
- the generated file include/config.h will contain these
lines:
#define CONFIG_HAS_BAR 1
#define CONFIG_BAZ 64
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
[wd@denx.de: edited commit message; added code to deal with an
optional board configuration name]
Scott Wood [Wed, 13 Oct 2010 16:04:30 +0000 (11:04 -0500)]
Fix warning in nand unlock command
Commit ea533c260a801c4e51f92f75165cebe6d7b01e35 changed
arg_off_size to take a pointer to a device index, rather than
to the device itself. When updating callers, the nand unlock
code was missed.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Wolfgang Denk [Tue, 5 Oct 2010 20:03:23 +0000 (22:03 +0200)]
logodl: remove code for yet another corpse
The logodl board has long been unmaintained and left broken.
As obviously nobody is interestedin that code any more, we may as well
remove it.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: August Hoeraendl <august.hoerandl@gmx.at> Cc: Robert Schwebel <r.schwebel@pengutronix.de> Cc: Marek Vasut <marek.vasut@gmail.com>
Wolfgang Denk [Mon, 18 Oct 2010 19:32:14 +0000 (21:32 +0200)]
FPGA: fix support for non-Lattice devices
Commit 3b8ac464 "FPGA: add support for downloading Lattice bitstream"
added support for Lattice devices, but failed to add #ifdef's that are
needed when building for non-Lattice devices, which results in build
failures like these:
Configuring for GEN860T board...
drivers/fpga/libfpga.a(fpga.o): In function `fpga_dev_info':
/home/wd/git/u-boot/work/drivers/fpga/fpga.c:145: undefined reference to `lattice_info'
drivers/fpga/libfpga.a(fpga.o): In function `fpga_dump':
/home/wd/git/u-boot/work/drivers/fpga/fpga.c:269: undefined reference to `lattice_dump'
drivers/fpga/libfpga.a(fpga.o): In function `fpga_load':
/home/wd/git/u-boot/work/drivers/fpga/fpga.c:233: undefined reference to `lattice_load'
make: *** [u-boot] Error 1
Add the missing code.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefano Babic <sbabic@denx.de>
Stefano Babic [Mon, 18 Oct 2010 08:23:05 +0000 (10:23 +0200)]
MX31: add delay between USB port setup and reset
Sometimes a usb tree is not popolated after a system reset.
It seems a delay is required after setting the USB ports
for the MX.31 before resetting the ehci controller.
Ben Gardiner [Thu, 14 Oct 2010 21:26:32 +0000 (17:26 -0400)]
da850evm: fix linux bootparam address
This patch fixes the LINUX_BOOT_PARAM_ADDR define to be based off of
PHYS_SDRAM_1 instead of CONFIG_SYS_MEMTEST_START. On da830 they are the same
thing but on da850 the CONFIG_SYS_MEMSTART define is offset from the
PHYS_SDRAM_1 start.
Without this patch it is not possible to boot linux on da850 -- bootm hangs
at "Uncompressing Linux... done, booting the kernel."
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Ben Gardiner [Thu, 14 Oct 2010 21:26:29 +0000 (17:26 -0400)]
da850evm: basic MII EMAC support
The current da850evm support in u-boot/master omits any use of
the davinci EMAC. This patch adds basic support for the EMAC using
the MII PHY found on the baseboard of the EVM. The MAC address is
read from the environment variable 'ethadd'. Note that this is
different from the da850evm support in the u-boot omapl1 tree
where the MAC address is read from SPI flash.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> CC: Sandeep Paulraj <s-paulraj@ti.com> CC: Sudhakar Rajashekhara <sudhakar.raj@ti.com> CC: Ben Warren <biggerbadderben@gmail.com> CC: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Ben Gardiner [Thu, 14 Oct 2010 21:26:25 +0000 (17:26 -0400)]
da850evm: setup NAND support under CONFIG_USE_NAND
The current da850evm config is missing the pieces for NAND support that can be
found in Sandeep's u-boot-davinci tree [1].
This patch adds NAND support in the spirit of the support in the u-boot-davinci
tree where NAND support for the da850evm can be enabled by putting a single
'#define CONFIG_USE_NAND' at the top of the include/configs/da850evm.h file.
Ben Gardiner [Thu, 14 Oct 2010 21:26:22 +0000 (17:26 -0400)]
da850evm: setup the NAND flash timings
The default NAND flash timings are very conservative. This patch assigns the
timings reccomended in the recent linux kernel patch [1] from Sekhar Nori. The
speedup, as reported in that patch, is 5.3x for reads.
Ben Gardiner [Thu, 14 Oct 2010 21:26:19 +0000 (17:26 -0400)]
da850evm : enable NAND even when not in NAND boot mode
There is currently no NAND pinmux enabled by the da850evm board setup code.
This is fine when booting from NAND since the early boot code (UBL) will setup
the pinmux; however, when the boot mode is any other setting NAND is unusable
when enabled in the config.
This patch adds a pinmux list for NAND and enables it when NAND is enabled in
the config. Tested by booting from SPI on the da850evm and verifying NAND
was usable.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> CC: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Ben Gardiner [Thu, 14 Oct 2010 21:26:17 +0000 (17:26 -0400)]
davinci_nand, trivial : use symbolic ECC start command
The ECC calculations were started by writing 1 << 13 to the nand FCR register;
that value is also defined as DAVINCI_NANDFCR_4BIT_CALC_START in emif_defs.h.
This patch substitutes the macro DAVINCI_NANDFCR_4BIT_CALC_START for the
magic number '1 << 13'.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
The IGEP module is a low-power, high performance production-ready
system-on-module (SOM) based on TI's OMAP3 family.The IGEP module
solution based upon TI OMAP3 provides a low-power/low-cost platform
for a variety of consumer/industrial/medical devices.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
The IGEP v2 board is a low-cost, fan-less and industrial temperature
range single board computer that unleashes laptop-like performance and
expandability without the bulk, expense, or noise of typical desktop
machines. Its architecture shares much in common with other OMAP3 boards.
Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com> Acked-by: Steve Sakoman <steve.sakoman@linaro.org> Tested-by: Steve Sakoman <steve.sakoman@linaro.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
Steve Sakoman [Fri, 1 Oct 2010 04:46:52 +0000 (21:46 -0700)]
ARMV7: OMAP3: Fix bug in get_sdr_cs_offset()
This patch fixes a typo in the routine to calculate the cs offset
based upon the contents of the SDRC cs_cfg register. This function
mistakenly shifts the CS1STARTLOW field 17 bits right instead of
17 bits left.
This hasn't been an issue to date because all OMAP3 boards currently
are configured to have zeros in this field.
Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>