Lines Matching +full:sun4i +full:- +full:a10 +full:- +full:sid

1 /*-
208 { "allwinner,sun4i-a10-sid", (uintptr_t)&a10_conf},
209 { "allwinner,sun7i-a20-sid", (uintptr_t)&a20_conf},
210 { "allwinner,sun50i-a64-sid", (uintptr_t)&a64_conf},
211 { "allwinner,sun8i-a83t-sid", (uintptr_t)&a83t_conf},
212 { "allwinner,sun8i-h3-sid", (uintptr_t)&h3_conf},
213 { "allwinner,sun50i-h5-sid", (uintptr_t)&h5_conf},
228 { -1, 0 }
231 #define RD1(sc, reg) bus_read_1((sc)->res, (reg))
232 #define RD4(sc, reg) bus_read_4((sc)->res, (reg))
233 #define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val))
243 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in aw_sid_probe()
259 sc->sid_dev = dev; in aw_sid_attach()
261 if (bus_alloc_resources(dev, aw_sid_spec, &sc->res) != 0) { in aw_sid_attach()
266 mtx_init(&sc->prctl_mtx, device_get_nameunit(dev), NULL, MTX_DEF); in aw_sid_attach()
267 sc->sid_conf = (struct aw_sid_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; in aw_sid_attach()
273 for (i = 0; i < sc->sid_conf->nfuses ;i++) {\ in aw_sid_attach()
276 OID_AUTO, sc->sid_conf->efuses[i].name, in aw_sid_attach()
278 dev, sc->sid_conf->efuses[i].id, aw_sid_sysctl, in aw_sid_attach()
279 "A", sc->sid_conf->efuses[i].desc); in aw_sid_attach()
295 for (i = 0; i < sc->sid_conf->nfuses; i++) in aw_sid_get_fuse()
296 if (id == sc->sid_conf->efuses[i].id) in aw_sid_get_fuse()
299 if (i == sc->sid_conf->nfuses) in aw_sid_get_fuse()
302 if (*size != sc->sid_conf->efuses[i].size) { in aw_sid_get_fuse()
303 *size = sc->sid_conf->efuses[i].size; in aw_sid_get_fuse()
310 if (sc->sid_conf->efuses[i].public == false) in aw_sid_get_fuse()
311 mtx_lock(&sc->prctl_mtx); in aw_sid_get_fuse()
312 for (j = 0; j < sc->sid_conf->efuses[i].size; j += 4) { in aw_sid_get_fuse()
313 if (sc->sid_conf->efuses[i].public == false) { in aw_sid_get_fuse()
314 val = SID_PRCTL_OFFSET(sc->sid_conf->efuses[i].offset + j) | in aw_sid_get_fuse()
323 val = RD4(sc, sc->sid_conf->efuses[i].base + in aw_sid_get_fuse()
324 sc->sid_conf->efuses[i].offset + j); in aw_sid_get_fuse()
333 if (sc->sid_conf->efuses[i].public == false) in aw_sid_get_fuse()
334 mtx_unlock(&sc->prctl_mtx); in aw_sid_get_fuse()
348 for (i = 0; i < sc->sid_conf->nfuses; i++) in aw_sid_read()
349 if (offset == sc->sid_conf->efuses[i].offset) { in aw_sid_read()
350 fuse_id = sc->sid_conf->efuses[i].id; in aw_sid_read()
381 snprintf(out + (i * 2), sizeof(out) - (i * 2), in aw_sid_sysctl()