summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2020-05-18arm: Don't include common.h in header filesSimon Glass4-1/+9
It is bad practice to include common.h in other header files since it can bring in any number of superfluous definitions. It implies that some C files don't include it and thus may be missing CONFIG options that are set up by that file. The C files should include these themselves. Update some header files in arch/arm to drop this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop flash.h from common headerSimon Glass1-1/+0
Move this uncommon header out of the common header. Fix up some style problems in flash.h while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18flash: Tidy up coding style for flash functionsSimon Glass1-12/+12
Some functions use the wrong code style and generate checkpatch errors. Fix these. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18common: Drop uuid.h from common headerSimon Glass1-1/+0
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-17efi_loader: Add headers for EDK2 StandAloneMM communicationSughosh Ganu1-0/+208
In Arm devices OP-TEE has the ability to run StandAloneMM (from EDK2) in a separate partition and handle UEFI variables. A following patch introduces this functionality. Add the headers needed for OP-TEE <--> StandAloneMM communication Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-05-17efi_loader: round the memory area in efi_add_memory_map()Michael Walle1-2/+1
Virtually all callers of this function do the rounding on their own. Some do it right, some don't. Instead of doing this in each caller, do the rounding in efi_add_memory_map(). Change the size parameter to bytes instead of pages and remove aligning and size calculation in all callers. There is no more need to make the original efi_add_memory_map() (which takes pages as size) available outside the module. Thus rename it to efi_add_memory_map_pg() and make it static to prevent further misuse outside the module. Signed-off-by: Michael Walle <michael@walle.cc> Add missing comma in sunxi_display.c. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-05-16qemu-x86*_defconfig: Enable CONFIG_PCI_INIT_ROvidiu Panait1-2/+0
Enable CONFIG_PCI_INIT_R for qemux86 and qemux86-64 pci enumeration during boot in order to eliminate the custom preboot commands in include/configs/qemu-x86.h. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2020-05-15rename symbol: CONFIG_TEGRA -> CONFIG_ARCH_TEGRATrevor Woerner1-1/+1
Have this symbol follow the pattern of all other such symbols. Signed-off-by: Trevor Woerner <twoerner@gmail.com>
2020-05-15pci: Fix typo in definition for PCI_DEVSimon Glass1-1/+1
Fix a typo in the comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-15usb: Update struct usb_device to indicate speed enumSimon Glass1-1/+1
The speed member actually uses an enum, so add this to the comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
2020-05-14dfu: add prototype for dfu_transaction_initiate/cleanupPatrick Delaunay1-0/+3
Add prototype for function dfu_transaction_initiate and dfu_transaction_cleanup to avoid warning with W=1. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14usb: gadget: g_dnl: add function g_dnl_set_productPatrick Delaunay1-0/+1
Add a function g_dnl_set_product to change the Product string used in USB enumeration in any command based on download gadget. If the function is called with NULL pointer, the product string is set to the default value (product[] = "USB download gadget"). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14board: stm32mp1: support boot from spi-nandPatrick Delaunay1-2/+3
Manage BOOT_FLASH_SPINAND, with boot_device="spi-nand" and treat this value in bootcmd_stm32mp. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14board: stm32mp1: reserve memory for OP-TEE in device treePatrick Delaunay1-4/+0
Add reserve memory for OP-TEE in U-Boot and in kernel device tree: - no more reduce the DDR size in "memory" node: CONFIG_SYS_MEM_TOP_HIDE is no more used - U-Boot device-tree defines the needed "reserved-memory" for OP-TEE and U-Boot should not use this reserved memory: board_get_usable_ram_top use lmb lib to found the first free region, the not reserved memory, enough to relocate U-Boot: the needed size of U-Boot is estimated with gd->mon_len + CONFIG_SYS_MALLOC_LEN. - the optee node ("optee@...": firmware with compatible "linaro,optee-tz") and the associated "reserved-memory" are deactivated in kernel device tree when OP-TEE is not detected by U-Boot to prevent kernel issue (memory is reserved but not used, optee driver probe failed). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14stm32mp1: move MTDPART configuration in KconfigPatrick Delaunay1-22/+0
This patch reduces the stm32mp1 environment size and builds dynamically the MTD partitions with information from defconfig (CONFIG_MTDPARTS_...). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14stm32mp1: dynamically build DFU_ALT_INFOPatrick Delaunay1-33/+0
This patch reduces the stm32mp1 environment size and builds dynamically the DFU board configuration with gpt and mtd partitions and information from defconfig (CONFIG_DFU_ALT_RAM0). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-05-14ARM: stm32: Implement board coding on AV96Marek Vasut1-0/+15
The AV96 board does exist in multiple variants. To cater for all of them, implement board code handling. There are two GPIOs which code the type of the board, read them out and use the value to pick the correct device tree from an fitImage. Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Marek Vasut <marex@denx.de> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Cc: Patrick Delaunay <patrick.delaunay@st.com> Cc: Patrice Chotard <patrice.chotard@st.com> Change-Id: Iddb330b9a66500495885457cbe17edc0eacaaf43
2020-05-12usb: dwc3: add dis_del_phy_power_chg_quirkJagan Teki1-0/+1
Add a quirk to clear the GUSB3PIPECTL.DELAYP1TRANS bit, which specifies whether disable delay PHY power change from P0 to P1/P2/P3 when link state changing from U0 to U1/U2/U3 respectively. Reference from below Linux commit, commit <00fe081dc3a3> ("usb: dwc3: add dis_del_phy_power_chg_quirk") Cc: Marek Vasut <marex@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-11Merge tag 'efi-2020-07-rc2-4' of ↵Tom Rini2-51/+108
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-07-rc2-4 This pull request comprises: * bug fixes * documentation fixes * a new function to determine u16 string sizes and its unit test
2020-05-11Merge tag 'ti-v2020.07-rc2' of ↵Tom Rini3-64/+28
https://gitlab.denx.de/u-boot/custodians/u-boot-ti - Fix boot issues on Nokia RX-51 - Configure AM6 CPSW for 10Mbps in rgmii mode. - Minor changes for J721e
2020-05-11Merge tag 'u-boot-imx-20200511' of ↵Tom Rini10-7/+409
https://gitlab.denx.de/u-boot/custodians/u-boot-imx i.MX for 2020.07 ---------------- - i.MX NAND and nandbxb for i.MX8M - imx8MM : new beacon devkit - imx8MQ : new pico-imx8MQ - imx8QXP : extend to enable M4, fixes - add thermal support - caches in SPL (missing board) - Fixes Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/685391011
2020-05-11Nokia RX-51: Enable CONFIG_CONSOLE_MUXPali Rohár1-3/+3
After this change both device display and serial console would contain U-Boto output automatically without any future configuration. This would allow easier debugging on real device as access to serial console is hard and also in qemu emulator where it is easier to copy+paste from serial console as from SDL framebuffer. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-05-11Nokia RX-51: Remove PART* macrosPali Rohár1-42/+0
Now when code for defining partitions is duplicated at two locations (option CONFIG_MTDPARTS_DEFAULT in nokia_rx51_defconfig file and macro OMAP_TAG_PARTITION_CONFIG in rx51.c file) there is no need to have common macros. Lets inline PART* macros to rx51.c file. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Revert back onenand defitionsPali Rohár1-10/+0
In commit commit 43ede0bca7fc ("Kconfig: Migrate MTDIDS_DEFAULT / MTDPARTS_DEFAULT") were removed definitions for onenand partitions. Revert them back and enable needed options for onenand support. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Move code from defconfig back to C header filePali Rohár1-0/+22
In commit commit 37304aaf60bf ("Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig") was moved complicated multiline script code from C header to oneliner in defconfig. After this change multiline to wide oneliner it is hard to read this code and even harder to debug. Moreover this script code should be at place where are other scripts, so move it back to C header file. Define new env variable preboot which stores this script and in option CONFIG_PREBOOT calls this preboot variable. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Move comment about CONFIG_SYS_TEXT_BASE to correct placePali Rohár1-6/+0
In commit commit 278b90ce786f ("configs: Migrate CONFIG_SYS_TEXT_BASE") was moved definition for CONFIG_SYS_TEXT_BASE option but author probably forgot to move also comment for lines which are moving. So do it now! Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-11Nokia RX-51: Update my email addressPali Rohár2-2/+2
I'm using a new email address, so reflect this state also in U-Boot. Signed-off-by: Pali Rohár <pali@kernel.org>
2020-05-10iopoll: Add readl_poll_sleep_timeoutJagan Teki1-0/+6
Add readl poll API with sleep and timeout support. This change is referenced from Linux from below commit: commit <5f5323a14cad19323060a8cbf9d96f2280a462dd> ("iopoll: introduce read_poll_timeout macro") Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-10iopoll: Add dealy to read pollJagan Teki1-2/+6
Some drivers and other bsp code not only poll the register with timeout but also required to delay on each transaction. This patch add that requirement by adding sleep_us variable so-that read_poll_timeout now support delay as well. This change is referenced from Linux from below commit: commit <5f5323a14cad19323060a8cbf9d96f2280a462dd> ("iopoll: introduce read_poll_timeout macro") Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-10iopoll: Add read_poll_timeout common APIJagan Teki1-2/+4
Add read_poll_timeout common API similar to Linux iopoll. readx_poll_timeout will trigger read_poll_timeout with proper op. This will help to extend the functionalities like sleep_us to poll timeout in future. This change is referenced from Linux from below commit: commit <5f5323a14cad19323060a8cbf9d96f2280a462dd> ("iopoll: introduce read_poll_timeout macro") Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-10clk: Fix clk func names in commentsJagan Teki1-6/+6
clk function names in comments should be prefix with clk instead of clock. Fix it. Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-05-10phy: Use _nodev naming convention if non-device clientsJagan Teki1-2/+5
Clients that are requesting some of uclass API's without a device (with ofnode) usually have _nodev naming convention. - clk_get_by_index_nodev - clk_get_by_name_nodev - reset_get_by_index_nodev - gpio_request_by_name_nodev So, update the same naming convention PHY framework. This doesn't change the existing functionality. Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-10phy: Fix node description of phy_get_by_nodeJagan Teki1-1/+1
node is most of device related API's are termed as device node and without device related API's are termed as ofnode. generic_phy_get_by_node API is without device API, so fixed the node description as ofnode. Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-10spi: Zap lpc32xx_ssp driver-related codeJagan Teki2-10/+0
lpc32xx_ssp driver is deprecated, no active updates and no board user, hence dropped the same. Cc: Vladimir Zapolskiy <vz@mleia.com> Cc: Albert ARIBAUD <albert.aribaud@3adev.fr> Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2020-05-10imx: imx8qxp: update fdt_file according to m4 statePeng Fan1-1/+1
Update fdt_file according to m4 parts state Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10imx: imx8qm: update fdt_file according to m4 statePeng Fan1-1/+1
Update fdt_file according to m4 parts state Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10imx: imx8qm/qxp: Recover SPL data section for partition rebootPeng Fan1-0/+1
When doing partition reboot, the boot image won't be reloaded by ROM, it is just CPU reset to boot entry. The SW has to keep the boot image inside the RAM unchanged. It includes both the TEXT section and DATA section. For SPL, the problem is DATA section will be updated at runtime, so in next partition reboot the data is not same as the initial value from cold boot. If any code depends on the initial value, then it will have problem. This patch introduces a mechanism to recover the data section for partition reboot. It adds a new section in image for saving data section. When from cold boot, the data section will be saved to that new section at SPL early phase. When from partition reboot, the data section will be restored from the new section. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10mtd: nand: raw: mxs_nand changes for nandbcbHan Xu1-1/+2
Add more BCH setting mode and remove the unnecessary platform constrain Signed-off-by: Han Xu <han.xu@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10dt-bindings: imx_rsrc: add SC_R_NONEPeng Fan1-0/+1
Add SC_R_NONE entry Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10imx: Add support for i.MX8MM Beacon EmbeddedWorks devkit.Adam Ford1-0/+152
Beacon EmbeddedWorks, formerly known as Logic PD, is releasing a devkit based on the i.MX8M Mini SoC consisting of baseboard + SOM. It supports eMMC on the SOM, microSD on the baseboard, various GPIO, the PINCTRL, and UART. Signed-off-by: Adam Ford <aford173@gmail.com>
2020-05-10mtd: mxs_nand: fix the gf_13/14 definition issueHan Xu1-0/+1
gf_13/14 mask was not set correctly in register definition. Signed-off-by: Han Xu <han.xu@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10mtd: gpmi: provide the option to use legacy bch geometryYe Li1-0/+2
Provide an option in DT to use legacy bch geometry, which compatible with the 3.10 kernel bch setting. To enable the feature, adding "fsl,legacy-bch-geometry" under gpmi-nand node. NOTICE: The feature must be enabled/disabled in both u-boot and kernel. Signed-off-by: Han Xu <han.xu@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10mtd: gpmi: change the BCH layout setting for large oob NANDYe Li1-4/+8
The code change updated the NAND driver BCH ECC layout algorithm to support large oob size NAND chips(oob > 1024 bytes) and proposed a new way to set ECC layout. Current implementation requires each chunk size larger than oob size so the bad block marker (BBM) can be guaranteed located in data chunk. The ECC layout always using the unbalanced layout(Ecc for both meta and Data0 chunk), but for the NAND chips with oob larger than 1k, the driver cannot support because BCH doesn’t support GF 15 for 2K chunk. The change keeps the data chunk no larger than 1k and adjust the ECC strength or ECC layout to locate the BBM in data chunk. General idea for large oob NAND chips is 1.Try all ECC strength from the minimum value required by NAND spec to the maximum one that works, any ECC makes the BBM locate in data chunk can be chosen. 2.If none of them works, using separate ECC for meta, which will add one extra ecc with the same ECC strength as other data chunks. This extra ECC can guarantee BBM located in data chunk, of course, we need to check if oob can afford it. Previous code has two methods for ECC layout setting, the legacy_calc_ecc_layout and calc_ecc_layout_by_info, the difference between these two methods is, legacy_calc_ecc_layout set the chunk size larger chan oob size and then set the maximum ECC strength that oob can afford. While the calc_ecc_layout_by_info set chunk size and ECC strength according to NAND spec. It has been proved that the first method cannot provide safe ECC strength for some modern NAND chips, so in current code, 1. Driver read NAND parameters first and then chose the proper ECC layout setting method. 2. If the oob is large or NAND required data chunk larger than oob size, chose calc_ecc_for_large_oob, otherwise use calc_ecc_layout_by_info 3. legacy_calc_ecc_layout only used for some NAND chips does not contains necessary information. So this is only a backup plan, it is NOT recommended to use these NAND chips. Signed-off-by: Han Xu <b45815@freescale.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10net: Add eth phy generic driver for shared MDIOYe Li2-0/+18
For dual ethernet controllers, the HW design may connect ETH phys to one MDIO ports. So two different ethernet drivers have to share MDIO bus. Since two ethernet drivers are independent, we can't ensure their probe order. To resolve this problem, introduce an eth phy generic driver and uclass. After eth-uclass binds, we search the mdio node and binds the phy node with the eth-phy-generic driver. When one eth driver get its phy device, the parent of phy device will probe prior than phy device. So this ensure the eth driver ownes the MDIO bus will be probed before using its MDIO. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-10ARM: imx: pico-imx8mq: Add support for Technexion Pico-iMX8MQMarek Vasut1-0/+199
Add initial support for Technexion Pico-iMX8MQ SoM on PicoPI carrier board. Currently working is ethernet, serial, eMMC. DT is imported from Linux 5.4.28 ("462afcd6e7ea") . Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: "NXP i.MX U-Boot Team" <uboot-imx@nxp.com> Cc: Peng Fan <peng.fan@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2020-05-10Merge branch 'master' of git://git.denx.de/u-bootStefano Babic328-1011/+660
2020-05-09configs: ti: Fix usage of undefined variable overlay_filesSuman Anna1-1/+1
The env variable overlay_files is used while adding the environment support commands for FIT loading, but it was cleaned up just prior in commit ee53b59511a6 ("configs: Remove unneeded overlay_files environment variable"). Fix this by replacing the undefined variable with the proper name_overlays env variable. Fixes: 76470b6929d5 ("configs: ti: Add environment support commands for FIT loading") Signed-off-by: Suman Anna <s-anna@ti.com>
2020-05-09lib: charset: correct function descriptionsHeinrich Schuchardt1-14/+25
Change function descriptions to match kernel doc style. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-05-09charset: Add support for calculating bytes occupied by a u16 stringSughosh Ganu1-0/+12
The current code uses 'u16_strlen(x) + 1) * sizeof(u16)' in various places to calculate the number of bytes occupied by a u16 string. Let's introduce a wrapper around this. This wrapper is used on following patches Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-05-09efi_selftest: add unit test functions to HTML documentationHeinrich Schuchardt1-38/+72
Add the UEFI unit test helper functions to the generated HTML documentation. Correct some documentation texts in include/efi_selftest.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>