Lines Matching refs:sm
135 const struct strtc_model *sm; in strtc_model_by_number() local
142 sm = dce->data; in strtc_model_by_number()
143 if (sm->sm_model == model) in strtc_model_by_number()
144 return sm; in strtc_model_by_number()
153 const struct strtc_model *sm = NULL; in strtc_model_by_compat() local
156 sm = dce->data; in strtc_model_by_compat()
158 return sm; in strtc_model_by_compat()
185 const struct strtc_model *sm; in strtc_attach() local
187 if ((sm = strtc_model_by_compat(ia)) == NULL) in strtc_attach()
188 sm = strtc_model_by_number(device_cfdata(self)->cf_flags); in strtc_attach()
190 if (sm == NULL) { in strtc_attach()
196 sm->sm_nvram_size ? "/NVRAM" : ""); in strtc_attach()
197 aprint_normal(": M41T%d Real-time Clock%s\n", sm->sm_model, in strtc_attach()
198 sm->sm_nvram_size ? "/NVRAM" : ""); in strtc_attach()
202 sc->sc_model = sm; in strtc_attach()
257 const struct strtc_model * const sm = sc->sc_model; in strtc_read() local
259 if (uio->uio_offset >= sm->sm_nvram_size) in strtc_read()
265 while (uio->uio_resid && uio->uio_offset < sm->sm_nvram_size) { in strtc_read()
267 cmdbuf[0] = a + sm->sm_nvram_start; in strtc_read()
298 const struct strtc_model * const sm = sc->sc_model; in strtc_write() local
300 if (uio->uio_offset >= sm->sm_nvram_size) in strtc_write()
306 while (uio->uio_resid && uio->uio_offset < sm->sm_nvram_size) { in strtc_write()
308 cmdbuf[0] = a + sm->sm_nvram_start; in strtc_write()