Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171808524
D44532.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
799 B
Referenced Files
None
Subscribers
None
D44532.diff
View Options
diff --git a/sys/dev/uart/uart_dev_snps.c b/sys/dev/uart/uart_dev_snps.c
--- a/sys/dev/uart/uart_dev_snps.c
+++ b/sys/dev/uart/uart_dev_snps.c
@@ -223,6 +223,22 @@
return (BUS_PROBE_VENDOR);
}
+static int
+snps_attach(device_t dev)
+{
+ phandle_t node;
+ int ret;
+
+ ret = uart_bus_attach(dev);
+ if (ret == 0) {
+ node = ofw_bus_get_node(dev);
+ /* Set up phandle to dev mapping */
+ OF_device_register_xref(OF_xref_from_node(node), dev);
+ }
+
+ return (ret);
+}
+
static int
snps_detach(device_t dev)
{
@@ -269,7 +285,7 @@
static device_method_t snps_bus_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, snps_probe),
- DEVMETHOD(device_attach, uart_bus_attach),
+ DEVMETHOD(device_attach, snps_attach),
DEVMETHOD(device_detach, snps_detach),
DEVMETHOD_END
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 14, 5:03 PM (12 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38917601
Default Alt Text
D44532.diff (799 B)
Attached To
Mode
D44532: uart_snps: Register a device xref for UARTs
Attached
Detach File
Event Timeline
Log In to Comment