]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 months agoimx9: trdc: cleanup code
Peng Fan [Thu, 19 Sep 2024 04:01:35 +0000 (12:01 +0800)]
imx9: trdc: cleanup code

Replace magic number with meaningful macros.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx: Generalize fixup_thermal_trips
Peng Fan [Thu, 19 Sep 2024 04:01:34 +0000 (12:01 +0800)]
imx: Generalize fixup_thermal_trips

i.MX8M and i.MX9 have duplicated fixup_thermal_trips, so move it
to arch/arm/mach-imx/fdt.c to avoid duplicated code.

The critial temperature point for i.MX9 set to "maxc - 5" back to give
some margin.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx93: Add Low performance parts 9302/9301 support
Ye Li [Thu, 19 Sep 2024 04:01:33 +0000 (12:01 +0800)]
imx93: Add Low performance parts 9302/9301 support

Add support for iMX93 low performance parts 9302 and 9301 which
restrict to low drive voltage only.
The parts run A55 max speed at 900Mhz and M33 at 133Mhz, have NPU
and A55 core1 (9301) disabled.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Disable cpu1 for variants that only has one A55 core
Peng Fan [Thu, 19 Sep 2024 04:01:32 +0000 (12:01 +0800)]
imx9: soc: Disable cpu1 for variants that only has one A55 core

Disale CPU1 for i.MX93 variants that only has one A55 core and update
cooling maps.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx: Generalize disable_cpu_nodes
Peng Fan [Thu, 19 Sep 2024 04:01:31 +0000 (12:01 +0800)]
imx: Generalize disable_cpu_nodes

disable_cpu_nodes could be reused by i.MX9, so move disable_cpu_nodes
out from mach-imx/imx8m/soc.c to mach-imx/fdt.c and update
disable_cpu_nodes to make it easy to support different socs.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx8m: soc: Drop disable_pmu_cpu_nodes
Peng Fan [Thu, 19 Sep 2024 04:01:30 +0000 (12:01 +0800)]
imx8m: soc: Drop disable_pmu_cpu_nodes

i.MX8M use PPI for PMU interrupts, there is no reason to update
interrupt-affinity for PMU even interrupt-affinity was wrongly added
to device tree before.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: Add 233Mhz DDR PLL frequency
Ye Li [Thu, 19 Sep 2024 04:01:29 +0000 (12:01 +0800)]
imx9: Add 233Mhz DDR PLL frequency

To support 1.866GTS LPDDR4x timing script, need to add 233Mhz freq
to DDR PLL for second mission point at 933MTS. Otherwise DDR training
will fail.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Mask the wdog reset in src by default on i.mx9
Jacky Bai [Thu, 19 Sep 2024 04:01:28 +0000 (12:01 +0800)]
imx9: soc: Mask the wdog reset in src by default on i.mx9

Normally, the wdog will be used for trigger external PMIC reset
through the WDOG_ANY pin. If the PMIC chip has debounce logic for
the reset signal, in some corner case the wdog can NOT trigger
external PMIC reset if the SoC has been reset internal before the
PMIC captures the WDOG_ANY pin reset, so need to keep the WDOG3-5
reset masked in the SRC to let the PMIC to do the reset safely.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: clock: Update clock init function and sequence
Ye Li [Thu, 19 Sep 2024 04:01:27 +0000 (12:01 +0800)]
imx9: clock: Update clock init function and sequence

Since we use SPEED GRADE fuse to set A55 frequency, remove the
set_arm_core_low_drive_clk function which has hard coded frequency.
And adjust clock_init called sequence and split it to early and late
functions.
Set the authen register in early function, because CCF driver checks
NS bit.
Set bus and core clock in late function, because the fuse read and
SoC type/rev depend on ELE.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Add function to get target voltage mode
Ye Li [Thu, 19 Sep 2024 04:01:26 +0000 (12:01 +0800)]
imx9: soc: Add function to get target voltage mode

Replace the static CONFIG_IMX9_LOW_DRIVE_MODE with runtime target
voltage mode by checking the part's SPEED GRADE fuse.
SPL will configure to highest A55 speed which is indicated by the SPEED
fuse and select corresponding voltage mode.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Print ELE information
Peng Fan [Thu, 19 Sep 2024 04:01:25 +0000 (12:01 +0800)]
imx9: soc: Print ELE information

The boot image includes Edgelock Enclave(ELE) Firmware. Print the
information out to let user know which version firmware is being used.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Change second Ethernet MAC fuse layout
Ye Li [Thu, 19 Sep 2024 04:01:24 +0000 (12:01 +0800)]
imx9: soc: Change second Ethernet MAC fuse layout

The second Ethernet MAC (eQOS) fuse layout is changed since i.MX93 A1
following other i.MX platforms, for example i.MX8MP.

Order for A0:
MAC1_ADDR[15:0]
MAC1_ADDR[31:16]
MAC1_ADDR[47:32]
MAC2_ADDR[47:32]
MAC2_ADDR[15:0]
MAC2_ADDR[31:16]

Order since A1:
MAC1_ADDR[15:0]
MAC1_ADDR[31:16]
MAC1_ADDR[47:32]
MAC2_ADDR[15:0]
MAC2_ADDR[31:16]
MAC2_ADDR[47:32]

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Change FSB directly access to fuse API
Peng Fan [Thu, 19 Sep 2024 04:01:23 +0000 (12:01 +0800)]
imx9: soc: Change FSB directly access to fuse API

