• Home
  • Raw
  • Download

Lines Matching refs:regs

77 	struct mpc5121_rtc_regs __iomem *regs;  member
87 static void mpc5121_rtc_update_smh(struct mpc5121_rtc_regs __iomem *regs, in mpc5121_rtc_update_smh() argument
90 out_8(&regs->second_set, tm->tm_sec); in mpc5121_rtc_update_smh()
91 out_8(&regs->minute_set, tm->tm_min); in mpc5121_rtc_update_smh()
92 out_8(&regs->hour_set, tm->tm_hour); in mpc5121_rtc_update_smh()
95 out_8(&regs->set_time, 0x1); in mpc5121_rtc_update_smh()
96 out_8(&regs->set_time, 0x3); in mpc5121_rtc_update_smh()
97 out_8(&regs->set_time, 0x1); in mpc5121_rtc_update_smh()
98 out_8(&regs->set_time, 0x0); in mpc5121_rtc_update_smh()
104 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_read_time() local
110 now = in_be32(&regs->actual_time) + in_be32(&regs->target_time); in mpc5121_rtc_read_time()
118 mpc5121_rtc_update_smh(regs, tm); in mpc5121_rtc_read_time()
126 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_set_time() local
134 out_be32(&regs->target_time, now - in_be32(&regs->actual_time)); in mpc5121_rtc_set_time()
140 mpc5121_rtc_update_smh(regs, tm); in mpc5121_rtc_set_time()
148 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5200_rtc_read_time() local
151 tm->tm_sec = in_8(&regs->second); in mpc5200_rtc_read_time()
152 tm->tm_min = in_8(&regs->minute); in mpc5200_rtc_read_time()
155 if (in_8(&regs->hour) & 0x20) in mpc5200_rtc_read_time()
156 tm->tm_hour = (in_8(&regs->hour) >> 1) + in mpc5200_rtc_read_time()
157 (in_8(&regs->hour) & 1 ? 12 : 0); in mpc5200_rtc_read_time()
159 tm->tm_hour = in_8(&regs->hour); in mpc5200_rtc_read_time()
161 tmp = in_8(&regs->wday_mday); in mpc5200_rtc_read_time()
163 tm->tm_mon = in_8(&regs->month) - 1; in mpc5200_rtc_read_time()
164 tm->tm_year = in_be16(&regs->year) - 1900; in mpc5200_rtc_read_time()
175 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5200_rtc_set_time() local
177 mpc5121_rtc_update_smh(regs, tm); in mpc5200_rtc_set_time()
180 out_8(&regs->month_set, tm->tm_mon + 1); in mpc5200_rtc_set_time()
181 out_8(&regs->weekday_set, tm->tm_wday ? tm->tm_wday : 7); in mpc5200_rtc_set_time()
182 out_8(&regs->date_set, tm->tm_mday); in mpc5200_rtc_set_time()
183 out_be16(&regs->year_set, tm->tm_year + 1900); in mpc5200_rtc_set_time()
186 out_8(&regs->set_date, 0x1); in mpc5200_rtc_set_time()
187 out_8(&regs->set_date, 0x3); in mpc5200_rtc_set_time()
188 out_8(&regs->set_date, 0x1); in mpc5200_rtc_set_time()
189 out_8(&regs->set_date, 0x0); in mpc5200_rtc_set_time()
197 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_read_alarm() local
201 alarm->pending = in_8(&regs->alm_status); in mpc5121_rtc_read_alarm()
209 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_set_alarm() local
215 out_8(&regs->alm_min_set, alarm->time.tm_min); in mpc5121_rtc_set_alarm()
216 out_8(&regs->alm_hour_set, alarm->time.tm_hour); in mpc5121_rtc_set_alarm()
218 out_8(&regs->alm_enable, alarm->enabled); in mpc5121_rtc_set_alarm()
227 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_handler() local
229 if (in_8(&regs->int_alm)) { in mpc5121_rtc_handler()
231 out_8(&regs->int_alm, 1); in mpc5121_rtc_handler()
232 out_8(&regs->alm_status, 1); in mpc5121_rtc_handler()
244 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_handler_upd() local
246 if (in_8(&regs->int_sec) && (in_8(&regs->int_enable) & 0x1)) { in mpc5121_rtc_handler_upd()
248 out_8(&regs->int_sec, 1); in mpc5121_rtc_handler_upd()
261 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_alarm_irq_enable() local
269 out_8(&regs->alm_enable, val); in mpc5121_rtc_alarm_irq_enable()
300 rtc->regs = devm_platform_ioremap_resource(op, 0); in mpc5121_rtc_probe()
301 if (IS_ERR(rtc->regs)) { in mpc5121_rtc_probe()
303 return PTR_ERR(rtc->regs); in mpc5121_rtc_probe()
343 ka = in_be32(&rtc->regs->keep_alive); in mpc5121_rtc_probe()
347 out_be32(&rtc->regs->keep_alive, ka); in mpc5121_rtc_probe()
376 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; in mpc5121_rtc_remove() local
379 out_8(&regs->alm_enable, 0); in mpc5121_rtc_remove()
380 out_8(&regs->int_enable, in_8(&regs->int_enable) & ~0x1); in mpc5121_rtc_remove()