| Commit message (Collapse) | Author | Age | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 'sandbox' of git://git.denx.de/u-boot-blackfin:
sandbox: mark os_exit as noreturn
sandbox: add getopt support
sandbox: allow processing before main loop
sandbox: add concept of sandbox state
sandbox: disable fortification
sandbox: u-boot.lds: tweak style
sandbox: add get_{tbclk,ticks}
sandbox: enable GPIO driver
sandbox: gpio: add basic driver for simulating GPIOs
sandbox: add flags for open() call
sandbox: config: enable fdt and snprintf() options
sandbox: fdt: add support for CONFIG_OF_CONTROL
sandbox: add lseek helper
sandbox: add ifdef protection to os.h
sandbox: add required header to os.c
sandbox: sort header files in os.c
|
| |
| |
| |
| | |
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Since we provide all our own library calls, the fortification from
glibc just gets in our way (which some distros enable by default).
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| | |
We use tabs for indentation, not spaces.
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| | |
Fixes building after recent readline updates with timeouts.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| | |
Enable the new GPIO driver for sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This provides a way of simulating GPIOs by setting values which are seen
by the normal gpio_get/set_value() calls.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This provides a way for callers to create files for writing. The flags
are translated at runtime, for the ones we support.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| | |
Enable fdt code and safe snprintf() options for sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| | |
This adds support for a controlling fdt, mirroring the ARM implementation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| | |
Follow up patches want to be able to seek fd's.
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| | |
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| | |
We should include the sys/time.h header to avoid warnings.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| | |
Tidy this up as the list is long and likely to get longer.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 'master' of git://git.denx.de/u-boot-sh:
sh: timer: Remove unnecessary variable 'ticks'
sh: Fix sh7264 clock speed and related serial setting
net: sh_eth: Remove unnecessary return
net: sh_eth: Collect up EDMR_INIT_CNT to TIMEOUT_CNT
net: sh_eth: Remove SH_ETH_PHY_DELAY
sh: ecovec: Add support PHY of SMSC
sh: sh_eth: Add support SH7724
|
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The generalised calculation of the serial bit rate reg also applies
to sh7264, it was just the clock speed that was set incorrectly.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
EDMR_INIT_CNT holds the check count of initialization.
Since there were more same values (1000), this collected as TIMEOUT_CNT.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
SH_ETH_PHY_DELAY is not used.
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
| |/
| |
| |
| |
| | |
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
|
| |
| |
| |
| | |
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_SYS_POST_FPU"
This reverts commit 3e16abe0e468c568b30acb7d8583e3dbed6f177b.
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.
Signed-off-by: Wolfgang Denk <wd@denx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
flush_dcache()/flush_icache() aren't defined in common.h,
flush_dcache_all()/invalidate_icache_all() however are.
Let the icache and dcache commands use those instead.
Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Acked-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
| |
Added from Linux - commit 62aa2b537c6f5957afd98e29f96897419ed5ebab
Signed-off-by: Tom Rini <trini@ti.com>
|
|
|
|
|
|
|
| |
As mmc_spl now follows SPL infrastructure, removed unwanted
entries in Makefile for mmc_spl related compilation.
Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
|
|\
| |
| |
| |
| | |
* 'master' of git://git.denx.de/u-boot-x86:
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
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This function was defined as an extern in net/eth.c, drop that and use
standard means of calling it.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefan Roese <sr@denx.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This function was defined as an extern in net/eth.c, drop that and use
standard means of calling it.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| |
| |
| |
| |
| |
| |
| | |
There is a nasty interleave of #ifdefs in hush.c where the two code
paths have different indents. Remove this ickiness.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| |
| |
| |
| |
| |
| |
| | |
We should aim for a single point of entry to the commands, whichever
parser is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| |
| |
| |
| |
| |
| |
| | |
This saves about 1KB of code space on ARM with CONFIG_SYS_HUSH_PARSER
defined.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
This is a more sensible name, so rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
It really isn't clear why this is here and there is no comment, so
drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
|
|/
|
|
| |
Signed-off-by: Thomas Weber <weber@corscience.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
This seems to be unsigned char for no good reason. Tidy this up and
remove the casts.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
There doesn't seem to be any reason for using uchar here, so change it
to char. This fixes a warning:
pointer targets in passing argument 1 of 'sprintf' differ in signedness
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.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>
|