Simon Glass [Sat, 14 Jan 2012 15:24:44 +0000 (15:24 +0000)]
bootstage: Create an initial header for boot progress integers
At present boot_stage_progress() is called with various magic numbers. The
new bootstage.h header will be used to turn these into symbolic names
throughout the code.
The intent is not that these numbers are passed to Linux. In fact by using
an enum to track them we should eventually be able to remove the explict
numbers and just have the stages count up from 0.
Reinhard Arlt [Fri, 18 Nov 2011 09:06:52 +0000 (09:06 +0000)]
bootvx: Clear and disable data cache, and call vxWorks with parameter.
This patch clear and disable the data cache for vxWorks.
The entry point sysInit(int) intended by Windriver to be called from
the vxWorks bootrom, a very small vxWorks system.
The routine is called by the go() handler in the bootrom, that clears
the cache from start of image to end of usable memory.
The PowerPC implementations only invalidates and disable the cache,
the ARM implementations also flush it.
U-Boot will be on the safe side, if it disables the data cache before
calling vxWorks sysInit(int).
Mike Frysinger [Thu, 10 Nov 2011 14:11:04 +0000 (14:11 +0000)]
net/miiphy/serial: drop duplicate "NAMESIZE" define
A few subsystems are using the same define "NAMESIZE". This has been
working so far because they define it to the same number. However, I
want to change the size of eth_device's NAMESIZE, so rather than tweak
the define names, simply drop references to it. Almost no one does,
and the handful that do can easily be changed to a sizeof().
Reinhard Arlt [Thu, 10 Nov 2011 08:51:57 +0000 (08:51 +0000)]
CPCI750: Add CPCI-HD/2 support
This patch adds support for the esd CPCI-HD/2 board to u-boot for CPCI-CPU/750.
As the primary devices on the CPCI-HD/2 board are connected to device 1 and 3,
the device must be swapped.
Wolfgang Denk [Sat, 17 Mar 2012 20:50:59 +0000 (21:50 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-avr32
* 'master' of git://git.denx.de/u-boot-avr32:
atmel_mci.h: remove outdated register macros
doc/git-mailrc: add <me> to avr32 alias
ATMEL: remove old atmel_mci driver
ATMEL: use generic mmc framework
Andreas Bießmann [Tue, 13 Mar 2012 11:43:51 +0000 (12:43 +0100)]
atmel_mci.h: remove outdated register macros
New gen_atmel_mci driver does not use the outated register access macros. Since
the old atmel_mci driver is deleted these macros are no longer necessary.
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Sven Schnelle [Fri, 21 Oct 2011 12:49:25 +0000 (14:49 +0200)]
ATMEL: use generic mmc framework
gen_atmel_mci works on AVR32 as well, so no need to use the legacy
mmc driver. This also has the nice side effect of being able to use
SDHC cards an those boards.
Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Simon Glass [Wed, 15 Feb 2012 23:51:16 +0000 (15:51 -0800)]
sandbox: add getopt support
This adds simple command-line parsing to sandbox. The idea is that it
sets up the state with options provided, and this state can then be
queried later, as needed.
New flags are declared with the SB_CMDLINE_OPT_SHORT helper macro,
pointers are automatically gathered up in a special section, and
then the core code takes care of gathering them up and processing
at runtime. This way there is no central place where we have to
store a list of flags with ifdefs.
Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Simon Glass [Sun, 26 Feb 2012 22:38:50 +0000 (17:38 -0500)]
sandbox: allow processing before main loop
In order to pass command line arguments to sandbox we need to be able
to act on them. So take control back at the end of board_init_r() from
where we can call the main loop or do something else.
Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Simon Glass [Wed, 15 Feb 2012 23:51:15 +0000 (15:51 -0800)]
sandbox: add concept of sandbox state
The state exists through the life of U-Boot. It can be adjusted by command
line options and perhaps later through a config file. It is available to
U-Boot through state_...() calls (within sandbox code).
The primary purpose of this is to contain the "hardware" state. It should
only be used by sandbox internal code.
Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
The logic of this patch is broken - testing for CONFIG_SYS_POST_FPU in
the Makefile cannot work, as this is only a bit that may (or may not)
be set in the CONFIG_POST variable.
The patch cases build errors on a number of boards, so we revert it.
Stephen Warren [Tue, 1 Nov 2011 06:28:21 +0000 (06:28 +0000)]
image: Support FDTs already loaded at their load address
boot_get_fdt() expects a uImage-wrapped FDT to be loaded to a staging
location, and then memmove()s it to the load address specified in the
header. This change enhances boot_get_fdt() to detect when the image has
already been loaded to the correct address, and skip this memmove(). The
detection algorithm was written to match the equivalent for the kernel;
see bootm_load_os()'s IH_COMP_NONE case.
v2: New patch
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Simon Glass [Sat, 10 Dec 2011 08:44:01 +0000 (08:44 +0000)]
Convert cmd_usage() calls in common to use a return value
Change all files in common/ to use CMD_RET_USAGE instead of calling
cmd_usage() directly. I'm not completely sure about this patch since
the code since impact is small (100 byte or so on ARM) and it might
need splitting into smaller patches. But for now here it is.
Simon Glass [Tue, 14 Feb 2012 19:59:25 +0000 (19:59 +0000)]
Add cmd_process() to process commands in one place
We currently have the same code in hush.c and main.c. This brings the
code into one place.
As an added feature, if the command function returns CMD_RET_USAGE then
cmd_process() will print a usage message for the command before
returning the standard failure code of 1.
ARM code size increases about 32 bytes with this clean-up.
Simon Glass [Tue, 14 Feb 2012 19:59:21 +0000 (19:59 +0000)]
Stop using builtin_run_command()
Boards can select either the 'built-in' parser or the hush parser. We
should not call builtin_run_command() if we are using the hush parser.
We use run_command() instead, since it knows how to call the correct
parser.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
Simon Glass [Tue, 14 Feb 2012 19:59:19 +0000 (19:59 +0000)]
Rename run_command() to builtin_run_command()
The current run_command() is only one of the parsing options - the other
is hush. We should not call run_command() when the hush parser is being
used. So we rename this function to better explain its purpose.
Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Mon, 5 Mar 2012 11:55:32 +0000 (11:55 +0000)]
sc520: fix build warning about unused temp var
Building the eNET_SRAM board fails for me:
sc520_timer.c: In function 'sc520_udelay':
sc520_timer.c:81:7: error: variable 'temp' set but not used
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make[1]: *** [sc520_timer.o] Error 1
Linus Walleij [Sat, 3 Mar 2012 20:21:13 +0000 (21:21 +0100)]
integrator: remove fragile delay loop from PCI code
The reference implementation of the PCI initialization code almost
everywhere contain this fragile loop of "a few usecs", and its
use of volatile variables to delay a number of bus cycles is indeed
uncertain.
Reading the manual "Integrator/AP Users Guide", page 5-15 it is
clearly stated:
"Wait until 230ms after the end of the reset period before
accessing V360EPC internal registers. The V360EPC supports the
use of a serial configuration PROM and the software must wait for
the device to detect the absence of this PROM before accessing any
registers. The required delay is a function of the PCI Clock, but
at the lower frequency (25MHz) is 230ms".
So let's simply wait 230ms per the spec.
This solves the compilation error that looked like this:
pci.c: In function ‘pci_init_board’:
pci.c:286:18: warning: variable ‘j’ set but not used
Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Sat, 3 Mar 2012 10:05:08 +0000 (10:05 +0000)]
pci: move pciauto_config_init() to pci.h
Fixing build regressions for the Integrator I get find that a few
boards try to work around the missing declaration of
pciauto_config_init() by declaring it in the local scope. This
does not make sense when the sibling functions are in <pci.h>
so move the function to the header, ridding the build error
in the Integrator and getting rid of the local declarations
here and there.
Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Following the corresponding Linux code, this patch relaxes reset timings
waiting at least 100ms after power to the ports. There are some reports
that it helps make enumeration work better on some high speed devices.
Furthermore, the wait is only done once after power has been enabled
on all ports.
CC: Remy Bohmer <linux@bohmer.net> CC: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
This moves keyboard polling logic from USB HCD drivers into USB
keyboard driver. Remove usb_event_poll() as keyboard polling was
the only user of this API. With this patch USB keyboard works with
EHCI controllers again. Tested on a tegra2 seaboard.
Vincent Palatin [Mon, 9 Jan 2012 08:35:09 +0000 (08:35 +0000)]
USB: fix USB keyboard polling parameter
When doing a "GET_REPORT" request on the keyboard control endpoint,
the report ID should 0 (ie report ID not used) rather than 1
as reports are not used in boot mode.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Wolfgang Denk [Sat, 3 Mar 2012 14:13:41 +0000 (15:13 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-nds32
* 'master' of git://git.denx.de/u-boot-nds32:
nds32/board.c: add PCI prompt at boot up
nds32/ag101/watchdog.S: add linkage support
nds32: add linkage support
Fix build error for ethernut5 board due to prototype change
for function board_mmc_getcd().
ethernut5.c:238: error: conflicting types for 'board_mmc_getcd'
u-boot/include/mmc.h:318: note: previous declaration of 'board_mmc_getcd'
was here
make[2]: *** [ethernut5.o] Error 1
Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Tim Schendekehl <tim.schendekehl@egnite.de> Cc: Thierry Reding <thierry.reding@avionic-design.de> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: egnite GmbH <info@egnite.de>
Tom Rini [Thu, 23 Feb 2012 22:47:46 +0000 (15:47 -0700)]
cmd_nand.c: Fix 'nand dump' after latest MTD resync
With 2a8e0fc nand_do_read_ops changed in behavior slightly (keeping in sync
with the kernel which did this change in b64d39d8) such that the OOB data is
always copied into oobbuf and never appended to datbuf. Within U-Boot only
the nand_dump function (for the dump nand subcommand) was expecting the OOB
data to only be appended to datbuf. So we now change nand_dump to not
malloc extra space, correct the comment about datbuf and OOB data and switch
the pointer to oobbuf before printing.
Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Tom Rini <trini@ti.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
mtd/nand:Fix wrong usage of is_blank() in fsl_ifc_run_command
Freescale IFC NAND Machine calculates ECC on 512byte sector and same is used in
fsl_ifc_run_command() during ECC status verification. Also this sector is passed
to is_blank() for blank checking. It is wrong at first place because
is_blank()'s implementation checks for Page size and OOB area size.
is_blank() should be called per page for main and OOB area verification.
Variables name are redefined to avoid confusion between buffer and ecc sector.
It breaks boards that currently rely on soft-ecc, as pointed out here:
http://patchwork.ozlabs.org/patch/140872/
The reverted patch should be resubmitted with documentation, and with the
CONFIG_MTD_ECC_SOFT selected from every board that needs it. We could
start by looking at what NAND driver the board selects, and whether
that driver ever asks for soft ECC.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Aneesh V [Thu, 16 Feb 2012 03:40:15 +0000 (03:40 +0000)]
armv7: omap3: leave outer cache enabled
Mainline kernel for OMAP3 doesn't enable L2 cache
It expects L2$ to be enabled by ROM-code/bootloader.
Leaving L2$ enabled can be troublesome in cases where
the L2 cache is not under CP15 control, such as in
Cortex-A9. This problem is explained in detail in
the commit dc7100f4080952798413fb63bb4134b22c57623a
However, this problem doesn't apply to Cortex-A8
because L2$ in Cortex-A8 is under CP15 control and
hence the generic armv7 maintenance opertions work
for it.
As such we can make an exception for OMAP3 and
leave the L2$ enabled when we jump to kernel. This
is done by removing the strongly-linked implementation
of v7_outer_cache_disable() and allowing it to fall
back to the weakly linked implementation that doesn't
do anything.
Helmut Raiger [Wed, 15 Feb 2012 22:40:12 +0000 (22:40 +0000)]
tt01: add video support
The video setup for the Epson display is provided. Addtionally
some extra info is displayed next to the Linux logo.
Make get_cpu_rev() publicly available (added to sys_proto.h).
Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Troy Kisky [Tue, 7 Feb 2012 14:08:50 +0000 (14:08 +0000)]
i.mx6q: mx6qsabrelite: Update the network configuration
Define CONFIG_PHY_MICREL, and
minimize the tx clock delay.
There is an issue with 1000 baseTx mode on early revs
of the SabreLite boards. The center tap pin 9 of the mag RJ45
USB combo was connected to the 3.3 filtered supply. Letting
this pin float solved the problem. Symptoms of the problem
were packets with many extra zeroes tacked on the end, and random
bit flips causing a high rate of CRC errors. 10/100 baseTx worked
fine on all revs. To disable 1000 baseTx for these boards, simply
define the environment variable disable_giga. ie.
Troy Kisky [Tue, 7 Feb 2012 14:08:49 +0000 (14:08 +0000)]
net: phy: make board_phy_config responsible for calling drv->config
Boards may have things they want done before or after normal phy config.
Letting the boards call drv->config allows them more flexibilty.
Boards affected by this change are corenet_ds and mpc8544ds.
Troy Kisky [Tue, 7 Feb 2012 14:08:48 +0000 (14:08 +0000)]
net: phy: add support for Micrel's KSZ9021
Add the gigabit phy KSZ9021.
Also, add function ksz9021_phy_extended_write
/_read for access to the phys extended registers.
The environment variable "disable_giga"
can be used to disable 1000baseTx.
Troy Kisky [Tue, 7 Feb 2012 14:08:47 +0000 (14:08 +0000)]
net: fec_mxc: add PHYLIB support
Surround non PHYLIB routines miiphy_restart_aneg
and miiphy_wait_aneg with ifndef CONFIG_PHYLIB.
When later PHYLIB is required it is easy to delete
the non-PHYLIB code. This separation idea
came from Andy Fleming.
fec_miiphy_read, and fec_miiphy_write changed to
fec_phy_read, and fec_phy_write with argument changes.
Deprecated miiphy_register is no longer used. Both
old and new PHYLIB code now use mdio_register.
Cleanup some debug prints.
Inline function fec_miiphy_fec_to_eth is no longer necessary.
Moved to the single call location.
Linus Walleij [Tue, 31 Jan 2012 12:20:17 +0000 (12:20 +0000)]
integrator: update the Integrator/CP config
The Integrator/CP config file was very outdated and gives a
non functional U-Boot. So:
- Set the CONFIG_ARCH_CINTEGRATOR arch flag correctly
- Add proper core module configuration options
- Skip cluttered command lista and just include
<config_cmd_default.h>
- Kill off #if 0 network section and insert some example
configuration that simply just boots from the network
using TFTP if available.
- Delete flash control registers that have no business
in this config file. These are already moved down to
board/armltd/integrator/integrator-sc.h
Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Mon, 30 Jan 2012 13:49:34 +0000 (13:49 +0000)]
integrator: rewrite the AP PCI driver
The PCI support for the Integrator AP has apparently never
been finished and I strongly suspect that it has never worked,
so let's fix it. This is a list of the more or less
un-splittable changes done in this driver rewrite:
- Replace the register definitions stashed into the config
file (!) with a copy if the register file from the Linux
kernels arch/arm/include/asm/hardware/pci_v3.h
- Delete the unreadable gigantic macros that perform the
config accesses and replace them with copyedited code from
Linux arch/arm/mach-integrator/pci_v3.c
- Rewrite the rest of the setup code to use the
v3_[read|write][lwb]() accessors.
- Enable PCI by default in the AP board configuration.
- Fix checkpatch warnings and make code more conformant.
Tested-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Sat, 21 Jan 2012 13:13:19 +0000 (13:13 +0000)]
integrator: stop calling pci_init() twice
The U-Boot startup infrastructure already makes sure pci_init() is
called at a proper time, calling it again from within the board
setup code will not make things better.
dm6467Tevm: Use a common configuration file for davinci_dm6467evm and davinci_dm6467Tevm
In commit 2d575e46859dd9127a9cec731ace77523e6ea2ab a separate header
file was introduced for the DM6467T EVM, include/configs/davinci_dm6467Tevm.h.
The substantial difference between the davinci_dm6467evm and the
davinci_dm6467Tevm configuration is a single bit in the hardware revision
that is passed to the Linux kernel and davinci_dm6467evm has
REFCLK_FREQ = 27000000 where as davinci_dm6467Tevm.h has a
REFCLK_FREQ = 33000000.
This patch removes include/configs/davinci_dm6467Tevm.h. Instead the
include/configs/davinci_dm6467evm.h configuration is used for DM6467T EVMs and
renamed CFG_REFCLK_FREQ to CONFIG_REFCLK_FREQ and CONFIG_REFCLK_FREQ is defined
in boards.cfg.
Signed-off-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Tom Rini <trini@ti.com>
da850evm: read mac address from I2C EEPROM on AM18x EVM
add support to read mac address for AM18x EVM manufactured from
Spectrum digital which have mac address stored in I2C EEPROM manufactured
by WINBOND. This patch reads mac address from I2C EEPROM and sets the
environment variable if not set, If mac address is already present in
environment compare it with the mac address in EEPROM and warn on
mismatch.Introduced a config option CONFIG_MAC_ADDR_IN_EEPROM to where
to look for the mac address.
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Cc: Tom Rini <trini@ti.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Wolfgang Denk <wd@denx.de>