Skip to content

shikra: Fix SMSM host count, defer BAM IRQ trigger to DT, enable BAM-DMUX#1193

Merged
Komal-Bajaj merged 3 commits into
qualcomm-linux:early/hwe/shikra/driversfrom
quic-vishsant:for-shikra-bam-drivers
May 22, 2026
Merged

shikra: Fix SMSM host count, defer BAM IRQ trigger to DT, enable BAM-DMUX#1193
Komal-Bajaj merged 3 commits into
qualcomm-linux:early/hwe/shikra/driversfrom
quic-vishsant:for-shikra-bam-drivers

Conversation

@quic-vishsant
Copy link
Copy Markdown

This series contains two fixes and one defconfig enablement needed for Shikra modem bring-up via BAM-DMUX.

On Shikra, SMEM_SMSM_SIZE_INFO (id 419) is not populated by boot firmware, so the SMSM driver falls back to SMSM_DEFAULT_NUM_HOSTS. The upstream default of 3 allocates a smaller SMEM_SMSM_CPU_INTR_MASK (id 333) than the modem firmware expects (num_hosts=5), causing a modem crash at boot with "smsm.c: Bad pointer from smem_alloc". Bump the default to 5 to match.

The BAM DMA driver hardcodes IRQF_TRIGGER_HIGH when registering its interrupt, silently overriding the trigger type from the device tree. Shikra's A2 BAM requires edge-triggered interrupts, so this causes missed interrupts. Switch to IRQF_TRIGGER_NONE to defer to the DT configuration, making the driver platform-agnostic.

Finally, enable CONFIG_QCOM_BAM_DMUX to bring up the WWAN modem data path on Shikra and other A2 BAM platforms.

SMEM_SMSM_SIZE_INFO (id 419) is not populated by the boot firmware
on Shikra. The SMSM driver falls back to SMSM_DEFAULT_NUM_HOSTS when
this segment is absent, which causes SMEM_SMSM_CPU_INTR_MASK (id 333)
to be allocated with the wrong size.

The upstream default of 3 allocates 8*3*4 = 96 bytes. Shikra modem
firmware expects 8*5*4 = 160 bytes, matching the num_hosts=5 used by
the downstream kernel. The size mismatch causes the modem to crash on
boot with "smsm.c: Bad pointer from smem_alloc".

Increasing the host count only results in a larger allocation, so this
change is safe for existing platforms.

Increase the default to 5 to match the modem firmware expectation.

Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
The driver hardcodes IRQF_TRIGGER_HIGH when registering the BAM
interrupt, which overrides the trigger type specified in the device
tree. This is incorrect for platforms like Shikra where the A2 BAM
requires edge-triggered interrupts.

Use IRQF_TRIGGER_NONE instead, which causes the kernel to use the
trigger type already configured by platform_get_irq() when it parsed
the device tree interrupts property. This makes the driver
platform-agnostic.

Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
This driver provides access to modem data channels on platforms
using the A2 BAM hardware, including Shikra.

Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
@quic-vishsant quic-vishsant force-pushed the for-shikra-bam-drivers branch from 7e44793 to fdfd6a9 Compare May 20, 2026 06:35
@Komal-Bajaj Komal-Bajaj merged commit 701d6d9 into qualcomm-linux:early/hwe/shikra/drivers May 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants