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>
ehci-fsl.c: In function 'ehci_hcd_init':
ehci-fsl.c:43: error: 'CONFIG_SYS_FSL_USB_ADDR' undeclared (first use in this function)
ehci-fsl.c:43: error: (Each undeclared identifier is reported only once
ehci-fsl.c:43: error: for each function it appears in.)
make[1]: *** [ehci-fsl.o] Error 1
John Schmoller [Wed, 29 Sep 2010 19:05:44 +0000 (14:05 -0500)]
ppc: Don't initialize write protected NOR flashes
If a NOR flash is write protected it can not be initialized/detected so
add the ability for boards to skip NOR initialization on bootup. A
board can skip NOR initialization by implementing the
board_flash_wp_on() function.
Signed-off-by: John Schmoller <jschmoller@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> CC: sr@denx.de Acked-by: Stefan Roese <sr@denx.de>
Steve Sakoman [Wed, 20 Oct 2010 13:07:44 +0000 (06:07 -0700)]
ARMV7: OMAP: I2C driver: Use same timeout value as linux kernel driver
This patch matches the poll interval (1 millisecond) and timeout (1 second)
used in the linux driver. It also adds a return value of 0 in the event of
a timeout error and cleans up some formatting errors in that section of the
code.
Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org> Tested-by: Heiko Schocher <hs@denx.de>
Stefan Roese [Fri, 15 Oct 2010 06:41:01 +0000 (08:41 +0200)]
ppc4xx: Fix default environment for AMCC boards
Commit 0ad7f0950a9bc0a69b3cd5f34ccf7da25fcf1c6d [ppc4xx: cleanup
default environment for AMCC boards] broke the default env for
many PPC4xx boards. The '\0' character got removed at the end
of some environment commands like "update". This patch adds the
missing '\0' characters again.
Stefan Roese [Mon, 11 Oct 2010 13:50:10 +0000 (15:50 +0200)]
ppc4xx: Enable NOR flash support in sequoia_ramboot target
Until now, the Sequoia RAM-booting image disabled NOR flash support
as this image was mainly created for NAND-only boards. This patch
now enables NOR flash support for this RAM-booting version as well.
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.
Aaron Sierra [Thu, 30 Sep 2010 17:22:16 +0000 (12:22 -0500)]
85xx: Add support for not releasing secondary cores via 'mp_holdoff'
Some OSes require that secondary cores not be initialized when they
are booted (eg VxWorks). By default when U-Boot is compiled with the
CONFIG_MP option all secondary cores are brought out of reset and held
in spinloops. Setting the "mp_holdoff" environment variable to 'yes'
or '1' will cause U-Boot to leave secondary cores in their default
state.
Signed-off-by: Aaron Sierra <asierra@xes-inc.com> Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
York Sun [Mon, 18 Oct 2010 20:46:49 +0000 (13:46 -0700)]
Adding fixed sdram setting for cornet_ds board
800, 900, 1000, 1200MT/s data rate parameters are added for fixed sdram
setting. SPD based parameters and fixed parameters can be toggled by hwconfig.
To use fixed parameters,
York Sun [Tue, 28 Sep 2010 22:20:33 +0000 (15:20 -0700)]
Add memory test feature for mpc85xx POST.
The memory test is performed after DDR initialization when U-boot stills runs
in flash and cache. On recent mpc85xx platforms, the total memory can be more
than 2GB. To cover whole memory, it needs be mapped 2GB at a time using a
sliding TLB window. After the testing, DDR is remapped with up to 2GB memory
from the lowest address as normal.
If memory test fails, DDR DIMM SPD and DDR controller registers are dumped for
further debugging.
Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi [Mon, 24 May 2010 20:10:25 +0000 (15:10 -0500)]
always relocate fdt into an lmb-allocated memory block
The device tree (fdt) must always exist in within the bootmap (usually the
first 16MB of RAM). If it doesn't, then boot_relocate_fdt() will allocate
an LMB region in the bootmap and copy the fdt into that region. It will
also increase the size of the fdt.
If the fdt is already in the bootmap, then previously the memory was just
reserved. There was no contingency if the reservation failed, however.
By always allocating an lmb region and copying/resizing the fdt into that
region, the code is simplified and the memory region is always allocated
properly.
Also change the types of some variables to avoid some typecasts.
Signed-off-by: Timur Tabi <timur@freescale.com> Tested-by: Ira Snyder <iws@ovro.caltech.edu> Acked-by: Gerald Van Baren <vanbaren@cideas.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
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>