06 Feb, 2020
2 commits
-
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.Move the compatibility features into a separate header file.
Signed-off-by: Simon Glass
-
Tidy up a few places where const * should be used.
Signed-off-by: Simon Glass
18 Jan, 2020
2 commits
-
At present panic() is in the vsprintf.h header file. That does not seem
like an obvious choice for hang(), even though it relates to panic(). So
let's put hang() in its own header.Signed-off-by: Simon Glass
[trini: Migrate a few more files]
Signed-off-by: Tom Rini -
These functions relate to memory init so move them into the init
header.Signed-off-by: Simon Glass
14 Nov, 2019
2 commits
-
The phandlep pointer returning the phandle to the caller is optional
and if it is not set when calling fdtdec_add_reserved_memory() it is
highly likely that the caller is not interested in a phandle to the
created reserved-memory area and really just wants that area added.So just don't create a phandle in that case.
Signed-off-by: Heiko Stuebner
Reviewed-by: Simon Glass -
The change adding fdtdec_add_reserved_memory() already protected the added
phandle against the phandlep being NULL - making the phandlep var optional.But in the early code checking for an already existing carveout this check
was not done and thus the phandle assignment could run into trouble,
so add a check there as well, which makes the function still return
successfully if a matching region is found, even though no-one wants to
work with the phandle.Fixes: c9222a08b3f7 ("fdtdec: Implement fdtdec_add_reserved_memory()")
Signed-off-by: Heiko Stuebner
Reviewed-by: Simon Glass
28 Oct, 2019
1 commit
-
The FDT specification [0] gives a requirement of aligning properties on
32-bits. Make sure that the compiler is aware of this constraint when
accessing 64-bits properties.[0]: https://github.com/devicetree-org/devicetree-specification/blob/master/source/flattened-format.rst
Signed-off-by: Jean-Jacques Hiblot
Reviewed-by: Simon Glass
08 Oct, 2019
1 commit
-
This function ise effectively replaced by ofnode_read_pci_addr() which
works with flat tree. Delete it to avoid code duplication.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
03 Oct, 2019
1 commit
-
This reads the low cell of the PCI address from the wrong cell. Fix it.
Also fix the function that this code came from.Fixes: 9e51204527 (dm: core: Add operations on device tree references)
Fixes: 4ea5243a3a (fdt: fix fdtdec_get_pci_addr() for CONFIG_PHYS_64BIT)
Signed-off-by: Simon Glass
Tested-by: Stephen Warren
Reviewed-by: Bin Meng
26 Aug, 2019
1 commit
-
The current preprocessor logic prevents CONFIG_OF_PRIOR_STAGE from being
used in U-Boot SPL. Change the logic to also make it available in U-Boot
SPL.Signed-off-by: Lukas Auer
Reviewed-by: Bin Meng
Tested-by: Bin Meng
Reviewed-by: Anup Patel
12 Aug, 2019
2 commits
-
Move env_get_ulong() over to the new header file.
Signed-off-by: Simon Glass
Acked-by: Joe Hershberger -
As part of the effort to remove things from common.h, create a new header
for the gzip functions. Move the function declarations to it and add
missing documentation.Signed-off-by: Simon Glass
Reviewed-by: Simon Goldschmidt
06 Jun, 2019
1 commit
-
This function can be used to set the local MAC address for the default
Ethernet interface in its device tree node. The default interface is
identified by the "ethernet" alias.One case where this is useful is for devices that store their MAC
address in a custom location. Once extracted, board code can store the
MAC address in U-Boot's control DTB so that it will automatically be
used by the Ethernet uclass.Signed-off-by: Thierry Reding
Signed-off-by: Tom Warren
22 May, 2019
1 commit
-
U-Boot already defines the {upper,lower}_32_bits() macros that have the
same purpose. Use the existing macros instead of defining new APIs.Signed-off-by: Thierry Reding
24 Apr, 2019
1 commit
-
The fdt_setprop_u32() function does everything that we need, so we
really only use the function as a convenience wrapper, in which case it
can simply be a static inline function.Signed-off-by: Thierry Reding
14 Apr, 2019
1 commit
-
Conflicts:
arch/arm/dts/armada-385-amc.dts
arch/arm/dts/armada-xp-theadorable.dts
arch/arm/dts/stm32mp157c-ev1-u-boot.dtsiSigned-off-by: Tom Rini
12 Apr, 2019
4 commits
-
The x86 code and DT uses "spi-flash" to detect a flash node, switch to
"jedec,spi-nor" in the DTS files and in fdtdec by switching the
GENERIC_SPI_FLASH value to to jedec,spi-nor.Signed-off-by: Neil Armstrong
Reviewed-by: Simon Goldschmidt
Reviewed-by: Jagan Teki -
The fdtdec_get_carveout() and fdtdec_set_carveout() function can be used
to read a carveout from a given node or add a carveout to a given node
using the standard device tree bindings (involving reserved-memory nodes
and the memory-region property).Reviewed-by: Simon Glass
Signed-off-by: Thierry Reding -
This function can be used to add subnodes in the /reserved-memory node.
Reviewed-by: Simon Glass
Signed-off-by: Thierry Reding -
This function can be used to set a phandle for a given node.
Signed-off-by: Thierry Reding
10 Apr, 2019
4 commits
-
Add required Kconfig symbols, Makefile bits and macro fixes in a
few places to support LZO and DT compression in U-Boot. This can
save a lot of space with multi-DTB fitImages.Signed-off-by: Marek Vasut
Cc: Nobuhiro Iwamatsu
Cc: Simon Glass
Cc: Tom RiniSigned-off-by: Marek Vasut
-
Allow enabling both LZO and GZIP DT compression in SPL and fix a
bug where if the GZIP decompression failed, the LZO decompression
would not even be attempted.Signed-off-by: Marek Vasut
Cc: Nobuhiro Iwamatsu
Cc: Simon Glass
Cc: Tom Rini -
Split fdtdec_setup_memory_banksize() into fdtdec_setup_memory_banksize_fdt(),
which allows the caller to pass custom blob into the function and the
original fdtdec_setup_memory_banksize(), which uses the gd->fdt_blob. This
is useful when configuring the DRAM properties from a FDT blob fragment
passed in by the firmware.Signed-off-by: Marek Vasut
Cc: Nobuhiro Iwamatsu
Cc: Simon Glass
Cc: Tom Rini
Reviewed-by: Simon Glass -
Split fdtdec_setup_mem_size_base() into fdtdec_setup_mem_size_base_fdt(),
which allows the caller to pass custom blob into the function and the
original fdtdec_setup_mem_size_base(), which uses the gd->fdt_blob. This
is useful when configuring the DRAM properties from a FDT blob fragment
passed in by the firmware.Signed-off-by: Marek Vasut
Cc: Nobuhiro Iwamatsu
Cc: Simon Glass
Cc: Tom Rini
Reviewed-by: Simon Glass
12 Feb, 2019
1 commit
-
- DM I2C improvements
10 Feb, 2019
2 commits
-
This is no-longer used. Drop it.
Signed-off-by: Simon Glass
Reviewed-by: Lukasz Majewski -
This enum still exists but we can shrink it a little based on recent
driver-model conversions with samsung. Update it to remove unused items.Signed-off-by: Simon Glass
Reviewed-by: Lukasz Majewski
08 Feb, 2019
1 commit
-
Find out the highest alias ID used for certain subsystem.
This call will be used for alocating IDs for i2c buses which are not
described in DT.Signed-off-by: Michal Simek
Reviewed-by: Heiko Schocher
Reviewed-by: Simon Glass
15 Jan, 2019
1 commit
-
With 8 bytes addressing even on 32 bit machines these checks
are no longer valid. Remove them.Signed-off-by: Keerthy
Reviewed-by: Simon Glass
13 Dec, 2018
1 commit
-
Building U-Boot with CONFIG_PCI and CONFIG_DM_PCI enabled, but
CONFIG_SPL_PCI_SUPPORT disabled, results in following linker
error:lib/built-in.o: In function `fdtdec_get_pci_bar32':
lib/fdtdec.c:305: undefined reference to `dm_pci_read_bar32'
fdtdec.c:305:(.text.fdtdec_get_pci_bar32+0x24): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `dm_pci_read_bar32'This is because reference to dm_pci_read_bar32() remains in lib/fdtdec.c
while SPL build does not descend into drivers/pci directory in
drivers/Makefile if CONFIG_SPL_PCI_SUPPORT is not enabled.Fix this by applying appropriate #define guards in lib/fdtdec.c.
It looks like ns16550.c has the same problem, so fixed that too.To simplify this, CONFIG_SPL_PCI_SUPPORT is renamed to CONFIG_SPL_PCI
(enables use of CONFIG_IS_ENABLED() macro).Suggested-by: Vignesh R
Signed-off-by: Sekhar Nori
Reviewed-by: Lokesh Vutla
Reviewed-by: Tom Rini
10 Dec, 2018
1 commit
-
In some cases it may be useful to be able to change the fdt we have been
using and use another one instead. For example, the TI platforms uses an
EEPROM to store board information and, based on the type of board,
different dtbs are used by the SPL. When DM_I2C is used, a first dtb must
be used before the I2C is initialized and only then the final dtb can be
selected.
To speed up the process and reduce memory usage, introduce a new function
fdtdec_setup_best_match() that re-use the DTBs loaded in memory by
fdtdec_setup() to select the best match.Signed-off-by: Jean-Jacques Hiblot
Reviewed-by: Heiko Schocher
03 Dec, 2018
1 commit
-
The sandbox uses a virtual address space that is neither the physical nor
the virtual address space of the operating system. All address used on the
command line live in this address space. So also the environment variable
${fdtcontroladdr} has to be in this address space.Commands like bootefi and booti receive the fdt address as parameter.
Without the patch ${fdtcontroladdr} cannot be used as parameter value on
the sandbox.Signed-off-by: Heinrich Schuchardt
Signed-off-by: Alexander Graf
21 Nov, 2018
1 commit
-
When U-Boot proper is compiled with CONFIG_MULTI_DTB_FIT and tries
to call uncompress_blob(), it fails with -ENOTSUPP. This is because
the full implementation of this function which includes compression
is available only in SPL. In U-Boot proper or if the compression is
not enabled, the blob is not compressed and thus can be passed to
locate_dtb_in_fit() in fdtdec_setup() without any changes. Pass the
blob without any changes if compression is not enabled instead of
failing.Signed-off-by: Marek Vasut
Cc: Michal Simek
Cc: Tom Rini
Reviewed-by: Simon Glass
16 Oct, 2018
1 commit
-
This reverts commit c35a7d375ec8f0a8ee343ae4868be3242172632e.
This commit is breaking SPL on zc706.Signed-off-by: Michal Simek
Reviewed-by: Simon Glass
Tested-by: Patrice Chotard [on STM32F746-disco]
09 Oct, 2018
1 commit
-
This function is not used in U-Boot now. Remove it along with its 'memory'
version.Signed-off-by: Simon Glass
30 Sep, 2018
1 commit
-
Converts fdtdec_setup_memory_banksize() to use ofnode functions instead.
Reviewed-by: Simon Glass
Signed-off-by: Jens Wiklander
11 Sep, 2018
1 commit
-
In int-ll64.h, we always use the following typedefs:
typedef unsigned int u32;
typedef unsigned long uintptr_t;
typedef unsigned long long u64;This does not need to match to the compiler's .
Do not include it.The use of PRI* makes the code super-ugly. You can simply use
"l" for printing uintptr_t, "ll" for u64, and no modifier for u32.Signed-off-by: Masahiro Yamada
10 Sep, 2018
1 commit
-
The get_next_memory_node() always sets mem to -1 , which is incorrect,
because then every iteration of memory bank parsing will start from the
first memory bank instead of the previous one.On systems with 1 memory bank defined in DT and CONFIG_NR_DRAM_BANKS=4 ,
like ie. r8a77965-salvator-x , this will result in U-Boot incorrectly
reporting four identical memory banks with the same memory configuration.Fix this by setting mem to startoffset value, which restores the behavior
before the fixed patch was applied.Signed-off-by: Marek Vasut
Cc: Jens Wiklander
Cc: Simon Glass
Cc: Tom Rini
Fixes: 452bc121027d ("fdt: fix fdtdec_setup_memory_banksize()")
Tested-by: Michal Simek [on ZynqMP}
27 Jul, 2018
1 commit
-
Prior to this patch is fdtdec_setup_memory_banksize() incorrectly
ignoring the "status" field. This patch fixes that by testing the status
with fdtdec_get_is_enabled() before using a memory node.Signed-off-by: Jens Wiklander
Reviewed-by: Simon Glass
19 Jul, 2018
1 commit
-
This patch renames the routine fdtdec_setup_memory_size()
to fdtdec_setup_mem_size_base() as it now fills the
mem base as well along with size.Signed-off-by: Siva Durga Prasad Paladugu
Signed-off-by: Michal Simek
Reviewed-by: Tom Rini