Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161954961
D16720.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D16720.diff
View Options
Index: head/sys/dev/ichiic/ig4_acpi.c
===================================================================
--- head/sys/dev/ichiic/ig4_acpi.c
+++ head/sys/dev/ichiic/ig4_acpi.c
@@ -68,10 +68,20 @@
static int
ig4iic_acpi_probe(device_t dev)
{
+ ig4iic_softc_t *sc;
+ char *hid;
- if (acpi_disabled("ig4iic") ||
- ACPI_ID_PROBE(device_get_parent(dev), dev, ig4iic_ids) == NULL)
- return (ENXIO);
+ sc = device_get_softc(dev);
+
+ if (acpi_disabled("ig4iic"))
+ return (ENXIO);
+
+ hid = ACPI_ID_PROBE(device_get_parent(dev), dev, ig4iic_ids);
+ if (hid == NULL)
+ return (ENXIO);
+
+ if (strcmp("AMDI0010", hid) == 0)
+ sc->access_intr_mask = 1;
device_set_desc(dev, "Designware I2C Controller");
return (0);
Index: head/sys/dev/ichiic/ig4_iic.c
===================================================================
--- head/sys/dev/ichiic/ig4_iic.c
+++ head/sys/dev/ichiic/ig4_iic.c
@@ -724,6 +724,19 @@
++sc->rnext;
status = reg_read(sc, IG4_REG_I2C_STA);
}
+
+ /*
+ * Workaround to trigger pending interrupt if IG4_REG_INTR_STAT
+ * is changed after clearing it
+ */
+ if(sc->access_intr_mask) {
+ status = reg_read(sc, IG4_REG_INTR_MASK);
+ if(status) {
+ reg_write(sc, IG4_REG_INTR_MASK, 0);
+ reg_write(sc, IG4_REG_INTR_MASK, status);
+ }
+ }
+
wakeup(sc);
mtx_unlock(&sc->io_lock);
}
Index: head/sys/dev/ichiic/ig4_var.h
===================================================================
--- head/sys/dev/ichiic/ig4_var.h
+++ head/sys/dev/ichiic/ig4_var.h
@@ -72,6 +72,7 @@
int slave_valid : 1;
int read_started : 1;
int write_started : 1;
+ int access_intr_mask : 1;
/*
* Locking semantics:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 9, 8:09 AM (13 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34843535
Default Alt Text
D16720.diff (1 KB)
Attached To
Mode
D16720: Designware I2C: Fix IO Timeout issue with I2C controller in AMD platforms
Attached
Detach File
Event Timeline
Log In to Comment