Lines Matching full:syscon
30 * This is a generic syscon driver, whose purpose is to provide access to
51 #include "syscon.h"
56 static uint32_t syscon_generic_unlocked_read_4(struct syscon *syscon,
58 static int syscon_generic_unlocked_write_4(struct syscon *syscon,
60 static int syscon_generic_unlocked_modify_4(struct syscon *syscon,
64 * Generic syscon driver (FDT)
67 {"syscon", 1},
74 device_get_nameunit((_sc)->dev), "syscon", MTX_SPIN)
90 syscon_generic_unlocked_read_4(struct syscon *syscon, bus_size_t offset)
95 sc = device_get_softc(syscon->pdev);
102 syscon_generic_unlocked_write_4(struct syscon *syscon, bus_size_t offset, uint32_t val)
106 sc = device_get_softc(syscon->pdev);
113 syscon_generic_unlocked_modify_4(struct syscon *syscon, bus_size_t offset,
119 sc = device_get_softc(syscon->pdev);
155 device_set_desc(dev, "syscon");
180 sc->syscon = syscon_create_ofw_node(dev, &syscon_generic_class,
182 if (sc->syscon == NULL) {
183 device_printf(dev, "Failed to create/register syscon\n");
207 if (sc->syscon != NULL) {
208 syscon_unregister(sc->syscon);
209 free(sc->syscon, M_SYSCON);