summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* odroid: remove CONFIG_DM_I2C_COMPAT configJaehoon Chung2017-06-191-5/+0
| | | | | | | | Remove the CONFIG_DM_I2C_COMPAT config. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini2017-06-037-5/+47
|\
| * armv8: ls2080aqds: Add support for SD bootSantan Kumar2017-06-012-1/+31
| | | | | | | | | | | | | | Signed-off-by: Santan Kumar <santan.kumar@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * armv8: ls2080a: Reorganise NAND_BOOT code in config flagSantan Kumar2017-06-012-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add CONFIG_NAND_BOOT config flag to organise NAND_BOOT specific code in config flag like -nand-boot specfic errata errata_rcw_src() -CONFIG_SYS_NAND_U_BOOT_DST,etc Signed-off-by: Santan Kumar <santan.kumar@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * QE: add QE support on SD bootZhao Qiang2017-06-014-3/+5
| | | | | | | | | | | | | | | | modify u_qe_init to upload QE firmware from SD card when it is SD boot Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
| * drivers: net: fsl-mc: Link MC boot to PHY_RESET_RBogdan Purcareata2017-06-012-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DPAA2 platforms boot the Management Complex based on the u-boot env variable "mcinitcmd". Instead of doing this step on each platform individually, define a single mc_env_boot function in the MC driver, since it's semantically tied to it. Call the function in a per-board reset_phy hook, as it gets called at a later moment, when all board PHY devices have been initialized. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Signed-off-by: Heinz Wrobel <heinz.wrobel@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | Merge git://git.denx.de/u-boot-sunxiTom Rini2017-06-032-0/+232
|\ \
| * | sunxi: A64/Pine64: update device tree from LinuxAndre Przywara2017-06-012-0/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux device tree for the Allwinner A64 SoC has changed a lot since the U-Boot version was merged. Let's replace the current DT with a exact copy of the Linux one as of: commit c6778ff813d2ca3e3c8733c87dc8b6831a64578b Merge: 0ff4c01 3c0e3abd Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 9 10:07:33 2017 -0700 This is the DT used in Linux 4.12-rc1. Since U-Boot has an Ethernet driver (while Linux does not yet), we provide the required DT nodes for it in an ...-u-boot.dtsi file, to both mark them as U-Boot specific and to allow easier upgrading once Linux gets the driver and its own binding later. Compared to the existing Ethernet DT nodes we just slightly tweak the clock and reset nodes in there to match the new bindings used by Linux for those. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
* | | Kconfig: Migrate FS_FAT / FAT_WRITETom Rini2017-06-0366-139/+1
| | | | | | | | | | | | | | | | | | | | | | | | Now that these symbols are in Kconfig, migrate all users. Use imply on a number of platforms that default to having this enabled. As part of this we must migrate some straglers for CMD_FAT and DOS_PARTITION. Signed-off-by: Tom Rini <trini@konsulko.com>
* | | board: ti: enable support for writing to fat partitionSekhar Nori2017-06-032-9/+0
| | | | | | | | | | | | | | | | | | | | | Enable support for writing to FAT partitions on TI's boards. Signed-off-by: Sekhar Nori <nsekhar@ti.com>
* | | config_fallbacks: add additional fallbacks for fat filesystemSekhar Nori2017-06-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add fallbacks needed to keep all boards building while they are migrated to use Kconfig symbols instead of defines in <board>_config.h files for FAT filesystem. These should eventually go away once Kconfig select or imply statements are put in place and duplicated defines in <board>_config.h removed. Signed-off-by: Sekhar Nori <nsekhar@ti.com> [trini: Update logic since CMD_FAT / CONFIG_SPL_FAT_SUPPORT are selecting FS_FAT] Signed-off-by: Tom Rini <trini@konsulko.com>
* | | configs: k2g_evm: make sure config fallbacks take effectSekhar Nori2017-06-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since config fallbacks contained in include/config_fallbacks.h come into k2g_evm.h file through ti_armv7_keystone2.h, it should be the last file included. Without this, #define of FAT_WRITE when environment is in FAT does not happen as the environment location is decided later in the file. Similar issues can come with other config fallbacks implemented. Signed-off-by: Sekhar Nori <nsekhar@ti.com>
* | | configs: k2*_evm: let each board decide env locationSekhar Nori2017-06-035-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all TI Keystone2 EVMs want environment in NAND flash. K2G EVM which has an MMC/SD slot, keep environment in a FAT partition on SD card. Since ti_armv7_keystone2.h defines environment is in NAND, boards which do not follow that have to #undef'ine that configuration. This leads to ugly ordering issues around where exactly the include of ti_armv7_keystone2.h can come in within the k2*_evm.h files. Move environment location to config file of each board. This should make it easy to change it for any one board without affecting all other boards. Signed-off-by: Sekhar Nori <nsekhar@ti.com>
* | | dm: test: Fix nit with position of backslashSimon Glass2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | Line up this backslash with all the others. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | dm: spi: Convert uclass to livetreeSimon Glass2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | cros_ec: Update the cros_ec keyboard driver to livetreeSimon Glass2017-06-011-2/+1
| | | | | | | | | | | | | | | | | | Update this driver and key_matrix to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | dm: reset: Update uclass to support livetreeSimon Glass2017-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | Update the reset domain uclass to support livetree. Fix the xlate() method which has no callers. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | dm: power-domain: Update uclass to support livetreeSimon Glass2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | Update the power domain uclass to support livetree. Fix the xlate() method which has no callers. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | dm: phy: Update uclass to support livetreeSimon Glass2017-06-011-2/+1
| | | | | | | | | | | | | | | | | | | | | Update the phy uclass to support livetree. Fix the xlate() method which has no callers. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | dm: mailbox: Update uclass to support livetreeSimon Glass2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | Update the mailbox uclass to support livetree. Fix the xlate() method in all callers. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | clk: Modify xlate() method for livetreeSimon Glass2017-06-011-2/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: pmic: Convert uclass to livetreeSimon Glass2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | Update the pmic uclass and all pmics to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | samsung: Move pmic header out of config fileSimon Glass2017-06-013-3/+0
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: i2c: Convert uclass to livetreeSimon Glass2017-06-011-2/+1
| | | | | | | | | | | | | | | | | | Update the i2c uclass to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | string: Add strcspn()Simon Glass2017-06-011-0/+15
| | | | | | | | | | | | | | | | | | | | | 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>
* | | string: Add strchrnul()Simon Glass2017-06-011-0/+13
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: Add more livetree helpers and definitionsSimon Glass2017-06-011-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | fdt: Rename a few functions in fdt_supportSimon Glass2017-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | cros_ec: Convert to support live treeSimon Glass2017-06-012-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: gpio: Add live tree supportSimon Glass2017-06-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: gpio: Drop blank line in gpio_xlate_offs_flags() commentSimon Glass2017-06-011-1/+0
| | | | | | | | | | | | | | | | | | This is not needed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | dm: gpio: Refactor to prepare for live tree supportSimon Glass2017-06-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Run tests with both livetree and flat treeSimon Glass2017-06-012-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: test: Show the test filename when runningSimon Glass2017-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add a way to find a device by ofnodeSimon Glass2017-06-012-0/+35
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Scan the live tree when setting up driver modelSimon Glass2017-06-011-1/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Update device_bind_driver_to_node() to use ofnodeSimon Glass2017-06-012-1/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Update lists_bind_fdt() to use ofnodeSimon Glass2017-06-011-4/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Allow binding a device from a live treeSimon Glass2017-06-011-4/+6
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Implement live tree 'read' functionsSimon Glass2017-06-011-92/+148
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add device-based 'read' functions to access DTSimon Glass2017-06-011-0/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add a place to put extra device-tree reading functionsSimon Glass2017-06-013-22/+48
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add address operations on device tree referencesSimon Glass2017-06-011-1/+22
| | | | | | | | | | | | | | | | | | Add functions to add addresses in the device tree using ofnode references. Signed-off-by: Simon Glass <sjg@chromium.org>
* | | fdt: Update fdt_get_base_address() to use constSimon Glass2017-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add livetree address functionsSimon Glass2017-06-012-2/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add operations on device tree referencesSimon Glass2017-06-011-3/+464
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Rename of_device_is_compatible()Simon Glass2017-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: Add a function to create a 'live' device treeSimon Glass2017-06-011-0/+24
| | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add livetree access functionsSimon Glass2017-06-011-0/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | dm: core: Add livetree definitionsSimon Glass2017-06-012-0/+109
| | | | | | | | | | | | | | | | | | | | | 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>