summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* armv7R: K3: am654: Add support for generating build targetsLokesh Vutla2018-11-163-0/+118
| | | | | | | | | | | | | | | | | | | | | Update Makefiles to generate: - tiboot3.bin: Image format that can be processed by ROM. Below is the tiboot3.bin image format that is required by ROM: _______________________ | X509 | | Certificate | | ____________________ | | | | | | | u-boot-spl.bin | | | | | | | |___________________| | |_______________________| Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
* armv7R: K3: am654: Enable MPU regionsLokesh Vutla2018-11-164-0/+64
| | | | | | | | | | | | | Enable MPU regions for AM654 evm: - Region0: 0x00000000 - 0xFFFFFFFF: Device memory, not executable - Region1: 0x41c00000 - 0x42400000: Normal, executable, WB, Write alloc - Region2: 0x80000000 - 0xFFFFFFFF: Normal, executable, WB, Write alloc - region3-15: Disabled With this dcache can be enabled either in SPL or U-Boot. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* ram: Introduce K3 AM654 DDR Sub System driverLokesh Vutla2018-11-166-0/+2087
| | | | | | | | | | | | | | | | | K3 based AM654 devices has DDR memory subsystem that comprises Synopys DDR controller, Synopsis DDR phy and wrapper logic to intergrate these blocks into the device. This DDR subsystem provides an interface to external SDRAM devices. Adding support for the initialization of the external SDRAM devices by configuring the DDRSS registers and using the buitin PHY routines. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Schuyler Patton <spatton@ti.com> Signed-off-by: James Doublesin <doublesin@ti.com>
* i2c: stm32f7: change setup struct to constPatrick Delaunay2018-11-161-2/+2
| | | | | | | Change static array to const when it is useful to save memory (move stm32f7_setup=0x18 from .data to .rodata section) Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* i2c: stm32f7: cosmetic: clean the driverPatrick Delaunay2018-11-161-15/+16
| | | | | | | Solve alignments issues in the driver to avoid checkpatch error. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* ARM: am3517_evm: Remove SPL_OF_CONTROL and OF_PLATDATAAdam Ford2018-11-161-2/+0
| | | | | | | After the recomendation, some testing shows like these are unnecessary. Suggested-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Adam Ford <aford173@gmail.com>
* ARM: omap3_logic: Remove SPL_OF_CONTROL and OF_PLATDATAAdam Ford2018-11-164-8/+0
| | | | | | | After the recomendation, some testing shows like these are unnecessary. Suggested-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Adam Ford <aford173@gmail.com>
* arm: Make arch specific memcpy thumb-safe.Klaus Goger2018-11-161-3/+5
| | | | | | | | | | | | The current arch implementation of memcpy cannot be called from thumb code, because it does not use bx instructions on return. This patch addresses that. Note, that this patch does not touch the hot loop of memcpy, so performance is not affected. Tested on MXS (arm926ejs) with and without thumb-mode enabled. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
* test/py: test pinmux commandPatrice Chotard2018-11-162-0/+70
| | | | | | | | | | | | | | Add pinmux test which test the following commands: - pinmux list - pinmux dev - pinmux status Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Mark some tests as sandbox-centric] Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* pinctrl: sandbox: Add get_pin_muxing ops supportPatrice Chotard2018-11-161-0/+18
| | | | | | | | Add get_pin_mux ops support to display the pin muxing description of the sandbox_pins[] Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* gpio: stm32f7: Add ops get_functionPatrice Chotard2018-11-161-0/+20
| | | | | | | | | This patch adds gpio get_function ops support. This function reports the state of a gpio. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
* pinctrl: stm32: Add get_pin_muxing() opsPatrice Chotard2018-11-161-0/+71
| | | | | | | | Add get_pin_muxing() ops to obtain the pin muxing description a given pin index. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* pinctrl: stm32: Add get_pin_name() opsPatrice Chotard2018-11-161-0/+46
| | | | | | | | Add get_pin_name ops to obtain a pin name given a pin index of a specified pin-controller. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* pinctrl: stm32: Add get_pins_count() opsPatrice Chotard2018-11-161-5/+85
| | | | | | | | | | | | | | | | | | | | Add get_pins_count ops to obtain the number of pins owns by a pin-controller. On STM32 SoCs bindings, each pin-controller owns several gpio banks. Each GPIO bank can own up to 16 pins. To obtain the total pins count, walk through each sub-nodes (ie GPIO banks) and sum each GPIO banks pins number. For that in probe() we build a list with each GPIO device reference found. This list will also be used with future get_pin_muxing and get_pin_name ops to speed up and optimize walk through all GPIO banks. As this code is common to all STM32 SoCs, this code is put under SPL_BUILD compilation flag to avoid to increase SPL code size for STM32F7 which is limited to 32Ko. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: pinmux: Add pinmux commandPatrice Chotard2018-11-164-0/+158
| | | | | | | | | | | | | | | pinmux command allows to : - list all pin-controllers available on platforms - select a pin-controller - display the muxing of all pins of the current pin-controller or all pin-controllers depending of given options Signed-off-by: Patrice Chotard <patrice.chotard@st.com> cmd: pinmux: Fix pinmux command if "pinmux status" command is used without having set dev using "pinmux dev", print pinmux usage Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: uclass: Add uclass_foreach_dev_probePatrice Chotard2018-11-161-0/+16
| | | | | | | | | Add uclass_foreach_dev_probe() which iterates through devices of a given uclass. Devices are probed if necessary and are ready to use. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: uclass: Add uclass_next_device_err() to return a valid devicePatrice Chotard2018-11-162-0/+25
| | | | | | | | Similarly to uclass_first_device_err(), add uclass_next_device_err() which returns an error if there are no next devices in that uclass. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: pinctrl: Add pinctrl_get_pin_name and pinctrl_get_pins_countPatrice Chotard2018-11-162-0/+45
| | | | | | | | | | Add pinctrl_get_pin_name() and pinctrl_get_pins_count() methods to obtain pin's name and pin's muxing given a pin reference. This will be used by the new pinmux command. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: pinctrl: Add get_pin_muxing() opsPatrice Chotard2018-11-162-0/+45
| | | | | | | | Add get_pin_muxing() which allows to display the muxing of a given pin belonging to a pin-controller. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* w1-eeprom: Add support for Maxim DS2502 add only memoryMartin Fuzzey2018-11-165-0/+292
| | | | Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
* ARM: omap3_logic: Make CONFIG_SYS_TEXT_BASE match README.omap3Adam Ford2018-11-164-0/+4
| | | | | | | | | README.omap3 has two options. For option 1, CONFIG_SYS_TEXT_BASE is set to 0x80100000. Option 2 lists 0x80008000. The existing value is neither of these, so this patch makes it equivalent to Option 1. Signed-off-by: Adam Ford <aford173@gmail.com>
* ARM: am3517_evm: Build for ThumbAdam Ford2018-11-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | In an effort to free up more resources in SPL and U-Boot, building for Thumb shrinks the code side. Before: text data bss dec hex filename 685588 25808 275724 987120 f0ff0 u-boot text data bss dec hex filename 55324 417 67460 123201 1e141 spl/u-boot-spl After: text data bss dec hex filename 515502 25808 275708 817018 c777a u-boot text data bss dec hex filename 42910 417 67460 110787 1b0c3 spl/u-boot-spl Signed-off-by: Adam Ford <aford173@gmail.com>
* configs: am3517_evm: Use default OMAP3 memory settingsAdam Ford2018-11-161-16/+0
| | | | | | | | The AM3517 is mostly am omap3, so this partch removes the custom memory configurations and just uses the default common entries for omap3 and armv7. Signed-off-by: Adam Ford <aford173@gmail.com>
* ARM: DTS: Resync am3517-evm.dts with Linux 4.19Adam Ford2018-11-163-8/+152
| | | | | | | | Some minor changes have been made to the AM3517-evm and the underlying am3517.dtsi files. This patch re-sync's the DTS and DTSI files with Linux. Signed-off-by: Adam Ford <aford173@gmail.com>
* mtd: nand: lpc32xx slc: disable DMA support in SPL buildsVladimir Zapolskiy2018-11-161-46/+32
| | | | | | | | | | | | | | Testing and analysis shows that at the moment LPC32xx NAND SLC driver can not get PL080 DMA backbone support in SPL build, because SPL NAND loaders operate with subpage (ECC step to be precisely) reads, and this is not supported in the NAND SLC + DMA + hardware ECC calculation bundle. The change removes a cautious build time warning and explicitly disables DMA flavour of the driver for SPL builds, to reduce the amound of #ifdef sections the code blocks are minimally reorganized. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
* mtd: nand: lpc32xx mlc: predefine number of NAND chips to supportVladimir Zapolskiy2018-11-161-0/+4
| | | | | | | | | | | Build option CONFIG_SYS_MAX_NAND_CHIPS is used by NXP LPC32xx NAND MLC driver only, as a preparation for potential removal or replacement of the option the change predefines CONFIG_SYS_MAX_NAND_CHIPS to 1, same value is used by the single user Work Microwave Work 92105 board, thus it will be safe now to remove the option as a board specific one. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
* gpio: pca953x: Clear the polarity invert register at initYe Li2018-11-161-0/+28
| | | | | | | | | | | | | | | The pca953x_gpio driver uses default value of polarity inversion register. For some devices like PCA9557 and MAX7310, their polarity inversion register default value is 0xf0. So for high 4 ports, when reading their values, the values are inverted as the actual level. This patch clears the polarity inversion register to 0 at init, so that the port read and write values are aligned. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Fugang Duan <fugang.duan@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* clk: Allow clock defaults to be set also during re-reloc stateAndreas Dannenberg2018-11-161-4/+0
| | | | | | | | | | | The earlier commit f4fcba5c5ba ("clk: implement clk_set_defaults()") which introduced the functionality for setting clock defaults such as rates and parents will skip the processing when executing in a re-reloc state. This for example can prevent the assigning of clock parents when running in SPL code. Go ahead and remove this limitation. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* bcm968580xref: add initial supportPhilippe Reynes2018-11-167-0/+190
| | | | | | | | | | This add the initial support of the broadcom reference board bcm968580xref with a bcm6858 SoC. This board has 512 MB of ram, 256 MB of flash (nand), 2 usb port, 1 uart, 4 ethernet ports (LAN), 1 ethernet port (WAN). Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* bcm6858: add initial supportPhilippe Reynes2018-11-162-0/+92
| | | | | | | This add the initial support of the broadcom bcm6858 SoC family, only the cpu, dram and uart are supported. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* serial: bcm6858: add serial supportPhilippe Reynes2018-11-163-0/+307
| | | | | | | This driver add the support of serial on bcm6858. It's based on serial for bcm6345. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
* cmd/bdinfo: correct output of numerical valuesHeinrich Schuchardt2018-11-161-2/+2
| | | | | | | | | | | Display all digits on 64bit systems. Currently we print only the lower 32 bits. Examples of values that can exceed 32 bits are the size and start of memory banks. For fdt_blob use the same output method as for other values. This avoids misalignment. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* arm: at91: wdt: Convert watchdog driver to dm/dtPrasanthi Chellakumar2018-11-1619-51/+114
| | | | | | | | Convert the Watchdog driver for AT91SAM9x processors to support the driver model and device tree. Changes "CONFIG_AT91SAM9_WATCHDOG" to new "CONFIG_WDT_AT91" Kconfig option. Signed-off-by: Prasanthi Chellakumar <prasanthi.chellakumar@microchip.com>
* ARMv8: SError exception handling in PSCI exception vectorsChee Hong Ang2018-11-161-0/+26
| | | | | | | | Allow platform vendors to handle SError interrupt exceptions from ARMv8 PSCI exception vectors by overriding this weak function 'plat_error_handler'. Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
* ARMv8: Add EL3 exception handling for ARMv8's KconfigChee Hong Ang2018-11-161-0/+7
| | | | | | | Kconfig option to allow all External Abort and SError exception taken to EL3. Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
* ARMv8: Enable all asynchronous abort exceptions taken to EL3Chee Hong Ang2018-11-162-0/+5
| | | | | | | Allow EL3 to handle all the External Abort and SError interrupt exception occur in all exception levels. Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
* configs: Enable THUMB2 on various ARM boardsTom Rini2018-11-164-0/+4
| | | | | | | | The clearfog, corvus, wb45n and picosam9g45 configs are close to exceeding their size limits, so enable THUMB2 builds on them to reclaim space. Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'pull-14nov18' of git://git.denx.de/u-boot-dmTom Rini2018-11-16171-343/+7486
|\ | | | | | | | | | | | | - virtio implementation and supporting patches - DM_FLAG_PRE_RELOC fixes - regmap improvements - minor buildman and sandbox things
| * Revert "imx8qxp_mek: Disable CONFIG_DISPLAY_CPUINFO"Bin Meng2018-11-141-1/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit c5bbfaf05dc8592b479a44df6abaadbab54fec2b. Disabling CONFIG_DISPLAY_CPUINFO was a temporary solution to get the v2018.11 release out. Now the merge window opens, revert it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cpu: sandbox: Add "u-boot, dm-pre-reloc" for all cpu nodesBin Meng2018-11-141-0/+3
| | | | | | | | | | | | | | | | To support CONFIG_DISPLAY_CPUINFO, add "u-boot,dm-pre-reloc" for all cpu nodes in Sandbox test.dts. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
| * cpu: Add DM_FLAG_PRE_RELOC flag to various cpu driversBin Meng2018-11-144-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | It turns out commit c0434407b595 broke some boards which have DM CPU driver with CONFIG_DISPLAY_CPUINFO option on. These boards just fail to boot when print_cpuinfo() is called during boot. Fixes: c0434407b595 ("board_f: Use static print_cpuinfo if CONFIG_CPU is active") Reported-by: Stefan Roese <sr@denx.de> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
| * dm: doc: Update description of pre-relocation supportBin Meng2018-11-141-4/+12
| | | | | | | | | | | | | | | | Add some description about pre-relocation driver binding, including usage of DM_FLAG_PRE_RELOC flag and caveats. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * watchdog: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng2018-11-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * video: simplefb: Remove DM_FLAG_PRE_RELOC flagBin Meng2018-11-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * sysreset: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng2018-11-143-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * serial: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng2018-11-1426-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * timer: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng2018-11-1414-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * ram: bmips: Remove DM_FLAG_PRE_RELOC flagBin Meng2018-11-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * pinctrl: Remove DM_FLAG_PRE_RELOC flag in various driversBin Meng2018-11-149-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: omap: Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL checkBin Meng2018-11-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a driver declares DM_FLAG_PRE_RELOC flag, it wishes to be bound before relocation. However due to a bug in the DM core, the flag only takes effect when devices are statically declared via U_BOOT_DEVICE(). This bug has been fixed recently by commit "dm: core: Respect drivers with the DM_FLAG_PRE_RELOC flag in lists_bind_fdt()", but with the fix, it has a side effect that all existing drivers that declared DM_FLAG_PRE_RELOC flag will be bound before relocation now. This may expose potential boot failure on some boards due to insufficient memory during the pre-relocation stage. To mitigate this potential impact, the following changes are implemented: - Remove DM_FLAG_PRE_RELOC flag in the driver, if the driver only supports configuration from device tree (OF_CONTROL) - Keep DM_FLAG_PRE_RELOC flag in the driver only if the device is statically declared via U_BOOT_DEVICE() - Surround DM_FLAG_PRE_RELOC flag with OF_CONTROL check, for drivers that support both statically declared devices and configuration from device tree Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>