aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-12-05Merge tag 'dm-pull-5nov21' of ↵WIP/05Dec2021Tom Rini65-273/+1102
https://source.denx.de/u-boot/custodians/u-boot-dm into next binman refactoring to imrpove section handling bloblist - allow it to be allocated sandbox config-header cleanup # gpg: Signature made Sun 05 Dec 2021 02:48:15 PM EST # gpg: using RSA key B25C0022AF86A7CC1655B6277F173A3E9008ADE6 # gpg: issuer "sjg@chromium.org" # gpg: Good signature from "Simon Glass <sjg@chromium.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: B25C 0022 AF86 A7CC 1655 B627 7F17 3A3E 9008 ADE6
2021-12-05timer: Add a migration messageSimon Glass2-0/+12
Some boards still use the old timer mechanism. Set a deadline for them to update to driver model. This needs a bit of a strange rule to avoid an error on some boards. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05ide: Drop ATA_PORT_ADDRSimon Glass1-8/+4
This is not needed anymore. Drop it to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-12-05ide: Drop unused CONFIG optionsSimon Glass7-20/+5
CONFIG_SYS_ATA_PORT_ADDR is not used in the code anymore. Drop it and use ATA_PORT_ADDR() locally instead. Drop CONFIG_IDE_RESET_ROUTINE and CONFIG_IDE_SWAP_IO which are also unused. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05sandbox: Drop CONFIG_SYS_TIMER_RATESimon Glass2-8/+3
This is not used by sandbox since it uses driver model for the timer. Drop it. Also update the tools_only build to avoid build errors, since it does actually build U-Boot too. Enable DM so we can use CONFIG_TIMER, disable EFI_LOADER to avoid an error about board_quiesce_devices() and disable NET to avoid having to define CONFIG_AVB_BUF_ADDR Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05keyboard: Add a migration messageSimon Glass2-0/+9
A few boards still use the old keyboard mechanism. Set a deadline for them to update to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05Convert CONFIG_KEYBOARD to KconfigSimon Glass18-26/+18
This converts the following to Kconfig: CONFIG_KEYBOARD Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05Convert CONFIG_SYS_FDT_LOAD_ADDR to KconfigSimon Glass3-7/+10
This converts the following to Kconfig: CONFIG_SYS_FDT_LOAD_ADDR Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05sandbox: Drop CONFIG_HOST_MAX_DEVICESSimon Glass5-7/+7
This can go in the related header file. Drop the CONFIG option. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-12-05trace: sandbox: Use only the Kconfig optionsSimon Glass2-7/+4
At present there are Kconfig options for tracing, but sandbox uses plain #defines to set them. Correct this and make the tracing command default to enabled so that this is not needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Rename _ReadSubnodes() to ReadEntries()Simon Glass3-6/+6
This method name is more commonly used for this function. Use it consistently. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Support lists of external blobsSimon Glass6-3/+133
Sometimes it is useful to have a list of related external blobs in a single entry. An example is the DDR binaries used by meson. There are 9 files in total. Add support for this, so we don't have to have a separate entry for each. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05dtoc: Add support for reading string-list propertiesSimon Glass2-0/+30
Add a function to read a list of strings from the devicetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Allow extracting a file in an alternative formatSimon Glass12-21/+193
In some cases entries encapsulate other data and it is useful to access the data within. An example is the fdtmap which consists of a 16-byte header, followed by a devicetree. Provide an option to specify an alternative format when extracting files. In the case of fdtmap, this is 'fdt', which produces an FDT file which can be viewed with fdtdump. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Allow listing an image created by a newer versionSimon Glass5-18/+74
If an older version of binman is used to list images created by a newer one, it is possible that it will contain entry types that are not supported. At present this produces an error. Adjust binman to use a plain 'blob' entry type to cope with this, so the image can at least be listed. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05binman: Allow providing tools and blob directoriesSimon Glass2-1/+32
At present it is necessary to symlink files containing external blobs into the U-Boot tree in order for binman to find them. This is not very convenient. Add two new environment/Makefile variables to help with this. Add documentation as well, fixing a related nit. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-05bloblist: Support allocating the bloblistSimon Glass4-5/+50
Typically the bloblist is positioned at a fixed address in memory until relocation. This is convenient when it is set up in SPL or before relocation. But for EFI we want to set it up only when U-Boot proper is running. Add a way to allocate it using malloc() and update the documentation to cover this aspect of bloblist. Note there are no tests of this feature at present, nor any direct testing of bloblist_init(). This can be added, e.g. by making this option controllable at runtime. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Rename testCbfsNoCOntents()Simon Glass1-1/+1
Use a lower-case O as was intended. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: cfbs: Refactor ObtainContents() for consistencySimon Glass1-17/+23
Update this to use the same arguments as entry_Section uses. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: cbfs: Refactor the init processSimon Glass1-2/+6
Update the constructor to work in the recommended way, where the node properties are read in a separate function. This makes it more similar to entry_Section. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Use normal entries in cbfsSimon Glass1-8/+8
This currently uses _cbfs_entries[] to store entries. Since the entries are in fact valid etypes, we may as well use the same name as entry_Section uses, which is _entries. This allows reusing more of the code there (in a future patch). Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Move cbfs.ObtainContents() down a bitSimon Glass1-15/+15
It is easier to understand this file if reading the entries comes before obtaining the contents, since that is the order in which Binman proceeds. Move the function down a bit. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Update the section documentationSimon Glass2-55/+242
Expand this to explain subclassing better and also to tidy up formatting for rST. Fix a few pylint warnings to avoid dropping the score. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Allow control of which entries to readSimon Glass1-6/+7
The ObtainContents() and GetEntryContents() methods in this file read every single entry in the section. This is the common case. However when one of the entries has had its data updated (e.g. with 'binman replace') we don't want to read it again from the file. Allow the entry to be skipped, for this purpose. This is currently done in the CBFS implementation, so adding it here will allow that to use more of the entry_Section code. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Allow overriding BuildSectionData()Simon Glass2-5/+13
This method is currently marked private. However it is useful to be able to subclass it, since much of the entry_Section code can be reused. Rename it. Also document one confusing part of this code, so people can understand how to add a test for this case. Fix up a few pylint warnings to avoid regressing the score. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Drop the filename property in entry_SectionSimon Glass1-4/+1
This is not used and does nothing. Drop it. Add a tweak to avoid reducing the pylint score. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Drop the underscore in _ReadEntries()Simon Glass4-8/+8
This function can be overridden so should not have an underscore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Correct comments for ReadChildData()Simon Glass1-2/+3
The comment here is incomplete. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Correct init of entry in Entry classSimon Glass1-1/+1
This should not have an underscore. Drop it so that derived classes can rely on it being set correctly. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Add a way to obtain the versionSimon Glass3-0/+67
Add a -V option which shows the version number of binman. For now this just uses a local 'version' file. Once the tool is packaged in some way we can figure out an approach that suits. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02binman: Tidy up style in cmdlineSimon Glass1-18/+27
Update this file to improve the pylint score a little. The remaining item is: Function name "ParseArgs" doesn't conform to snake_case naming style which needs some binman-wide renaming. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02dtoc: Add support for reading fixed-length bytes propertiesSimon Glass2-0/+37
Add functions to read a sequence of bytes from the devicetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02dtoc: Add support for reading 64-bit intsSimon Glass4-3/+56
Add functions to read a 64-bit integer property from the devicetree. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02dtoc: Bring in the libfdt module automaticallySimon Glass1-0/+6
Use the same technique as with binman to load this module from the U-Boot tree if available. This allows running tests without having to specify the PYTHONPATH variable. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-02sandbox: replace putchar(ch) by fputc(ch, stdout)Heinrich Schuchardt1-1/+1
When compiled with -Og for better debugability u-boot ends up in a stack overflow using gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0 GNU Binutils for Ubuntu 2.37 putchar(ch) is defined as a macro which ends up calling U-Boot's putc() implementation instead of the glibc one, which calls os_putc() ... Let's use fputc(ch, stdout) instead as fputc() does not exist in U-Boot. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-12-02drivers: core: lists: fix for loop index typeAlexander Preißner1-1/+1
* fixes the bug in function bind_drivers_pass that for CONFIG_CC_OPTIMIZE_FOR_SIZE=n and no entries in the driver_info list, i.e. n_ents == 0, the processor steps into the first loop iteration despite the loop condition being false. * the Xilinx Zynq-7000 device would eventually hang due to an attempted access to an invalid memory address * the bug is fixed by changing the type of idx from uint to int Board: zynq-zybo Target: ARM Compiler: arm-none-eabi-gcc 9.2.1 Signed-off-by: Alexander Preissner <fpga-garage@preissner-muc.de> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2021-12-02Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net ↵WIP/02Dec2021Tom Rini12-43/+3605
into next - New Broadcom NetXtreme driver - Support for socat for netconsole - Felix switch soft reset fix
2021-12-02Merge branch '2021-12-01-assorted-updates' into nextTom Rini5-9/+23
- Have SPL skip length 0 images, some clean-ups related to CONFIG symbols and the known list of unmigrated symbols and pinctrl updates.
2021-12-02board: brcm-ns3: Load netXtreme firmwareBharat Gooty1-1/+4
Load NetXtreme firmware in board_init when BNXT_ETH is selected. Signed-off-by: Bharat Gooty <bharat.gooty@broadcom.com> Signed-off-by: Roman Bacik <roman.bacik@broadcom.com>
2021-12-02net: brcm: netXtreme driverBharat Gooty9-0/+3540
Broadcom bnxt L2 driver support. Used by the Broadcom iproc platforms. Signed-off-by: Bharat Gooty <bharat.gooty@broadcom.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Signed-off-by: Roman Bacik <roman.bacik@broadcom.com>
2021-12-02driver: net: Makefile: order file alphabeticallyRamon Fried1-39/+39
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
2021-12-02drivers: net: Soft reset felix switch coreRadu Bulie1-1/+12
It turns out that in custom designs if the system is reset multiple times in conjunction with a slight increase in external temperature, the felix switch starts to behave in a strange way: packets are no longer received on the ENECT interface connected to the L2switch internal port (the TX side of internal port stops working or the packets do not reach there. It is not very clear where the packets remain blocked. None of the counters points to a disruption in the L2switch) The issue is not reproducible on NXP reference designs. It was observed that by adding the switch core reset, the problem goes aways, even if intensive testing in temperature chambers is applied. The current patch performs soft reset on the switch core to ensure proper operation of the L2switch. Signed-off-by: Radu Bulie <radu-andrei.bulie@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-12-02tools/netconsole: Add support for socatAndy Shevchenko1-2/+10
socat is a very powerful tool to work with socets (and not only) in UNIX systems. Let's add support for it in netconsole. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Ferry Toth <fntoth@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-12-01spl: fit: Skip attempting to load 0 length imageNishanth Menon1-0/+7
When, for various reasons, a bad FIT image is used where a loadable image is marked as 0 length, attempt is made for a 0 length allocation and read of 0 byte read operation. Instead provide warning in log and skip attempting to do such a load. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Aswath Govindraju <a-govindraju@ti.com>
2021-12-01dm: add debug message when failed to select the default pinctrlPatrick Delaunay1-4/+12
Add a message on probe in driver model core when the default pinctrl selection failed. This message is displayed only when the pinctrl API is implemented, i.e. when result is not ENOSYS. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-12-01pinctrl: change result for unsupported APIPatrick Delaunay1-2/+2
Use the return value ENOSYS for unsupported API - pinctrl_generic_set_state - pinctrl_select_state Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-12-01scripts: remove CONFIG_IS_ENABLED and CONFIG_VAL in config_whitelist.txtPatrick Delaunay1-2/+0
The helper macro CONFIG_IS_ENABLED and CONFIG_VAL are not real configurations and they are no more present in u-boot.cfg so they can be removed in config_whitelist.txt. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Simon Glass <sjg@chromium.org>
2021-12-01scripts: remove CONFIG_IS_ENABLED and CONFIG_VAL in generated u_boot.cfgPatrick Delaunay1-1/+2
The two helpers macros CONFIG_IS_ENABLED and CONFIG_VAL are defined in include/linux/kconfig.h but they are not real configurations; they can be safely removed in the generated configuration file "u-boot.cfg". This patch simplifies the comparison of this U-Boot configuration file. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Simon Glass <sjg@chromium.org>
2021-12-01Merge branch '2021-12-01-Kconfig-migrations' into nextTom Rini680-2486/+1427
- Finish converting CONFIG_USE_BOOTCOMMAND, CONFIG_BOOTCOMMAND, CONFIG_RAMBOOTCOMMAND, CONFIG_NFSBOOTCOMMAND, all of CONFIG_SYS_[BO]R[0-7]_PRELIM, CONFIG_FSL_DDR_BIST and CONFIG_FSL_DDR_INTERACTIVE.
2021-12-01Convert CONFIG_FSL_DDR_BIST et al to KconfigWIP/2021-12-01-Kconfig-migrationsTom Rini2-2/+4
This converts the following to Kconfig: CONFIG_FSL_DDR_BIST CONFIG_FSL_DDR_INTERACTIVE Signed-off-by: Tom Rini <trini@konsulko.com>