25 Jul, 2018
1 commit
-
The second argument of fdt_fixup_mtdparts() is an opaque pointer,
'void *node_info', hence callers can pass any pointer.Obviously, fdt_fixup_mtdparts() expects 'struct node_info *'
otherwise, it crashes run-time.Change the prototype so that it is compile-time checked.
Also, add 'const' qualifier to it so that callers can constify
the struct node_info arrays.Signed-off-by: Masahiro Yamada
Reviewed-by: Simon Glass
09 Jul, 2018
1 commit
-
Support a default memory bank, specified in reg, as well as
board-specific memory banks in subtree board-id nodes.This allows memory information to be provided in the device tree,
rather than hard-coded in, which will make it simpler to handle
similar devices with different memory banks, as the board-id values
or masks can be used to match devices.Signed-off-by: Michael Pratt
Signed-off-by: Simon Glass
Reviewed-by: Vadim Bendebury
07 May, 2018
1 commit
-
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.Signed-off-by: Tom Rini
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
31 Jan, 2018
1 commit
-
For for case of lazyapply method, API fdt_fixup_board_enet() gets
invoked before DPL being deployed. This leads to an issue that
fsl-mc fdt fixup status marked as fail and dprc driver didn't get
registered in linux boot.Fixes this issue by calling fdt_fixup_board_enet() for case when
DPL is deployed successfully in lazyapply method.Signed-off-by: Yogesh Gaur
Reviewed-by: York Sun
25 Dec, 2017
1 commit
-
"ethernet" node fix-up for device tree happens before Linux boot.
There can be requirement of updating "ethernet" node even before
fix-up. So, add support of updating "ethernet" node.Signed-off-by: Prabhakar Kushwaha
Reviewed-by: York Sun
26 Nov, 2017
2 commits
-
A minor code-size increase from the changes for tracking the os-type
of FIT images and from infrastructure for recording the loadables into
the the loaded FDT, broke the builds for sun50i and some OMAP2+ devices.This change adds a new config option (enabled by default for
MACH_SUN50I, MACH_SUN50I_H5 and ARCH_OMAP2PLUS) that does skips these
processing steps (bringing code size down to below the limit
again). The os-type is not evaluated, but assumed to be IH_OS_UBOOT
(i.e. taking the code-paths intended for backward-compatibility).Note that enabling this config option precludes any useful downstream
processing, such as utilising a special calling convention for ATF or
OPTEE, based on the os-type of the loadables.Signed-off-by: Philipp Tomsich
-
During the loading of more complex FIT images (e.g. when the invoked
next stage needs to find additional firmware for a power-management
core... or if there are multiple images for different privilege levels
started in parallel), it is helpful to create a record of what images
are loaded where: if a FDT is loaded for one of the next stages, it
can be used to convey the status and location of loadables.This adds a fdt_record_loadable() function that can be invoked to
record the status of each loadable below the /fit-images path.Signed-off-by: Philipp Tomsich
Reviewed-by: Simon Glass
15 Sep, 2017
1 commit
-
Introduce fdt_overlay_apply_verbose, a method that applies an
overlay but in the case of an error produces a helpful message.In addition if a base tree is found to be missing the __symbols__
node the message will point out that the probable reason is that
the base tree was miscompiled without the -@ option.Signed-off-by: Pantelis Antoniou
Acked-by: Simon Glass
01 Jun, 2017
2 commits
-
These two functions have an of_ prefix which conflicts with naming used
in of_addr. Rename them:fdt_read_number
fdt_support_bus_default_count_cellsSigned-off-by: Simon Glass
-
This function does not change the device tree so adjust it to use const
for this parameter.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
14 Oct, 2016
1 commit
-
Sometimes devicetree nodes and or properties are added out of the u-boot
console, maybe through some script or manual interaction.The devicetree as loaded or embedded is quite small, so the devicetree
has to be resized to take up those new nodes/properties.In original the devicetree was only extended by effective
4 * add_mem_rsv.With this commit we can add an argument to the "fdt resize" command,
which takes the extrasize to be added.Signed-off-by: Hannes Schmelzer
Signed-off-by: Hannes Schmelzer
Acked-by: Simon Glass
28 Sep, 2016
1 commit
-
The function fdt_fixup_dr_usb is specific to fsl/nxp. So,
make the function name explicit and rename fdt_fixup_dr_usb
into fsl_fdt_fixup_dr_usb.Signed-off-by: Sriram Dash
12 Aug, 2016
1 commit
-
The next patch will call fdt_translate_address() from somewhere with a
"const void *blob" rather than a "void *blob", so fdt_translate_address()
must accept a const pointer too. Constify the minimum number of function
parameters to achieve this.Signed-off-by: Stephen Warren
Acked-by: Simon Glass
Squashed in build fix from Stephen:
Signed-off-by: Simon Glass
20 Jul, 2016
1 commit
-
Define an inline stub for fdt_fixup_mtdparts in the case that
CONFIG_FDT_FIXUP_PARTITIONS is not defined. This avoids the need
to guard every call to this function by a proper #ifdef in board
files.Signed-off-by: Christopher Spinrath
Reviewed-by: Simon Glass
Reviewed-by: Igor Grinberg
10 Apr, 2016
1 commit
-
Enables usb device-tree fixup code to incorporate xhci controller
Signed-off-by: Ramneek Mehresh
Signed-off-by: Sriram Dash
20 Jul, 2015
1 commit
-
Avoid clearing the reg property in the memory DT node if no memory
banks have been specified for a board (CONFIG_NR_DRAM_BANKS == 0).
This allows boards to let U-Boot skip the DT memory tinkering in case
other firmware has already setup the node properly before.
This should be safe as all callers of fdt_fixup_memory_banks that use
a computed value put at least 1 in there.
Add some documentation comments to the header file.Signed-off-by: Andre Przywara
Acked-by: Simon Glass
05 Jun, 2015
2 commits
-
This instroduces comments that explain the purpose, parameters and return codes
of a few fdt support functions, that are used to fill the fdt.Signed-off-by: Paul Kocialkowski
Acked-by: Simon Glass -
Before device-tree, the device serial number used to be passed to the kernel
using ATAGs (on ARM). This is now deprecated and all the handover to the kernel
should now be done using device-tree. Thus, this passes the serial-number
property to the kernel using the serial-number property of the root node, as
expected by the kernel.The serial number is a string that somewhat represents the device's serial
number. It might come from some form of storage (e.g. an eeprom) and be
programmed at factory-time by the manufacturer or come from identification
bits available in e.g. the SoC.Signed-off-by: Paul Kocialkowski
Reviewed-by: Simon Glass
22 Apr, 2015
1 commit
-
Add 'fdt_fixup_display' function to fixup device-tree native-mode property
of display-timings node to select timings for a specific display.
This is useful if a device-tree has configurations for multiple
display timings for undetectable displays.see kernel Documentation/devicetree/bindings/video/display-timing.txt
Signed-off-by: Tim Harvey
Acked-by: Simon Glass
18 Feb, 2015
1 commit
-
Commit 90bac29a76bc8d649b41a55f2786c0abef9bb2c1 claims to fix this bug
that was introduced in commit a92fd6577ea17751ead9b50243e3c562125cf581
but doesn't actually make the change that the commit message describes.Actually fix the bug this time.
Signed-off-by: Joe Hershberger
Acked-by: Simon Glass
27 Nov, 2014
1 commit
25 Nov, 2014
1 commit
-
Add a generic helper to fill and enable simplefb nodes.
The first user of this will be the sunxi display code.
lcd_dt_simplefb_configure_node is also a good candidate to be converted
to use this, but that requires someone to run some tests first, as
lcd_dt_simplefb_configure_node does not honor #address-cells and #size-cells,
but simply assumes 1 and 1 for both.Signed-off-by: Hans de Goede
Tested-by: Stephen Warren
Acked-by: Simon Glass
21 Nov, 2014
4 commits
-
Add an additional function for adding information to the device tree before
booting. This permits additions which are not board-specific.Signed-off-by: Simon Glass
Acked-by: Anatolij Gustschin
Reviewed-by: Tom Rini -
The message about needing to reset should be printed no matter what error
is printed. Also, an error should always be printed.Signed-off-by: Simon Glass
Acked-by: Anatolij Gustschin
Reviewed-by: Tom Rini -
This function is useful for ensuring that a node exists. Export it so it
can be used more widely.Signed-off-by: Simon Glass
Acked-by: Anatolij Gustschin
Reviewed-by: Tom Rini -
This function can fail if the device tree runs out of space. Rather than
silently booting with an incomplete device tree, allow the failure to be
detected.Unfortunately this involves changing a lot of places in the code. I have
not changed behvaiour to return an error where one is not currently
returned, to avoid unexpected breakage.Eventually it would be nice to allow boards to register functions to be
called to update the device tree. This would avoid all the many functions
to do this. However it's not clear yet if this should be done using driver
model or with a linker list. This work is left for later.Signed-off-by: Simon Glass
Acked-by: Anatolij Gustschin
26 Oct, 2014
1 commit
-
Signed-off-by: Jeroen Hofstee
25 Sep, 2014
2 commits
-
of_bus_default_count_cells can be used to get the #address-cells
and #size-cells defined by the current node's parent node. This
is required when using of_read_number to read from FDT nodes that
can be 32 or 64 bytes depending on values defined by the parent.Signed-off-by: Arnab Basu
CC: Scott Wood -
This is being done so that it can be used outside 'fdt_support.c'. Making
life more convenient when reading device node properties that can be 32
or 64 bits long.Signed-off-by: Arnab Basu
Cc: Scott Wood
09 Aug, 2014
1 commit
-
Since libfdt now has an fdt_resize() function, we need to rename the
U-Boot one.Signed-off-by: Simon Glass
03 Jul, 2014
1 commit
-
Adding support to load and start the Layerscape Management Complex (MC)
firmware. First, the MC GCR register is set to 0 to reset all cores. MC
firmware and DPL images are copied from their location in NOR flash to
DDR. MC registers are updated with the location of these images.
Deasserting the reset bit of MC GCR register releases core 0 to run.
Core 1 will be released by MC firmware. Stop bits are not touched for
this step. U-boot waits for MC until it boots up. In case of a failure,
device tree is updated accordingly. The MC firmware image uses FIT format.Signed-off-by: J. German Rivera
Signed-off-by: York Sun
Signed-off-by: Lijun Pan
Signed-off-by: Shruti Kanetkar
19 Jun, 2014
2 commits
-
After all, we have realized "force" argument is completely
useless. fdt_chosen() was always called with force = 1.We should always want to do the same thing
(set appropriate value to the property)
even if the property already exists.Signed-off-by: Masahiro Yamada
Acked-by: Simon Glass -
After all, we have realized "force" argument is completely
useless. fdt_initrd() was always called with force = 1.We should always want to do the same thing
(set appropriate value to the property)
even if the property already exists.Signed-off-by: Masahiro Yamada
Acked-by: Simon Glass
09 May, 2014
1 commit
-
Conflicts:
drivers/net/Makefile(trivial merge)
23 Apr, 2014
2 commits
-
This patch adds a helper function that can be used to interpret most
"ranges" properties in the device tree.It reads the n'th range out of a "ranges" array and returns the node's
virtual address of the range, the physical address that range starts at
and the size of the range.Signed-off-by: Alexander Graf
Acked-by: Scott Wood
Reviewed-by: York Sun -
We already have a nice helper to give us a property cell value with default
fall back from a path. Split that into two helpers - one for the old path
based lookup and one to give us a value based on a node offset.Signed-off-by: Alexander Graf
Acked-by: Scott Wood
Reviewed-by: York Sun
18 Apr, 2014
1 commit
-
The keystone2 SOC requires to fix all 32 bit aliased addresses
to their 36 physical format. This has to happen after all fdt
nodes are added or modified.Signed-off-by: Vitaly Andrianov
Signed-off-by: Murali Karicheri
Acked-by: Tom Rini
22 Mar, 2014
1 commit
-
add host tool "fit_check_sign" which verifies, if a fit image is
signed correct.Signed-off-by: Heiko Schocher
Cc: Simon Glass