Commit graph

89924 commits

Author SHA1 Message Date
Ilias Apalodimas
229f9e77fe efi_loader: Correctly account the SCRTM event creation
The result of efi_append_scrtm_version() is overwritten before anyone
checks its result. Check it and exit the function on failures

Addresses-Coverity-ID: 467399 Code maintainability issues (UNUSED_VALUE)
Fixes: commit 97707f12fd ("tpm: Support boot measurements")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-11-20 19:06:22 +01:00
Ilias Apalodimas
a8062549d6 efi_loader: Increase default variable store size to 128K
In commit 9fd3f881c6 ("efi_loader: Increase default variable store size to 64KiB")
Alper has a detailed explanation of why the size needs to be bumped to at
least 64K.  However enabling Secure boot, writing db, KEK, PK etc keys
will further increase the size so bump it to 128K.

It's worth noting that when U-Boot stores the EFI variables in an RPMB the
available storage is defined statically in StandAloneMM at build time.
The U-Boot code is detecting the available true size on the fly during
writes. When StandAloneMM is present this size defines the reserved
memory U-Boot can use to copy any runtime variables, before booting an
OS.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-11-20 19:06:22 +01:00
Heinrich Schuchardt
9781ec9840 doc: typo fdtaddr_addr_r
%s/fdtaddr_addr_r/fdt_addr_r/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-20 19:06:22 +01:00
Jonathan Corbet
dc23eb8e0e docs: Fix the docs build with Sphinx 6.0
Sphinx 6.0 removed the execfile_() function, which we use as part of the
configuration process.  They *did* warn us...  Just open-code the
functionality as is done in Sphinx itself.

Tested (using SPHINX_CONF, since this code is only executed with an
alternative config file) on various Sphinx versions from 2.5 through 6.0.

Reported-by: Martin Liška <mliska@suse.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Rebased for U-Boot
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-11-20 19:06:22 +01:00
Heinrich Schuchardt
63e41659f2 doc: add HiSilicon board documentation to HTML docs
Add the README files for the HiSilicon boards to the HTML documentation.
This required a bit of reformatting.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-11-20 19:06:22 +01:00
Heinrich Schuchardt
2b3b3511bd mkimage: do not write incorrect error message
When running 'mkimage -l' is called for a valid StarFive file an error
message "Error: invalid marker bytes" is written by the Renesas SPKG
driver.

mkimage -l may be invoked without specifying an image type. In this case
mkimage iterates over all image type drivers to find the one that matches.
None of the non-matching drivers should write an error message.

Fix the Renesas SPKG driver.

Fixes: afdfcb11f9 ("tools: spkgimage: add Renesas SPKG format")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-20 19:06:22 +01:00
Tom Rini
24ca49b33a Prepare v2024.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-20 08:43:46 -05:00
Tom Rini
f629d50419 configs: Resync with savedefconfig
Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-11-20 08:37:27 -05:00
Nikita Yushchenko
beeb91aa64 scsi: set dma direction to NONE for TEST UNIT READY
SCSI device scan code was executing TEST UNIT READY command without
explicitly setting dma direction in struct scsi_cmd to NONE, so command
was passed to driver with dma direction set to DMA_FROM_DEVICE,
inherited from older usage.

With WDC SDINDDH6-64G ufs device, that caused TEST UNIT READY to
return error.

Fix that, by explicitly setting dma direction to NONE for
TEST UNIT READY, and restoring it back DMA_FROM_DEVICE for the
following READ CAPACITY.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2023-11-20 08:34:08 -05:00
Tom Rini
d5ff806cb5 Merge branch 'master-mmc-clock' of https://source.denx.de/u-boot/custodians/u-boot-sh 2023-11-18 10:25:48 -05:00
Tom Rini
cc7bc8237a Merge branch '2023-11-17-assorted-important-fixes'
- Revert HAFDBS changes, correct spl_imx_romapi for eMMC, fix the virtio
  rng in one case, fix bootstd in one case, and correct a Kconfig
  description.
