diff mbox series

[v2,2/3] ACPI/IORT: Add Qualcomm Snapdragon platforms to iort_plat_info[]

Message ID 20210402035602.9484-3-shawn.guo@linaro.org (mailing list archive)
State Not Applicable, archived
Headers show
Series arm-smmu-qcom: Create qcom_smmu_impl for ACPI boot | expand

Commit Message

Shawn Guo April 2, 2021, 3:56 a.m. UTC
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 <shawn.guo@linaro.org>
---
 drivers/acpi/arm64/iort.c | 5 +++++
 include/linux/acpi_iort.h | 1 +
 2 files changed, 6 insertions(+)

Comments

Robin Murphy April 27, 2021, 5:41 p.m. UTC | #1
On 2021-04-02 04:56, Shawn Guo wrote:
> 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.

Just to clarify, my expectation was that the relevant match table and 
its usage would be private to arm-smmu-qcom. There didn't seem to be any 
obvious reason that couldn't work, but please do enlighten me if I've 
overlooked something.

Robin.

> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> ---
>   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;
>
diff mbox series

Patch

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;