26 Apr, 2018
1 commit
-
Commit 286ede6 ("drivers: core: Add translation in live tree case") made
dev_get_addr always use proper bus translations for addresses read from
the device tree. But this leads to problems with certain busses, e.g.
I2C busses, which run into an error during translation, and hence stop
working.It turns out that of_translate_address() and fdt_translate_address()
stop the address translation with an error when they're asked to
translate addresses for busses where #size-cells == 0 (comment from
drivers/core/of_addr.c):* Note: We consider that crossing any level with #size-cells == 0 to mean
* that translation is impossible (that is we are not dealing with a value
* that can be mapped to a cpu physical address). This is not really specified
* that way, but this is traditionally the way IBM at least do thingsTo fix this case, we check in both the live-tree and non-live tree-case,
whether the bus of the device whose address is about to be translated
has size-cell size zero. If this is the case, we just read the address
as a plain integer and return it, and only apply bus translations if the
size-cell size if greater than zero.Signed-off-by: Mario Six
Signed-off-by: Martin Fuzzey
Reported-by: Martin Fuzzey
Fixes: 286ede6 ("drivers: core: Add translation in live tree case")
Reviewed-by: Simon Glass
05 Mar, 2018
1 commit
-
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.This commit moves the header code:
include/libfdt.h -> include/linux/libfdt.h
include/libfdt_env.h -> include/linux/libfdt_env.hand replaces include directives:
#include -> #include
#include -> #includeReported-by: Thomas Petazzoni
Signed-off-by: Masahiro Yamada
19 Feb, 2018
4 commits
-
To debug device tree issues involving 32- and 64-bit platforms, it is useful to
have a generic 64-bit platform available.Add a version of the sandbox that uses 64-bit integers for its physical
addresses as well as a modified device tree.Signed-off-by: Mario Six
Added CONFIG_SYS_TEXT_BASE to configs/sandbox64_defconfig
Signed-off-by: Simon Glass -
At present dtc produces these warnings when compiling sandbox:
arch/sandbox/dts/test.dtb: Warning (gpios_property):
Could not get phandle node for /base-gpios:num-gpios(cell 0)
arch/sandbox/dts/test.dtb: Warning (gpios_property):
Missing property '#gpio-cells' in node /reset-ctl or bad phandle
(referred from /extra-gpios:num-gpios[0])Both are due to it assuming that the 'num-gpios' property holds a phandle
pointing to a GPIO node.To avoid these warnings, rename the sandbox property so that it does not
include the string 'gpios'.Signed-off-by: Simon Glass
-
At present dtc produces these warnings when compiling sandbox:
arch/sandbox/dts/test.dtb: Warning (reg_format): "reg" property in /chosen/chosen-test has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
arch/sandbox/dts/test.dtb: Warning (avoid_default_addr_size): Relying on default #address-cells value for /chosen/chosen-test
arch/sandbox/dts/test.dtb: Warning (avoid_default_addr_size): Relying on default #size-cells value for /chosen/chosen-testAdd the missing properties to avoid this.
Signed-off-by: Simon Glass
Fixes: f200680 (dm: core: parse chosen node) -
Only ARM and in some configs MIPS really implement arch_fixup_fdt().
Others just use the same boilerplate which is not good by itself,
but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
apparently implemented in arch/xxx/lib/bootm.c.Now with weak arch_fixup_fdt() right in image-fdt.c where it is
used we get both items highlighted above fixed.Signed-off-by: Alexey Brodkin
Cc: Daniel Schwierzeck
Cc: Simon Glass
Cc: York Sun
Cc: Stefan Roese
Reviewed-by: Tom Rini
Reviewed-by: Daniel Schwierzeck
14 Feb, 2018
2 commits
-
Signed-off-by: Simon Goldschmidt
-
This driver is no longer used on any supported platform in U-Boot and
there is no interest in maintaining it further from people that have
used it historically.Cc: Simon Glass
Cc: Michal Simek
c: Alexey Brodkin
Signed-off-by: Tom Rini
Acked-by: Michal Simek
16 Jan, 2018
1 commit
-
This is the node that would contain, for example, the framebuffer setup
by an earlier stage.Signed-off-by: Rob Clark
10 Jan, 2018
1 commit
-
Given gcc-6.1 and later we can now safely have strings discarded when
the functions are unused. This lets us drop certain cases of not
building something so that we don't have the strings brought in when the
code was discarded. Simplify the code now by dropping guards we don't
need now.Cc: Stefano Babic
Cc: Fabio Estevam
Cc: Chander Kashyap
Cc: Thomas Abraham
Cc: Vipin Kumar
Cc: Wenyou Yang
Signed-off-by: Tom Rini
13 Dec, 2017
1 commit
-
This patch extends pmic_bind_children prefix matching. In addition to
the node name the property regulator-name is used while trying to match
prefixes. This allows assigning different drivers to regulator nodes
named regulator@1 and regulator@10 for example.
I have discarded the idea of using other properties then regulator-name
as I do not see any benefit in using property compatible or even
regulator-compatible. Of course I am open to change this if there are
good reasons to do so.Signed-off-by: Felix Brack
Reviewed-by: Simon Glass
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
1 commit
-
This function is not used anymore. Drop it.
Signed-off-by: Simon Glass