To support OSCCA enabled part which has disabled FSB access from SOC,
change directly read from FSB to use fuse_read API.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Print UID in big endian format for EL2GO
Ye Li [Thu, 19 Sep 2024 04:01:22 +0000 (12:01 +0800)]
imx9: soc: Print UID in big endian format for EL2GO

Print UID in big endian format and as one buffer of bytes, so customer
can directly use it for EdgeLock 2GO.

Before:
UID: 0xf6c8ae93 0x0f46b326 0x10d61eb3 0x0583c2d2

Become:
UID: 93aec8f626b3460fb31ed610d2c28305

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: imx9: soc: Align UID endianness with ROM
Frank Li [Thu, 19 Sep 2024 04:01:21 +0000 (12:01 +0800)]
imx9: soc: imx9: soc: Align UID endianness with ROM

ROM use UID[0] and UID[1] as serial number with big endian when usb serial
download.

After update this, uuu(>1.6) can use below command to filter out devices
when multi boards connected.

uuu -ms <serial#> ...

[sudo] uuu -lsusb can list known devices with serial# informaiton.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoimx9: soc: Configure TRDC for M33 TCM access
Ye Li [Thu, 19 Sep 2024 04:01:20 +0000 (12:01 +0800)]
imx9: soc: Configure TRDC for M33 TCM access

On OSCCA part, M33 TCM is used for ROM PATCH and protected by ELE ROM.
So after release TRDC, we need to configure TRDC for M33 TCM,
otherwise A55 can't access the TCM.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
3 months agoimx9: soc: wait ssar when power on power domain
Peng Fan [Thu, 19 Sep 2024 04:01:19 +0000 (12:01 +0800)]
imx9: soc: wait ssar when power on power domain

SSAR handshake done means power on finished, not ISO done. so correct
the waiting mask.

Fixes: 0256577a83b ("imx: imx9: Add MIX power init")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 months agoMerge patch series "Fix various bugs"
Tom Rini [Wed, 18 Sep 2024 19:07:19 +0000 (13:07 -0600)]
Merge patch series "Fix various bugs"

Simon Glass <sjg@chromium.org> says:

This series includes the patches needed to make make the EFI 'boot' test
work. That test has now been split off into a separate series along with
the EFI patches.

This series fixes these problems:
- sandbox memory-mapping conflict with PCI
- the fix for that causes the mbr test to crash as it sets up pointers
  instead of addresses for its 'mmc' commands
- the mmc and read commands which cast addresses to pointers
- a tricky bug to do with USB keyboard and stdio
- a few other minor things

3 months agotest: mbr: Drop a duplicate test
Simon Glass [Sun, 1 Sep 2024 22:26:34 +0000 (16:26 -0600)]
test: mbr: Drop a duplicate test

The test currently runs twice as it is declared twice. Unwind this.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: mbr: Use RAM for the buffers
Simon Glass [Sun, 1 Sep 2024 22:26:33 +0000 (16:26 -0600)]
test: mbr: Use RAM for the buffers

The normal approach with sandbox is to use a fixed memory address in the
RAM, to avoid needing to create a map for transient local variables.

Update this test to use this approach.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: mbr: Use a constant for the block size
Simon Glass [Sun, 1 Sep 2024 22:26:32 +0000 (16:26 -0600)]
test: mbr: Use a constant for the block size

It isn't that important to factor out constants in tests, but in this
case we have 0x200 and 512 used. The commands don't use the constant
as they use a block count ('1'). It doesn't create more code to use a
constant, so create one.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: mbr: Unmap the buffers after use
Simon Glass [Sun, 1 Sep 2024 22:26:31 +0000 (16:26 -0600)]
test: mbr: Unmap the buffers after use

This tests maps some local variables into sandbox's address space. Make
sure to unmap them afterwards.

Note that the normal approach with sandbox is to use a fixed memory
address in the RAM, to avoid needing to create a map for transient local
variables.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 04291ee0aba ("cmd: mbr: Allow 4 MBR partitions without need...")
3 months agocmd: Fix memory-mapping in cmp command
Simon Glass [Sun, 1 Sep 2024 22:26:30 +0000 (16:26 -0600)]
cmd: Fix memory-mapping in cmp command

This unmaps a different address from what was mapped. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agoread: Tidy up use of map_sysmem() in the read command
Simon Glass [Sun, 1 Sep 2024 22:26:29 +0000 (16:26 -0600)]
read: Tidy up use of map_sysmem() in the read command

Rename the variable to 'ptr' since it is a pointer, not an address. Make
sure to unmap the pointer.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agommc: Use map_sysmem() with buffers in the mmc command
Simon Glass [Sun, 1 Sep 2024 22:26:28 +0000 (16:26 -0600)]
mmc: Use map_sysmem() with buffers in the mmc command

The current implementation casts an address to a pointer. Make it more
sandbox-friendly by using map_sysmem().

Rename the variable to 'ptr' since it is a pointer, not an address.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agosandbox: Implement reference counting for address mapping
Simon Glass [Sun, 1 Sep 2024 22:26:27 +0000 (16:26 -0600)]
sandbox: Implement reference counting for address mapping

An address may be mapped twice and unmapped twice. Delete the mapping
only when the last user unmaps it.

