Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174335343
D60201.id188324.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
D60201.id188324.diff
View Options
diff --git a/sys/arm/ti/ti_sysc.c b/sys/arm/ti/ti_sysc.c
--- a/sys/arm/ti/ti_sysc.c
+++ b/sys/arm/ti/ti_sysc.c
@@ -267,7 +267,7 @@
}
static int
-parse_regfields(struct ti_sysc_softc *sc) {
+parse_regfields(struct ti_sysc_softc *sc, struct simplebus_softc *sb_sc) {
phandle_t node;
uint32_t parent_address_cells;
uint32_t parent_size_cells;
@@ -331,11 +331,8 @@
sc->reg[prop_idx].size |= reg[reg_i++];
}
- if (sc->sc.nranges == 0)
- sc->offset_reg[prop_idx] = sc->reg[prop_idx].address;
- else
- sc->offset_reg[prop_idx] = sc->reg[prop_idx].address -
- sc->sc.ranges[REG_REV].host;
+ sc->offset_reg[prop_idx] = sc->reg[prop_idx].address -
+ sb_sc->ranges[REG_REV].host;
DPRINTF(sc->dev, "reg[%s] address %#jx size %#jx\n",
reg_names[idx],
@@ -460,26 +457,24 @@
phandle_t node;
int err;
cell_t value;
+ struct simplebus_softc *sb_sc;
sc = device_get_softc(dev);
sc->dev = dev;
sc->device_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
node = ofw_bus_get_node(sc->dev);
- /* ranges - use simplebus */
- simplebus_init(sc->dev, node);
- if (simplebus_fill_ranges(node, &sc->sc) < 0) {
- DPRINTF(sc->dev, "could not get ranges\n");
+
+ err = simplebus_attach_impl(dev, 0, node);
+ if (err != 0)
return (ENXIO);
- }
- if (sc->sc.nranges == 0) {
- DPRINTF(sc->dev, "nranges == 0\n");
+ sb_sc = device_get_softc_class(dev, &simplebus_driver);
+ if (sb_sc->nranges == 0)
return (ENXIO);
- }
/* Required field reg & reg-names - assume at least "rev" exists */
- err = parse_regfields(sc);
+ err = parse_regfields(sc, sb_sc);
if (err) {
DPRINTF(sc->dev, "parse_regfields failed %d\n", err);
return (ENXIO);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 12:04 PM (9 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40089709
Default Alt Text
D60201.id188324.diff (1 KB)
Attached To
Mode
D60201: TI AM335x: ti_sysc simplebus updates
Attached
Detach File
Event Timeline
Log In to Comment