Lines Matching defs:syscon
30 * This is a generic syscon driver, whose purpose is to provide access to
53 #include "syscon.h"
58 static uint32_t syscon_generic_unlocked_read_4(struct syscon *syscon,
60 static int syscon_generic_unlocked_write_4(struct syscon *syscon,
62 static int syscon_generic_unlocked_modify_4(struct syscon *syscon,
66 * Generic syscon driver (FDT)
69 {"syscon", 1},
76 device_get_nameunit((_sc)->dev), "syscon", MTX_SPIN)
92 syscon_generic_unlocked_read_4(struct syscon *syscon, bus_size_t offset)
97 sc = device_get_softc(syscon->pdev);
104 syscon_generic_unlocked_write_4(struct syscon *syscon, bus_size_t offset, uint32_t val)
108 sc = device_get_softc(syscon->pdev);
115 syscon_generic_unlocked_modify_4(struct syscon *syscon, bus_size_t offset,
121 sc = device_get_softc(syscon->pdev);
157 device_set_desc(dev, "syscon");
182 sc->syscon = syscon_create_ofw_node(dev, &syscon_generic_class,
184 if (sc->syscon == NULL) {
185 device_printf(dev, "Failed to create/register syscon\n");
208 if (sc->syscon != NULL) {
209 syscon_unregister(sc->syscon);
210 free(sc->syscon, M_SYSCON);