When mdio_register fails, mdio_free should be called on the mdiodev that
was previously allocated with mdio_alloc.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
strncpy() simply bails out when copying a source string whose size
exceeds the destination string size, potentially leaving the destination
string unterminated.
One possible way to address is to pass MDIO_NAME_LEN - 1 and a
previously zero-initialized destination string, but this is more
difficult to maintain.
The chosen alternative is to use strlcpy(), which properly limits the
copy len in the (srclen >= size) case to "size - 1", and which is also
more efficient than the strncpy() byte-by-byte implementation by using
memcpy. The destination string returned by strlcpy() is always NULL
terminated.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Remove the driver st_smic.c used in SPEAr products and the associated
config CONFIG_ST_SMI; this driver is no more used in U-Boot after the
commit 570c3dcfc1 ("arm: Remove spear600 boards and the rest of SPEAr
support").
Fixes: 570c3dcfc1 ("arm: Remove spear600 boards and the rest of SPEAr support")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Our mailmapper script required Python 2 which is no longer maintained.
A main difference when converting to Python 3 is that byte strings are not
character strings. So add conversion and skip over conversion errors.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-----BEGIN PGP SIGNATURE-----
iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmFR2fMRHHNqZ0BjaHJv
bWl1bS5vcmcACgkQfxc6PpAIreaAnAf/ZKPy3CRphbgAmbLhNQhQGpLosLcFp343
cv53gfsv1DakLRrhqMSnOQSVoTg9P22uHbooDDR9WHfZyEL6tvGZ+dgN2/wlDhDj
wbvvsM7FB+uvLVfMF3MURQBvy4dPO+FyCm/uHmry2V2uqWPw4ss+aVhxeQ5s4/oI
LpS6yaiM8UAj2GTUZSqJ1+/W7YG9N6tL73n0PDyCvSrdCkyPWqpww1rtST88SfFI
bBEWc6ksna/29haOwHQ2xopEbVxtHv2byULfqUtnsbtE4Ozw8o0fx66tdwPHTQlM
7eSuRiEbqjlJuUZFIbMat7nb7inZkaWupZ/Sr1HUUiDdKMygrRsQhg==
=x8Uf
-----END PGP SIGNATURE-----
Merge tag 'dm-pull-next-27sep21' of https://source.denx.de/u-boot/custodians/u-boot-dm into next
Various of-platdata improvements, including CONFIG_OF_REAL
Remove the driver st_smic.c used in SPEAr products and the associated
config CONFIG_ST_SMI; this driver is no more used in U-Boot after the
commit 570c3dcfc1 ("arm: Remove spear600 boards and the rest of SPEAr
support").
Fixes: 570c3dcfc1 ("arm: Remove spear600 boards and the rest of SPEAr support")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Our mailmapper script required Python 2 which is no longer maintained.
A main difference when converting to Python 3 is that byte strings are not
character strings. So add conversion and skip over conversion errors.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
CONFIG_SYS_AT91_CPU_NAME looks to be unused.
Remove it and remove it from config_whitelist.txt
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
CONFIG_SPIFLASH is manually re-added as it is not a new symbol, but now
only exists in CONFIG_SYS_EXTRA_OPTIONS.
Signed-off-by: Tom Rini <trini@konsulko.com>
This board has not been converted to CONFIG_DM_PCI by the deadline.
Remove it.
Note that we have to add CONFIG_SPIFLASH to scripts/config_whitelist.txt
because it's not really migrated at this point.
Acked-by: Michael Durrant <mdurrant@arcturusnetworks.com>
Acked-by: Oleksandr Zhadan <oleks@arcturusnetworks.com>
Acked-by: Oleksandr Zhadan and Michael Durrant <arcsupport@arcturusnetworks.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
[trini: Handle CONFIG_SPIFLASH differently and delete Kconfig file]
Signed-off-by: Tom Rini <trini@konsulko.com>
This converts the following to Kconfig:
CONFIG_POWER_I2C
CONFIG_POWER_LEGACY
They are handled at the same time due to a dependency between them.
Update the Makefile rule to use legacy power only in U-Boot proper.
Unfortunately a separate rule is needed in SPL to be able to build
legacy power. Add SPL related symbols for both, to allow for SPL-only
usage.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
[trini: More SPL related cleanups, reword commit message]
Signed-off-by: Tom Rini <trini@konsulko.com>
This option is used in pre-driver model code and much of it has never
been converted to driver model.
We want to add a new option to enable power support, so we can use a
simple rule in the Makefile. Rename this one, which is really about
a particular implementation of power.
Also update the pmic.h header file so it either includes the legacy
API or the driver model one.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
This resyncs us with the version found in v5.13 of the Linux kernel with
the following exceptions:
- Keep our u-boot specific tests / code area.
- Change the location of checkpatch.rst (which we now import)
- Drop the "use strscpy" test as we don't have that, but do have strlcpy
and want that used now.
- Keep debug/printf in the list for $logFunctions
And note that we now also include the spdxcheck.py tool that
checkpatch.pl supports calling out to, and include upstream's
checkpatch.rst in our develop section of the documentation.
Signed-off-by: Tom Rini <trini@konsulko.com>
- Further CONFIG to Kconfig migrations
- Some DDR related symbols
- CONFIG_SYS_LOAD_ADDR moved, loadaddr always set in environment now.
- Finish MX7D, convert IMX_CONFIG
- Some RAMBOOT related options
- L1 cache size converted and named consistently for all arches. A
further follow-up to rename things for even better clarity is welcome.
- CONFIG_SKIP_LOWLEVEL_INIT, CONFIG_SYS_MALLOC_LEN
This converts the following to Kconfig:
CONFIG_SKIP_LOWLEVEL_INIT
CONFIG_SKIP_LOWLEVEL_INIT_ONLY
In order to do this, we need to introduce SPL and TPL variants of these
options so that we can clearly disable these options only in SPL in some
cases, and both instances in other cases.
Signed-off-by: Tom Rini <trini@konsulko.com>
- Begin merging some Kconfig migration, and CONFIG namespace cleanup
series in. This gives us:
- A number of I2C symbols migrated over
- DWC2, i8042, altera_spi and a few other areas updated to use CFG not
CONFIG for the concept of "configuration space" defines.
- Rename CONFIG_EXTRA_ENV_BOARD_SETTINGS to EXTRA_ENV_BOARD_SETTINGS
- Some dead code removal.
- Rename a number of CONFIG symbols that were only referenced within
the config header to not use CONFIG as a prefix.
First, we convert CONFIG_SYS_I2C_LEGACY to Kconfig. Next, as you cannot
have SYS_I2C_LEGACY and DM_I2C at the same time, introduce
CONFIG_SPL_SYS_I2C_LEGACY so that we can enable the legacy option only
in SPL. Finally, for some PowerPC cases we also need
CONFIG_TPL_SYS_I2C_LEGACY support. Convert all of the existing users to
one or more symbols.
Signed-off-by: Tom Rini <trini@konsulko.com>
There are a number of DWC2 configuration options that are set in dwc2.h
and referenced in dwc2.c only. Move these out of the CONFIG_DWC2
namespace and in to the DWC2 namespace. Note that hikey was defining an
option that was already always enabled, so we can remove that hunk.
Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Use moveconfig.py script to convert below defines to Kconfig and move
these entries to defconfigs.
CONFIG_CORTINA_FW_ADDR
CONFIG_CORTINA_FW_LENGTH
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Symbol CONFIG_SYS_ID_EEPROM is defined in include/configs/MPC8548CDS.h
but never used. Remove it here and from the whitelist.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Macro CONFIG_SYS_U_BOOT_OFFS is set but not used anymore. Remove it.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
With LTO activated, the buildman tools failed with an error on my
configuration (Ubuntu 20.04, stm32mp15_trusted_defconfig) with the error:
../arm-linux-gnueabi/bin/nm:
scripts/gen_ll_addressable_symbols.sh: file format not recognized
It seems the shell variable initialization NM=$(NM) is not correctly
interpreted when shell is started in the Makefile, but I have not this
issue when I compile the same target without buildman.
I don't found the root reason of the problem but I solve it by
providing $(NM) as script parameter instead using a shell variable.
The command executed is identical:
cmd_keep-syms-lto.c := NM=arm-none-linux-gnueabihf-gcc-nm \
u-boot/scripts/gen_ll_addressable_symbols.sh arch/arm/cpu/built-in.o \
.... net/built-in.o >keep-syms-lto.c
cmd_keep-syms-lto.c := u-boot/scripts/gen_ll_addressable_symbols.sh \
arm-none-linux-gnueabihf-gcc-nm arch/arm/cpu/built-in.o \
... net/built-in.o > keep-syms-lto.c
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
This actually does nothing but is defined by a few dozen boards. Drop it,
so we can define a real one.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
It is quite confusing that CONFIG_SYS_I2C selects the legacy I2C and
CONFIG_DM_I2C selects the current I2C. The deadline to migrate I2C is less
than a year away.
Also we want to have a CONFIG_I2C for U-Boot proper just like we have
CONFIG_SPL_I2C for SPL, so we can simplify the Makefile rules.
Rename this symbol so it is clear it is going away.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
This script was broken by the change to default archives for linking.
This is due to objcopy specifically disallowing copying of thin
archives. To fix this and re-support external users of this script,
switch to using the same logic the u-boot-initial-env make target uses
to dump the section from the object file.
Reported-by: Jan Kiszka <jan.kiszka@web.de>
Fixes: 958f2e57ef ("build: use thin archives instead of incremental linking")
Signed-off-by: Tom Rini <trini@konsulko.com>
Align Kconfig and Kbuild logic to Linux 4.20 release with minimal impact
on files outside of this scope.
Our previous Kconfig sync was done by commit 587e4a4296 ("kconfig /
kbuild: Re-sync with Linux 4.19").
As part of this re-sync, a few related changes from previous Linux
releases were found to have been missed and merged in, and are not in
the following list.
The imported Linux commits are:
[From prior to v4.19]
b1e0d8b70fa3 kbuild: Fix gcc -x syntax
a4353898980c kconfig: add CC_IS_GCC and GCC_VERSION
469cb7376c06 kconfig: add CC_IS_CLANG and CLANG_VERSION
[From v4.19 to v4.20]
487c7c7702ab kbuild: prefix Makefile.dtbinst path with $(srctree) unconditionally
0d91bf584fe5 kbuild: remove old check for CFLAGS use
25815cf5ffec kbuild: hide most of targets when running config or mixed targets
00d78ab2ba75 kbuild: remove dead code in cmd_files calculation in top Makefile
23066c3f4e21 Compiler Attributes: enable -Wstringop-truncation on W=1 (gcc >= 8)
37c8a5fafa3b kbuild: consolidate Devicetree dtb build rules
80463f1b7bf9 kbuild: add --include-dir flag only for out-of-tree build
77ec0c20c7e0 kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile
74bc0c09b2da kbuild: remove user ID check in scripts/mkmakefile
4fd61277f662 kbuild: do not pass $(objtree) to scripts/mkmakefile
80d0dda3a4e5 kbuild: simplify command line creation in scripts/mkmakefile
fb073a4b473e kbuild: add -Wno-pointer-sign flag unconditionally
9df3e7a7d7d6 kbuild: add -Wno-unused-but-set-variable flag unconditionally
69ea912fda74 kbuild: remove unneeded link_multi_deps
7d0ea2524202 kbuild: use 'else ifeq' for checksrc to improve readability
04c459d20448 kconfig: remove oldnoconfig target
0085b4191f3e kconfig: remove silentoldconfig target
3f80babd9ca4 kbuild: remove unused cc-fullversion variable
2cd3faf87d2d merge_config.sh: Allow to define config prefix
076f421da5d4 kbuild: replace cc-name test with CONFIG_CC_IS_CLANG
6bbe4385d035 kconfig: merge_config: avoid false positive matches from comment lines
[From post v4.20]
885480b08469 Makefile: Move -Wno-unused-but-set-variable out of GCC only block
There are a number of changes related to additional warnings as well as
being able to drop cc-name entirely that have been omitted for now as
additional work is required first.
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Update U-Boot's version of scripts/get_maintainer.pl to sync it up with the
latest changes to the Linux kernel's version of the same script.
The last sync was with Linux kernel version v4.16. The commits to the kernel's
get_maintainer.pl since then (starting with the most recent) are:
6343f6b71f83 get_maintainer: exclude MAINTAINERS file(s) from --git-fallback
cdfe2d220476 get_maintainer: add test for file in VCS
e33c9fe8b80c get_maintainer: fix unexpected behavior for path/to//file (double slashes)
0c78c0137621 get_maintainer: add email addresses from .yaml files
0ef82fcefb99 scripts/get_maintainer.pl: deprioritize old Fixes: addresses
ef0c08192ac0 get_maintainer: remove uses of P: for maintainer name
2f5bd343694e scripts/get_maintainer.pl: add signatures from Fixes: <badcommit> lines in commit message
49662503e8e4 get_maintainer: add ability to skip moderated mailing lists
0fbd75fd7fee get_maintainer: allow option --mpath <directory> to read all files in <directory>
5f0baf95b1ed get_maintainer.pl: add -mpath=<path or file> for MAINTAINERS file location
31bb82c9caa9 get_maintainer: allow usage outside of kernel tree
0455c74788fd get_maintainer: improve patch recognition
882ea1d64eb3 scripts: use SPDX tag in get_maintainer and checkpatch
Signed-off-by: Trevor Woerner <twoerner@gmail.com>