aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2023-06-14net: ldpaa_eth: extend debug capabilities with DPMAC statisticsIoana Ciornei
The ldpaa_eth driver already had a DPMAC statistics dump, this patch extends the list of stats and adds a bit more structure to the code. For a bit more context, the DPAA2 u-boot software architecture uses a default network interface object - a DPNI - which, at runtime, will get connected to the currently used DPMAC object. Each time the .stop() eth callback is called, the DPMAC is destroyed thus any previous counters will get lost. As a preparation for the next patches, we add a software kept set of DPMAC counters which will get updated before each destroy operation takes place. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-06-14net: ldpaa_eth: transform dpni_statistics from a struct to a unionIoana Ciornei
In order to simplify code, dpni_statistics can be written as a union. Using the raw accessors we can just loop through all the statistics from a page without trying to access each an every one independently. Make this change to a union. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-06-14net: ldpaa_eth: fix the memory layout of the dpmac_get_counters() APIIoana Ciornei
Each MC commands has a specific predefined memory layout that gets interpreted by the firmware. The dpmac_get_counters() API memory layout is wrong, thus the results returned by the command are incorrect. Fix this by updating the offset of the counter field. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-06-12Merge tag 'xilinx-for-v2023.10-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2023.10-rc1 global: - Use proper U-Boot project name Fix sparse warnings in zynqmp-clk, zynqmp handoff, board cmd: - Cover incorrect 0 length entries Versal NET: - Add bootmode logic - Support SPP production version - Add loadpdi command ZynqMP: - Clear pmufw node command ID handling - Change power domain behavior around zynqmp_pmufw_node() - Fix zynqmp cmd return values and pmufw command - Fix R5 tcm init and modes mmc: - Sync Versal NET emmc DT binding pcie: - Add support for ZynqMP PCIe root port video: - Add support for ZynqMP DP tools: - Fix debug message in relocate-rela
2023-06-12Merge tag v2023.07-rc4 into nextTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-06-12xilinx: zynqmp: Enable the vidconsole by defaultVenkatesh Yadav Abbarapu
Add the vidconsole flags for video serial console. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/f1b58d1d1052bf2d8cb8b25af44ecbb567ebbd4a.1684312924.git.michal.simek@amd.com
2023-06-12video: Add support for RGBA8888 formatMichal Simek
Add support for RGBA8888 32bpp format where pixels are picked in 32-bit integers, where the colors are stored in memory such that R is at lowest address, G after that, B after that, and A last. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/aa1de54b7d4ff46df6858f76d52634e0c5c71a4a.1684312924.git.michal.simek@amd.com
2023-06-12global: Use proper project name U-BootMichal Simek
Use proper project name in comments, Kconfig, readmes. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/0dbdf0432405c1c38ffca55703b6737a48219e79.1684307818.git.michal.simek@amd.com
2023-06-10net: phy: Unpublish phy_connect_dev()Marek Vasut
The phy_connect_dev() is legacy API, now that there are no users, make it internal to phy.c and unpublish it from headers. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-06-09fwu: DeveloperBox: add support for FWUJassi Brar
Add code to support FWU_MULTI_BANK_UPDATE. The platform does not have gpt-partition storage for Banks and MetaData, rather it used SPI-NOR backed mtd regions for the purpose. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-06-09FWU: Add FWU metadata access driver for MTD storage regionsMasami Hiramatsu
In the FWU Multi Bank Update feature, the information about the updatable images is stored as part of the metadata, on a separate region. Add a driver for reading from and writing to the metadata when the updatable images and the metadata are stored on a raw MTD region. The code is divided into core under drivers/fwu-mdata/ and some helper functions clubbed together under lib/fwu_updates/ Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2023-06-09fwu: rename fwu_get_verified_mdata to fwu_get_mdataJassi Brar
fwu_get_mdata() sounds more appropriate than fwu_get_verified_mdata() Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09fwu: meta-data: switch to management by common codeJassi Brar
The common code can now read, verify and fix meta-data copies while exposing one consistent structure to users. Only the .read_mdata() and .write_mdata() callbacks of fwu_mdata_ops are needed. Get rid of .get_mdata() .update_mdata() .get_mdata_part_num() .read_mdata_partition() and .write_mdata_partition() and also the corresponding wrapper functions. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-09fwu: move meta-data management in coreJassi Brar
Instead of each i/f having to implement their own meta-data verification and storage, move the logic in common code. This simplifies the i/f code much simpler and compact. Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2023-06-08ARM: renesas: Add R8A77980 V3HSK board and CPLD codeValentine Barshak
Add board code for the R8A77980 V3HSK board. Add CPLD sysreset driver to the R-Car V3H SK board. Extracted from a larger patch by Valentine Barshak. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Sync configs and board code with V3H Condor, squash CPLD driver in]
2023-06-08ARM: rmobile: Drop eagle.h config of R8A77970 V3M Eagle boardMarek Vasut
The eagle.h is now empty and only includes rcar-gen3-common.h . Use rcar-gen3-common.h directly instead and drop eagle.h . No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-06-08efi_loader: add the number of image entries in efi_capsule_update_infoMasahisa Kojima
The number of image array entries global variable is required to support EFI capsule update. This information is exposed as a num_image_type_guids variable, but this information should be included in the efi_capsule_update_info structure. This commit adds the num_images member in the efi_capsule_update_info structure. All board files supporting EFI capsule update are updated. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-06-06ubifs: allow loading to above 4GiBBen Dooks
The ubifsload command is truncating any address above 4GiB as it casts this address to an u32, instead of using an unsigned long which most of the other load commands do. Change this to an unsigned long to allow loading into high memory for boards which use these areas. Fixes the following error: => ubifsload 0x2100000000 /boot/Image.lzma Loading file '/boot/Image.lzma' to addr 0x00000000... Unhandled exception: Store/AMO access fault Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
2023-05-31acpi: Put the version numbers in a central placeSimon Glass
At present two acpi files are built every time since they use a version number from version.h This is not necessary. Make use of the same technique as for the version string, so that they are build only when they change. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-05-31asm-generic: simplify unaligned.hJens Wiklander
The get_unaligned()/put_unaligned() implementations are more complex than necessary. Move everything into one file and use a more compact implementation based on packed struct access and byte swapping macros. This patch is based on the Linux kernel commit 803f4e1eab7a ("asm-generic: simplify asm/unaligned.h") by Arnd Bergmann. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31linux/unaligned: remove unused access_ok.hJens Wiklander
linux/unaligned/access_ok.h is unused, so remove it. Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-05-31include: Remove unused header filesTom Rini
As part of various code clean-ups we have on occasion missed removing unused header files. None of these files are referenced anywhere else at this point. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-05-31faraday: remove orphaned header fileAndre Przywara
Commit 11232139e399 ("nds32: Remove the architecture") removed the nds32 architecture, and with it the last user of the Faraday AHB controller header file. Consequently remove that header file as well. This was found because the inclusion guard was misspelled. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-31imx: fix header inclusion guardsAndre Przywara
It seems like the header inclusion guards for some IMX related headers were misspelled or got out of sync. Make the preprocessor symbols for the #ifndef and #define lines the same, so that the double inclusion protection works as expected. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-05-31arm: Remove ti816x_evm board and ti816x SoC supportTom Rini
This platform is currently unmaintained and untested, so remove it. Further, as it is the only TI816X SoC example, remove related files as well. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-05-21arm: dts: imx93: sync device tree with LinuxPeng Fan
Sync device tree with next-20230426 Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-05-21imx9: imx93_evk: drop unused macroPeng Fan
Drop unused macro Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-05-21imx: firmware: sci: add inline functions when IMX8 not enabledPeng Fan
Since we might reuse some drivers for other platforms, while the drivers have sci firmware api, so to avoid build failure add inline functions Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-05-21imx: move imx8 sci header file to include/firmware/imxPeng Fan
Move imx8 sci header file to include/firmware/imx, then we could use build macro to reuse some i.MX8 drivers for i.MX9, such as drivers/cpu/imx8_cpu.c. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Stefano Babic <sbabic@denx.de>
2023-05-16Merge tag 'efi-2023-07-rc3' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request efi-2023-07-rc3 Documentation: * update the description of signature algorithms UEFI: * fix unaligned access to GUID in HII database protocol * fix launching EFI binaries loaded via semihosting * fix filling of file path in loaded image protocol for non-block devices
2023-05-15environment: ti: rproc: fix remoteproc environment variablesManorit Chawdhry
During refactor this seemed to have been missed. Fixes: 65dbb128fb45 ("include: environment: ti: Use .env for environment variables") Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
2023-05-15envtools lack extra settings since commit 86b9c3e4e4 ("env: Allow U-Boot ↵Christophe Leroy
scripts to be placed in After converting my targets from CFG_EXTRA_ENV_SETTINGS to CONFIG_EXTRA_ENV_TEXT as suggested by Tom, I discovered that fw_setenv doesn't set the entire defaut environment anymore. I tried to fix it with the below patch, but it fails qemu-x86 CI test, see https://source.denx.de/u-boot/custodians/u-boot-mpc8xx/-/pipelines/16326 That's the only CI test that fails AFAICS. Could you help with a solution ? This needs to be fixed. Thanks Christophe ---- >8 ---- From: Christophe Leroy <christophe.leroy@csgroup.eu> Subject: [RFC PATCH] envtools: Fix default environment After converting some targets from CFG_EXTRA_ENV_SETTINGS to CONFIG_EXTRA_ENV_TEXT, default environment embedded in fw_env tool missed all extra settings. Commit 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in a .env file") restricted the inclusion of the content of that file to builds without USE_HOSTCC. But as mentionned in commit 79fc0c5f49 ("tools/env: cross-compile fw_printenv without setting HOSTCC"), HOSTCC and USE_HOSTCC are kept for code re-use. Remove the restricting so that settings included in a .env file are also added to fw_env tool. Fixes: 86b9c3e4e4 ("env: Allow U-Boot scripts to be placed in a .env file") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-15Fix sparse checks processingChristophe Leroy
A lot of errors are encountered when building with sparse checking activated (make C=1 or make C=2). Many of them are fixed in Linux. Resynchronise Makefile and include/linux/build_bug.h with Linux kernel sources by porting the following Linux commits into u-boot: - 6c49f359ca14 ("kbuild: disable sparse warnings about unknown attributes") - 80591e61a0f7 ("kbuild: tell sparse about the $ARCH") - 8788994376d8 ("linux/build_bug.h: change type to int") - 527edbc18a70 ("build_bug.h: remove most of dummy BUILD_BUG_ON stubs for Sparse") - c60d3b79423a ("build_bug.h: remove negative-array fallback for BUILD_BUG_ON()") - 14e83077d55f ("include: drop pointless __compiler_offsetof indirection") Also revert commit aa9e891c63 ("include/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined'") because the error it creates is worse than the warning it is trying to fix. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-05-15Merge https://source.denx.de/u-boot/custodians/u-boot-cfi-flashTom Rini
- cfi: respect reg address length (Nuno)
2023-05-15mtd: cfi: respect reg address lengthNuno Sá
flash_get_size() will get the flash size from the device itself and go through all erase regions to read protection status. However, the device mappable region (eg: devicetree reg property) might be lower than the device full size which means that the above cycle will result in a data bus exception. This change fixes it by reading the 'addr_size' during probe() and also use that as one possible upper limit. Signed-off-by: Nuno Sá <nuno.sa@analog.com>
2023-05-14Merge branch 'master_rzn1/rzn1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-sh - R-Car RZN1 support
2023-05-13bootstd: Rename distro and syslinux to extlinuxSimon Glass
We use the terms 'distro' to mean extlinux but they are not really the same. 'Distro' could refer to any method of booting a distribution, whereas extlinux is a particular method. Also we sometimes use syslinux, but it is better to use the same term in all cases. Rename distro to syslinux and also update bootstd uses of syslinux to use extlinux instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-05-13usb: Tidy up the usb_start flagSimon Glass
This should be declared in a header file so that type-checking works correctly. Add a single declaration to usb.h and remove the others. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-05-13efi_loader: fix efi_dp_from_file()Heinrich Schuchardt
* When called from efi_dp_from_name() we miss to append the filename for non-block devices. * expand_media_path() could be simplified by using efi_dp_from_file to prepend the device path of the boot device. This can be avoided by passing a device path to efi_dp_from_file() instead of a block device descriptor and a partition number. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-05-13efi_loader: Fix warnings for unaligned accessesIlias Apalodimas
Tom reports that when building with clang we see this warning: field guid within 'struct efi_hii_keyboard_layout' is less aligned than 'efi_guid_t' and is usually due to 'struct efi_hii_keyboard_layout' being packed, which can lead to unaligned accesses [-Wunaligned-access] This happens because 'struct efi_hii_keyboard_layout' is defined as packed and thus has 1-byte alignment but efi_guid_t is a type that requires greater alignment than that. However the EFI spec describes the EFI_GUID as "128-bit buffer containing a unique identifier value. Unless otherwise specified" So convert the efi_guid_t -> u8 b[16] here and skip the alignment requirements. Since the struct is packed to begin with, it makes no difference on the final memory layout. Suggested-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-05-13tools: spkgimage: add Renesas SPKG formatRalph Siemsen
Renesas RZ/N1 devices contain BootROM code that loads a custom SPKG image from QSPI, NAND or USB DFU. Support this format in mkimage tool. SPKGs can optionally be signed, however creation of signed SPKG is not currently supported. Example of how to use it: tools/mkimage -n board/schneider/rzn1-snarc/spkgimage.cfg \ -T spkgimage -a 0x20040000 -e 0x20040000 \ -d u-boot.bin u-boot.bin.spkg The config file (spkgimage.cfg in this example) contains additional parameters such as NAND ECC settings. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-05-13board: schneider: add RZN1 board supportRalph Siemsen
Add support for Schneider Electric RZ/N1D and RZ/N1S boards, which are based on the Reneasas RZ/N1 SoC devices. The intention is to support both boards using a single defconfig, and to handle the differences at runtime. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-05-13ARM: dts: add devicetree for Renesas RZ/N1 SoCRalph Siemsen
This is taken directly from Linux kernel 6.3 (commit 457391b0380335d5e9a5babdec90ac53928b23b4) Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-05-13ram: cadence: add driver for Cadence EDACRalph Siemsen
Driver for Cadence EDAC DDR controller, as found in the Renesas RZ/N1. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-05-13pinctrl: renesas: add R906G032 driverRalph Siemsen
Pinctrl/pinconf driver for Renesas RZ/N1 (R906G032) SoC. This is quite rudimentary right now, and only supports applying a default pin configuration as specified by the device tree. Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-05-11dm: Emit the arch_cpu_init_dm() even only before relocationSimon Glass
The original function was only called once, before relocation. The new one is called again after relocation. This was not the intent of the original call. Fix this by renaming and updating the calling logic. With this, chromebook_link64 makes it through SPL. Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-05-11x86: coreboot: Collect the address of the ACPI tablesSimon Glass
At present any ACPI tables created by prior-stage firmware are ignored. It is useful to be able to view these in U-Boot. Pick this up from the sysinfo tables and display it with the cbsysinfo command. This allows the 'acpi list' command to work when booting from coreboot. Adjust the global_data condition so that acpi_start is available even if table-generation is disabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2023-05-11acpi: Move the table-finding functions into the libarySimon Glass
This is useful for other features. Move the function into library code so it can be used outside just the 'acpi' command. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2023-05-10power: pmic: add dm style definitions if not CONFIG_IS_ENABLED(POWER_LEGACY)Troy Kisky
This avoids an error in converting to CONFIG_IS_ENABLED(DM_PMIC). Many boards SPL code needs these definitions to compile, even if the functions are not linked. Signed-off-by: Troy Kisky <troykiskyboundary@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-10ofnode: fdt_support definitions needed if OF_CONTROL is enabledTroy Kisky
With the use of CONFIG_IS_ENABLED in code, instead of at the preprocessor level, these defines are still needed if OF_CONTROL is enabled. Signed-off-by: Troy Kisky <troykiskyboundary@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>