Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174346474
D60202.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
D60202.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
@@ -306,12 +306,6 @@
reg = malloc(nreg, M_DEVBUF, M_WAITOK);
OF_getencprop(node, "reg", reg, nreg);
- /* Make sure address & size are 0 */
- for (idx = 0; idx < REG_MAX; idx++) {
- sc->reg[idx].address = 0;
- sc->reg[idx].size = 0;
- }
-
/* Loop through reg-names and figure out which reg-name corresponds to
* index populate the values into the reg array.
*/
@@ -473,11 +467,18 @@
if (sb_sc->nranges == 0)
return (ENXIO);
- /* Required field reg & reg-names - assume at least "rev" exists */
- err = parse_regfields(sc, sb_sc);
- if (err) {
- DPRINTF(sc->dev, "parse_regfields failed %d\n", err);
- return (ENXIO);
+ /* Make sure address & size are 0 */
+ for (int idx = 0; idx < REG_MAX; idx++) {
+ sc->reg[idx].address = 0;
+ sc->reg[idx].size = 0;
+ }
+
+ if (OF_hasprop(node, "reg") == 1) {
+ err = parse_regfields(sc, sb_sc);
+ if (err) {
+ DPRINTF(sc->dev, "parse_regfields failed %d\n", err);
+ return (ENXIO);
+ }
}
/* Optional */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 2:17 PM (12 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40089850
Default Alt Text
D60202.diff (1 KB)
Attached To
Mode
D60202: TI AM335x: ti_sysc FDT property reg is optional
Attached
Detach File
Event Timeline
Log In to Comment