Lines Matching refs:rtc
72 struct gemini_rtc *rtc = dev_get_drvdata(dev); in gemini_rtc_read_time() local
77 sec = readl(rtc->rtc_base + GEMINI_RTC_SECOND); in gemini_rtc_read_time()
78 min = readl(rtc->rtc_base + GEMINI_RTC_MINUTE); in gemini_rtc_read_time()
79 hour = readl(rtc->rtc_base + GEMINI_RTC_HOUR); in gemini_rtc_read_time()
80 days = readl(rtc->rtc_base + GEMINI_RTC_DAYS); in gemini_rtc_read_time()
81 offset = readl(rtc->rtc_base + GEMINI_RTC_RECORD); in gemini_rtc_read_time()
92 struct gemini_rtc *rtc = dev_get_drvdata(dev); in gemini_rtc_set_time() local
101 sec = readl(rtc->rtc_base + GEMINI_RTC_SECOND); in gemini_rtc_set_time()
102 min = readl(rtc->rtc_base + GEMINI_RTC_MINUTE); in gemini_rtc_set_time()
103 hour = readl(rtc->rtc_base + GEMINI_RTC_HOUR); in gemini_rtc_set_time()
104 day = readl(rtc->rtc_base + GEMINI_RTC_DAYS); in gemini_rtc_set_time()
108 writel(offset, rtc->rtc_base + GEMINI_RTC_RECORD); in gemini_rtc_set_time()
109 writel(0x01, rtc->rtc_base + GEMINI_RTC_CR); in gemini_rtc_set_time()
121 struct gemini_rtc *rtc; in gemini_rtc_probe() local
126 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); in gemini_rtc_probe()
127 if (unlikely(!rtc)) in gemini_rtc_probe()
129 platform_set_drvdata(pdev, rtc); in gemini_rtc_probe()
135 rtc->rtc_irq = res->start; in gemini_rtc_probe()
141 rtc->rtc_base = devm_ioremap(dev, res->start, in gemini_rtc_probe()
144 ret = devm_request_irq(dev, rtc->rtc_irq, gemini_rtc_interrupt, in gemini_rtc_probe()
149 rtc->rtc_dev = rtc_device_register(pdev->name, dev, in gemini_rtc_probe()
151 return PTR_ERR_OR_ZERO(rtc->rtc_dev); in gemini_rtc_probe()
156 struct gemini_rtc *rtc = platform_get_drvdata(pdev); in gemini_rtc_remove() local
158 rtc_device_unregister(rtc->rtc_dev); in gemini_rtc_remove()