Sughosh Ganu [Mon, 3 Mar 2025 13:32:26 +0000 (19:02 +0530)]
lmb: check if a region can be reserved by lmb_reserve()
The logic used in lmb_alloc() takes into consideration the existing
reserved regions, and ensures that the allocated region does not
overlap with any existing allocated regions. The lmb_reserve()
function is not doing any such checks -- the requested region might
overlap with an existing region. This also shows up with
lmb_alloc_addr() as this function ends up calling lmb_reserve().
Add a function which checks if the region requested is overlapping
with an existing reserved region, and allow for the reservation to
happen only if both the regions have LMB_NONE flag, which allows
re-requesting of the region. In any other scenario of an overlap, have
lmb_reserve() return -EEXIST, implying that the requested region is
already reserved.
Add corresponding test cases which check for overlapping reservation
requests made through lmb_reserve() and lmb_alloc_addr(). And while
here, fix some of the comments in the test function being touched.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
The current code has a problematic corner case with formar "%c" and
0 as parameter. The proper zero byte is being emitted into digit buffer
but the final copy into outstr expects null-terminated string and doesn't
copy the required \0 byte. This has lead to malformed TFTP packets, refer
to tftp_send() which relies on %c to generate multiple zero-terminated
strings in one buffer.
Introduce a variable to force the copy of one character in this case.
The new behaviour is consistent with non-tiny implementation.
Reported-by: Chintan Vankar <c-vankar@ti.com> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Tom Rini [Mon, 3 Mar 2025 20:21:14 +0000 (14:21 -0600)]
Merge patch series "J784S4: Enable USB DFU boot, DFU flash and UMS configs"
Siddharth Vadapalli <s-vadapalli@ti.com> says:
This series enables configs for USB DFU boot, USB DFU flash and USB Mass
Storage command for J784S4. The device-tree changes required for enabling
these features will be posted as patches to Linux device-tree mailing lists
and will eventually make it to U-Boot via DT Sync.
configs: j784s4_evm_a72_defconfig: enable USB DFU boot, DFU flash and UMS
Enable support for USB DFU boot via USB0 instance of USB on J784S4 SoC
which is a Cadence USB Controller. Additionally, enable support for USB
DFU flash and USB Mass Storage (UMS) command. While at it, sync with
savedefconfig.
Keerthy [Mon, 17 Feb 2025 10:57:18 +0000 (16:27 +0530)]
configs: j722s_evm_r5_defconfig: Enable the ESM Configs to support watchdog
Enable ESM configs. ESMs are a prerequisite to enable
watchdog reset functionality. The ESM aka error signalling module
is primarily responsible for sensing the watchdog reset event.
Keerthy [Mon, 17 Feb 2025 10:57:17 +0000 (16:27 +0530)]
arm: mach-k3: j722s: Initialize MCU & MAIN Domain ESMs
Initialize MCU & MAIN Domain ESMs as a prerequisite to enable
watchdog reset functionality. The ESM aka error signalling module
is primarily responsible for sensing the watchdog reset event.
Tom Rini [Fri, 28 Feb 2025 22:51:10 +0000 (16:51 -0600)]
Merge patch series "rsa: Add rsa_verify_openssl() to use openssl for host builds"
Paul HENRYS <paul.henrys_ext@softathome.com> says:
This serie of patches adds a new tool to authenticate files signed with
a preload header. This tool is also used in the tests to actually
verify the authenticity of the file signed with such a preload header.
Paul HENRYS [Mon, 24 Feb 2025 21:20:53 +0000 (22:20 +0100)]
tools: Add preload_check_sign to authenticate images with a pre-load
preload_check_sign is added so that it can be used to authenticate images
signed with the pre-load signature supported by binman and U-Boot.
It could also be used to test the signature in binman tests signing
images with the pre-load.
Signed-off-by: Paul HENRYS <paul.henrys_ext@softathome.com>
Tom Rini [Fri, 28 Feb 2025 14:42:01 +0000 (08:42 -0600)]
Merge patch series "boards: siemens: iot2050: SM variant, sysinfo support, fixes & cleanups"
Baocheng Su <baocheng.su@siemens.com> says:
This introduces a sysinfo driver which also permits SMBIOS support.
The first 10 patches of v2 have already been applied. The remaining is
solely the sysinfo driver. To maintain consistency and ease of searching
through the history, the series title remains unchanged.
Baocheng Su [Tue, 18 Feb 2025 02:36:13 +0000 (10:36 +0800)]
sysinfo: Add driver for IOT2050 boards
This brings a sysinfo driver and DT entry for the IOT2050 board series.
It translates the board information passed from SE-Boot to SPL into
values that can be retrieved via the sysinfo API. Will is already used
to fill the SMBIOS table when booting via EFI.
Signed-off-by: Baocheng Su <baocheng.su@siemens.com> Signed-off-by: Li Hua Qian <huaqian.li@siemens.com>
[Jan: split-off as separate patch, cleanup] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Baocheng Su [Tue, 18 Feb 2025 02:36:12 +0000 (10:36 +0800)]
sysinfo: Add SYSID_BOARD_RAM_SIZE_MB
Add a new field SYSID_BOARD_RAM_SIZE_MB to sysinfo structure to store
the size of RAM in MB. dram_init can use this field to get the RAM size
via sysinfo driver.
Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
Baocheng Su [Tue, 18 Feb 2025 02:36:11 +0000 (10:36 +0800)]
sysinfo: Add API for accessing data elements
This commit introduces a new API to the sysinfo module, allowing access
to data elements. This is particularly useful for handling data with
multiple instances, such as MAC addresses.
Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
Baocheng Su [Tue, 18 Feb 2025 02:36:10 +0000 (10:36 +0800)]
smbios: Fill UUID from sysinfo when available
Allow for the sysinfo drivers to provide a system UUID to SMBIOS. Will
be first used by the IOT2050 boards.
Signed-off-by: Li Hua Qian <huaqian.li@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Baocheng Su <baocheng.su@siemens.com>
dma: ti: k3-udma: Avoid Memory leak issues during dma memcpy
During dma memcpy, bcdma descriptor gets allocated for each
transaction and not freed after completion of that transaction.
So, avoid the memory allocation for every transaction.
Add one descriptor per dma device and allocate it once in
resource setup. This descriptor can now be used for all
dma memcpy transactions optimally.
J. Neuschäfer [Tue, 18 Feb 2025 13:39:45 +0000 (14:39 +0100)]
serial: ns16550: Fix pointer type mismatch
serial_out_dynamic() takes a u8* addr and uses it for 8-bit or 32-bit
accesses, depending on the value of plat->reg_width. This results in a
pointer type mismatch that the compiler may even turn into an error:
drivers/serial/ns16550.c: In function ‘serial_out_dynamic’:
drivers/serial/ns16550.c:115:42: error: passing argument 1 of ‘out_be32’ from incompatible pointer type [-Wincompatible-pointer-types]
115 | out_be32(addr, value);
| ^~~~
| |
| u8 * {aka unsigned char *}
Alexander Stein [Thu, 20 Feb 2025 14:58:07 +0000 (15:58 +0100)]
mtd: mtdpart: Support MTD_SIZE_REMAINING with unallocated memory area
If there is an unallocated memory area before the last, filling parting
the size calculation for MTD_SIZE_REMAINING does not take this hole
into account.
Fix this by calculating the remaining size just based on total size
and partition offset.
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Tom Rini [Fri, 28 Feb 2025 14:35:57 +0000 (08:35 -0600)]
Merge patch series "env: mmc: Make redundant env in both eMMC boot partitions consider DT properties"
This series from Marek Vasut <marex@denx.de> clarifies and makes a bit
more configurable the case of redundant environment storage using the
eMMC boot partitions.
Marek Vasut [Fri, 21 Feb 2025 18:47:24 +0000 (19:47 +0100)]
env: mmc: Clean up env_mmc_load() ifdeffery
Rename the variants of env_mmc_load() for redundant and non-redundant
environment to env_mmc_load_redundant() and env_mmc_load_singular()
respectively and convert the env_mmc_load() implementation to use of
if (IS_ENABLED(...)). As a result, drop __maybe_unused from
mmc_env_is_redundant_in_both_boot_hwparts().
Marek Vasut [Fri, 21 Feb 2025 18:47:23 +0000 (19:47 +0100)]
env: mmc: Make redundant env in both eMMC boot partitions consider DT properties
Introduce a new function mmc_env_is_redundant_in_both_boot_hwparts()
which replaces IS_ENABLED(ENV_MMC_HWPART_REDUND) and internally does
almost the same check as the macro which assigned ENV_MMC_HWPART_REDUND
did, and call it in place of IS_ENABLED(ENV_MMC_HWPART_REDUND).
The difference compared to IS_ENABLED(ENV_MMC_HWPART_REDUND) is
in the last conditional, which does not do plain macro compare
(CONFIG_ENV_OFFSET == CONFIG_ENV_OFFSET_REDUND), but instead does
mmc_offset(mmc, 0) == mmc_offset(mmc, 1). If OF_CONTROL is not
in use, this gets optimized back to original macro compare, but
if OF_CONTROL is in use, this also takes into account the DT
properties u-boot,mmc-env-offset and u-boot,mmc-env-offset-redundant.
- Convert imx6q-lxr and imxrt1050 to OF_UPSTREAM.
- Fix potential memory leak on ]imx/imx8/imx8m]image.
- Restrict DDR_SI_TEST to only Siemens Capricorn board.
- Fix CONFIG_BOOTCOUNT_ALTBOOTCMD on Data Modul and DH imx8m boards.
Marek Vasut [Sat, 22 Feb 2025 17:13:26 +0000 (18:13 +0100)]
ARM: imx: Introduce DH i.MX6 DHSOM board specific defconfigs
Move content of dh_imx6_defconfig into dh_imx6.config. Retain legacy
dh_imx6_defconfig as multi-config for all DH i.MX6 DHSOM based boards.
Introduce separate imx6_dhcom_drc02_defconfig, imx6_dhcom_pdk2_defconfig
and imx6_dhcom_picoitx_defconfig for each i.MX6 DHSOM based board, to
make build for those boards easier. No functional change.
Marek Vasut [Fri, 21 Feb 2025 17:07:16 +0000 (18:07 +0100)]
ARM: imx: Fix CONFIG_BOOTCOUNT_ALTBOOTCMD update on Data Modul i.MX8M Mini eDM SBC
The environment is missing quotes for string variable, add them.
Fixes: 940135eea5df ("Kconfig: Move CONFIG_BOOTCOUNT_ALTBOOTCMD to Kconfig") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
Liya Huang [Fri, 31 Jan 2025 00:52:43 +0000 (08:52 +0800)]
siemens: common: Make DDR_SI_TEST depend on TARGET_CAPRICORN
The DDR_SI_TEST config option is only relevant to the i.MX8 Capricorn
board.
Make DDR_SI_TEST depend on DDR_SI_TEST so that it does not show up
on other targets.
Marek Vasut [Sat, 22 Feb 2025 20:33:28 +0000 (21:33 +0100)]
net: miiphybb: Use container_of() in bb_miiphy_getbus()
Replace the name based look up in bb_miiphy_getbus() with trivial
container_of() call. This works because the struct bb_miiphy_bus
always embeds the matching struct mii_dev . This also makes the
code much simpler and more efficient.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 22 Feb 2025 20:33:27 +0000 (21:33 +0100)]
net: designware: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sat, 22 Feb 2025 20:33:26 +0000 (21:33 +0100)]
net: sh_eth: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sat, 22 Feb 2025 20:33:25 +0000 (21:33 +0100)]
net: ravb: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 22 Feb 2025 20:33:24 +0000 (21:33 +0100)]
arm: mvebu: a38x: Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
Allocate bb_miiphy using bb_miiphy_alloc() and fill in callbacks
currently listed in bb_miiphy_buses[] array. This is a temporary
duplication of assignment to avoid breakage, which will be removed
in follow up patches. At this point, the bb_miiphy callbacks can
reach these accessors by doing container_of() on struct mii_dev.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Introduce bb_miiphy_alloc()/bb_miiphy_free() wrappers to allocate and free
struct bb_miiphy_bus. Make struct bb_miiphy_bus wrap struct mii_dev, which
will become useful later in bb_miiphy_bus accessors, which would be able
to access struct bb_miiphy_bus using container_of, even if the PHY stack
only passes in the inner struct mii_dev .
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 22 Feb 2025 20:33:21 +0000 (21:33 +0100)]
net: designware: Extract bbmiiphy initialization into dedicated function
Pull the bbmiiphy initialization code from designware_eth_probe() into
dedicated function, dw_bb_mdio_init(), just like all the other MDIO
initialization functions.
Keep check for "snps,bitbang-mii" in the designware_eth_probe(), so the
driver can initialize this MDIO only in case the property is present,
and initialize regular DW MDIO in case it is not present.
The dw_bb_mdio_init() allocates its own MDIO instance, because thus far
code gated behind "snps,bitbang-mii" did depend on allocation of MDIO bus
by the other two MDIO bus options and then rewrote the newly allocated
MDIO bus callbacks, which is wrong, instead allocate proper MDIO bus with
the correct callbacks outright.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sat, 22 Feb 2025 20:33:18 +0000 (21:33 +0100)]
arm: mvebu: a38x: Call bb_miiphy init directly in driver probe
All the resources needed by this .init callback should already
be available by the time probe function runs, simply call the
init callback directly and set the bb_miiphy init callback to
NULL. This shouldn't break anything on this hardware, but would
be nice if someone could double-check and test that.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sat, 22 Feb 2025 20:33:17 +0000 (21:33 +0100)]
net: designware: Reorder bb_miiphy functions
Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sat, 22 Feb 2025 20:33:16 +0000 (21:33 +0100)]
arm: mvebu: a38x: Reorder bb_miiphy functions
Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sat, 22 Feb 2025 20:33:15 +0000 (21:33 +0100)]
net: sh_eth: Reorder bb_miiphy functions
Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Marek Vasut [Sat, 22 Feb 2025 20:33:14 +0000 (21:33 +0100)]
net: ravb: Reorder bb_miiphy functions
Move the bb_miiphy functions before MDIO registration. This is a
preparatory patch, the functions will be referenced around the MDIO
registration in the follow up patches. No functional change.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 22 Feb 2025 20:33:12 +0000 (21:33 +0100)]
net: sh_eth: Drop empty init callback
The init function does nothing, the bb_miiphy_init() already checks
whether the .init callback is assigned, and if not, skips calling it.
Remove the empty init function. The entire init callback will be
removed in follow up patches.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 22 Feb 2025 20:33:11 +0000 (21:33 +0100)]
net: ravb: Drop empty init callback
The init function does nothing, the bb_miiphy_init() already checks
whether the .init callback is assigned, and if not, skips calling it.
Remove the empty init function. The entire init callback will be
removed in follow up patches.
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tom Rini [Tue, 25 Feb 2025 17:11:32 +0000 (11:11 -0600)]
Merge patch series "Remove "saveenv" functionality from am57xx evms"
Anurag Dutta <a-dutta@ti.com> says:
Previously saved environment introduce discrepancies and may lead to
incompatibilities without default settings. This series removes the saved
environment functionality on am57xx evms so that the default configuration
is always loaded
Anurag Dutta [Sat, 8 Feb 2025 04:39:38 +0000 (10:09 +0530)]
configs: am57xx: Remove saved environments
Saved environments lead to inconsistencies leading to conflicts
with the default environment that U-boot should update during
development. Remove the previously saved environment so that
the default environment is always loaded.
Anurag Dutta [Sat, 8 Feb 2025 04:39:37 +0000 (10:09 +0530)]
configs: am57xx_hs: Remove saved environments
Saved environments cause inconsistencies leading to conflicts
with the default environment that U-boot should update during
development. Remove the previously saved environment so that
the default environment is always loaded.
Please pull the SoCFPGA changes for next from u-boot-socfpga, containing
boot support for the Altera SoCFPGA Agilex 5 platform in U-Boot. The
changes include:
1. Board-specific configurations and setup required to enable Agilex 5
operation in U-Boot.
2. Integration of cache coherency unit (CCU) initialization routine,
including CCU conguration in DT.
3. Clock, firewall (configured in DT), SMMU, low level initialization
specific to Agilex 5.
4. Integration of memory initialization routine, including DDR setup.
This patch set has been tested on Agilex 5 devkit with QSPI boot
(UBI/UBIFS) and RAM boot (TFTP & ARM DS debugger).
Automatically start watchdog timer for Agilex5. This
configuration is enabled by default in the Kconfig,
hence removing this configuration from Agilex5 defconfig.
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
Tien Fong Chee [Tue, 18 Feb 2025 08:35:09 +0000 (16:35 +0800)]
arm: socfpga: soc64: Add support for board_boot_order()
Add board_boot_order() to retrieve the list of boot devices from
spl-boot-order property in device tree. This board_boot_order()
would be used for all Intel SOC64 devices.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
arm: armv8: Improve SPL data save and restore implementation
Introduce a new symbol in the beginning of .data section in
the common ARMv8 linker script and use that as a reference
for data save and restore.
Previously, the code would rely on calculating the start of
the .data section address via data size, however, we observed
that the data size does not really reflect the SPL mapped
addresses.
In our case, the binman_sym section size was not included in
the data size, which will result in a wrong address for the
.data start section, which prevents us from properly saving
and restoring SPL data.
This approach skips the calculation for the starting address
of the .data section, and instead just defines the beginning
address of the .data section and calling the symbol as needed,
in which we think as a simpler and much more robust method.
Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
arm: socfpga: smc: Add memory coherency support to mailbox command
As cache is enabled in U-Boot and disabled in ATF(BL31). We need to
perform cache flush of buffers that are shared between U-Boot and
ATF using secure monitor calls.
Signed-off-by: Mahesh Rao <mahesh.rao@altera.com> Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
Tien Fong Chee [Tue, 18 Feb 2025 08:34:59 +0000 (16:34 +0800)]
arm: socfpga: agilex5: Add SMMU initialization
Allow non-secure accesses only with SMMU peripherals. This would protect
the content in DDR secure region from accidentally modified by SMMU
peripherals.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
Tien Fong Chee [Thu, 8 Aug 2024 08:47:39 +0000 (16:47 +0800)]
arm: socfpga: agilex5: Enable cache flush for system memory cache in CCU
set/way instructions "dc cisw" which is used by the "dcache flush" command
only flushing CPU data caches from L1 -> L2 -> L3 to system memory cache in
cache coherency unit, hence this patch enables data flush from system
memory cache of CCU into DDR memory.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
These firewall configure settings are needed to disable firewall on
respective hardware component so both secure and non-secure transactions
are allowed.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
arm: socfpga: Add handoff data support for SoCFPGA Agilex5 device
Agilex5 supports both HPS handoff data and DDR handoff data.
Existing HPS handoff functions are restructured to support both existing
devices and Agilex5 device.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com>
arm: socfpga: agilex5: Add warm reset mask for Agilex5
There are 5 L4 watchdogs and one SDM triggered warm reset bit
in Agilex5 reset manager "stat" register where bit 16:20 for L4
watchdogs. Assigning value 1 to these bits in the register address
will initiate SDM to trigger warm reset.
Introducing new warm reset mask for Agilex5 to trigger warm reset
to all five L4 watchdogs.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com> Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
drivers: clk: agilex5: Configure intosc as boot_clk source
Some customers prefer to minimize the use of external oscillators,
especially when using the FPGA first configuration mode.
By enabling the configuration of the HPS internal oscillator as
the boot_clk source instead of the default external oscillator,
(HPS_OSC_CLK) in non-secure boot scenarios, this allows them
to eliminate the need for an additional oscillator device and
a dedicated HPS pin, simplifying board layout and routing.
arm: socfpga: agilex5: Add new driver model for system manager in Agilex5
Initial creation of new system manager driver.
Add supports for the SOCFPGA System Manager Register block which
aggregates different peripheral function into one area.
On 64 bit ARM parts, the system manager only can be accessed during
EL3 mode, this driver model provide user the high level access
to system register and abstract user from low level access.
The base address of system manager can be retrieved
using DT framework through the System Manager driver.
Signed-off-by: Tien Fong Chee <tien.fong.chee@altera.com> Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Marek Vasut [Wed, 29 Jan 2025 11:15:54 +0000 (12:15 +0100)]
mmc: Fix size calculation for sector addressed MMC version 4
For eMMC v4 and newer that is smaller than 2 GiB, the JEDEC JESD84-B51
section 6.2.4 Configure partitions indicates that EXT_CSD SEC_COUNT
should not be used to determine device size, and instead device size
should be calculated from C_SIZE and C_SIZE_MULT.
This is not exactly accurate, the 2 GiB limit is not a hard line,
there are eMMC devices which are smaller than 2 GiB and still
require device size to be determined from EXT_CSD SEC_COUNT. The
hard line is instead OCR HCS bit, which indicates whether the device
is byte or sector addressed, the former applies to most devices
below 2 GiB, and the later applies mostly to devices above 2 GiB.
However, there are a couple of devices which are smaller than 2 GiB
and still set the OCR HCS bit to indicate they are sector addressed,
and therefore the size calculation for those devices should also
use EXT_CSD SEC_COUNT . Use mmc->high_capacity flag to discern the
devices instead of arbitrary 2 GiB limit. The mmc->high_capacity flag
reflects the OCR HCS bit state.
Fixes: 639b7827d1ca ("mmc: fix the condition for MMC version 4") Signed-off-by: Marek Vasut <marex@denx.de>
The length of buffers used to read inode tables, directory tables, and
reading a file are calculated as: number of blocks * block size, and
such plain multiplication is prone to overflowing (thus unsafe).
Replace it by __builtin_mul_overflow, i.e. safe math.
Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
Tom Rini [Sat, 22 Feb 2025 14:42:01 +0000 (08:42 -0600)]
Merge branch 'picasso' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Branch contains bringup of Acer Iconia Tab A500 (codename picasso), a
Tegra 2 Android device with decent Linux kernel support. Ondevice tests
and U-Boot test suit all passed.