Age | Commit message (Collapse) | Author |
|
These should follow the UBoot standard. Update them.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Line up this backslash with all the others.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the SPI uclass to support a live device tree. Also adjust
spi_slave_ofdata_to_platdata() to accept a device instead of a blob and
offset.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update this driver and key_matrix to support a live device tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the reset domain uclass to support livetree. Fix the xlate() method
which has no callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the power domain uclass to support livetree. Fix the xlate() method
which has no callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the phy uclass to support livetree. Fix the xlate() method
which has no callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the mailbox uclass to support livetree. Fix the xlate() method
in all callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the xlate() method to use ofnode_phandle_args instead of the fdtdec
variant. This will allow drivers to support a live device tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the pmic uclass and all pmics to support a live device tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
We should not be including a PMIC header file in the board config. Move it
to a C file.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Update the i2c uclass to support a live device tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add an implementation of strcspn() which returns the number of initial
characters that do not match any in a rejection list.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This functions works like strchr() but returns the end of the string if
the character is not found. Add an implementation of this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add some definitions and helpers for livetree in the main of.h header
file. These include:
- reading multi-cell integers
- default number of address/size cells
- functions for comparing names
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
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_cells
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Convert this driver to support the live device tree and remove the old
fdtdec support.
The keyboard is not yet converted.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add support for requesting GPIOs with a live device tree.
This involves adjusting the function signature for the legacy function
gpio_request_by_name_nodev(), so fix up all callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes to stm32f746-disco.c:
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
This is not needed. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Move the main part of the GPIO request function into a separate function
so that it can be used by the live tree function when added. Update the
xlate method to use a node reference.
Update all GPIO drivers to handle the modified xlate() method.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Some tests require either livetree or flat tree. Add flags to allow the
tests to specify this. Adjust the test runner to run with livetree (if
supported) and then flat tree.
Some video tests are quite slow and running on flat tree adds little extra
test value, so run these on livetree only.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Show the filename of the test being run. Skip the path and show just the
base name.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add a function which looks up a device by its node (either in live tree
or flat tree).
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
When starting up driver model with a live tree we need to scan the tree
for devices. Add code to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Adjust this function to us an ofnode instead of an offset, so it can be
used with livetree. This involves updating all callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Adjust this function to use an ofnode instead of an offset, so it can be
used with livetree. This involves updating all callers.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
When a live tree is being used we need to record the node that was used to
create the device. Update device_bind_with_driver_data() to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
When the live tree is supported some functions need to change a little.
Add an implementation which is used when not inlining these functions.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
It is common to read a device-tree property from the node associated with
a device. Add convenience functions to do this so that drivers do not need
to deal with accessing the ofnode from the device.
These functions all start with 'dev_read_' to provide consistent naming
for all functions which read information from a device's device tree node.
These are inlined when using the flat DT to save code size. The live tree
implementation is added in a later commit.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Some functions deal with structured data rather than simple data types.
It makes sense to have these in their own file. For now this just has a
function to read a flashmap entry. Move the data types also.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add functions to add addresses in the device tree using ofnode references.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This function does not change the device tree so adjust it to use const
for this parameter.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add functions to access addresses in the device tree. These are brought
in from Linux 4.10.
Also fix up the header guard for fdtaddr.h to avoid confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Since U-Boot supports both a live tree and a flat tree, we need an easy
way to access the tree without worrying about which is currently active.
To support this, U-Boot has the concept of an ofnode, which can refer
either to a live tree node or a flat tree node.
For the live tree, the reference contains a pointer to the node (struct
device_node *) or NULL if the node is invalid. For the flat tree, the
reference contains the node offset or -1 if the node is invalid.
Add a basic set of operations using ofnodes. These are implemented by
using either libfdt functions (in the case of a flat DT reference) or
the live-tree of_...() functions.
Note that it is not possible to have both live and flat references active
at the same time. As soon as the live tree is available, everything in
U-Boot should switch to using that. This avoids confusion and allows us to
assume that the type of a reference is simply based on whether we have a
live tree yet, or not.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
The of_ prefix conflicts with the livetree version of this function.
Rename it to avoid problems when we add livetree support.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This function converts the flat device tree into a hierarchical one with
C structures and pointers. This is easier to access.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add a basic assortment of functions to access the live device tree. These
come from Linux v4.9 and are modified for U-Boot to the minimum extent
possible. While these functions are now very stable in Linux, it will be
possible to merge in fixes if needed.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Add a Kconfig option to enable a live device tree, built at run time from
the flat tree. Also add structure definitions and a root node.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
In linux v4.9 this returns a value. This saves checking the warning
condition twice in some code.
Update the U-Boot version to do this also.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Sometimes it is useful to be able to find a block device without also
probing it. Add a function for this as well as the associated test.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
With live tree we need a struct device_node * to reference a node. With
the existing flat tree, we need an int offset. We need to unify these into
a single value which can represent both.
Add an ofnode union for this and adjust existing code to move to this.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
This function is only used in one place. It is better to just declare it
internally since there is a simpler replacement for use outside the
driver-model core code.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
These support the flat device tree. We want to use the dev_read_..()
prefix for functions that support both flat tree and live tree. So rename
the existing functions to avoid confusion.
In the end we will have:
1. dev_read_addr...() - works on devices, supports flat/live tree
2. devfdt_get_addr...() - current functions, flat tree only
3. of_get_address() etc. - new functions, live tree only
All drivers will be written to use 1. That function will in turn call
either 2 or 3 depending on whether the flat or live tree is in use.
Note this involves changing some dead code - the imx_lpi2c.c file.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Move this group of address-related functions into a new file. These use
the flat device tree. Future work will provide new versions of these which
can support the live tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
|
|
Please pull another update for Broadcom MIPS.
This contains new SoC's, new boards and new drivers and some bugfixes.
|
|
Mostly including the Armada 37xx pinctrl / gpio driver.
|
|
Currently these (board agnostic) commands cannot be selected using
menuconfig and friends. Fix this the obvious way. As part of this,
don't muddle the meaning of CONFIG_HASH_VERIFY to mean both 'hash -v'
and "we have a hashing command" as this makes the Kconfig logic odd.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
[trini: Re-apply, add imply for a few cases, run moveconfig.py, also
migrate CRC32_VERIFY]
Signed-off-by: Tom Rini <trini@konsulko.com>
|
|
Now that the uart driver has been fixed we support more baud rates.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
|
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|