Fix a missing comment while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agosandbox: Add some debugging to pci_io
Simon Glass [Sun, 1 Sep 2024 22:26:26 +0000 (16:26 -0600)]
sandbox: Add some debugging to pci_io

Add a little debugging to this driver. Convert the existing debugging to
use logging.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agosandbox: Unmap old tags
Simon Glass [Sun, 1 Sep 2024 22:26:25 +0000 (16:26 -0600)]
sandbox: Unmap old tags

So far unmapping has not been implemented. This means that if one test
maps a pointer to an address with map_sysmem(), then a second test can
use that same pointer, by mapping the address back to a pointer with
map_to_sysmem(). This is not really desirable, even if it doesn't
cause any problems at the moment.

Implement unmapping, to clean this up.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agosandbox: Update cpu to use logging
Simon Glass [Sun, 1 Sep 2024 22:26:24 +0000 (16:26 -0600)]
sandbox: Update cpu to use logging

Use log_debug() instead of including the function name in the string.
Add one more debug for PCI.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agosandbox: Change the range used for memory-mapping tags
Simon Glass [Sun, 1 Sep 2024 22:26:23 +0000 (16:26 -0600)]
sandbox: Change the range used for memory-mapping tags

Sandbox keeps a table of addresses which map to pointers which are
outside its emulated DRAM. The current range from 10000000 conflicts
with the PCI range, meaning that if PCI mapping is on, that particular
address can be decoded by PCI instead of the table.

Fix this by moving the range up to the top of memory. Update the docs
while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: mbr: Adjust test to drop 0x
Simon Glass [Sun, 1 Sep 2024 22:26:22 +0000 (16:26 -0600)]
test: mbr: Adjust test to drop 0x

U-Boot commands typically don't need 0x to specify hex, since they use
hex by default. Adding 0x in this test is confusing since it suggests
that it is necessary. Drop it from the file.

Also use the %#x construct to get the 0x when needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest: mbr: Adjust test to use lower-case hex
Simon Glass [Sun, 1 Sep 2024 22:26:21 +0000 (16:26 -0600)]
test: mbr: Adjust test to use lower-case hex

Switch to lower-case hex which is more commonly used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agodm: usb: Deal with USB keyboard persisting across tests
Simon Glass [Sun, 1 Sep 2024 22:26:20 +0000 (16:26 -0600)]
dm: usb: Deal with USB keyboard persisting across tests

Clear any USB-keyboard devices before running a unit test, to avoid
using a stale udevice pointer in stdio. Add a long comment to explain
this situation and why this solution seems best, at least for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agousb: Add DEV_FLAGS_DM to stdio for USB keyboard
Simon Glass [Sun, 1 Sep 2024 22:26:19 +0000 (16:26 -0600)]
usb: Add DEV_FLAGS_DM to stdio for USB keyboard

This device contains a pointer to struct udevice so set the flag
indicating that, just to be tidy.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agolog: Add a new log category for the console
Simon Glass [Sun, 1 Sep 2024 22:26:18 +0000 (16:26 -0600)]
log: Add a new log category for the console

Add a new category which covers the console, including the stdio
drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agousb: Drop old non-DM code
Simon Glass [Sun, 1 Sep 2024 22:26:17 +0000 (16:26 -0600)]
usb: Drop old non-DM code

The driver model deadline for USB was in 2019, so drop the old USB
keyboard code, to avoid needing to deal with the extra code path.

Drop the unnecessary #ifdef around USB_KBD_BOOT_REPORT_SIZE while we
are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agobootstd: Create a function to reset USB
Simon Glass [Sun, 1 Sep 2024 22:26:16 +0000 (16:26 -0600)]
bootstd: Create a function to reset USB

Set up a function for this, since it needs to be used from multiple test
files.

This test file is only used on sandbox, where USB is enabled, so drop
the local declaration of usb_started

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agoscripts: Update pylint.base
Simon Glass [Sun, 1 Sep 2024 22:26:15 +0000 (16:26 -0600)]
scripts: Update pylint.base

There have been quite a few changes in the Python scripts, so update the
pylint baseline.

This was created using:

   make pylint
   cp pylint.cur scripts/pylint.base

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agotest/py: Fix some pylint warnings in test_ut.py
Simon Glass [Sun, 1 Sep 2024 22:26:14 +0000 (16:26 -0600)]
test/py: Fix some pylint warnings in test_ut.py

Tidy up most of these warnings. Remaining are four of these:

   R0914: Too many local variables

which can only by fixed by splitting things into functions, so that is
left for another time.

Part of this change was done by the flynt tool.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agonvmxip: Avoid probing on boot
Simon Glass [Sun, 1 Sep 2024 22:26:13 +0000 (16:26 -0600)]
nvmxip: Avoid probing on boot

Devices should be probed when they are used, not before. Drop this
boot-time probing.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agonvmxip: Drop the message on probe
Simon Glass [Sun, 1 Sep 2024 22:26:12 +0000 (16:26 -0600)]
nvmxip: Drop the message on probe

We should not need to announce this device. Drop the message.

Signed-off-by: Simon Glass <sjg@chromium.org>
3 months agocmd: osd: Depend on OSD
Marek Vasut [Fri, 6 Sep 2024 17:12:23 +0000 (19:12 +0200)]
cmd: osd: Depend on OSD