2023-11-17 13:15:33 -05:00
Chris Packham
0585c28fda Revert "arm64: Use FEAT_HAFDBS to track dirty pages when available"
This reverts commit 6cdf6b7a34. This is
part of a series trying to make use of the arm64 hardware features for
tracking dirty pages. Unfortunately this series causes problems for the
AC5/AC5X SoCs. Having exhausted other options the consensus seems to be
reverting this series is the best course of action.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-17 11:58:26 -05:00
Chris Packham
eed8294b75 Revert "arm64: Use level-2 for largest block mappings when FEAT_HAFDBS is present"
This reverts commit 836b8d4b20. This is
part of a series trying to make use of the arm64 hardware features for
tracking dirty pages. Unfortunately this series causes problems for the
AC5/AC5X SoCs. Having exhausted other options the consensus seems to be
reverting this series is the best course of action.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-17 11:58:26 -05:00
Chris Packham
ee23d7466c Revert "armv8: enable HAFDBS for other ELx when FEAT_HAFDBS is present"
This reverts commit c1da6fdb5c. This is
part of a series trying to make use of the arm64 hardware features for
tracking dirty pages. Unfortunately this series causes problems for the
AC5/AC5X SoCs. Having exhausted other options the consensus seems to be
reverting this series is the best course of action.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2023-11-17 11:58:26 -05:00
Marcel Ziswiler
ac33a7976a imx: spl_imx_romapi: fix emmc fast boot mode case
This fixes a regression in the eMMC fast boot mode case where the buffer
was missing 464 bytes.

The code figures out how many bytes must at least be fetched to honor
the current read, rounds that up to the ss->pagesize [which is a no-op
in the USB download case because that has ->pagesize==1], fetches that
many bytes, but then recorded the original upper bound as the new end of
the valid data. However, this did not take into account the rounding up
to the ss->pagesize. Fix this by recording the actual bytes downloaded.

Fixes: 4b4472438f ("imx: spl_imx_romapi: avoid tricky use of spl_load_simple_fit() to get full FIT size")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-11-17 11:58:26 -05:00
Marcel Ziswiler
e2dcadbba4 imx: spl_imx_romapi: fix comment about stream(usb) download failure
Fix comment about Stream(USB) download failure.

Fixes: 1cbebc7862 ("imx: add rom api support")
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2023-11-17 11:58:26 -05:00
John Keeping
e319ef02fb spl: fix TPL_SYS_MALLOC_F description
This config option enables the malloc() pool in TPL not the SPL.  Fix
the description to accurately reflect this.

Fixes: fd8497dae5 (spl: Create proper symbols for enabling the malloc() pool)
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-17 11:58:26 -05:00
Andre Przywara
45c4b276f0 virtio: rng: gracefully handle 0 byte returns
According to the virtio v1.x "entropy device" specification, a virtio-rng
device is supposed to always return at least one byte of entropy.
However the virtio v0.9 spec does not mention such a requirement.

The Arm Fixed Virtual Platform (FVP) implementation of virtio-rng always
returns 8 bytes less of entropy than requested. If 8 bytes or less are
requested, it will return 0 bytes.
This behaviour makes U-Boot's virtio_rng_read() implementation go into an
endless loop, hanging the system.

Work around this problem by always requesting 8 bytes more than needed,
but only if a previous call to virtqueue_get_buf() returned 0 bytes.

This should never trigger on a v1.x spec compliant implementation, but
fixes the hang on the Arm FVP.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reported-by: Peter Hoyes <peter.hoyes@arm.com>
2023-11-17 11:58:26 -05:00
Simon Glass
741d1e9d3f bootstd: Avoid freeing a non-allocated buffer
EFI applications can be very large and thus used to cause boot failures
when malloc() space was exhausted.

A recent changed fixed this by using the kernel_addr_r environment var
as the address of the buffer. However, it still frees the buffer when
the bootflow is discarded.

Fix this by introducing a flag to indicate whether the buffer was
allocated, or not.

Note that kernel_addr_r is not the last word here. It might be better
to use lmb to place images. But there is a lot of refactoring to do
before we can remove the environment variables. The distro scripts rely
on them so it is safe for bootstd to do so too.

