Lines Matching defs:dev
43 #include <dev/ofw/ofw_bus.h>
44 #include <dev/ofw/ofw_bus_subr.h>
57 static int lpc_rtc_probe(device_t dev);
58 static int lpc_rtc_attach(device_t dev);
59 static int lpc_rtc_gettime(device_t dev, struct timespec *ts);
63 lpc_rtc_probe(device_t dev)
66 if (!ofw_bus_status_okay(dev))
69 if (!ofw_bus_is_compatible(dev, "lpc,rtc"))
72 device_set_desc(dev, "LPC32x0 real time clock");
77 lpc_rtc_attach(device_t dev)
79 struct lpc_rtc_softc *sc = device_get_softc(dev);
82 sc->lr_dev = dev;
84 clock_register(dev, 1000000);
86 sc->lr_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
89 device_printf(dev, "cannot allocate memory window\n");
100 lpc_rtc_gettime(device_t dev, struct timespec *ts)
102 struct lpc_rtc_softc *sc = device_get_softc(dev);
111 lpc_rtc_settime(device_t dev, struct timespec *ts)
113 struct lpc_rtc_softc *sc = device_get_softc(dev);