The OSD command calls functions from video_osd-uclass.o ,
which is built only when CONFIG_OSD is enabled. Add the
missing dependency into Kconfig.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
3 months agocmd: mmc: Allow using partition name in mmc erase command
Tomas Paukrt [Mon, 2 Sep 2024 18:49:17 +0000 (20:49 +0200)]
cmd: mmc: Allow using partition name in mmc erase command

The mmc erase command currently requires blk# and cnt parameters
which can be obtained using the part start and part size commands
if the entire partition needs to be erased.

Simplify the use of the mmc erase command by allowing the partition
name to be specified directly.

Signed-off-by: Tomas Paukrt <tomaspaukrt@email.cz>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
3 months agommc: Hide mmc speed command under mmc command
Marek Vasut [Mon, 2 Sep 2024 13:37:09 +0000 (15:37 +0200)]
mmc: Hide mmc speed command under mmc command

The mmc speed command configuration option keeps showing up in
Kconfig directly in 'Command line interface'. Move MMC_SPEED_MODE_SET
under CMD_MMC to make it show up alongside the MMC command.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
3 months agoMerge patch series "Arm: npcm: modify npcm8xx boot setting"
Tom Rini [Mon, 16 Sep 2024 22:43:53 +0000 (16:43 -0600)]
Merge patch series "Arm: npcm: modify npcm8xx boot setting"

Jim Liu <jim.t90615@gmail.com> says:

Modify npcm8xx new boot design.
Correct memory setting and set gpio default value.

3 months agopinctrl: npcm8xx: clear all gpio events
Stanley Chu [Wed, 4 Sep 2024 02:41:06 +0000 (10:41 +0800)]
pinctrl: npcm8xx: clear all gpio events

Clear all gpio events to avoid unexpected interrupts
during kernel booting.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
3 months agoconfigs: arbel_evb: change env offset and boot address
Jim Liu [Wed, 4 Sep 2024 02:41:05 +0000 (10:41 +0800)]
configs: arbel_evb: change env offset and boot address

Change env offset and boot address for new design.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
3 months agoboard: arbel: correct the dram bank size
Jim Liu [Wed, 4 Sep 2024 02:41:04 +0000 (10:41 +0800)]
board: arbel: correct the dram bank size

If CONFIG_SYS_MEM_TOP_HIDE is defined, gd->ram_size is reduced by
CONFIG_SYS_MEM_TOP_HIDE. Need to correct the actual ram size in
dram_init_banksize.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
3 months agodrivers/crypto: aspeed: Add Caliptra SHA ACC support
Chia-Wei Wang [Fri, 30 Aug 2024 07:23:34 +0000 (15:23 +0800)]
drivers/crypto: aspeed: Add Caliptra SHA ACC support

Aspeed AST27xx SoCs integrate the CPTRA 1.0 secure IP, which
export a SHA accelerator interface for SoC to use.

Note that CPTRA 1.0 supports only SHA384 and SHA512 and this
patch is verified by the 'hash test sha384/sha512' commands.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
3 months agoMerge tag 'v2024.10-rc5' into next
Tom Rini [Mon, 16 Sep 2024 20:48:13 +0000 (14:48 -0600)]
Merge tag 'v2024.10-rc5' into next

Prepare v2024.10-rc5

3 months agoPrepare v2024.10-rc5
Tom Rini [Mon, 16 Sep 2024 20:41:32 +0000 (14:41 -0600)]
Prepare v2024.10-rc5

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agodoc/develop/sending_patches.rst: Reword where our git tree is slightly
Tom Rini [Mon, 26 Aug 2024 17:01:40 +0000 (11:01 -0600)]
doc/develop/sending_patches.rst: Reword where our git tree is slightly

We shouldn't have had the link to our git tree be contained within "``"
as that meant that it did not work as a link, so remove those. And
rather than make this a link plus text, keep this as a link within the
text for overall clarity.

Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agoMerge patch series "Bump new hush commits and fix old hush test behavior"
Tom Rini [Fri, 13 Sep 2024 19:44:00 +0000 (13:44 -0600)]
Merge patch series "Bump new hush commits and fix old hush test behavior"

Francis Laniel <francis.laniel@amarulasolutions.com> says:

Hi!

With this series, I bumped the new hush to get the latest commits from upstream.

Also, I added back a reverted commit which goal was to fix a bad behavior in
old hush test.
I had to tweak a bit this commit, but everything worked both locally and in the
CI.

3 months agocli: modern_hush: Add upstream commits up to 13 July 2024
Francis Laniel [Tue, 3 Sep 2024 17:09:43 +0000 (19:09 +0200)]
cli: modern_hush: Add upstream commits up to 13 July 2024

This commit adds the following hush busybox upstream commits:
23da5c4b716b ("hush: do not exit interactive shell on some redirection errors")
14e28c18ca1a ("hush: fix "exec 3>FILE" aborting if 3 is exactly the next free fd")
6c38d0e9da2d ("hush: avoid duplicate fcntl(F_SETFD, FD_CLOEXEC) during init")
758b21402abc ("hush: detect when terminating "done"/"fi" is missing")
2639f3bc72ac ("hush: set G.ifs sooner (prevents segfault)")

Adding specific ifdef and endif guard was needed for 2639f3bc72ac.

Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
3 months agotest: hush: dollar: fix bugous behavior
Ion Agorria [Tue, 3 Sep 2024 17:09:42 +0000 (19:09 +0200)]
test: hush: dollar: fix bugous behavior