Fixes: 6a8c2f9781 bootstd: Avoid allocating memory for the EFI file

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported by: Simon Glass <sjg@chromium.org>
Reported by: Shantur Rathore <i@shantur.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Shantur Rathore <i@shantur.com>
2023-11-17 11:58:26 -05:00
Tom Rini
169c3cc49e patman correct import of u_boot_pylib
correct long-standing EFI framebuffer bug
 minor test refactor
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmVUxF0RHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreandwgAkAhSYyADGMtGzbGbWK1t4EvYryaRCKvk
 KwbAWjbAfK3xOr8lUviRDDNEn2T1UQKYLPf64h6e1ivMrpS1M9JW8N0dEttagk1R
 O4KLMFkbBZXbbVA/ovhBvEDSBVWCnj0bRSq5nKnoCRCZAtQJnRpQXAZlUz9WT+js
 zJqgVoNua44akYtqulpgX4O6/8SvecQBJoP0yIyQCbXSNSOr7zcADIxq9yJJ0KrC
 4nFQ/qCvLsfrfeRX/NoSbEftX480fjyzpTFsp9XqvJPvtFQbzDUSaXSQ5QSUWNNl
 DrjNjUElqJv7cGSj73mm6yarVyRDygNyu49T/vgAvq3LwgNwdLuUqA==
 =tbfh
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-15nov23' of https://source.denx.de/u-boot/custodians/u-boot-dm

patman correct import of u_boot_pylib
correct long-standing EFI framebuffer bug
minor test refactor
2023-11-15 14:15:21 -05:00
Simon Glass
0d4d9f94c5 bootstage: Correct exhasuted typo
Correct this typo in the warning message shown when no more bootstage
records can be added.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:01 -07:00
Sean Anderson
f6d76e6878 sandbox: Close file after mmaping it
After opening pathname, we must close ifd once we are done with it.

Fixes: b9274095c2 ("sandbox: Add a way to map a file into memory")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:01 -07:00
Heinrich Schuchardt
2c61c0eb14 dm: Do not enable debug messages by default
CONFIG_DM_WARN has a text indicating that these messages should only
provided when debugging. This implies that the setting must be default no.

We should still create debug messages.

Reported-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:01 -07:00
Simon Glass
abf7004321 patman: Correct Python 3.6 behaviour
The importlib_resources import is not actually used. Fix this so that
patman can run on Python 3.6 to some extent, once
'pip3 install importlib-resources' has been run.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:01 -07:00
Simon Glass
dfdf621ff2 patman: Avoid using func_test at top level
Import this only when it is needed, since it is not present when
installed via 'pip install'.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: https://source.denx.de/u-boot/u-boot/-/issues/26
2023-11-14 20:04:01 -07:00
Simon Glass
21229c921b patman: Correct easy pylint warnings in __main__
Tidy up the code a little to reduce the number of pylint warnings.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:00 -07:00
Simon Glass
e296a3c73d patman: Move the main program into a function
Add a new run_patman() function to hold the main logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:00 -07:00
Simon Glass
18f8830ab9 patman: Split out arg parsing into its own file
Move this code into a separate cmdline module, as is done with the
other tools.

Use the same HAS_TESTS check as buildman

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:00 -07:00
Simon Glass
cac91b0b72 expo: Correct background colour
Use the correct background colour when using white-on-black.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-11-14 20:04:00 -07:00
Simon Glass
3fa53b9531 bootstd: Add a return code to bootflow menu
Return an error when the user does not select an OS, so we know whether
to boot or not.

Move calling of bootflow_menu_run() into a separate function so we can
call it from other places.

Expand the test to cover these cases.

Add some documentation also, while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:00 -07:00
Simon Glass
baea7ec6a6 bootstd: Refactor mmc prep to allow a different scan
Adjust scan_mmc4_bootdev() and related function so that the caller can
do its own 'bootflow scan' command. This allows it to change the flags
if needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-11-14 20:04:00 -07:00
Simon Glass
a75cf70d23 efi: Correct handling of frame buffer
The efi_gop driver uses private fields from the video uclass to obtain a
pointer to the frame buffer. Use the platform data instead.

