Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167409270
D5703.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
D5703.diff
View Options
Index: head/sys/dev/extres/clk/clk_fixed.c
===================================================================
--- head/sys/dev/extres/clk/clk_fixed.c
+++ head/sys/dev/extres/clk/clk_fixed.c
@@ -150,12 +150,19 @@
static int
clk_fixed_probe(device_t dev)
{
+ intptr_t clk_type;
- if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) {
+ clk_type = ofw_bus_search_compatible(dev, compat_data)->ocd_data;
+ switch (clk_type) {
+ case CLK_TYPE_FIXED:
device_set_desc(dev, "Fixed clock");
return (BUS_PROBE_DEFAULT);
+ case CLK_TYPE_FIXED_FACTOR:
+ device_set_desc(dev, "Fixed factor clock");
+ return (BUS_PROBE_DEFAULT);
+ default:
+ return (ENXIO);
}
- return (ENXIO);
}
static int
@@ -184,11 +191,11 @@
rv = OF_getencprop(node, "clock-mult", &def->mult, sizeof(def->mult));
if (rv <= 0)
return (ENXIO);
- rv = OF_getencprop(node, "clock-div", &def->mult, sizeof(def->div));
+ rv = OF_getencprop(node, "clock-div", &def->div, sizeof(def->div));
if (rv <= 0)
return (ENXIO);
/* Get name of parent clock */
- rv = clk_get_by_ofw_name(sc->dev, "clocks", &parent);
+ rv = clk_get_by_ofw_index(sc->dev, 0, &parent);
if (rv != 0)
return (ENXIO);
def->clkdef.parent_names = malloc(sizeof(char *), M_OFWPROP, M_WAITOK);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 22, 2:44 PM (12 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37089962
Default Alt Text
D5703.diff (1 KB)
Attached To
Mode
D5703: clk_fixed: Fix support for fixed factor clocks
Attached
Detach File
Event Timeline
Log In to Comment