The dollar test was merged with bugous console behavior, and
instead of fixing it, this behavior was just workarounded.
This was done to keep compatibility with the existing behavior.

It seems like without the fix the ut_assert_skipline(); didn't clear
console and running ut_assert_skipline(); many times would give always
OK. With e58bafc35fe3 ("lib: membuff: fix readline not returning line in case of overflow")
the line is cleared correctly and next assert fails because now there
is nothing to clean which is correct if we look the this a bit above
the failing assert:

    if (gd->flags & GD_FLG_HUSH_MODERN_PARSER) {
         /*
          * For some strange reasons, the console is not empty after
          * running above command.
          * So, we reset it to not have side effects for other tests.
          */
         console_record_reset_enable();
    } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
         ut_assert_console_end();
    }

Which further confirms that tests workaround the old problem and now
that problem is fixed we can remove the whole if blocks and simply
place ut_assert_console_end() right after ut_assert_skipline() without
any conditional and will pass green.

So this part of code goes from:
    ut_assert_skipline();
    ut_assert_skipline();

    if (gd->flags & GD_FLG_HUSH_MODERN_PARSER) {
        /* See above comments. */
        console_record_reset_enable();
    } else if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
        ut_assert_console_end();
    }

to become:
    ut_assert_skipline();
    if (gd->flags & GD_FLG_HUSH_OLD_PARSER) {
        ut_assert_skipline();
    }
    ut_assert_console_end();

The if block mentioned above that calls console_record_reset_enable() is
completely removed as fixed by e58bafc35fe3.

[flaniel: adapt second if]

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20240105072212.6615-8-clamor95@gmail.com
[mkorpershoek: reworded commit title]
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
[flaniel: remove console_record_reset_enable() if]
Signed-off-by: Francis Laniel <francis.laniel@amarulasolutions.com>
3 months agoMerge tag 'efi-next-20241024' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Fri, 13 Sep 2024 14:20:25 +0000 (08:20 -0600)]
Merge tag 'efi-next-20241024' of https://source.denx.de/u-boot/custodians/u-boot-efi into next

Pull request efi-next-20241024

UEFI:

* Use generated UUIDs in UEFI capsules:
  - efi: define struct efi_guid
  - lib: uuid: add UUID v5 support
  - efi: add a helper to generate dynamic UUIDs
  - doc: uefi: document dynamic UUID generation
  - sandbox: switch to dynamic UUIDs
  - lib: uuid: supporting building as part of host tools
  - include: export uuid.h
  - tools: mkeficapsule: use u-boot UUID library
  - tools: mkeficapsule: support generating dynamic GUIDs
  - test: lib/uuid: add unit tests for dynamic UUIDs
  - test: lib/uuid: add tests for UUID version/variant bits

* Minor code clean-up
  - shorten efi_bootmgr_release_uridp_resource()
  - rename efi_bootmgr_image_return_notify
  - return the correct error in efi_bootmgr_release_uridp()
  - Kconfig: clean up the efi configuration status
  - Use puts() in cout so that console recording works
  - Put back copyright message in helloworld.c

3 months agoMerge tag 'doc-2024-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Fri, 13 Sep 2024 14:18:54 +0000 (08:18 -0600)]
Merge tag 'doc-2024-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2024-10-rc4

* doc/develop/sending_patches.rst: Clarify when to use which branch
* doc/arch/m68k.rst: Update toolchain comment
* doc/arch/mips.rst: Update toolchain list
* doc: Update rST to not reference the old wiki
* doc/mkeficapsule.1: Update homepage link
* bootcount: Update to point to current documentation
* binman: Update links for sending patches

3 months agobinman: Update links for sending patches
Tom Rini [Mon, 26 Aug 2024 16:49:57 +0000 (10:49 -0600)]
binman: Update links for sending patches

When linking to our documentation for submitting patches, we shouldn't
point at the old wiki but instead our current documentation.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agobootcount: Update to point to current documentation
Tom Rini [Mon, 26 Aug 2024 16:49:56 +0000 (10:49 -0600)]
bootcount: Update to point to current documentation

The current documentation for the bootcount API is on our website and
not the old wiki, update the link in two places.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agodoc/mkeficapsule.1: Update homepage link
Tom Rini [Mon, 26 Aug 2024 16:49:55 +0000 (10:49 -0600)]
doc/mkeficapsule.1: Update homepage link

The project home page is no longer the old wiki, but
https://www.u-boot.org/

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agodoc: Update rST to not reference the old wiki
Tom Rini [Mon, 26 Aug 2024 16:49:54 +0000 (10:49 -0600)]
doc: Update rST to not reference the old wiki

In two places we had references to the old wiki pages instead of links
to the relevant part of our documentation. Update (and slightly reword)
these spots.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agodoc/arch/mips.rst: Update toolchain list
Tom Rini [Mon, 26 Aug 2024 16:49:53 +0000 (10:49 -0600)]
doc/arch/mips.rst: Update toolchain list

Remove both the ELDK and emdebian links as they are broken, and add a
link to the kernel.org toolchains which we use in CI.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agodoc/arch/m68k.rst: Update toolchain comment
Tom Rini [Mon, 26 Aug 2024 16:49:52 +0000 (10:49 -0600)]
doc/arch/m68k.rst: Update toolchain comment

The old wiki page has not exited for quite some time, update to note
what we build with in CI at least.

