MCPcopy Create free account
hub / github.com/F-Stack/f-stack / as3722_rtc_attach

Function as3722_rtc_attach

freebsd/arm/nvidia/as3722_rtc.c:99–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99int
100as3722_rtc_attach(struct as3722_softc *sc, phandle_t node)
101{
102 int rv;
103
104 /* Enable RTC, set 24 hours mode and alarms */
105 rv = RM1(sc, AS3722_RTC_CONTROL,
106 AS3722_RTC_ON | AS3722_RTC_ALARM_WAKEUP_EN | AS3722_RTC_AM_PM_MODE,
107 AS3722_RTC_ON | AS3722_RTC_ALARM_WAKEUP_EN);
108 if (rv < 0) {
109 device_printf(sc->dev, "Failed to initialize RTC controller\n");
110 return (ENXIO);
111 }
112 clock_register(sc->dev, 1000000);
113
114 return (0);
115}

Callers 1

as3722_attachFunction · 0.85

Calls 2

device_printfFunction · 0.85
clock_registerFunction · 0.85

Tested by

no test coverage detected