From patchwork Fri Apr 2 03:56:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 12180287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1A3BC433B4 for ; Fri, 2 Apr 2021 03:58:18 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67E1D6023C for ; Fri, 2 Apr 2021 03:58:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67E1D6023C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/vtILqmexNKxhrwXmDF/9sYMxP/YganF0t61zCleRCM=; b=DApcW5vdB3mX8ZilDOdRCwHRzG gZvioNLQiW5pRZja5IiKZJaG0XRd/NYxVyL851yWoPLCKI5n/X4JCGdIGONeyhIgJtOO1/vy1h3EW zBA+78lgjIxiDUfaSWifgQFLcHHNfun2tSeZqx7HNrIIEOWhznaiq/yXKjlyMuKYm2Dw1IVuQWFwA nMPSrjY6Nv1cPgFIrwqkQT6b0hvmArkh71eIgC21aUvnnOzMzATlFVEpr+8SgdSCIbw8cIIfIYCB4 N6IvqklaJztsrfcQzgXyUq69cSFix8CVrLSvkzNT7lEg/fMhlUtgUqCHdLFUSxu9ChScTsHWlJXsO uN/xX1eA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lSAvG-00BsjG-VQ; Fri, 02 Apr 2021 03:56:39 +0000 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lSAuv-00Bsho-2m for linux-arm-kernel@lists.infradead.org; Fri, 02 Apr 2021 03:56:19 +0000 Received: by mail-pg1-x534.google.com with SMTP id w10so1264148pgh.5 for ; Thu, 01 Apr 2021 20:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/1tfZ3KHdBRbQ7iOu9GTGKGQQTHAyTZW2kSrQXENCl0=; b=xy6IMHoIjKIxBBq1kpYTDQkjsdBtbEb9bsTqof3z3+10iqaOGUpFsKODpR2BJE3V9l GmHQkPX+aJ2RR3K3StqZLC8YUG97r6rnTP0DUEOCtlI45bDPntoC5EDK8/o/40jBt+f6 i4DpeVwqoXl/vTCrrToqU1FTaunO+/av8VfWuE9t5zC+ZIURcbT7dLpY27n5VNF1kIgE oZ7+0JcvmhEF5Al57VnaIZ8tvVoUPybyc+uccsmJzhB1U2vxUeXO8ahOxWyIefHDk/YQ v4rQbwt2snwgK37SuSn/xwWdY7/zh3Y2dIqm4pzm3G97MzEveVEI5ydK+0teBebf4qCo rGFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/1tfZ3KHdBRbQ7iOu9GTGKGQQTHAyTZW2kSrQXENCl0=; b=lrESd0sv68GCdkH4t2pTKEkTRnDRqBvBGqK8hRW7Fec2/3tL1oOdQuK+sX/fmlj/Gt yJ3tW9m/3la5Bx70IHu1oeMBDZGfdqzt4iu0gZVvNd+9w8D0KR3NAymlWLACQZu5Rrj5 TdJJecHq/MXuCYX+HMLXH+hTzVxnawvNtGUB7B9Q0VBG2C4FmymrCR6/nTy1BuNX9nFD 5rPioIv9czbsEg8CicR//YhdCH+mj4iOEI5+B3OazB+EEddZa+3OJy7C1axdj+WS+m1s RUWKrekdZ3v2LNus/aVoY9rNuRosYsUZEycmWxa7cWD3xYFrVZppaMHd9WZY4xtNwhrL 07JQ== X-Gm-Message-State: AOAM531QpSQXIlW9vZquHaDhltnFOsHrbFZov4cWglkhyItAzbWe2QW1 Kwzj2SxGe0V1Sg7T+zbJdXIGfw== X-Google-Smtp-Source: ABdhPJxq0/P3BZCjsJltqsSX1E8fe3pwGt3mKPGSYK3eBXms5/r6xe7yM/u4Bry3jlTaGPDMJyCnlw== X-Received: by 2002:a65:6a01:: with SMTP id m1mr10169543pgu.215.1617335775654; Thu, 01 Apr 2021 20:56:15 -0700 (PDT) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id 81sm6875972pfu.164.2021.04.01.20.56.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 20:56:15 -0700 (PDT) From: Shawn Guo To: Will Deacon Cc: Robin Murphy , Bjorn Andersson , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Shawn Guo Subject: [PATCH v2 2/3] ACPI/IORT: Add Qualcomm Snapdragon platforms to iort_plat_info[] Date: Fri, 2 Apr 2021 11:56:01 +0800 Message-Id: <20210402035602.9484-3-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210402035602.9484-1-shawn.guo@linaro.org> References: <20210402035602.9484-1-shawn.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210402_045617_565153_C8723D8B X-CRM114-Status: GOOD ( 15.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The SMMU driver on Qualcomm Snapdragon platforms needs to hook up some QCOM specific arm_smmu_impl. Define model identifier for QCOM SMMU and add Qualcomm SC8180X platform to iort_plat_info[], so that SMMU driver can detect the model and handle QCOM specific arm_smmu_impl. Some device chooses to use manufacturer name in IORT table, like Lenovo Flex 5G, while others use SoC vendor name, such as Microsoft Surface Pro X and Samsung Galaxy Book S. Signed-off-by: Shawn Guo --- drivers/acpi/arm64/iort.c | 5 +++++ include/linux/acpi_iort.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index e2a96d2d399a..f88b8c0a7d84 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -1467,6 +1467,11 @@ static struct acpi_platform_list iort_plat_info[] __initdata = { /* HiSilicon Hip08 Platform */ {"HISI ", "HIP08 ", 0, ACPI_SIG_IORT, greater_than_or_equal, "Erratum #162001800", IORT_SMMU_V3_PMCG_HISI_HIP08}, + /* Qualcomm Snapdragon Platform */ + { "LENOVO", "CB-01 ", 0x8180, ACPI_SIG_IORT, equal, + "QCOM SMMU", IORT_SMMU_QCOM }, + { "QCOM ", "QCOMEDK2", 0x8180, ACPI_SIG_IORT, equal, + "QCOM SMMU", IORT_SMMU_QCOM }, { } }; diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h index 678cdf036948..66c859ea2abf 100644 --- a/include/linux/acpi_iort.h +++ b/include/linux/acpi_iort.h @@ -21,6 +21,7 @@ */ #define IORT_SMMU_GENERIC 0x00000000 /* Generic SMMU */ #define IORT_SMMU_V3_PMCG_HISI_HIP08 0x00000001 /* HiSilicon HIP08 PMCG */ +#define IORT_SMMU_QCOM 0x00000002 /* QCOM SMMU */ struct iort_smmu_pdata { struct acpi_iort_node *node;