Signed-off-by: Tom Rini <trini@konsulko.com>
3 months agodoc/develop/sending_patches.rst: Clarify when to use which branch
Tom Rini [Mon, 26 Aug 2024 16:39:17 +0000 (10:39 -0600)]
doc/develop/sending_patches.rst: Clarify when to use which branch

The previous wording on the paragraph about what branch to use when
submitting patches did not reflect how / when the next branch is
currently used. Reword this to note that master should be used for bug
and regression fixes, always, and that next should be used once it
opens, with -rc2.

Reported-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
3 months agoefi_loader: Put back copyright message
Simon Glass [Mon, 2 Sep 2024 01:18:13 +0000 (19:18 -0600)]
efi_loader: Put back copyright message

This was lost in a later commit, so add it back.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 months agoefi_loader: Use puts() in cout so that console recording works
Simon Glass [Mon, 2 Sep 2024 01:18:12 +0000 (19:18 -0600)]
efi_loader: Use puts() in cout so that console recording works

At present EFI output to the console uses fputs() which bypasses the
console-recording feature. This makes it impossible for tests to check
the output of an EFI app.

There doesn't seem to be any need to do this bypass, so adjust it to
simply use the puts() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
3 months agotest: lib/uuid: add tests for UUID version/variant bits
Caleb Connolly [Fri, 30 Aug 2024 12:34:41 +0000 (13:34 +0100)]
test: lib/uuid: add tests for UUID version/variant bits

Add a test to check the version/variant bits of v4 and v5 UUIDs.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agotest: lib/uuid: add unit tests for dynamic UUIDs
Caleb Connolly [Fri, 30 Aug 2024 12:34:40 +0000 (13:34 +0100)]
test: lib/uuid: add unit tests for dynamic UUIDs

Add some basic unit tests to validate that the UUID generation behaves
as expected. This matches the implementation in efi_loader for sandbox
and a Qualcomm board and should catch any regressions.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agotools: mkeficapsule: support generating dynamic GUIDs
Caleb Connolly [Fri, 30 Aug 2024 12:34:39 +0000 (13:34 +0100)]
tools: mkeficapsule: support generating dynamic GUIDs

Add support for generating GUIDs that match those generated internally
by U-Boot for capsule update fw_images when using dynamic UUIDs.

Dynamic UUIDs in U-Boot work by taking a namespace UUID and hashing it
with the board compatible and fw_image name. This feature just provides
a way to determine the UUIDs for a particular board without having to
actually boot U-Boot on it.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agotools: mkeficapsule: use u-boot UUID library
Caleb Connolly [Fri, 30 Aug 2024 12:34:38 +0000 (13:34 +0100)]
tools: mkeficapsule: use u-boot UUID library

Replace the use of libuuid with U-Boot's own UUID library. This prepares
us to add support for generating v5 GUIDs.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agoinclude: export uuid.h
Caleb Connolly [Fri, 30 Aug 2024 12:34:37 +0000 (13:34 +0100)]
include: export uuid.h

Move this header to include/u-boot/ so that it can be used by external
tools.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agolib: uuid: supporting building as part of host tools
Caleb Connolly [Fri, 30 Aug 2024 12:34:36 +0000 (13:34 +0100)]
lib: uuid: supporting building as part of host tools

Adjust the UUID library code so that it can be compiled as part of a
host tool.

This removes the one redundant log_debug() call, as well as the
incorrectly defined LOG_CATEGORY.

In general this is a fairly trivial change, just adjusting includes and
disabling list_guid.

This will be used by a new genguid tool to generate v5 GUIDs that match
those generated by U-Boot at runtime.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agosandbox: switch to dynamic UUIDs
Caleb Connolly [Fri, 30 Aug 2024 12:34:35 +0000 (13:34 +0100)]
sandbox: switch to dynamic UUIDs

Migrate sandbox over to generating it's capsule update image GUIDs
dynamically from the namespace and board/image info. Update the
reference and tests to use the new GUIDs.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agodoc: uefi: document dynamic UUID generation
Caleb Connolly [Fri, 30 Aug 2024 12:34:34 +0000 (13:34 +0100)]
doc: uefi: document dynamic UUID generation

Document how platforms can generate GUIDs at runtime rather than
maintaining a list of UUIDs per-board.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agoefi: add a helper to generate dynamic UUIDs
Caleb Connolly [Fri, 30 Aug 2024 12:34:33 +0000 (13:34 +0100)]
efi: add a helper to generate dynamic UUIDs

Introduce a new helper efi_capsule_update_info_gen_ids() which populates
the capsule update fw images image_type_id field. This allows for
determinstic UUIDs to be used that can scale to a large number of
different boards and board variants without the need to maintain a big
list.

We call this from efi_fill_image_desc_array() to populate the UUIDs
lazily on-demand.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agolib: uuid: add UUID v5 support
Caleb Connolly [Fri, 30 Aug 2024 12:34:32 +0000 (13:34 +0100)]
lib: uuid: add UUID v5 support

Add support for generating version 5 UUIDs, these are determistic and work
by hashing a "namespace" UUID together with some unique data. One intended
usecase is to allow for dynamically generate payload UUIDs for UEFI
capsule updates, so that supported boards can have their own UUIDs
without needing to hardcode them.

In addition, move the common bit twiddling code from gen_ran_uuid into a
separate function and rewrite it not to use clrsetbits (which is not
available when building as part of host tools).

