Lines Matching defs:dev
48 #include <dev/ofw/ofw_bus.h>
49 #include <dev/ofw/ofw_bus_subr.h>
58 device_t dev;
67 static int mv_rtc_probe(device_t dev);
68 static int mv_rtc_attach(device_t dev);
70 static int mv_rtc_gettime(device_t dev, struct timespec *ts);
71 static int mv_rtc_settime(device_t dev, struct timespec *ts);
97 mv_rtc_probe(device_t dev)
100 if (!ofw_bus_status_okay(dev))
103 if (!ofw_bus_is_compatible(dev, "mrvl,rtc"))
106 device_set_desc(dev, "Marvell Integrated RTC");
111 mv_rtc_attach(device_t dev)
115 sc = device_get_softc(dev);
116 sc->dev = dev;
118 clock_register(dev, 1000000);
120 if (bus_alloc_resources(dev, res_spec, sc->res)) {
121 device_printf(dev, "could not allocate resources\n");
129 mv_rtc_gettime(device_t dev, struct timespec *ts)
135 sc = device_get_softc(dev);
155 mv_rtc_settime(device_t dev, struct timespec *ts)
161 sc = device_get_softc(dev);