- Oct 16, 2024
-
-
The current implementation of the circular rx buffer falls into a common trap with circular buffers: It keeps the head/tail indices reduced modulo the buffer size. The problem with that is that it makes it impossible to distinguish "buffer full" from "buffer empty", because in both situations one has head==tail. This can easily be demonstrated: Build sandbox with RX_BUFFER enabled, set the RX_BUFFER_SIZE to 32, and try pasting the string 01234567890123456789012345678901 Nothing seems to happen, but in reality, all characters have been read and put into the buffer, but then tstc ends up believing nothing is in the buffer anyway because upriv->rd_ptr == upriv->wr_ptr. A better approach is to let the indices be free-running, and only reduce them modulo the buffer size when accessing the array. Then "empty" is head-tail==0 and "full" is head-tail==size. This does rely on the buffer size being a power-of-two and the free-running indices simply wrapping around to 0 when incremented beyond the maximal positive value. Incidentally, that change from signed to unsigned int also improves code generation quite a bit: In C, (signed int)%(signed int) is defined to have the sign of the dividend (so (-35) % 32 is -3, not 29), and hence despite the modulus being a power-of-two, x % 32 does not actually compile to the same as a simple x & 31 - on x86 with -Os, it seems that gcc ends up emitting an idiv instruction, which is quite expensive. Signed-off-by:
Rasmus Villemoes <ravi@prevas.dk> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Oct 03, 2024
-
-
Tom Rini authored
Simon Glass <sjg@chromium.org> says: This includes various patches towards implementing the VBE abrec bootmeth in U-Boot.
-
This driver should not generally be present in SPL, even if misc devices are enabled. Update the Makefile rule accordingly. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add a missing colon and newline in rk3399_emmc_get_phy(). Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Allow MMC init when clock support is not enabled in a particular phase. Refactor the setting of priv->emmc_clk so it is a bit clearer. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add a little logging to some places in this driver, to aid debugging when something goes wrong. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add an error-return log to the call in mmc_init_device() Signed-off-by:
Simon Glass <sjg@chromium.org>
-
When MMC booting fails it is sometimes hard to figure out what went wrong as there is no error code. It isn't even clear which MMC device was chosen, since SPL can have its own numbering. Add some debugging to help with this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Some boards want to use DM_MMC in TPL so add an option for that. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
There are currently four symbols here, so drop the word 'two'. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
This header includes more than just dummy functions, so drop this comment. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Separate BSS is current mandatory on armv8 but this is not useful for early boot phases. Add support for the combined BSS. Use an #ifdef to avoid using CONFIG_SPL_BSS_START_ADDR which is not valid in this case. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Ilias Apalodimas <ilias.apalodimas@linaro.org>
-
Some boards want to use the debug UART in TPL so add an option for that. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Some boards want to use RAM in VPL so add an option for that. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add an option so that this feature can be enabled in TPL for boards which need it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
The sprintf() etc. functions are supposed to return the length of the string written, but do not. Fix this by checking the amount of buffer space used. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Adjust the condition so that separate BSS can be deselected for TPL and VPL. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This doesn't describe the length parameter correctly. Fix it and zunzip() too. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
When bootstd is not enabled, bootdevs should not be set up. Add a static inline function to see to this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
This file uses __aligned so should include the header which defines that. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Tom Rini authored
Oliver Gaskell <Oliver.Gaskell@analog.com> says: ADSP-SC5xx is a series of ARM-based DSPs. This comprises the armv7 based SC57x, SC58x and SC594 series, and the armv8 based SC598. This patch series includes configurations, init code, and minimal DTs to enable Analog Devices' evaluation boards for these SoCs to boot through SPL and into U-Boot Proper, as well as devicetree schemas for the added DTs. This patch series depends on ("arm: Add Analog Devices SC5xx Machine Type") (https://lists.denx.de/pipermail/u-boot/2024-April/552043.html)
-
Adds support for Analog Devices' SC573-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Adds support for Analog Devices' SC589-MINI board. Includes: - Board specific configs in mach-sc5xx/Kconfig - Board-specific Kconfig and environment in board/adi/ Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Adds support for Analog Devices' SC589-EZKIT board. Includes: - Board specific configs in mach-sc5xx/Kconfig - Board-specific Kconfig and environment in board/adi/ - Memory configuration Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Adds support for Analog Devices' SC584-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - SPL config options in common/spl/Kconfig - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Trevor Woerner <twoerner@gmail.com> Signed-off-by:
Trevor Woerner <twoerner@gmail.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Adds support for Analog Devices' SC594-SOM-EZLITE board. Includes: - Board specific configs in mach-sc5xx/Kconfig - Board-specific Kconfig and environment in board/adi/ Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Adds support for Analog Devices' SC594-SOM-EZKIT board. Includes: - SoC specific configs in mach-sc5xx/Kconfig - Memory Map for SPL - SPL config options in common/spl/Kconfig - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Trevor Woerner <twoerner@gmail.com> Signed-off-by:
Trevor Woerner <twoerner@gmail.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Co-developed-by:
Ian Roberts <ian.roberts@timesys.com> Signed-off-by:
Ian Roberts <ian.roberts@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Adds support for Analog Devices' SC598-SOM-EZLITE board. Includes: - Board specific configs in mach-sc5xx/Kconfig - Board-specific Kconfig and environment in board/adi/ Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Adds support for Analog Devices' SC598-SOM-EZKIT board. Includes: - CONFIG options common to all SC5xx SoCs - SoC specific configs in mach-sc5xx/Kconfig - SPL config options in common/spl/Kconfig - Memory Map for SPL - Necessary board-specific init functions - Board-specific Kconfig and environment in board/adi/ - Memory configuration Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Co-developed-by:
Trevor Woerner <twoerner@gmail.com> Signed-off-by:
Trevor Woerner <twoerner@gmail.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Moves common options between all SC5xx series boards to the ARCH_SC5XX option instead of duplicating them. Also, it was possible to select multiple of the SoC support options. Given a U-Boot binary can only support a single platform, this moves the SoC selection to a `choice`, making them mutually exclusive. Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add devicetree schema for the timer peripheral on Analog Devices SC5xx series SoCs. Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add devicetree schema for the clock tree on Analog Devices SC5xx series SoCs. Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add devicetree schema for Analog Devices SC5xx series SoCs. Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add minimal device tree for Analog Devices' SC598-SOM-EZLITE board. This patch depends on Patches 01 and 07, for sc5xx.dtsi and sc598-som.dtsi respectively. Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add minimal device tree for Analog Devices' SC598-SOM-EZKIT board, and the SC598 SoM. This patch depends on patch 01, for sc5xx.dtsi. Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add minimal device tree for Analog Devices' SC594-SOM-EZLITE board. This patch depends on Patches 01 and 05, for sc5xx.dtsi and sc594-som.dtsi respectively. Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add minimal device tree for Analog Devices' SC594-SOM-EZKIT board, and the SC594 SoM. This patch depends on patch 01, for sc5xx.dtsi. Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add minimal device tree for Analog Devices' SC589-EZKIT board. This patch depends on Patches 01 and 02, for sc5xx.dtsi and sc58x.dtsi. Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Trevor Woerner <twoerner@gmail.com> Signed-off-by:
Trevor Woerner <twoerner@gmail.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add minimal device tree for Analog Devices' SC589-MINI board. This patch depends on Patches 01 and 02, for sc5xx.dtsi and sc58x.dtsi. Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Trevor Woerner <twoerner@gmail.com> Signed-off-by:
Trevor Woerner <twoerner@gmail.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-
Add minimal device tree for Analog Devices' SC584-EZKIT board, and common files for the SC58x family. This patch depends on Patch 01, for sc5xx.dtsi. Co-developed-by:
Greg Malysa <greg.malysa@timesys.com> Signed-off-by:
Greg Malysa <greg.malysa@timesys.com> Co-developed-by:
Trevor Woerner <twoerner@gmail.com> Signed-off-by:
Trevor Woerner <twoerner@gmail.com> Co-developed-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by:
Oliver Gaskell <Oliver.Gaskell@analog.com>
-