Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171325488
D6026.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
856 B
Referenced Files
None
Subscribers
None
D6026.diff
View Options
Index: head/sys/dev/flash/mx25l.c
===================================================================
--- head/sys/dev/flash/mx25l.c
+++ head/sys/dev/flash/mx25l.c
@@ -443,12 +443,26 @@
static int
mx25l_probe(device_t dev)
{
-
#ifdef FDT
+ int i;
+
if (!ofw_bus_status_okay(dev))
return (ENXIO);
- if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0)
- return (ENXIO);
+
+ /* First try to match the compatible property to the compat_data */
+ if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 1)
+ goto found;
+
+ /*
+ * Next, try to find a compatible device using the names in the
+ * flash_devices structure
+ */
+ for (i = 0; i < nitems(flash_devices); i++)
+ if (ofw_bus_is_compatible(dev, flash_devices[i].name))
+ goto found;
+
+ return (ENXIO);
+found:
#endif
device_set_desc(dev, "M25Pxx Flash Family");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Sep 11, 10:38 AM (22 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38700374
Default Alt Text
D6026.diff (856 B)
Attached To
Mode
D6026: Modify mx25l FDT compatible device handling
Attached
Detach File
Event Timeline
Log In to Comment