Skip to content

Initialize adsp-6.12.89-y#3323

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

Initialize adsp-6.12.89-y#3323
pamolloy merged 87 commits into
adsp-6.12.89-yfrom
adsp-6.12.89/philip/rebase-init

Conversation

@pamolloy
Copy link
Copy Markdown
Collaborator

@pamolloy pamolloy commented May 18, 2026

Rebase adsp-6.12.0-y onto v6.12.89, the latest v6.12 stable release.

This is setting the stage for v6.18, which needs to be released this week. Once this PR is merged I'll:

  • Make adsp-6.12.0-y read-only
  • Update corresponding PRs
  • Do a final release on the adsp-6.12.0-y branch

pamolloy added 14 commits May 18, 2026 13:02
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>
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>
@pamolloy pamolloy requested review from a team, gastmaier and ozan956 May 18, 2026 11:08
@pamolloy pamolloy added this to ADSP May 18, 2026
@pamolloy pamolloy force-pushed the adsp-6.12.89/philip/rebase-init branch from 868397a to c73fd10 Compare May 18, 2026 12:05
@qasim-ijaz
Copy link
Copy Markdown

Overall this looks good. Small nit: the MAINTAINERS file should probably be updated to include myself and @CalebEthridgeADI and drop Utsav. Should we update it here, or would you prefer I handle it in a follow up PR?

Comment on lines +3 to +9
* (C) Copyright 2022 - Analog Devices, Inc.
*
* Written and/or maintained by Timesys Corporation
*
* Contact: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
* Contact: Greg Malysa <greg.malysa@timesys.com>
*
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are we going to keep it like this or gonna switch to <linux@analog.com>

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

obj-$(CONFIG_PINCTRL_ADSP) += pinctrl-adsp.o
obj-$(CONFIG_SRUCTRL_ADSP) += sru-ctrl-adsp.o No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

EOF

@@ -0,0 +1,29 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)-only
Copy link
Copy Markdown

@ozan956 ozan956 May 19, 2026

Choose a reason for hiding this comment

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

should we keep -only ?


description: |
This rpmsg driver, used when the firmware loaded before Linux Kernel
starts. Allocates memmory according rpmsg message max settings
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

memmory -> memory

Comment on lines +9 to +12
maintainers:
- Arturs Artamonovs <arturs.artamonovs@analog.com>
- Utsav Agarwal <Utsav.Agarwal@analog.com>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can be changed as well

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Commit message can be clk: instead clock:

Comment thread sound/soc/adi/Makefile
obj-$(CONFIG_SND_SC5XX_PCM) += snd-soc-sc5xx-pcm.o snd-soc-sc5xx-sport.o
obj-$(CONFIG_SND_SOC_ADI_SC5XX_I2S) += snd-soc-adi-sc5xx-i2s.o
obj-$(CONFIG_SND_SC5XX_MACHINE) += snd-soc-sc5xx-asoc-card.o
obj-$(CONFIG_SND_SC5XX_SHARC_ALSA_CARD) += snd-soc-sharc-alsa-asoc-card.o No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

EOF

@ozan956
Copy link
Copy Markdown

ozan956 commented May 19, 2026

just checked over it, I can also take a more detailed look when needed

@pamolloy
Copy link
Copy Markdown
Collaborator Author

pamolloy commented May 19, 2026

@qasim-ijaz @ozan956 Thanks for looking it over and all those are good things to open PRs to fix (once this has been merged). This PR is just rebasing the series. It is important make as few changes as possible to not break anything when migrating to a new kernel version.

For reference, I took adsp-6.12.0-y, squashed and dropped commits accordingly and then diffed against the original commits to make sure there were no unintended changes, then rebased on top of v6.12.89.

And even before that opened PRs to fix-up the CI/CD and resolve a rebase conflict.

@pamolloy pamolloy force-pushed the adsp-6.12.89/philip/rebase-init branch from 21c9496 to e2a04a3 Compare May 19, 2026 11:19
@pamolloy pamolloy force-pushed the adsp-6.12.89/philip/rebase-init branch 2 times, most recently from 07f0a51 to e84f9a7 Compare May 19, 2026 11:39
pamolloy added 3 commits May 19, 2026 13:53
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>
pamolloy and others added 19 commits May 19, 2026 13:55
adi_remoteproc.c includes arch specific code under linux/soc/ that is
not enabled with COMPILE_TEST making it impossible to build the driver
with COMPILE_TEST enabled

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
Introduce a hidden Kconfig symbol COMMON_CLK_ADI_PLL to handle the shared
PLL code in clk-adi-pll.c.

Previously, the Makefile attempted to build clk-adi-pll.o based on
architecture flags (ARCH_SC5XX, ARCH_SC59X_64), which is fragile and
incorrect if multiple drivers are enabled or if they are built as modules.

Update the specific clock drivers (SC57X, SC58X, SC594, SC598) to select
COMMON_CLK_ADI_PLL, and update the Makefile to build clk-adi-pll.o
only when this symbol is selected.

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
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 force-pushed the adsp-6.12.89/philip/rebase-init branch from e84f9a7 to fa8223d Compare May 19, 2026 12:09
@pamolloy pamolloy force-pushed the adsp-6.12.89/philip/rebase-init branch from fa8223d to 6f4e500 Compare May 21, 2026 10:29
@pamolloy
Copy link
Copy Markdown
Collaborator Author

I squashed d5f7ef5 into [ADI] .github: top-level: Synchronize with xlnx-main

pamolloy added 3 commits May 21, 2026 12:31
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
Copy link
Copy Markdown
Collaborator Author

Generic CI/CD fails due to numerous build configuration issues in the series, but the SC598 defconfig builds successfully. I'm merging this since it matches the tip of adsp-6.12.0-y. It will continue as a branch to back-port from adsp-6.18.31-y.

@pamolloy pamolloy merged commit 1e8540f into adsp-6.12.89-y May 21, 2026
11 of 14 checks passed
@pamolloy pamolloy deleted the adsp-6.12.89/philip/rebase-init branch May 21, 2026 11:23
@github-project-automation github-project-automation Bot moved this to Done in ADSP May 21, 2026
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