git: 6f38d2e7b059 - main - acpi: Add workaround for Altra I2C memory resource

From: Andrew Gallatin <gallatin_at_FreeBSD.org>
Date: Wed, 15 Nov 2023 21:28:18 UTC
The branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=6f38d2e7b0599f9b61c04686eb9a7faf3264b8ec

commit 6f38d2e7b0599f9b61c04686eb9a7faf3264b8ec
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2023-11-15 21:22:00 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2023-11-15 21:25:00 +0000

    acpi: Add workaround for Altra I2C memory resource
    
    Submitted by: allanjude
    Sponsored by: Ampere Computing LLC
    Reviewed by: imp
    Differential Revision: https://reviews.freebsd.org/D28741
---
 sys/dev/acpica/acpi_resource.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/dev/acpica/acpi_resource.c b/sys/dev/acpica/acpi_resource.c
index 373cc6da9820..b845fd146f67 100644
--- a/sys/dev/acpica/acpi_resource.c
+++ b/sys/dev/acpica/acpi_resource.c
@@ -517,6 +517,13 @@ acpi_parse_resources(device_t dev, ACPI_HANDLE handle,
         acpi_MatchHid(handle, "ARMHD620") != ACPI_MATCHHID_NOMATCH)
 	    arc.ignore_producer_flag = true;
 
+    /*
+     * The DesignWare I2C Controller on Ampere Altra sets ResourceProducer on
+     * memory resources.
+     */
+    if (acpi_MatchHid(handle, "APMC0D0F") != ACPI_MATCHHID_NOMATCH)
+	    arc.ignore_producer_flag = true;
+
     status = AcpiWalkResources(handle, "_CRS", acpi_parse_resource, &arc);
     if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
 	printf("can't fetch resources for %s - %s\n",