Check the VIDEO_COPY setting to determine which frame buffer to use. Once
the next stage is running (and making use of U-Boot's EFI boot services)
U-Boot does not handle copying from priv->fb to the hardware framebuffer,
so we must allow EFI to write directly to the hardware framebuffer.

We could provide a function to read this, but it seems better to just
document how it works. The original change ignored an explicit comment
in the video.h file ("Things that are private to the uclass: don't use
these in the driver") which is why this was missed when the VIDEO_COPY
feature was added.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 8f661a5b66 ("efi_loader: gop: Expose fb when 32bpp")
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-11-14 20:04:00 -07:00
Marek Vasut
70d2c9940e mmc: renesas-sdhi: Disable clock after tuning reset when possible
Currently the renesas_sdhi_reset_tuning() unconditionally leaves SDHI
clock enabled after the tuning reset. This is not always necessary.

After the driver performed tuning reset at the end of probe function,
or in the unlikely case that tuning failed during regular operation,
the SDHI clock can be disabled after the tuning reset. The following
set_ios call would reconfigure the clock as needed.

In case of regular set_ios call which requires a tuning reset, keep
the clock enabled or disabled according to the mmc->clk_disable state.

With this in place, the controllers which have not been accessed via
block subsystem after boot are left in quiescent state. However, if an
MMC device is used e.g. for environment storage, that controller would
be accessed during the environment load and left active, including its
clock which would still be generated. This is due to the design of the
MMC subsystem, which does not deinit a controller after it was started
once, the controller is only deinited in case of mmc rescan, or before
OS boot.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Tested-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Thuan Nguyen Hong <thuan.nguyen-hong@banvien.com.vn>
2023-11-13 04:12:47 +01:00
Tom Rini
92b27528d7 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
To quote Andre:

The first few patches are some easy refactorings and fixes, most of them
actually don't change the generated binaries at all. Then there is a
defconfig for a new board, for which we just gained the .dts file from
the last kernel DT sync.
On top there is support for a new PMIC (AXP313), and LPDDR4 support for
the Allwinner H616 SoC, both of which are needed to support new devices
that appeared lately, especially cheap TV boxes.

While those are technically new features, they don't affect existing
boards, for instance the LPDDR4 support code is guarded by a new DRAM
type Kconfig variable. So the risk for regressions is very slim.

Gitlab CI passed, and I booted that briefly on some boards, including an
H616 and an H618 one (with LPDDR4).
2023-11-12 16:36:52 -05:00
Mikhail Kalashnikov
4b02f0120a sunxi: H616: add LPDDR4 DRAM support
The H616 SoC family has support for several types of DRAM: DDR3,
LPDDR3, DDR4 and LPDDR4.
At the moment, the driver only supports DDR3 and LPDDR3 memory.
Let's extend the driver to support the LPDDR4 memory. This type
of memory widely used in device with T507(-H) SoC and new orangepi
zero3 with H618.
The compatibility with T507 is not yet complete, because there
is difference in the phy_init array.
The LPDDR4-2133 timings correspond to DRAM Rayson RS1G32LO4D2BDS-53BT
found on the NOR SPI from the Orangepi Zero 3 4GB.

Signed-off-by: Mikhail Kalashnikov <iuncuim@gmail.com>
Tested-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 18:04:32 +00:00
Andre Przywara
b71129ca3b sunxi: H616: DRAM: refactor mctl_phy_configure_odt()
The original H616 DDR3 ODT configuration code wrote board specific values
into a sequence of paired registers.
For LPDDR3 support we needed to special-case one group of registers,
because for that DRAM type we need to write 0 into the lower register of
each pair. That already made the code less readable.

LPDDR4 support will make things even messier, so let's refactor that
code now: We allow to write different values into the lower and upper
half of each pair. The masking is moved into a macro, and use in each
write statement.

The effect is not as obvious yet, as we don't need the full flexibility at
the moment, but the motivation will become clearer with LPDDR4 support.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Reviewed-by: Mikhail Kalashnikov <iuncuim@gmail.com>
2023-11-12 18:03:37 +00:00
Andre Przywara
fafedff350 power: regulator: add AXP313 support
The X-Powers AXP313a is a small PMIC with just three buck converters and
three LDOs, one of which is actually fixed (so not modelled here).

Add the compatible string and the respective regulator ranges to allow
drivers to adjust voltages.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-11-12 16:47:16 +00:00
Andre Przywara
d17d051c54 power: pmic: sunxi: add AXP313 SPL driver
On boards using the AXP313 PMIC, the DRAM rail is often not setup
correctly at reset time, so we have to program the PMIC very early in
the SPL, before running the DRAM initialisation.

Add a simple AXP313 PMIC driver that knows about DCDC2(CPU) and
DCDC3(DRAM), so that we can bump up the voltage before the DRAM init.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2023-11-12 16:47:16 +00:00
Ludwig Kormann
1f6c98c2d3 arm: dts: icnova-a20-adb4006: Add board support
Add board support for ICnova A20 SomPi compute module on
ICnova ADB4006 development board.

Specification:
SoM
- Processor: Allwinner A20 Cortex-A7 Dual Core at 1GHz
- 512MB DDR3 RAM
- Fast Ethernet (Phy: Realtek RTL8201CP)
ADB4006
- I2C
- 2x USB 2.0
- 1x Fast Ethernet port
- 1x SATA
- 2x buttons (PWRON, Boot)
- 2x LEDS
- serial console
- HDMI
- µSD-Card slot
- Audio Line-In / Line-Out
- GPIO pinheaders

https://wiki.in-circuit.de/index.php5?title=ICnova_ADB4006
https://wiki.in-circuit.de/index.php5?title=ICnova_A20_SODIMM

devicetree upstreamed with linux 6.5

Signed-off-by: Ludwig Kormann <ludwig.kormann@ict42.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 16:47:00 +00:00
Samuel Holland
0070d57c33 pinctrl: sunxi: Avoid using .bss for SPL
sunxi platforms put .bss in DRAM, so .bss is not available in SPL before
DRAM controller initialization. Therefore, this buffer must be placed in
the .data section.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 16:46:46 +00:00
Samuel Holland
d379bcbfaf sunxi: mmc: Sort compatible strings numerically
commit 95168d77d3 ("sunxi: add Allwinner R528/T113 SoC support") added
the new entry out of order.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-11-12 16:46:32 +00:00
Samuel Holland
ca43266562 clk: sunxi: Use the right symbol in the Makefile
CONFIG_ARCH_SUNXI will not be enabled for RISC-V SoCs using this driver.
Use the symbol for the driver itself instead.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 16:46:16 +00:00
Samuel Holland
43b573df33 sunxi: mmc: Move header to the driver directory
The MMC controller driver is (and ought to be) the only user of these
register definitions. Put them in a header next to the driver to remove
the dependency on a specific ARM platform's headers.

Due to the sunxi_mmc_init() prototype, the file was not renamed. None of
the register definitions were changed.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2023-11-12 16:45:08 +00:00
Samuel Holland
7b252df7ca net: sun8i_emac: Drop DM_GPIO checks
DM_GPIO is always enable in U-Boot proper for ARCH_SUNXI, and this
driver is never enabled in SPL, so the condition is always true.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 16:45:03 +00:00
Tom Rini
f054f12089 arm: sunxi: Correct warning in board_fit_config_name_match
When building this with clang, we get a warning about having excess
parenthesis here, or that we're incorrectly using "==" when we want "=".
Correct these by using the common size macro.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[Andre: Use SZ_512M as per Simon's suggestion]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 12:03:42 +00:00
Andre Przywara
ffb02942fa sunxi: board: simplify early PMIC setup conditions
So far we have a convoluted #ifdef mesh that guards the early AXP PMIC
setup in board.c. That combination of &&, || and negations is very hard
to read, maintain and especially to extend.

Fortunately we have those same conditions already modelled in the
Kconfig file, so they are actually redundant. On top of that the real
reason we have those preprocessor guards in the first place is about the
symbols that are *conditionally* defined: without #ifdefs the build
would break because of them being undefined for many boards.

To simplify this, just change the guards to actually look at the symbols
needed, so CONFIG_AXP_xxx_VOLT instead of CONFIG_AXPyyy_POWER.
This drastically improves the readability of this code, and makes adding
PMIC support a pure Kconfig matter.

Doing this revealed one bug in Kconfig: there is no axp_set_dcdc4() for
the AXP818, even though CONFIG_AXP_DCDC4_VOLT includes that PMIC.
Since the AXP818 wasn't included when calling axp_set_dcdc4() in board.c,
this wasn't an issue, but becomes one now, so also remove the AXP818 from
the DCDC4 Kconfig symbol.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2023-11-12 12:03:42 +00:00
Tom Rini
17e9db18f1 Documentation:
* hikey960: update link URLs
 * j7200_evm: Fix OPTEE platform name
 * ti: fix style of examples
 * fix typos
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmVOz18ACgkQhO4vgnE3
 U0vcTw/+IiJgluko4+eeyv4IDw9Irc2w3HRq8ZgrNsyx0gdSsnvo/rRfyB9uggfQ
 AJSXDkEHxyWYmta0kz79Dy6SwM9+ez1rhjr4Hz5MrBWPgV4aNqbpY7TlTUjmtU2O
 +oVc+dDpIDfo5Pje+q4yl+YmsQ/YXl45IL0fVJ0FVVZg5oIhNsMo+u1d/umH0+iU
 1rIYBvx1ncODpJB/XcqYQbPYQ3VH5uaSe/x4FVYycx/RGvWZQvohgtE2drNiBE1l
 wAMswDD0PyLWUjAtZwFyzN8VpCcXIGUn/5pUkJ4XaZaKci65beRnEFi0mZDuo+H7
 nMY7VxzDTXQTXvQCkZMuU6Uqn5YU/gop5T0ew2MbxJI1SRMYXecTtS+oo0Btd2oH
 fJFrX9+OBQaZF7Qdii6EreuSAz3nFgWF3p7n2ffGgImzJCpBCznIjXr7Q1iOO30o
 OAD/JxzFgHeQdaOHxlOUIRqnAQNOQ+svtehga9IKi3B/uIuF4EgHxYb8dNMvVepd
 ZIVX6fA6MNHpfk8e/lzpQSn7sj875perxUIU975ukrAskM2+6hqbOzxQ2v9uHW9n
 HXWpu1hLOBwx2lU6jYv2CDihQy3mEkbRjVKwNw4vESB1m3YflswfwYbOI+0aGW8e
 V0jkaVGt78uGYeLl8BHtD/ZSWrrdYeF3XRk2cpxI67i7Rp+Ld8o=
 =nXZy
 -----END PGP SIGNATURE-----

Merge tag 'doc-2024-01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi

Documentation:

* hikey960: update link URLs
* j7200_evm: Fix OPTEE platform name
* ti: fix style of examples
* fix typos
2023-11-11 09:22:54 -05:00
Heinrich Schuchardt
cfaf05839f doc: typo 'form' in qfw.rst
%s/form/from/

Fixes: d46bee8c2d ("doc: qfw man-page")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-11-11 01:44:09 +01:00
Nishanth Menon
ca845d20e6 doc: board: ti: k3 docs: Use ::prompt
Use prompt instead of code-block to have copy-paste friendly command
documentation.

Signed-off-by: Nishanth Menon <nm@ti.com>
2023-11-11 01:44:08 +01:00
Nishanth Menon
81cf99e723 doc: board: ti: Use prompt prompt_style to simplify documentation
The sphinx-prompt documentation[0] provides examples on how we can use
prompt as a parameter to simplify the description. Use the same.

While at it, ensure to make all relevant prompts clarified such as gdb
prompts.

[0] http://sbrunner.github.io/sphinx-prompt/

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-11-11 01:44:08 +01:00