Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145184717
D25925.id75313.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
D25925.id75313.diff
View Options
Index: head/sys/dev/fdt/simplebus.h
===================================================================
--- head/sys/dev/fdt/simplebus.h
+++ head/sys/dev/fdt/simplebus.h
@@ -47,6 +47,8 @@
struct simplebus_range *ranges;
int nranges;
+#define SB_FLAG_NO_RANGES (1 << 0) /* Bus doesn't have ranges property */
+ int flags;
pcell_t acells, scells;
};
@@ -63,4 +65,7 @@
struct simplebus_devinfo *di);
int simplebus_fill_ranges(phandle_t node,
struct simplebus_softc *sc);
+
+int simplebus_attach(device_t dev);
+
#endif /* _FDT_SIMPLEBUS_H */
Index: head/sys/dev/fdt/simplebus.c
===================================================================
--- head/sys/dev/fdt/simplebus.c
+++ head/sys/dev/fdt/simplebus.c
@@ -46,7 +46,6 @@
* Bus interface.
*/
static int simplebus_probe(device_t dev);
-static int simplebus_attach(device_t dev);
static struct resource *simplebus_alloc_resource(device_t, device_t, int,
int *, rman_res_t, rman_res_t, rman_res_t, u_int);
static void simplebus_probe_nomatch(device_t bus, device_t child);
@@ -134,7 +133,7 @@
return (BUS_PROBE_GENERIC);
}
-static int
+int
simplebus_attach(device_t dev)
{
struct simplebus_softc *sc;
@@ -142,7 +141,8 @@
sc = device_get_softc(dev);
simplebus_init(dev, 0);
- if (simplebus_fill_ranges(sc->node, sc) < 0) {
+ if ((sc->flags & SB_FLAG_NO_RANGES) == 0 &&
+ simplebus_fill_ranges(sc->node, sc) < 0) {
device_printf(dev, "could not get ranges\n");
return (ENXIO);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 17, 9:19 PM (14 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28825150
Default Alt Text
D25925.id75313.diff (1 KB)
Attached To
Mode
D25925: Allow child classes of simplebus to call attach directly
Attached
Detach File
Event Timeline
Log In to Comment