- Jun 01, 2017
-
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
The standard sandbox board cannot run the of-platdata test since it needs SPL. Also, we should test the flat tree version of sandbox. Add these tests to the default test script. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a sandbox board to test the non-livetree build (i.e. with CONFIG_OF_FLAT disabled). This increases our build and test coverage. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
This prints out the wrong pointers. Fix it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
Use the new dev_read...() functions to access the device tree, so that a live tree can be used. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This is not needed. Drop it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
It is useful to run the driver model tests with both livetree and flat tree in case something is different between the two. Add this feature to the test runner. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
We want to run the same test on flat and live trees. In preparation for this, create a new function which handles running a test. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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 <sjg@chromium.org>
-
Simon Glass authored
Adjust this function to work with livetree. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Modify simple-bus to support livetree. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Modify regmap to support livetree. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
Add functions to add addresses in the device tree using ofnode references. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
If enabled, build a live device tree after relocation. This can then be used by driver model. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
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>
-
Simon Glass authored
Adjust the order to make it clear that *devp is set to NULL by default. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Enable CONFIG_DM_MMC_OPS and CONFIG_BLK for all Tegra devices. This moves Tegra to use driver model fully for MMC. Signed-off-by:
Simon Glass <sjg@chromium.org>
-