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>
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>
Stefano Babic [Wed, 13 Oct 2010 10:17:14 +0000 (12:17 +0200)]
MX51: Add video support
Add framebuffer driver for the MX51 processor
working on the IPUv3 internal graphic processor.
The port is based on the driver found in the kernel
delivered by Freescale as part of i.MX BSP:
Stefano Babic [Wed, 13 Oct 2010 10:16:35 +0000 (12:16 +0200)]
MX51: Add IPU driver for video support
The patch is a porting of the IPU Linux driver
developed by Freescale to have framebuffer
functionalities in u-boot. The port is based on
kernel 2.6.31 commit cc4fe714041805997b601fe8e5dd585d8a99297f,
as delivered by Freescale [i.MX BSP].
Most features are dropped from the original driver and
only LCD support is the goal of this porting.
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>