Commit graph

78507 commits

Author SHA1 Message Date
Tom Rini
28f9c3125d Convert CONFIG_DEEP_SLEEP to Kconfig
This converts the following to Kconfig:
   CONFIG_DEEP_SLEEP

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:47 -04:00
Tom Rini
ac28e20842 M5329EVB, M5373EVB: Remove CONFIG_NANDFLASH_SIZE
In the case of M5373EVB we always had NANDFLASH_SIZE=16, so just use it
directly.  In the case of M5329EVB we had not removed the rest of NAND
support when saying we didn't have NAND, so instead use that to key off
of rather than NANDFLASH_SIZE.

Cc: TsiChung Liew <Tsi-Chung.Liew@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:47 -04:00
Tom Rini
225aaacf36 db-mv784mp-gp: Rename CONFIG_DB_784MP_GP to CONFIG_TARGET_DB_MV784MP_GP
The value CONFIG_DB_784MP_GP is only used in the DDR code to refer to
CONFIG_TARGET_DB_MV784MP_GP so just use that second value directly.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2022-04-01 10:28:47 -04:00
Tom Rini
53f2222c71 p1_p2_rdb: Remove CONFIG_CPLD_[BO]R_PRELIM
These are not referenced in code, drop.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:47 -04:00
Tom Rini
15b4aed473 Convert CONFIG_CLOCKS to Kconfig
This converts the following to Kconfig:
   CONFIG_CLOCKS

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:47 -04:00
Tom Rini
b20e79f0bb Convert CONFIG_CLOCK_SYNTHESIZER to Kconfig
This converts the following to Kconfig:
   CONFIG_CLOCK_SYNTHESIZER

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:47 -04:00
Tom Rini
a9ee1ad95a exynos: Drop CONFIG_CLK_*
We only set one of these values ever at this point, so remove dead code.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-04-01 10:28:47 -04:00
Tom Rini
d7b7e3e906 Convert CONFIG_SYS_USE_NORFLASH et al to Kconfig
This converts the following to Kconfig:
   CONFIG_SYS_USE_NORFLASH
   CONFIG_SYS_USE_BOOT_NORFLASH

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
36a4dae18f global: Remove CONFIG_SYS_USE_DATAFLASH*
There are a handful of variants around CONFIG_SYS_USE_DATAFLASH and none
of them now control anything further within their board config.h files,
so remove these from CONFIG_SYS_EXTRA_OPTIONS and then remove the empty
blocks in the board config.h files.  In a few places further clean up
related logic.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
d433c74eec Convert CONFIG_SDCARD et al to Kconfig
This converts the following to Kconfig:
   CONFIG_SDCARD
   CONFIG_SPIFLASH

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
0941548c20 am43xx_evm_qspiboot: Remove CONFIG_SYS_EXTRA_OPTIONS
CONFIG_QSPI is not used in the code, drop this.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
ef26b53a11 MPC837XERDB: Move CONFIG_PCIE to Kconfig
Move this symbol to the board Kconfig file.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
db48e52584 Convert CONFIG_LPUART et al to Kconfig
This converts the following to Kconfig:
   CONFIG_LPUART
   CONFIG_LPUART_32B_REG

And note that CONFIG_LPUART_32B_REG is unused in code.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
e9ce70eff0 Convert CONFIG_LSCHLV2 to Kconfig et al
This converts the following to Kconfig:
   CONFIG_LSCHLV2
   CONFIG_LSXHL

Cc: Michael Walle <michael@walle.cc>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Michael Walle <michael@walle.cc>
2022-04-01 10:28:46 -04:00
Tom Rini
11f077bb20 mpc8548cds: Rework CONFIG_LEGACY usage
This CONFIG option is used in one place, so pick a more direct name and
migrate to Kconfig.  Rework the code slightly.

Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
7f3092d713 Convert CONFIG_KM_COGE5UN et al to Kconfig
This converts the following to Kconfig:
   CONFIG_KM_COGE5UN
   CONFIG_KM_KIRKWOOD_128M16
   CONFIG_KM_KIRKWOOD
   CONFIG_KM_KIRKWOOD_PCI
   CONFIG_KM_NUSA
   CONFIG_KM_SUSE2