Tests for this are added in an upcoming patch.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agoefi: define struct efi_guid
Caleb Connolly [Fri, 30 Aug 2024 12:34:31 +0000 (13:34 +0100)]
efi: define struct efi_guid

This let's us forward declare efi_guid_t in the UUID code without
pulling in efi.h

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
3 months agoKconfig: clean up the efi configuration status
Ilias Apalodimas [Fri, 30 Aug 2024 11:45:27 +0000 (14:45 +0300)]
Kconfig: clean up the efi configuration status

The EFI_LOADER and EFI config options are randomly scattered under lib/
making it cumbersome to navigate and enable options, unless you really
know what you are doing. On top of that the existing options are in
random order instead of a logical one.

So let's move things around a bit and move them under boot/. Present a
generic UEFI entry where people can select Capsules, Protocols,
Services,  and an option to compile U-Boot as an EFI for X86

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 months agoefi_loader: return the correct error in efi_bootmgr_release_uridp()
Ilias Apalodimas [Mon, 12 Aug 2024 20:56:38 +0000 (23:56 +0300)]
efi_loader: return the correct error in efi_bootmgr_release_uridp()

There's currently a chance for this function to overwrite an error if
one occurred and the subsequent call to
efi_uninstall_multiple_protocol_interfaces() succedded. Although this
is an EFI event and we can't do much let's at least set and return
the correct error

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 months agoefi_loader: rename efi_bootmgr_image_return_notify
Ilias Apalodimas [Mon, 12 Aug 2024 20:56:37 +0000 (23:56 +0300)]
efi_loader: rename efi_bootmgr_image_return_notify

We use this event when returning from an EFI HTTP booted image.
The name is a bit confusing since it suggests we always run it,
rename it to make it clearer

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 months agoefi_loader: shorten efi_bootmgr_release_uridp_resource()
Ilias Apalodimas [Mon, 12 Aug 2024 20:56:36 +0000 (23:56 +0300)]
efi_loader: shorten efi_bootmgr_release_uridp_resource()

We use this function to clean up leftover resources when booting an
EFI HTTP boot image, but the name is unnecessary long.

Shorten it to efi_bootmgr_release_uridp()

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 months agoMerge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into...
Tom Rini [Thu, 12 Sep 2024 15:03:40 +0000 (09:03 -0600)]
Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-riscv into next

CI result shows no issue:
https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/22315
----------------------------------------------------------------
- Aspeed: Add AST2700 board (Ibex RISC-V core) support
        - Add timer, dram controller, network support
- Sophgo: Add clock controller support for Milk-V Duo

3 months agoMerge tag 'u-boot-imx-next-20240911' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Thu, 12 Sep 2024 01:07:53 +0000 (19:07 -0600)]
Merge tag 'u-boot-imx-next-20240911' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/22320

- Improve i.MX8M boot time by enabling MMU and D-cache very early.
- Don't drop the enable bit once set on the i.MX PWM driver.
- Enable DM_RNG so that the kaslr-seed property is set in the dt
  allowing Linux KASLR.

3 months agopwm: imx: Don't drop the enable bit once set
Miquel Raynal [Tue, 10 Sep 2024 09:13:59 +0000 (11:13 +0200)]
pwm: imx: Don't drop the enable bit once set

Changing the duty-cycle should not blindly override (and clear) the
enable (EN) bit if it has already been set. For instance, a PWM
backlight can be enabled and set to a specific intensity using two
operations. The order of these operations should not matter.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoconfigs: venice: enable DM_RNG
Tim Harvey [Thu, 5 Sep 2024 19:08:26 +0000 (12:08 -0700)]
configs: venice: enable DM_RNG

Enable DM_RNG so that the kaslr-seed property is set in the dt allowing
Linux KASLR.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoARM: imx: Enable MMU and dcache very early on i.MX8M
Marek Vasut [Thu, 5 Sep 2024 15:35:00 +0000 (17:35 +0200)]
ARM: imx: Enable MMU and dcache very early on i.MX8M

Enable MMU and caches very early on in the boot process on i.MX8M
in U-Boot proper. This allows board_init_f to run with icache and
dcache enabled, which saves some 700 milliseconds of boot time on
i.MX8M Plus based device.

The 'bootstage report' output is below:

Before:
```
Timer summary in microseconds (8 records):
       Mark    Elapsed  Stage
          0          0  reset
    961,363    961,363  board_init_f
  1,818,874    857,511  board_init_r
  1,921,474    102,600  eth_common_init
  2,013,702     92,228  eth_initialize
  2,015,238      1,536  main_loop

Accumulated time:
                32,775  dm_r
               289,165  dm_f
```

After:
```
Timer summary in microseconds (8 records):
       Mark    Elapsed  Stage
          0          0  reset
    989,466    989,466  board_init_f
  1,179,100    189,634  board_init_r
  1,281,456    102,356  eth_common_init
  1,373,857     92,401  eth_initialize
  1,375,396      1,539  main_loop

Accumulated time:
                12,630  dm_f
                32,635  dm_r
```

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 months agoconfigs: ibex-ast2700: Enable DRAM and timer driver
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:20 +0000 (17:39 +0800)]
configs: ibex-ast2700: Enable DRAM and timer driver

Enable the driver support for the DRAM and timer devices.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agoram: ast2700: Add DRAM controller initialization
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:19 +0000 (17:39 +0800)]
ram: ast2700: Add DRAM controller initialization

