summaryrefslogtreecommitdiff
path: root/drivers/iommu/qcom-hyp-smmu.c
AgeCommit message (Collapse)Author
2025-06-14iommu: qcom-smmu: add missing linux/bug.h header for WARN_ONChristian Marangi
The WARN macro requires inclusion of linux/bug.h header. It does currently work as bitfield.h includes it indirectly but this will change when bitfield.h will be synced with new Linux version. Explicitly include the header to fix future compilation error. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-11-20iommu: qcom-smmu: handle running in el2Caleb Connolly
We only need to configure the SMMU when running in EL1. In EL2 the hypervisor isn't running so peripherals can just do DMA as they wish. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-20iommu: qcom-smmu: allow SID 0Caleb Connolly
It turns out this is a very real stream ID. Who woulda thought? Drop the 0 check on the SID, there's no reason for it to be there in the first place. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-09-06iommu: qcom-smmu: add sc7280-smmu-500 compatibleCaleb Connolly
This soc doesn't have the generic compatible. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-04-23iommu: qcom-smmu: add qcom generic compatibleCaleb Connolly
With the exception of SDM845, most other Qualcomm SoCs have the Qualcomm specific (but not SoC) specific SMMU compatible string. Add it here so we can match those without having to add individual SoCs to the list here. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-03-22iommu: qcom-smmu: fix debuggingCaleb Connolly
The priv struct was wrong in dump_boot_mappings(). Causing errors when compiling with -DDEBUG. Fix this. Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Link: https://lore.kernel.org/r/20240320-b4-qcom-usb-v4-5-41be480172e1@linaro.org Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-12-21iommu: add qcom-hyp-smmuCaleb Connolly
Add a basic implementation of the ARM SMMU. This driver is intended for use on Qualcomm platforms where the SMMU has been configured by a previous bootloader, cannot be turned off, and doesn't support BYPASS streams. It keeps all existing stream mappings and only creates new ones for stream ids that aren't already configured. This driver is necessary to support peripherals that perform DMA which weren't configured by the previous stage bootloader (for example USB). It works by allocating a context bank using identity mapping (as U-Boot doesn't use virtual addresses). Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>