Skip to content

Initialize adsp-6.18.31-y#3333

Merged
pamolloy merged 85 commits into
adsp-6.18.31-yfrom
adsp-6.18.0/philip/rebase-adsp-6.12.89-init
May 21, 2026
Merged

Initialize adsp-6.18.31-y#3333
pamolloy merged 85 commits into
adsp-6.18.31-yfrom
adsp-6.18.0/philip/rebase-adsp-6.12.89-init

Conversation

@pamolloy
Copy link
Copy Markdown
Collaborator

2nd attempt at #3330 since that went a little sideways with CI/CD work

pamolloy and others added 30 commits May 19, 2026 14:59
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Co-developed-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Co-developed-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Co-developed-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Co-developed-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
Co-developed-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Only supports the ADZS-SC589-MINI

Co-developed-by: Utsav Agarwal <utsav.agarwal@analog.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
Co-developed-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Co-developed-by: UtsavAgarwalADI <utsav.agarwal@analog.com>
Signed-off-by: UtsavAgarwalADI <utsav.agarwal@analog.com>
Co-developed-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
Co-developed-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
Signed-off-by: Utsav Agarwal <Utsav.Agarwal@analog.com>
Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
Adding SoC audio support for the following modes:

- ASoC (linux only audio)
- SHARC ALSA (Hybrid Audio)
- SHARC

Co-developed-by: Utsav Agarwal <utsav.agarwal@analog.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
pamolloy and others added 17 commits May 19, 2026 15:07
Enable COMPILE_TEST for ADI system configuration and PADS drivers.
This allows these drivers to be built on other architectures for
testing purposes, increasing build coverage.

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Reconfiguring the partitions in the SPI and OSPI to remove
the DTB partition and give the extra space to the rootfs
partition.

Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
Remove unused button-led device tree nodes from sc573-ezlite,
and sc594-som boards.

Signed-off-by: Ozan Durgut <ozndrgt@gmail.com>
Removing these hardcoded bootargs since they are
not needed, bootargs are passed from U-boot for
ADSP platforms.

Signed-off-by: Caleb Ethridge <caleb.ethridge@analog.com>
Always fetch from the official public ADI org, even when forked

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Add COMPILE_TEST to SERIAL_ADI_UART4 so CI build jobs can build the driver.

Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Add the missing MODULE_LICENSE() declaration so CI jobs can build the driver.

Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Remove the explicit .owner assignment from adi_uart4_serial_driver
to address the coccicheck warning:
"No need to set .owner here. The core will do it."

Signed-off-by: Qasim Ijaz <qasim.ijaz@analog.com>
Enable early console support for ADI UART4. Currently it
is included in the kernel command line arguments for
ADSP Linux but not enabled via Kconfig.

This makes it so the ADI UART4 driver selects and enables
earlycon support by default and will be available as an
early console option during boot.

Signed-off-by: Brandon Hurst <brandon.hurst@analog.com>
Add device tree support for SC598 HTOL SBC based on the
reference board designs.

Signed-off-by: Ozan Durgut <ozan.durgut@analog.com>
The driver allocates struct adi_uart4_serial_port with kzalloc()
in probe(), but several probe error paths return after the port
has been allocated and published in adi_uart4_serial_ports[]
without freeing it.

Convert the port allocation to devm_kzalloc() so the memory
is device managed meaning it is released automatically on
probe failure and device detach.

While doing that, route the post allocation probe failures
through a common error path so adi_uart4_serial_ports[uartid]
is cleared before returning. This avoids leaving a stale
global port pointer behind after a failed probe.

Also move dev_set_drvdata() to the successful
uart_add_one_port() path so drvdata is not set for
a port that failed to register.

This change:
- replaces kzalloc() with devm_kzalloc() in probe()
- removes the manual kfree() from the probe error path
- removes the manual kfree() from adi_uart4_serial_remove()
- converts several direct probe returns to use the
  common cleanup path
- renames out_error_unmap to out_error
- propagates the devm_clk_get() error with PTR_ERR()
- sets drvdata only after uart_add_one_port() succeeds

Signed-off-by: Qasim Ijaz <Qasim.Ijaz@analog.com>
The driver requests TX and RX DMA channels during
adi_uart4_serial_probe(), but several probe failure
paths return without releasing them.

Add a common probe cleanup path that releases any
successfully requested DMA channels before returning
an error. Ensure that alias lookup failure, allocation
failure, and post allocation probe failures go through
that cleanup path.

Signed-off-by: Qasim Ijaz <Qasim.Ijaz@analog.com>
The driver indexes adi_uart4_serial_ports[] using the
serial alias id returned by of_alias_get_id(), but does
not verify that the id is within the valid port range.

Add a bounds check and reject alias ids greater than or
equal to ADI_UART_NR_PORTS before indexing the port array.

Signed-off-by: Qasim Ijaz <Qasim.Ijaz@analog.com>
SERIAL_ADI_UART4_CONSOLE selects SERIAL_EARLYCON, but only
depended on SERIAL_ADI_UART4. This allowed the UART driver and
serial core to be built as modules while earlycon was built into
vmlinux, causing a link failure:

  earlycon.c:(.init.text+0x1e0): undefined reference to `uart_parse_earlycon'

Require SERIAL_ADI_UART4=y for console support so earlycon is only
enabled when the ADI UART4 driver and serial core are built into
the kernel.

Signed-off-by: Qasim Ijaz <Qasim.Ijaz@analog.com>
adi_uart4_serial_set_termios() applies new termios settings such as
baud rate, parity and stop bits. Before reprogramming the UART
registers, it waits for any active TX to complete so the settings
are not changed mid transfer.

That wait is done while holding a spin lock with interrupts disabled
via spin_lock_irqsave(). The driver has a safety mechanism in the
loop where it waits for a maximum of 10 ms:

        timeout = jiffies + msecs_to_jiffies(10);
        while (UART_GET_GCTL(uart) & UCEN && !(UART_GET_LSR(uart) & TEMT))
                if (time_after(jiffies, timeout)) {
                        dev_warn(port->dev,
                                "timeout waiting for TX buffer empty\n");
                        break;
                }

However this approach is problematic because on single core systems,
jiffies may not advance while interrupts are disabled (jiffies
is advanced through timer interrupts), making the timeout approach
unreliable if TX does not drain for some reason.

To confirm this behaviour on single core systems I wrote a small
program to validate if jiffies was being advanced on the
ADSP-SC589-MINI and it did not while holding the spin lock.

Use readl_poll_timeout_atomic() instead, which is suitable for atomic
contexts and is suitable when timekeeping is disabled.

This fix also removes the duplicated TX empty wait loop which seems
to be an accidental copy+paste issue.

Signed-off-by: Qasim Ijaz <Qasim.Ijaz@analog.com>
… in startup

gcc-fanalyzer flagged a NULL dereference on `desc` —
dmaengine_prep_dma_cyclic() can return NULL and we just blindly assign
desc->callback without checking.

While fixing that I noticed all the error paths in
adi_uart4_serial_startup() are broken too. Every early return after
clk_prepare_enable() leaks the clock, and later failures dont clean up
DMA buffers or mappings.

Fixed by adding goto-based cleanup like upstream does (same pattern as
atmel_serial.c). Each failure point now unwinds exactly what was
allocated before it. Also added a dev_err so we actually get a log
message if cyclic prep fails.

Signed-off-by: Vasileios Bimpikas <Vasileios.Bimpikas@analog.com>
- Remove __init from console_setup/get_options. These get called on
  rebind via register_console and the code was already freed after boot.
- Move clk_prepare_enable from startup() to probe() so the clock is on
  before uart_add_one_port re-registers the console. Without this,
  console_putchar spins forever on THRE with the clock gated.
- Use timer_delete_sync() instead of timer_delete() to avoid
  use-after-free if the rx timeout handler is still running when we
  free the DMA buffer.

Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@analog.com>
@pamolloy pamolloy requested review from a team, gastmaier and ozan956 May 21, 2026 11:47
@pamolloy pamolloy added this to ADSP May 21, 2026
pamolloy added 3 commits May 21, 2026 13:47
Synchronize with a14dd7c on xlnx-main
including:

- Remove paths-ignore for push and pull request triggers
- Add the concurrency group with cancel-in-progress: true to optimize
  resource usage by cancelling redundant runs
- Restrict push events to the analogdevicesinc repository owner
- Explicitly define read permission for all build and check jobs
- Upload to Cloudsmith, which includes SBOM generation
- Use the consolidated summary output from dependency jobs
- Switch from assert_labels to assert_job_summary
- Remove the unused ref_branch input from the checks job

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Signed-off-by: Philip Molloy <philip.molloy@analog.com>
The generic arm and arm64 builds that intelligently enable Kconfig
options based on what is changed fail because of issues with how certain
ADSP drivers call into arch specific code.

To not block all ADSP defconfigs from building make the SC598 EZ-KIT
build independent and enable checks for it rather than the generic ARM
build.

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
@pamolloy pamolloy merged commit 8c46ae7 into adsp-6.18.31-y May 21, 2026
10 of 14 checks passed
@pamolloy pamolloy deleted the adsp-6.18.0/philip/rebase-adsp-6.12.89-init branch May 21, 2026 12:35
@github-project-automation github-project-automation Bot moved this to Done in ADSP May 21, 2026
ret = icap_get_subdevices(icap);
if (ret < 0)
dev_err(&sport->pdev->dev, "Get sharc%d devices error: %d", sharc_core, ret);
return;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No features ever :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

9 participants