Initialize adsp-6.12.89-y#3323
Conversation
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>
868397a to
c73fd10
Compare
|
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? |
| * (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> | ||
| * |
There was a problem hiding this comment.
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 |
| @@ -0,0 +1,29 @@ | |||
| # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)-only | |||
|
|
||
| description: | | ||
| This rpmsg driver, used when the firmware loaded before Linux Kernel | ||
| starts. Allocates memmory according rpmsg message max settings |
| maintainers: | ||
| - Arturs Artamonovs <arturs.artamonovs@analog.com> | ||
| - Utsav Agarwal <Utsav.Agarwal@analog.com> | ||
|
|
There was a problem hiding this comment.
Commit message can be clk: instead clock:
| 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 |
|
just checked over it, I can also take a more detailed look when needed |
|
@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 And even before that opened PRs to fix-up the CI/CD and resolve a rebase conflict. |
21c9496 to
e2a04a3
Compare
07f0a51 to
e84f9a7
Compare
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>
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>
e84f9a7 to
fa8223d
Compare
fa8223d to
6f4e500
Compare
|
I squashed d5f7ef5 into |
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>
|
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 |
Rebase
adsp-6.12.0-yonto v6.12.89, the latest v6.12 stable release.Fixes:tags using my magic proprietary vibe codedsquash-fixes.pyscript, which I'll upload somewhere.Author: Brandon Hurst <82959533+Brandon-Hurst@users.noreply.github.com>This is setting the stage for v6.18, which needs to be released this week. Once this PR is merged I'll:
adsp-6.12.0-yread-onlyadsp-6.12.0-ybranch