Lines Matching +full:sun7i +full:- +full:a20 +full:- +full:sid

1 /*-
234 { "allwinner,sun4i-a10-sid", (uintptr_t)&a10_conf},
235 { "allwinner,sun7i-a20-sid", (uintptr_t)&a20_conf},
236 { "allwinner,sun50i-a64-sid", (uintptr_t)&a64_conf},
237 { "allwinner,sun8i-a83t-sid", (uintptr_t)&a83t_conf},
238 { "allwinner,sun8i-h3-sid", (uintptr_t)&h3_conf},
239 { "allwinner,sun50i-h5-sid", (uintptr_t)&h5_conf},
240 { "allwinner,sun20i-d1-sid", (uintptr_t)&d1_conf},
255 { -1, 0 }
258 #define RD1(sc, reg) bus_read_1((sc)->res, (reg))
259 #define RD4(sc, reg) bus_read_4((sc)->res, (reg))
260 #define WR4(sc, reg, val) bus_write_4((sc)->res, (reg), (val))
270 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in aw_sid_probe()
286 sc->sid_dev = dev; in aw_sid_attach()
288 if (bus_alloc_resources(dev, aw_sid_spec, &sc->res) != 0) { in aw_sid_attach()
293 mtx_init(&sc->prctl_mtx, device_get_nameunit(dev), NULL, MTX_DEF); in aw_sid_attach()
294 sc->sid_conf = (struct aw_sid_conf *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; in aw_sid_attach()
300 for (i = 0; i < sc->sid_conf->nfuses ;i++) {\ in aw_sid_attach()
303 OID_AUTO, sc->sid_conf->efuses[i].name, in aw_sid_attach()
305 dev, sc->sid_conf->efuses[i].id, aw_sid_sysctl, in aw_sid_attach()
306 "A", sc->sid_conf->efuses[i].desc); in aw_sid_attach()
322 for (i = 0; i < sc->sid_conf->nfuses; i++) in aw_sid_get_fuse()
323 if (id == sc->sid_conf->efuses[i].id) in aw_sid_get_fuse()
326 if (i == sc->sid_conf->nfuses) in aw_sid_get_fuse()
329 if (*size != sc->sid_conf->efuses[i].size) { in aw_sid_get_fuse()
330 *size = sc->sid_conf->efuses[i].size; in aw_sid_get_fuse()
337 if (sc->sid_conf->efuses[i].public == false) in aw_sid_get_fuse()
338 mtx_lock(&sc->prctl_mtx); in aw_sid_get_fuse()
339 for (j = 0; j < sc->sid_conf->efuses[i].size; j += 4) { in aw_sid_get_fuse()
340 if (sc->sid_conf->efuses[i].public == false) { in aw_sid_get_fuse()
341 val = SID_PRCTL_OFFSET(sc->sid_conf->efuses[i].offset + j) | in aw_sid_get_fuse()
350 val = RD4(sc, sc->sid_conf->efuses[i].base + in aw_sid_get_fuse()
351 sc->sid_conf->efuses[i].offset + j); in aw_sid_get_fuse()
360 if (sc->sid_conf->efuses[i].public == false) in aw_sid_get_fuse()
361 mtx_unlock(&sc->prctl_mtx); in aw_sid_get_fuse()
375 for (i = 0; i < sc->sid_conf->nfuses; i++) in aw_sid_read()
376 if (offset == sc->sid_conf->efuses[i].offset) { in aw_sid_read()
377 fuse_id = sc->sid_conf->efuses[i].id; in aw_sid_read()
408 snprintf(out + (i * 2), sizeof(out) - (i * 2), in aw_sid_sysctl()