Cc: Holger Brunck <holger.brunck@hitachienergy.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Holger Brunck <holger.brunck@hitachienergy.com>
2022-04-01 10:28:46 -04:00
Tom Rini
0ebaa72e56 kmtegr1: Drop CONFIG_KMTEGR1
The only usage of CONFIG_KMTEGR1 can be replaced by
CONFIG_TARGET_KMTEGR1 so do so and remove this other symbol.

Cc: Holger Brunck <holger.brunck@hitachienergy.com>
Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Holger Brunck <holger.brunck@hitachienergy.com>
2022-04-01 10:28:46 -04:00
Tom Rini
c6c0e56ff8 keymile: Move sourcing of common Kconfig
The way board/keymile/Kconfig is written protects the options there from
being parsed on non-keymile platforms.  We cannot however safely source
this file from multiple locations.  This does not manifest as a problem
currently as there are no choice statements inside of this file (nor the
sub-Kconfig files it sources).  However, moving some target selection to
one of these files exposes the underlying problem.  Rework things so
that we have this file sourced in arch/Kconfig.

Cc: Holger Brunck <holger.brunck@hitachienergy.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Holger Brunck <holger.brunck@hitachienergy.com>
2022-04-01 10:28:46 -04:00
Tom Rini
a8a326e62d Convert CONFIG_EMMC_BOOT et al to Kconfig
This converts the following to Kconfig:
   CONFIG_EMMC_BOOT
   CONFIG_MAC_ADDR_IN_SPIFLASH
   CONFIG_NAND_BOOT
   CONFIG_SPL_FSL_PBL
   CONFIG_SYS_FSL_DDR4

In this case we re-sync options that had been set in
CONFIG_SYS_EXTRA_OPTIONS but should not have been as they have proper
entries.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
ef0a3449e3 mx28evk_auart_console: Remove CONFIG_SYS_EXTRA_OPTIONS
This was only setting values not referenced in the code so remove it.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
26e5944ec9 stmark2: Migrate CONFIG_SYS_EXTRA_OPTIONS to Kconfig
This platform is the only one to set these options, so define them in
the board Kconfig file.

Cc: Angelo Dureghello <angelo@sysam.it>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
3c205a6e4a Convert CONFIG_MCFRTC et al to Kconfig
This converts the following to Kconfig:
   CONFIG_MCFRTC
   CONFIG_SYS_MCFRTC_BASE

While at it, remove '#undef RTC_DEBUG' from these config files.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
b7872641a8 stmark2: Remove CONFIG_SERIAL_FLASH
This is not referenced anywhere, remove it.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
143a365a5b Convert CONFIG_MCFTMR to Kconfig
This converts the following to Kconfig:
   CONFIG_MCFTMR

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
f88e9f5ab8 Convert CONFIG_CF_DSPI to Kconfig
This converts the following to Kconfig:
   CONFIG_CF_DSPI

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
c3cdca48df atmel: Remove CONFIG_SPL_ATMEL_SIZE
This seems to be unused in the code, remove it.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
47267f8261 Remove CONFIG_BOARDNAME and CONFIG_BOARD_NAME
Both of these variables are used in a few hard-coded ways to set some
string values or print something to the user.  In almost all cases, it's
just as useful to hard-code the value used.  The exception here is
printing something closer to correct board name for p1_p2_rdb machines.
This can be done using something from the device tree, but for now
hard-code a non-CONFIG based value instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
448dfb407f Convert CONFIG_BITBANGMII_MULTI to Kconfig
This converts the following to Kconfig:
   CONFIG_BITBANGMII_MULTI

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
797c2b4a1a Convert CONFIG_BCM2835_GPIO to Kconfig
This converts the following to Kconfig:
   CONFIG_BCM2835_GPIO

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Tom Rini
439cc7fb05 Finish converting CONFIG_BOOTM_NETBSD et al to Kconfig
This converts the following to Kconfig:
   CONFIG_BOOTM_NETBSD
   CONFIG_BOOTM_RTEMS
   CONFIG_DESIGNWARE_WATCHDOG
   CONFIG_DISPLAY_CPUINFO
   CONFIG_DM_ETH
   CONFIG_DM_MMC
   CONFIG_DM_REGULATOR
   CONFIG_DM_SPI
   CONFIG_DM_SPI_FLASH
   CONFIG_ISO_PARTITION
   CONFIG_OF_SEPARATE
   CONFIG_SPI_FLASH_WINBOND
   CONFIG_SPL_ETH
   CONFIG_TIMER
   CONFIG_USB_DWC3
   CONFIG_USB_DWC3_GADGET
   CONFIG_USB_DWC3_OMAP
   CONFIG_USB_DWC3_PHY_OMAP
   CONFIG_USB_EHCI_TEGRA
   CONFIG_USB_GADGET_DOWNLOAD
   CONFIG_USB_GADGET_DUALSPEED
   CONFIG_USB_GADGET_MANUFACTURER
   CONFIG_USB_GADGET_PRODUCT_NUM
   CONFIG_USB_GADGET_VBUS_DRAW
   CONFIG_USB_GADGET_VENDOR_NUM