Add driver for AST2700 to initialize DRAM in SPL.

This patch also refactors the Kconfig dependency of
Aspeed DRAM drivers as some of them are shared among
the file structures of RV and ARM ISAs.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agoboard: ibex_ast2700: Add FMC header support
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:18 +0000 (17:39 +0800)]
board: ibex_ast2700: Add FMC header support

Define and parse the header of the First Mutable Code (FMC)
of AST2700 SoCs at runtime phase.

The FMC header contains the information to load prebuilt binaries
required for device initialization such as DRAM and VGA.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agotimer: Add AST2700 IBEX timer support
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:17 +0000 (17:39 +0800)]
timer: Add AST2700 IBEX timer support

Add the driver for the AST2700 Ibex timer, which uses CPU
cycles as the timer count running at 200MHz.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agoriscv: Add AST2700 SoC initial platform support
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:16 +0000 (17:39 +0800)]
riscv: Add AST2700 SoC initial platform support

AST2700 SoCs integrates a Ibex 32-bits RISC-V core as the boot MCU
for the first stage bootloader execution, namely SPL.

This patch implements the preliminary base to successfully run SPL
on this RV32-based MCU to the console banner message.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agoriscv: u-boot-spl.lds: Remove _image_binary_end alignment
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:15 +0000 (17:39 +0800)]
riscv: u-boot-spl.lds: Remove _image_binary_end alignment

The _image_binary_end symbol was aligned to the 8-bytes boundary.
However, the SPL device tree (u-boot-spl.dtb) is concatenated right
after the binary (u-boot-spl-nodtb.bin) wihtout the consideration of
the 8-bytes alignment restriction.

After then, for the SPL_SEPARATE_BSS case, fdtdec_setup() searching
for the DTB by _image_binary_end will return the "Missing DTB" error.
As the real DTB starting point does not align to a 8-bytes address
like _image_binary_end does.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agoriscv: Make stack size shift configurable
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:14 +0000 (17:39 +0800)]
riscv: Make stack size shift configurable

Add prompt for STACK_SIZE_SHIFT to make it configurable.
The default value remains 14 as usual.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agoriscv: Make A ISA extension selectable
Chia-Wei Wang [Tue, 10 Sep 2024 09:39:13 +0000 (17:39 +0800)]
riscv: Make A ISA extension selectable

Make the Atomic (A) ISA extension selectable. Thus CPUs such as
Ibex without the A extension can be supported.

Signed-off-by: Chia-Wei Wang <chiawei_wang@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agodriver: net: Add Aspeed AST2700 MDIO support
Jacky Chou [Tue, 10 Sep 2024 07:49:34 +0000 (15:49 +0800)]
driver: net: Add Aspeed AST2700 MDIO support

The AST2700 is the 7th generation SoC from Aspeed.
And use the driver to support clause 22 access.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agonet: ftgmac100: Add Aspeed AST2700 support
Jacky Chou [Mon, 8 Jul 2024 06:07:18 +0000 (14:07 +0800)]
net: ftgmac100: Add Aspeed AST2700 support

Add support of Aspeed AST2700 SoC.  AST2700 is based on ARM64 so modify
the DMA address related code to fit both ARM and ARM64.  Besides, the
RMII/RGMII mode control register is moved from SCU500 to MAC50 so
initialize the register in ftgmac100_start correspondingly.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agonet: ftgmac100: Modify desc. size to cache line
Jacky Chou [Fri, 28 Jun 2024 09:38:50 +0000 (17:38 +0800)]
net: ftgmac100: Modify desc. size to cache line

The TX/RX descriptor size is 16 byte.
When the cache line size is larger than 16 bytes, descriptors
flushed to RAM will flush more than one descriptor.
It is possible that it may mistakenly flush to other descriptor
that has been updated by MAC in RAM.

To avoid this issue, align the descriptors to cache line size.
Only one desc will be flushed or invalidated at a time.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agonet: ftgmac100: Fixed NC-SI PHY device cannot get
Jacky Chou [Fri, 28 Jun 2024 07:14:45 +0000 (15:14 +0800)]
net: ftgmac100: Fixed NC-SI PHY device cannot get

The NC-SI interface does not need the MDIO bus and the
NC-SI PHY device cannot get from dm_eth_phy_connect.
Therefore, use phy_connect directly here.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agonet: ftgmac100: Fixed the cache coherency issues of rx memory
Jacky Chou [Thu, 27 Jun 2024 06:26:00 +0000 (14:26 +0800)]
net: ftgmac100: Fixed the cache coherency issues of rx memory

When executing TFTP, the ARP will be replied to after receiving
the ARP. U-boot's ARP routine modifies the data in the receive
packet in response to the ARP packet and then copies it
into the transmit packet.
At this point, the received packet cache is inconsistent.
It is possible that the cache will perform a writeback action to
affect the MAC receiving packets.

Avoid the same problem that occurs in other networking protocols.
In the free_pkt function, ensure cache and memory consistency.

Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
3 months agoriscv: dts: sophgo: Replace device clocks with real clocks.
Kongyang Liu [Tue, 11 Jun 2024 09:41:16 +0000 (17:41 +0800)]
riscv: dts: sophgo: Replace device clocks with real clocks.

Replace device clocks with real clocks from the clock controller, and
remove dummy clocks.

Signed-off-by: Kongyang Liu <seashell11234455@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>