From 8b366bad9738d633d93fe7eceba9edb5b0e4bf4a Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 6 Nov 2022 12:14:52 +0000 Subject: [PATCH] Disable smmu(4) for Qualcomm SC8280XP on FDT attachment like we already do on ACPI. ok kettenis@ --- sys/arch/arm64/dev/smmu_fdt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm64/dev/smmu_fdt.c b/sys/arch/arm64/dev/smmu_fdt.c index 9a0819cda94..cb6b542a12a 100644 --- a/sys/arch/arm64/dev/smmu_fdt.c +++ b/sys/arch/arm64/dev/smmu_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smmu_fdt.c,v 1.5 2022/04/06 18:59:26 naddy Exp $ */ +/* $OpenBSD: smmu_fdt.c,v 1.6 2022/11/06 12:14:52 patrick Exp $ */ /* * Copyright (c) 2021 Patrick Wildt * @@ -83,9 +83,16 @@ smmu_fdt_attach(struct device *parent, struct device *self, void *aux) sc->sc_is_mmu500 = 1; if (OF_is_compatible(faa->fa_node, "marvell,ap806-smmu-500")) sc->sc_is_ap806 = 1; + if (OF_is_compatible(faa->fa_node, "qcom,sc8280xp-smmu-500")) + sc->sc_is_qcom = 1; if (OF_getproplen(faa->fa_node, "dma-coherent") == 0) sc->sc_coherent = 1; + if (sc->sc_is_qcom) { + printf(": disabled\n"); + return; + } + if (smmu_attach(sc) != 0) return; -- 2.20.1