This catches a number of cases where board config files were #undef
various CONFIG options when building SPL, and that doesn't work.  Clean
up the related comments as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:45 -04:00
Tom Rini
694943cf2a CI: Update unmigrated symbol check
We need to check for config header files that #undef migrated symbols as
well.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:45 -04:00
Tom Rini
6815a66ad7 am33xx: musb: Remove unused configuration logic
At this point DM and OF_CONTROL are used to configure how the USB ports
are enabled, with the exception of in SPL and no SPL_OF_CONTROL.  Remove
a bunch of now unused logic to simplify the code.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:45 -04:00
Tom Rini
52d8100b1d Merge branch '2022-03-31-image-add-a-stage-pre-load' into next
To quote the author:
This series adds a stage pre-load before launching an image.  This stage
is used to read a header before the image and this header contains the
signature of the full image.  So u-boot may check the full image before
using any data of the image.

The support of this header is added to binman, and a command verify
checks the signature of a blob and set the u-boot env variable
"loadaddr_verified" to the beginning of the "real" image.

The support of this header is only added to binman, but it may also be
added to mkimage.
2022-03-31 14:12:30 -04:00
Philippe Reynes
7bebc11c42 cmd: bootm: add subcommand preload
Add a subcommand preload to bootm that execute the preload
stage on the image. Right now, it checks the signature
of the image with the pre-load header. If the check
succeed, the u-boot env variable 'loadaddr_verified'
is set to the address of the image (without the header).

It allows to run such commands:
tftp script.img && bootm preload $loadaddr && source $loadaddr_verified

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:23 -04:00
Philippe Reynes
776db4fa96 test: py: vboot: add test for global image signature
Adds test units for the pre-load header signature.

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:23 -04:00
Philippe Reynes
29451432c7 configs: sandbox_defconfig: enable stage pre-load in bootm
Enable the support of stage pre-load in bootm.
For the moment, this stage allow to verify the
signature of the full image with a header.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:23 -04:00
Philippe Reynes
b1c5093008 tools: binman: add support for pre-load header
Adds the support of the pre-load header with the image signature
to binman.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:23 -04:00
Philippe Reynes
d12c1be903 Makefile: provide sah-key to binman
Set the variable pre-load-key-path with the shell variable
PRE_LOAD_KEY_PATH that contain the keys path (used for signature).
This variable pre-load-key-path is provided to binman.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
6e052d1cba mkimage: add public key for image pre-load stage
This commit enhances mkimage to update the node
/image/pre-load/sig with the public key.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
2404a01544 common: spl: fit_ram: allow to use image pre load
Add the support of image pre load in spl or tpl
when loading an image from ram.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
9d46e63d97 cmd: bootm: add a stage pre-load
Add a stage pre-load to the command bootm.
Right now, this stage may be used to read a
header and check the signature of the full
image.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
982207435a boot: image: add a stage pre-load
Add a stage pre-load that could
check or modify an image.

For the moment, only a header with a signature is
supported. This header has the following format:
- magic : 4 bytes
- version : 4 bytes
- header size : 4 bytes
- image size : 4 bytes
- offset image signature : 4 bytes
- flags : 4 bytes
- reserved0 : 4 bytes
- reserved1 : 4 bytes
- sha256 of the image signature : 32 bytes
- signature of the first 64 bytes : n bytes
- image signature : n bytes
- padding : up to header size

The stage uses a node /image/pre-load/sig to
get some informations:
- algo-name (mandatory) : name of the algo used to sign
- padding-name : name of padding used to sign
- signature-size : size of the signature (in the header)
- mandatory : set to yes if this sig is mandatory
- public-key (madatory) : value of the public key

Before running the image, the stage pre-load checks
the signature provided in the header.

This is an initial support, later we could add the
support of:
- ciphering
- uncompressing
- ...

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
f6bacf1d48 lib: rsa: allow rsa verify with pkey in SPL
This commit adds the option SPL_RSA_VERIFY_WITH_PKEY.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
e44ec9f709 lib: crypto: allow to build crypyo in SPL
This commit adds the options:
- SPL_ASYMMETRIC_KEY_TYPE
- SPL_ASYMMETRIC_PUBLIC_KEY_SUBTYPE
- SPL_RSA_PUBLIC_KEY_PARSER

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
fd210fee1d lib: allow to build asn1 decoder and oid registry in SPL
This commit adds the options:
- SPL_ASN1_DECODER
- SPL_OID_REGISTRY

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
7d44a98517 lib: Kconfig: enhance the help of OID_REGISTRY
Enhance the help for the config OID_REGISTRY.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
a0e71d9614 lib: Kconfig: enhance help for ASN1
Enhance the help for configs ASN1_COMPILER
and ASN1_decoder.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Philippe Reynes
059df5624b arch: Kconfig: imply BINMAN for SANDBOX
To be able to use the tool binman on sandbox,
the config SANDBOX should imply BINMAN.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2022-03-31 14:12:01 -04:00
Tom Rini
23e354f82c Clock patches for u-boot/next
This is mostly cleanups/consolidations. clk_free is made to return void, and the
 CCF wrappers present in almost every CCF clock are consolidated. I would
 particularly like to have the latter upstream, since there are at least two
 series adding support for new CCF drivers (imx8mq and imxrt1170) which can
 benefit from these commits.
 
 I had to fix up the last commit since I missed an include for at91.
 
 CI: https://source.denx.de/u-boot/custodians/u-boot-clk/-/pipelines/11521
 -----BEGIN PGP SIGNATURE-----
 
 iQGTBAABCgB9FiEEkGEdW86NSNID6GAoPuiP7LShEG4FAmJErVFfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDkw
 NjExRDVCQ0U4RDQ4RDIwM0U4NjAyODNFRTg4RkVDQjRBMTEwNkUACgkQPuiP7LSh
 EG6J7Af+K3FTOmxuocqNBaT6IPEIYkgTnxdih8b6taYhhrTkq2YPRjKhK64Seldf
 gID8/+3Ya46/xprp9dRl1NcCFl5ou7htAF0FwLSGms8pxCJkARMY0VxxCBfnJt18
 zFjjTNxxPVBVrCEAiRc3ncL69XF49Xp276ERcAGA8DqOXie9wTViasQ3emQS5k4Q
 +AiRSuJs1dOZYv9K4yc70DpZdPzwKdCt7ykzCoVvHp+W7TeJ5zpzcCrVbTduVwVd
 0IOpF0iF0EGJcFCE+S0YS6lPrw7fEpwgmeZsYIW7U8X9Avo83X+ZXlr0K6dzyJTa
 Bo2jfJgohAAclz9/bbMEqP2zgcnxIw==
 =qrkR
 -----END PGP SIGNATURE-----

Merge tag 'clk-2022.04-next' of https://source.denx.de/u-boot/custodians/u-boot-clk into next

Clock patches for u-boot/next

This is mostly cleanups/consolidations. clk_free is made to return void, and the
CCF wrappers present in almost every CCF clock are consolidated. I would
particularly like to have the latter upstream, since there are at least two
series adding support for new CCF drivers (imx8mq and imxrt1170) which can
benefit from these commits.

I had to fix up the last commit since I missed an include for at91.

CI: https://source.denx.de/u-boot/custodians/u-boot-clk/-/pipelines/11521
2022-03-30 18:14:33 -04:00
Sean Anderson
682e73d235 clk: Use generic CCF ops where possible
This converts most CCF drivers to use generic ops. imx6q is the only
outlier, where we retain the existing functionality by moving the check to
request().

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20220320203446.740178-2-seanga2@gmail.com
[ fixed missing include for at91 ]
Signed-off-by: Sean Anderson <seanga2@gmail.com>
2022-03-30 14:18:56 -04:00