08 Dec, 2017
1 commit
-
While sandbox works OK without the special-case code, it does result in
console output being stored in the pre-console buffer while sandbox starts
up. If there is a crash or a problem then there is no indication of what
is going on.For ease of debugging it seems better to revert this change.
This reverts commit 47b98ad0f6779485d0f0c14f337c3eece273eb54.
Signed-off-by: Simon Glass
17 Nov, 2017
1 commit
-
We borrow the macros for these functions from ARM and remove references
to '__raw_'.Signed-off-by: Tom Rini
09 Oct, 2017
1 commit
-
Realloc does not free the old memory area if it fails.
Identified by cppcheck.
Signed-off-by: Heinrich Schuchardt
Reviewed-by: Simon Glass
04 Oct, 2017
1 commit
-
The setbits/clrbits/clrsetbits macros are used widely across the tree,
let's provide implementation for them in the sandbox.Signed-off-by: Maxime Ripard
03 Oct, 2017
1 commit
-
Convert the sandbox architecture to make use of the new asm-generic/io.h
to provide address mapping functions. As sandbox actually performs
non-identity mapping between physical & virtual addresses we can't
simply make use of the generic mapping functions, but are able to
implement phys_to_virt() & make use of it from map_physmem().Signed-off-by: Paul Burton
Cc: Simon Glass
Acked-by: Simon Glass
12 Sep, 2017
3 commits
-
This allows to scan the DT including all "clocks" node's sub-nodes
in which fixed-clock are defined.
All fixed-clock should be defined inside a clocks node which collect all
external oscillators. Until now, all clocks sub-nodes can't be binded except
if the "simple-bus" compatible string is added which is a hack.Update test.dts by moving clk_fixed node inside clocks.
Signed-off-by: Patrice Chotard
Reviewed-by: Simon Glass
Reviewed-by: Simon Glass -
Convert SANDBOX_BITS_PER_LONG to Kconfig and assign it a correct
number depending on which host we are going to build and run.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass -
It seems most of the time we are building and running sandbox on 64-bit host.
But we do support 32-bit host as well. Introduce Kconfig option for this.Signed-off-by: Bin Meng
Reviewed-by: Simon Glass
28 Aug, 2017
1 commit
-
This adds invalidate_dcache_range() so that some drivers can build
without error on sandbox.Signed-off-by: Bin Meng
29 Jul, 2017
1 commit
-
They are unused since commit d8c6fb8cedbc ("sandbox: Drop special
case console code for sandbox").Signed-off-by: Masahiro Yamada
Acked-by: Simon Glass
27 Jul, 2017
1 commit
-
SPL and normal u-boot stage use different malloc pool size
configuration before relocation, so use CONFIG_VAL(SYS_MALLOC_F_LEN)
to fit different boot stage.Signed-off-by: Andy Yan
Changes in v3:
- use CONFIG_VAL(), which suggested by SimonChanges in v2: None
arch/sandbox/cpu/start.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Philipp Tomsich
Reviewed-by: Philipp Tomsich
12 Jul, 2017
3 commits
-
Currently we have code which prints out platform data at the start of SPL.
Now that we have tests for dtoc this is probably not necessary. Drop it.
Update test_ofplatdata to check for empty output since it is useful to
check that sandbox_spl works as expected.Signed-off-by: Simon Glass
-
Enable the pre-console buffer, displaying the model and post-relocation
console announce on sandbox. Also add a model name to the device tree.
This allows testing of these features.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
Add some tests which check the behaviour of uclass_first_device() and
uclass_next_device() when probing of a device fails.Signed-off-by: Simon Glass
09 Jun, 2017
1 commit
-
In os_dirent_get_typename() we are checking that type falls within the
known values of the enum os_dirent_t. With clang-3.8 testing this value
as being >= 0 results in a warning as it will always be true. This
assumes of course that we are only given valid data. Given that we want
to sanity check the input, we change this to check that it falls within
the range of the first to the last entry in the given enum.Cc: Simon Glass
Signed-off-by: Tom Rini
Reviewed-by: Simon Glass
06 Jun, 2017
1 commit
-
At present we provide a default version of this function for use by
bootstage. However it uses the system timer and therefore likely requires
driver model. This makes it impossible to time driver-model init.Drop the function and require boards to provide their own. Add a sandbox
version also. There is a default implememtation in lib/time.c for boards
which use CONFIG_SYS_TIMER_COUNTER.Signed-off-by: Simon Glass
05 Jun, 2017
1 commit
-
Rather than including this arch-specific header file in common.h, include
it from within sandbox's u-boot.h header.Also drop the comment about something to be fixed.
Signed-off-by: Simon Glass
01 Jun, 2017
3 commits
-
Running a new test should reset the sandbox state to avoid tests
interferring with each other. Move the existing state-reset code into a
function so it can be used from tests.Also update the code to reset the SPI devices and adjust the test code to
call it.Signed-off-by: Simon Glass
-
The intention with block devices is that the device number (devnum field
in its descriptor) matches the alias of its parent device. For example,
with:aliases {
mmc0 = "/sdhci@700b0600";
mmc1 = "/sdhci@700b0400";
}we expect that the block devices for mmc0 and mmc1 would have device
numbers of 0 and 1 respectively.Unfortunately this does not currently always happen. If there is another
MMC device earlier in the driver model data structures its block device
will be created first. It will therefore get device number 0 and mmc0
will therefore miss out. In this case the MMC device will have sequence
number 0 but its block device will not.To avoid this, allow a device to request a device number and bump any
existing device number that is using it. This all happens during the
binding phase so it is safe to change these numbers around. This allows
device numbers to match the aliases in all circumstances.Add a test to verify the behaviour.
Signed-off-by: Simon Glass
-
This header includes things that are needed to make driver build. Adjust
existing users to include that always, even if other dm/ includes are
presentSigned-off-by: Simon Glass
10 May, 2017
1 commit
-
Those tests check:
- the ability for a phy-user to get a phy based on its name or its index
- the ability of a phy device (provider) to manage multiple ports
- the ability to perform operations on the phy (init,deinit,on,off)
- the behavior of the uclass when optional operations are not implementedSigned-off-by: Jean-Jacques Hiblot
Reviewed-by: Simon Glass
08 May, 2017
1 commit
-
This is a simple uclass for Watchdog Timers. It has four operations:
start, restart, reset, stop. Drivers must implement start, restart and
stop operations, while implementing reset is optional: It's default
implementation expires watchdog timer in one clock tick.Signed-off-by: Maxim Sloyko
Reviewed-by: Simon Glass
28 Apr, 2017
1 commit
-
Unfortunately a test for the PWM uclass was not included when it was
submitted. This was noticed when trying to add more functionality:http://patchwork.ozlabs.org/patch/748172/
Add a simple test to get us started.
Signed-off-by: Simon Glass
15 Apr, 2017
1 commit
-
Add some LEDs to the standard sandbox device tree.
Signed-off-by: Simon Glass
Reviewed-by: Ziping Chen
13 Apr, 2017
1 commit
-
Instead of having CONFIG_SANDBOX_BITS_PER_LONG in sandbox.h set to 64
with a comment to change to 32 on a 32bit host, simply set this to 64 in
asm/types.h and have the comment be there.Cc: Simon Glass
Signed-off-by: Tom Rini
06 Apr, 2017
2 commits
-
We don't need a special hook for sandbox as one of the later ones will do
just as well. We can print error messages about bad options after we
print the banner. In fact, it seems better.Signed-off-by: Simon Glass
Reviewed-by: Stefan Roese -
There is no need to have this call in the generic init sequence and no
other architecture has needed it in the time it has been there. Move it
into sandbox's private code.Signed-off-by: Simon Glass
Reviewed-by: Stefan Roese
Reviewed-by: Stefan Roese
08 Feb, 2017
1 commit
-
If there is a '.' in a compatible string, then dtoc will produce a struct
with a name containing a '.'. This won't work, so replace it with '_'.Also add a suitable test to the sandbox device tree to catch this.
Signed-off-by: Simon Glass
09 Dec, 2016
2 commits
-
This function is not used anymore. Drop it.
Signed-off-by: Simon Glass
-
It is useful to name each method so that we can print out this name when
using the method. Currently this happens using a separate function. In
preparation for unifying this, add a name to each method.The name is only available if we have libcommon support (i.e can use
printf()).Signed-off-by: Simon Glass
03 Dec, 2016
1 commit
-
Commit e2f88dfd2d96 ("libfdt: Introduce new ARCH_FIXUP_FDT option")
allows us to skip memory setup of DTB, but a problem for ARM is that
spin_table_update_dt() and psci_update_dt() are skipped as well if
CONFIG_ARCH_FIXUP_FDT is disabled.This commit allows us to skip only fdt_fixup_memory_banks() instead
of the whole of arch_fixup_fdt(). It will be useful when we want to
use a memory node from a kernel DTB as is, but need some fixups for
Spin-Table/PSCI.Signed-off-by: Masahiro Yamada
Acked-by: Alexey Brodkin
Acked-by: Simon Glass
Fixed build error for x86:
Signed-off-by: Simon Glass
28 Oct, 2016
1 commit
-
Add 'PCI' as a menu option and migrate all existing users.
Signed-off-by: Tom Rini
Acked-by: Stephen Warren
19 Oct, 2016
1 commit
-
This is required for x86 and is also correct for ARM (since it is empty).
Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Signed-off-by: Alexander Graf
12 Oct, 2016
5 commits
-
The "hostfs ls" command prefixes each directory entry with either DIR,
LNK or " " if it is a directory, symlink resp. regular file, or
"???" for any other or unknown type.
The latter only works if the type is set correctly, as the entry defaults
to OS_FILET_REG and e.g. socket files show up as regular files.Signed-off-by: Stefan Brüns
Acked-by: Simon Glass -
At present these functions do not touch addr, which can raising warnings
about unused variables.This fixes the following warnings:
sandbox_spl defconfig
drivers/core/regmap.c: In function ‘regmap_read’:
drivers/core/regmap.c:125:12: warning: unused variable ‘ptr’ [-Wunused-variable]
uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE);
^
drivers/core/regmap.c: In function ‘regmap_write’:
drivers/core/regmap.c:134:12: warning: unused variable ‘ptr’ [-Wunused-variable]
uint32_t *ptr = map_physmem(map->base + offset, 4, MAP_NOCACHE);Signed-off-by: Simon Glass
Fixes: 3bfb8cb4 (dm: regmap: Implement simple regmap_read & regmap_write) -
Using readdir_r limits the maximum file name length and may even be
unsafe, and is thus deprecated in since glibc 2.24.Signed-off-by: Stefan Brüns
Acked-by: Simon Glass -
The readdir linux manpage explicitly states (quoting POSIX.1) that
sizeof(d_name) is not correct for determining the required size, but to
always use strlen. Grow the buffer if needed.Signed-off-by: Stefan Brüns
Acked-by: Simon Glass -
Previously, after reading/creating the second dirent, the second entry
would be chained to the first entry and the first entry would be linked
to head. Instead, immediately link the first entry to head.Signed-off-by: Stefan Brüns
Acked-by: Simon Glass
07 Oct, 2016
2 commits
-
Rather than having a global variable, pass the spl_image as a parameter.
This avoids BSS use, and makes it clearer what the function is actually
doing.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
Add a linker list declaration for this method and remove the explicit
switch() code. Update existing users.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini