]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ACPI/IORT: Enable stall support for platform devices
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 26 May 2021 16:19:27 +0000 (18:19 +0200)
committerWill Deacon <will@kernel.org>
Tue, 8 Jun 2021 11:35:55 +0000 (12:35 +0100)
Copy the "Stall supported" bit, that tells whether a named component
supports stall, into the dma-can-stall device property.

Acked-by: Hanjun Guo <guohanjun@huawei.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20210526161927.24268-3-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
drivers/acpi/arm64/iort.c

index 3912a1f6058e5034f741ab0f01ebd3aea616a971..0828f70cb782f3a06a0124460bbe24a688b353e2 100644 (file)
@@ -968,13 +968,15 @@ static int iort_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
 static void iort_named_component_init(struct device *dev,
                                      struct acpi_iort_node *node)
 {
-       struct property_entry props[2] = {};
+       struct property_entry props[3] = {};
        struct acpi_iort_named_component *nc;
 
        nc = (struct acpi_iort_named_component *)node->node_data;
        props[0] = PROPERTY_ENTRY_U32("pasid-num-bits",
                                      FIELD_GET(ACPI_IORT_NC_PASID_BITS,
                                                nc->node_flags));
+       if (nc->node_flags & ACPI_IORT_NC_STALL_SUPPORTED)
+               props[1] = PROPERTY_ENTRY_BOOL("dma-can-stall");
 
        if (device_add_properties(dev, props))
                dev_warn(dev, "Could not add device properties\n");