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
23 Feb, 2018
1 commit
-
Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.Acked-by: Stephen Warren
Signed-off-by: Thierry Reding
19 Feb, 2018
1 commit
-
Memory banks with address 0 and size 0 are empty and should not be
passed to the OS via device tree.Signed-off-by: Thierry Reding
Acked-by: Stephen Warren
13 Feb, 2018
1 commit
-
The fdt_record_loadable()-function was wedged between other functions
that were guarded by ARCH_FIXUP_FDT_MEMORY. This could lead to linker
errors on some configurations.With this change, fdt_record_loadable() is moved out of the
ARCH_FIXUP_FDT_MEMORY guard (plus I tried to retain alphabetical
ordering for functions by placing it appropriately).References: 9f45aeb ("spl: fit: implement fdt_record_loadable")
Signed-off-by: Philipp Tomsich
Reported-by: Michal Simek
Tested-by: Michal Simek
25 Dec, 2017
1 commit
-
The MAC addresses get fixed in the device tree for "ethernet" nodes
is by using trailing number behind "ethernet" found in "/aliases".
It may not be necessary for the "ethernet" nodes to be sequential.
There can be gaps in between or any node disabledSo provide a support to fetch MAC addr sequentially from env
and apply them to "ethernet" nodes in the order they appear in
device tree only if "ethernet" is not "disabled"Signed-off-by: Prabhakar Kushwaha
Reviewed-by: York Sun
26 Nov, 2017
1 commit
-
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
16 Aug, 2017
1 commit
-
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass
01 Aug, 2017
1 commit
-
This function appears to obtain the value of the 'ranges' property rather
than 'reg'. As such it does not behave as documented or expected.In addition it picks up the second field of the property which is the size
(with prop += naddr) rather than the first which is the address.Fix it.
Signed-off-by: Simon Glass
04 Jul, 2017
1 commit
-
There was for long time no activity in the 4xx area.
We need to go further and convert to Kconfig, but it
turned out, nobody is interested anymore in 4xx,
so remove it.Signed-off-by: Heiko Schocher
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
26 Mar, 2017
1 commit
-
The Raspberry Pi device tree files since Linux v4.9 have a "ethernet"
alias pointing to the on-board Ethernet device node. However,
U-Boot's fdt_fixup_ethernet() only looks at ethernet aliases ending
in digits.As the spec doesn't mandate that aliases must end in numbers and there
have been much older uses of an "ethernet" aliases in the wild
(according to Tom Rini), change the code to accept "ethernet" as well.Without this Linux isn't told of the MAC address provided by the
RPI firmware and the ethernet interface is always assigned a random MAC
address.Signed-off-by: Tuomas Tynkkynen
Reviewed-by: Tom Rini
Acked-by: Joe Hershberger
10 Feb, 2017
1 commit
08 Feb, 2017
2 commits
-
fdt_fixup_mtdparts currently does nothing when partition info is
runtime-generated or compiled-in defaults are used.Signed-off-by: Ladislav Michl
Fix nits in commit message:
Signed-off-by: Simon Glass -
Commit 674bb249825a ("net: cosmetic: Replace magic numbers in arp.c with
constants") introduced a nice define to replace the magic value 6 for
the ethernet hardware address. Replace more hardcoded instances of 6
which really reference the ARP_HLEN (iow the MAC/Hardware/Ethernet
address).Signed-off-by: Olliver Schinagl
Acked-by: Joe Hershberger
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
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
26 May, 2016
2 commits
-
Provide some documentation for the fields of struct of_bus, for
consistency with that provided for the new match field.Signed-off-by: Paul Burton
Reviewed-by: Simon Glass -
Support ISA busses in much the same way as Linux does. This allows for
ISA bus addresses to be translated, and only if CONFIG_OF_ISA_BUS is
selected in order to avoid including the code in builds which won't need
it.Signed-off-by: Paul Burton
Reviewed-by: Simon Glass
04 May, 2016
1 commit
-
For multiple ethernet interfaces the FDT offset of '/aliases' will change as we
are adding MAC addresses to the FDT.
Therefore only the first interface ('ethernet0') will get properly updated in
the FDT, with the rest getting FDT errors when we try to set their MAC address.Signed-off-by: Lev Iserovich
Acked-by: Joe Hershberger
18 Mar, 2016
1 commit
-
This reverts commit 71105f50fedddfa5b0535d102c3d5078671721ad.
The reverted commit was applied for a temporary to unbreak
few Exynos boards on the release.After the discussion about the change, this commit should be avoided.
Fixed device-tree for Exynos, allows reverting it without any issues.Signed-off-by: Przemyslaw Marczak
Cc: Stefan Roese
Cc: Tom Rini
Cc: Simon Glass
Cc: Stephen Warren
Cc: Stephen Warren
Tested-by: Simon Glass
Acked-by: Simon Glass
21 Jan, 2016
1 commit
-
This reverts commit 3e303f748cf57fb23e8ec95ab7eac0074be50e2b.
The fix up in the /aliases node does not work under the following
scenarios:
- Not every non-DM serial driver was written to have a driver name
that conforms the format of "serial%d" or "eserial%d".
- With driver model serial, the stdio_devices[] stores the serial
device node name in the device tree.Signed-off-by: Bin Meng
Acked-by: Simon Glass
14 Jan, 2016
1 commit
08 Jan, 2016
1 commit
-
Commit: dm: core: Enable optional use of fdt_translate_address()
Enables use of this function as default, but after this it's not
possible to get dev address for the case in which: '#size-cells == 0'This causes errors when getting address for some GPIOs, for which
the '#size-cells' is set to 0.Example error:
'__of_translate_address: Bad cell count for gpx0'Allowing for that case by modifying the macro 'OF_CHECK_COUNTS',
(called from )__of_translate_address(), fixes the issue.Now, this macro doesn't check, that '#size-cells' is greater than 0.
This is possible from the specification point of view, but I'm not sure
that it doesn't introduce a regression for other configs.Please test and share the results.
Tested-on: Odroid U3, Odroid X2, Odroid XU3, Sandbox.
Signed-off-by: Przemyslaw Marczak
Cc: Masahiro Yamada
Cc: Lukasz Majewski
Cc: Jaehoon Chung
Cc: Stefan Roese
Cc: Simon Glass
Cc: Bin Meng
Cc: Marek Vasut
Tested-by: Jaehoon Chung
Tested-by: Lukasz Majewski
22 Dec, 2015
2 commits
-
Currently in fdt_fixup_ethernet() the MAC address fix up is
handled in a loop of which the exit condition is to test the
"eth%daddr" env is not NULL. However this creates unnecessary
constrains that those "eth%daddr" env variables must be
sequential even if "ethernet%d" does not start from 0 in the
"/aliases" node. For example, with "/aliases" node below:aliases {
ethernet3 = &enet3;
ethernet4 = &enet4;
};"ethaddr", "eth1addr", "eth2addr" must exist in order to fix
up ethernet3's MAC address successfully.Now we change the loop logic to iterate the properties in the
"/aliases" node. For each property, test if it is in a format
of "ethernet%d", then get its MAC address from corresponding
"eth%daddr" env and fix it up in the dtb.Signed-off-by: Bin Meng
Acked-by: Joe Hershberger
Reviewed-by: Tom Rini
On OMAP4 Panda (+v4.3 kernel)
Tested-by: Tom Rini -
In fdt_fixup_ethernet() only "usbethaddr" is handled to fix up the
first usb ethernet port MAC address. Other additional usb ethernet
ports are ignored as there is no logic to handle "usbeth%daddr".It is suggested we should use "ethaddr" for all ethernet devices.
Hence deprecate "usbethaddr" usage in fdt_fixup_ethernet().This actually reverts commit b1f49ab8c7bad60426b30c134ae065ef77d2dfc1
"ARM: fdt support: Add usbethaddr as an acceptable MAC".Signed-off-by: Bin Meng
Acked-by: Joe Hershberger
Reviewed-by: Tom Rini
On OMAP4 Panda (+ v4.3 kernel)
Tested-by: Tom Rini
09 Dec, 2015
1 commit
-
Currently OF_BAD_ADDR is always -1ULL. When using OF_BAD_ADDR as the
return value of dev_get_addr(), it creates potential size mismatch
as dev_get_addr() uses FDT_ADDR_T_NONE as the return value which can
be either -1U or -1ULL depending on CONFIG_PHYS_64BIT. Now we change
OF_BAD_ADDR to FDT_ADDR_T_NONE to avoid such case.Signed-off-by: Bin Meng
Acked-by: Simon Glass
Reviewed-by: Stefan Roese
27 Oct, 2015
1 commit
-
Currently, using fdt_fixup_stdout() on a device tree that is missing
the relevant alias results in this:WARNING: could not set linux,stdout-path FDT_ERR_NOTFOUND.
ERROR: /chosen node create failed
- must RESET the board to recover.FDT creation failed! hanging...### ERROR ### Please RESET the board ###
There is no reason for this to be a fatal error rather than a warning,
and removing this allows for a smooth transition on a platform where
the device tree currently lacks the correct aliases but will have them
in the future.Signed-off-by: Scott Wood
Cc: Kumar Gala
Cc: Simon Glass
Reviewed-by: Simon Glass
Reviewed-by: York Sun
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
1 commit
-
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
06 May, 2015
1 commit
-
Adjust the printf() string to avoid a warning on sandbox.
Signed-off-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
04 Dec, 2014
1 commit
01 Dec, 2014
1 commit
-
After commit 933cdbb479: "fdt: Try to use fdt_address_cells()/fdt_size_cells()"
I noticed that allwinner boards would no longer boot.Switching to fdt_address_cells / fdt_size_cells changes the result from
bytes to 32 bit words, so when we increment pointers into the blob, we must
do so by 32 bit words now.This commit makes allwinner boards boot again.
Signed-off-by: Hans de Goede
Tested-by: Masahiro Yamada
Acked-by: Simon Glass
Tested-by: Stefan Roese
Tested-by: Vince Hsu
27 Nov, 2014
3 commits
-
Now that we have inttypes.h, use it in a few more places to avoid compiler
warnings on sandbox when building on 64-bit machines.Signed-off-by: Simon Glass
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