summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | dt-bindings: add imx-audmux macro definitionsBaruch Siach2020-01-071-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import fsl-imx-audmux.h from Linux as of v5.4-rc6. The header is unchanged since v4.18. That would make it easier to import DT files that depend on imx-audmux definitions from the kernel tree. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Fabio Estevam <festevam@gmail.com>
| * | | board: ge: pass rtc_status via device treeIan Ray2020-01-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass rtc_status via the device tree, instead of on kernel command line. Additionally, the 2038 mitigation is reported, if applied successfully. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
| * | | board: ge: bx50v3: Enable DM for PCI and ethernetDenis Zalevskiy2020-01-071-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DM for PCI pulls DM for ethernet that also needs other changes described below to build u-boot and keep existing functionality - ability to update MAC addresses of FEC ethernet adapter and I210 adapter connected to the Marvell switch. - fec_mxc driver with DM needs PHYLIB; - configuration items are moved from ge_bx50v3.h to ge_bx50v3_defconfig; - FEC is marked as eth0 because it is always present, so indices changed: I210 are still probed in the same order; - board_eth_init() was used by legacy ethernet, setup for enet iomux and pcie is moved to the board_late_init(); - pci_init() is called from the board_late_init() to initiate PCI bus probing, so I210 devices are propagated to the device tree; Signed-off-by: Denis Zalevskiy <denis.zalevskiy@ge.com> [Describe PHY reset in device tree] Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
| * | | board: ge: bx50v3: Fix message output to video consoleIan Ray2020-01-071-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use vidconsole for output to the LCD, now that DM_VIDEO is used. Write white text on a black background, like before migrating to DM_VIDEO. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
| * | | imx: Add support for i.MX28 based XEA boardLukasz Majewski2020-01-071-0/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces support for i.MX28 based XEA board. This board supports DM/DTS in U-Boot proper as well as DM aware drivers in SPL (u-boot.sb) by using OF_PLATDATA. More detailed information regarding usage of it can be found in ./board/liebherr/xea/README file. U-Boot SPL 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200) Trying to boot from MMC1 MMC0: Command 8 timeout (status 0xf0344020) mmc_load_image_raw_sector: mmc block read error U-Boot 2019.10-rc1-00233-g6aa549f05c (Aug 12 2019 - 09:23:36 +0200) CPU: Freescale i.MX28 rev1.2 at 454 MHz BOOT: SSP SPI #3, master, 3V3 NOR Model: Liebherr (LWE) XEA i.MX28 Board DRAM: 128 MiB MMC: MXS MMC: 0 Loading Environment from SPI Flash... SF: Detected n25q128a13 with page size 256 Bytes, erase size 64 KiB, total 16 MiB OK In: serial Out: serial Err: serial Net: Warning: ethernet@800f0000 (eth0) using random MAC address - ce:e1:9e:46:f3:a2 eth0: ethernet@800f0000 Hit any key to stop autoboot: 0 Signed-off-by: Lukasz Majewski <lukma@denx.de>
| * | | imx6: aristainetos: add support for rev C boardHeiko Schocher2020-01-071-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | add support for revision C boards. This board has no longer a NAND. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: add aristainetos 2b cslHeiko Schocher2020-01-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | add aristainetso board version CSL. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: readd aristainetos 2b boardHeiko Schocher2020-01-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | readd aristainetos 2b board. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: enable HAB bootHeiko Schocher2020-01-071-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | enable IMX_HAB on aristianetos board Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: cleanup default EnvironmentHeiko Schocher2020-01-071-55/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sync defaut Envoronment with customer changes. Unfortunately they are not changeable, as already board is in production mode. Get rid of the big bootcommand and set bootcommand through Kconfig option. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: add DM_I2C supportHeiko Schocher2020-01-071-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | enable DM_I2C in defconfig and remove i2c specific board code. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: add DM_VIDEO supportHeiko Schocher2020-01-071-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add DM_VIDEO support and remove now unneeded board code. As we show a bmp logo on boot, call now bmp_display() from board code and do not use cfb_console anymore. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: convert CONFIG_DM_SPIHeiko Schocher2020-01-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable CONFIG_DM_SPI and CONFIG_DM_SPI_FLASH and get rid of build removal warnings. define CONFIG_GPIO_ENABLE_SPI_FLASH is not longer needed, so remove it from config_whitelist.txt Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: convert to DM_USBHeiko Schocher2020-01-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop CONFIG_USB_MAX_CONTROLLER_COUNT and enable DM_USB in defconfig. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: convert to DM_MMCHeiko Schocher2020-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Enable DM_MMC support. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: remove aristainetos-v2.cHeiko Schocher2020-01-072-187/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove aristainetos-v2.c file, as we now want to switch to DM/DTS support and have all board specific code in one file. Goal is to setup differences through DT. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: disable gigabit supportHeiko Schocher2020-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | gigabit support does not work on the aristainetos board, so disable it. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: remove 2b versionHeiko Schocher2020-01-071-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove 2b version of aristainetos board, as it is easier to make the DM / DTS port and introduce the 2b board version again (also some more board version). Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: aristainetos: move defines to KconfigHeiko Schocher2020-01-073-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | move defines, which are already moved to Kconfig out of board config. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | video: lg4573: convert to DMHeiko Schocher2020-01-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | convert this driver to support DM. Signed-off-by: Heiko Schocher <hs@denx.de>
| * | | imx6: remove aristainetos boardHeiko Schocher2020-01-071-43/+0
| |/ / | | | | | | | | | | | | | | | remove not anymore used aristainetos board. Signed-off-by: Heiko Schocher <hs@denx.de>
* | | Merge tag 'u-boot-atmel-2020.04-a' of ↵Tom Rini2020-01-071-0/+2
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-atmel First set of u-boot-atmel features for 2020.04 cycle This feature set is a patch series from Tudor Ambarus which includes parsing of the spi flash SFDP parser for SST flashes, and using those tables to retrieve unique saved per device MAC address. This is then used as base mac address on the SAMA5D2 Wireless SOM EK board.
| * | mtd: spi: spi-nor-core: Add SST vendor specific SFDP parserTudor Ambarus2019-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JESD216 allow vendors to define their own SFDP tables. Add SST SFDP parser. The vendor table is allocated using resource-managed kmalloc - the table will be freed on driver detach. It will be accessible by getting the UCLASS_SPI_FLASH's private data. The SST's SFDP table is particularly of interest because contains pre-programmed globally unique EUI-48 and EUI-64 identifiers. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
* | | Merge branch 'next'Tom Rini2020-01-0639-61/+909
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring in the following merges: commit 8fbbec12f7d2c18f8883f3371cfca74a98b5dd87 Merge: 87f69f467a83 63618e71e89b Author: Tom Rini <trini@konsulko.com> Date: Fri Jan 3 09:48:47 2020 -0500 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq into next - updates and fixes on ls1028a, lx2, ls1046a, MC-DPSPARSER support commit 87f69f467a8335b171c71bf217d2625d515acd7c Merge: c0912f9bbfb2 4466b9970319 Author: Tom Rini <trini@konsulko.com> Date: Tue Dec 24 08:18:19 2019 -0500 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-mpc85xx into next - Enable DM driver on ppc/km boards - Enable DM_USB for some of NXP powerpc platforms: P5040, T4240, T208x, T104x, P4080, P2041, P2020, P1020, P3041 - Some updates in mpc85xx-ddr driver, km boards commit c0912f9bbfb26dd03d189953678691b799d35b6e Merge: 533c9f5714bd a1d6dc3f8407 Author: Tom Rini <trini@konsulko.com> Date: Wed Dec 18 07:20:19 2019 -0500 Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-x86 into next - Various x86 common codes updated for TPL/SPL - I2C designware driver updated for PCI - ICH SPI driver updated to support Apollo Lake - Add Intel FSP2 base support - Intel Apollo Lake platform specific drivers support - Add a new board Google Chromebook Coral commit 533c9f5714bdba79dc6f2629284d4c1a08a611d1 Merge: 553cb0688782 033e18b47bd0 Author: Tom Rini <trini@konsulko.com> Date: Tue Dec 17 07:53:08 2019 -0500 Merge tag '20191217-for-next' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c into next i2c: for next - misc: i2c_eeprom: Add partition support and add ability to query size of eeprom device and partitions - i2c common: add support for offset overflow in to address and add sandbox tests for it. commit 553cb06887825314e74a9bdac337467c77d1db88 Merge: f39abbbc531e b4f98b3b16ec Author: Tom Rini <trini@konsulko.com> Date: Thu Dec 12 08:18:59 2019 -0500 Merge tag 'dm-next-13dec19' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm into next buildman improvements including toolchain environment feature sandbox unicode support in serial
| * | armv8: ls1028ardb: enable DisplayPort Power supportWen He2019-12-261-0/+3
| | | | | | | | | | | | | | | | | | | | | Enable DP_PWR signal to power the DP to HDMI converter cable. Signed-off-by: Wen He <wen.he_1@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
| * | armv8: fsl-layerscape: Increase mmc read size for secure-boot headersUdit Agarwal2019-12-263-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maximum size of secure boot header to be read from MMC is 12KB which spans across 0x20 blocks. Hence increase the mmc read size for secure boot headers from MMC to 0x20 blocks. Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
| * | drivers/fsl-mc: Support DPSPARSER object and apply spb commandFlorinel Iordache2019-12-262-1/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for DPSPARSER object (create/destroy, open/close, apply spb) which is required to configure Soft Parser by using MC. Also add uboot command to apply Soft Parser Blob with command: fsl_mc apply spb <spb_load_addr> Signed-off-by: Florinel Iordache <florinel.iordache@nxp.com> Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
| * | ppc/kmeter1: remove unused defineHolger Brunck2019-12-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_CONS_INDEX is nowhere used for this board, we can drop it. Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com> CC: Priyanka Jain <priyanka.jain@nxp.com> CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
| * | board/km: remove CONFIG_KM_BOARD_NAMEHolger Brunck2019-12-2310-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use the existing CONFIG_SYS_CONFIG_NAME define for that and remove the option. Also fix the boot string for all km83xx boards. Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com> CC: Priyanka Jain <priyanka.jain@nxp.com> CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
| * | ppc/km: convert KM_DEF_NETDEV to KconfigHolger Brunck2019-12-234-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove this from the board header files and move it to Kconfig. Also use the correct default address for kmtegr1. Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com> CC: Priyanka Jain <priyanka.jain@nxp.com> CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
| * | ppc/km/tegr1: support second localbus clock signalHolger Brunck2019-12-232-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On kmtegr1 we have to specify the second localbus clock signal also instead of using the default for our ppc 8309 boards. Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com> CC: Priyanka Jain <priyanka.jain@nxp.com> CC: Valentin Longchamp <valentin.longchamp@ch.abb.com>
| * | Merge branch 'next' of https://gitlab.denx.de/u-boot/custodians/u-boot-x86 ↵Tom Rini2019-12-1819-18/+600
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into next - Various x86 common codes updated for TPL/SPL - I2C designware driver updated for PCI - ICH SPI driver updated to support Apollo Lake - Add Intel FSP2 base support - Intel Apollo Lake platform specific drivers support - Add a new board Google Chromebook Coral
| | * | x86: Add chromebook_coralSimon Glass2019-12-151-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for coral which is a range of Apollo Lake-based Chromebook released in 2017. This also includes reef released in 2016, since it is based on the same SoC. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | spl: Add methods to find the position/size of next phaseSimon Glass2019-12-151-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Binman supports writing the position and size of U-Boot proper and SPL into the previous phase of U-Boot. This allows the next phase to be easily located and loaded. Add functions to return these useful values, along with symbols to allow TPL to load SPL. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | x86: Move qemu CPU fixup function into its own fileSimon Glass2019-12-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is specific to qemu so it seems best to keep it separate from the generic code. Move it out to a new file and update the condition to use if() instead of #ifdef Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | mtd: spi: Export spi_flash_std_probe()Simon Glass2019-12-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With of-platdata we need to create drivers for particular chips, or at least drivers that are separate from the standard code, since C structures are created by dtoc which are private to that driver. To avoid duplicating the probing code, export this probe function for use by these drivers. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | spi: Correct operations check in dm_spi_xfer()Simon Glass2019-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present we have to have an xfer() method even if it does nothing. This is not correct, so fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | x86: fsp: Add a new arch_fsp_init_r() hookSimon Glass2019-12-151-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FSP2 we need to run silicon init early after relocation. Add a new hook for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | x86: fsp: Add FSP2 base supportSimon Glass2019-12-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for some important configuration options and FSP memory init. The memory init uses swizzle tables from the device tree. Support for the FSP_S binary is also included. Bootstage timing is used for both FSP_M and FSP_S and memory-mapped SPI reads. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | x86: Move UCLASS_IRQ into a separate fileSimon Glass2019-12-151-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update this uclass to support the needs of the Apollo Lake ITSS. It supports four operations. Move the uclass into a separate directory so that sandbox can use it too. Add a new Kconfig to control it and enable this on x86. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | pci: Add support for p2sb uclassSimon Glass2019-12-152-0/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Primary-to-Sideband bus (P2SB) is used to access various peripherals through memory-mapped I/O in a large chunk of PCI space. The space is segmented into different channels and peripherals are accessed by device-specific means within those channels. Devices should be added in the device tree as subnodes of the p2sb. This adds a uclass and enables it for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | x86: power: Add an ACPI PMC uclassSimon Glass2019-12-152-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel x86 SoCs have a power manager/controller which handles several power-related aspects of the platform. Add a uclass for this, with a few useful operations. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | dm: pci: Move pci_get_devfn() into a common fileSimon Glass2019-12-152-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Early in boot it is necessary to decode the PCI device/function values for particular peripherals in the device tree or of-platdata. This is needed in TPL where CONFIG_PCI is not defined. To handle this, move pci_get_devfn() into a file that is built even when CONFIG_PCI is not defined. Also add a function for use by of-platdata, to convert a reg property to a pci_dev_t. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | dm: pci: Allow delaying auto-config until after relocationSimon Glass2019-12-151-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present PCI auto-configuration happens in U-Boot both before and after relocation. This is a waste of time and may mess up static addresses used in board_init_f(). Adjust the code to supporting doing auto-configuration once, after relocation, under control of a device-tree property. This is needed for Apollo Lake for debugging the silicon-init code. Once the UART is moved to a different MMIO address the debug UART does not work and any debug output in Apollo Lake's arch_fsp_init_r() causes a hang. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | dm: core: Fix offset_to_ofnode() with invalid offsetSimon Glass2019-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the offset is -1 this function correctly sets up a null ofnode. But if the offset is any other negative number (e.g. -FDT_ERR_BADPATH) then it does the wrong thing. An offset of -1 in ofnode indicates that the ofnode is not valid. Any other negative value is not handled by ofnode_valid(). We could of course change that function, but it seems much better to always use the same value for an invalid node. Fix it by setting the offset to -1 if it is invalid for any reason. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | dm: gpio: Allow control of GPIO uclass in SPLSimon Glass2019-12-154-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present if CONFIG_SPL_GPIO_SUPPORT is enabled then the GPIO uclass is included in SPL/TPL without any control for boards. Some boards may want to disable this to reduce code size where GPIOs are not needed in SPL or TPL. Add a new Kconfig option to permit this. Default it to 'y' so that existing boards work correctly. Change existing uses of CONFIG_DM_GPIO to CONFIG_IS_ENABLED(DM_GPIO) to preserve the current behaviour. Also update the 74x164 GPIO driver since it cannot build with SPL. This allows us to remove the hacks in config_uncmd_spl.h and Makefile.uncmd_spl (eventually those files should be removed). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| | * | binman: Add a library to access binman entriesSimon Glass2019-12-151-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPL and TPL can access information about binman entries using link-time symbols but this is not available in U-Boot proper. Of course it could be made available, but the intention is to just read the device tree. Add support for this, so that U-Boot can locate entries. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * | | misc: i2c_eeprom: add size queryRobert Beckett2019-12-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ability to query size of eeprom device and partitions Signed-off-by: Robert Beckett <bob.beckett@collabora.com> Reviewed-by: Heiko Schocher <hs@denx.de>
| * | | i2c: add support for offset overflow in to addressRobert Beckett2019-12-171-0/+33
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices (2 wire eeproms for example) use some bits from the chip address to represent the high bits of the offset instead of or as well as using multiple bytes for the offset, effectively stealing chip addresses on the bus. Add a chip offset mask that can be set for any i2c chip which gets filled with the offset overflow during offset setup. Signed-off-by: Robert Beckett <bob.beckett@collabora.com> Signed-off-by: Ian Ray <ian.ray@ge.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* | | include/u-boot/crc.h: pull 'uint' definition on musl targetsSergei Trofimovich2020-01-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The build failure was originally reported on arm64-musl target at https://bugs.gentoo.org/703132. Here is the amd64-musl variant: ``` $ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig -j$(nproc) $ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all -j$(nproc) ... include/u-boot/crc.h:37:44: error: unknown type name 'uint'; did you mean 'int'? 37 | void crc16_ccitt_wd_buf(const uint8_t *in, uint len, | ^~~~ | int ``` Note: 'uint' is not defined there. On glibc 'uint' comes from <sys/types.h> and happens to work on most .c files. The change imports 'uint' declaration from '<compiler.h>'. Bug: https://bugs.gentoo.org/703132 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>