blob: 86fa723b3b7624baf24a3ce485a1cca896ccb92d [file] [log] [blame]
Thomas Gleixner2874c5f2019-05-27 08:55:01 +02001// SPDX-License-Identifier: GPL-2.0-or-later
Richard Purdiee842f1c2006-03-27 01:16:46 -08002/*
3 * Real Time Clock interface for StrongARM SA1x00 and XScale PXA2xx
4 *
5 * Copyright (c) 2000 Nils Faerber
6 *
7 * Based on rtc.c by Paul Gortmaker
8 *
9 * Original Driver by Nils Faerber <nils@kernelconcepts.de>
10 *
11 * Modifications from:
12 * CIH <cih@coventive.com>
Nicolas Pitre2f82af02009-09-14 03:25:28 -040013 * Nicolas Pitre <nico@fluxnic.net>
Richard Purdiee842f1c2006-03-27 01:16:46 -080014 * Andrew Christian <andrew.christian@hp.com>
15 *
16 * Converted to the RTC subsystem and Driver Model
17 * by Richard Purdie <rpurdie@rpsys.net>
Richard Purdiee842f1c2006-03-27 01:16:46 -080018 */
19
20#include <linux/platform_device.h>
21#include <linux/module.h>
Haojian Zhuang8e8bbcb2012-02-23 23:36:37 +080022#include <linux/clk.h>
Richard Purdiee842f1c2006-03-27 01:16:46 -080023#include <linux/rtc.h>
24#include <linux/init.h>
25#include <linux/fs.h>
26#include <linux/interrupt.h>
Haojian Zhuang3888c092012-02-21 11:51:13 +080027#include <linux/slab.h>
Russell Kinga0164a52012-01-19 11:55:21 +000028#include <linux/string.h>
Haojian Zhuang8bec2e92012-03-05 19:26:42 +080029#include <linux/of.h>
Richard Purdiee842f1c2006-03-27 01:16:46 -080030#include <linux/pm.h>
Russell Kinga0164a52012-01-19 11:55:21 +000031#include <linux/bitops.h>
Rob Herring23019a72012-03-20 14:33:19 -050032#include <linux/io.h>
Richard Purdiee842f1c2006-03-27 01:16:46 -080033
Rob Herring90d0ae82015-02-03 14:44:51 -060034#define RTSR_HZE BIT(3) /* HZ interrupt enable */
35#define RTSR_ALE BIT(2) /* RTC alarm interrupt enable */
36#define RTSR_HZ BIT(1) /* HZ rising-edge detected */
37#define RTSR_AL BIT(0) /* RTC alarm detected */
Russell Kinga0164a52012-01-19 11:55:21 +000038
Rob Herring8c0961b2015-05-12 16:23:23 -050039#include "rtc-sa1100.h"
40
Marcelo Roberto Jimeneza404ad12010-10-18 22:33:53 +010041#define RTC_DEF_DIVIDER (32768 - 1)
Richard Purdiee842f1c2006-03-27 01:16:46 -080042#define RTC_DEF_TRIM 0
Haojian Zhuang3888c092012-02-21 11:51:13 +080043#define RTC_FREQ 1024
Richard Purdiee842f1c2006-03-27 01:16:46 -080044
Richard Purdiee842f1c2006-03-27 01:16:46 -080045
David Howells7d12e782006-10-05 14:55:46 +010046static irqreturn_t sa1100_rtc_interrupt(int irq, void *dev_id)
Richard Purdiee842f1c2006-03-27 01:16:46 -080047{
Haojian Zhuang3888c092012-02-21 11:51:13 +080048 struct sa1100_rtc *info = dev_get_drvdata(dev_id);
49 struct rtc_device *rtc = info->rtc;
Richard Purdiee842f1c2006-03-27 01:16:46 -080050 unsigned int rtsr;
51 unsigned long events = 0;
52
Haojian Zhuang3888c092012-02-21 11:51:13 +080053 spin_lock(&info->lock);
Richard Purdiee842f1c2006-03-27 01:16:46 -080054
Rob Herring90d0ae82015-02-03 14:44:51 -060055 rtsr = readl_relaxed(info->rtsr);
Richard Purdiee842f1c2006-03-27 01:16:46 -080056 /* clear interrupt sources */
Rob Herring90d0ae82015-02-03 14:44:51 -060057 writel_relaxed(0, info->rtsr);
Marcelo Roberto Jimenez7decaa52010-10-18 22:35:54 +010058 /* Fix for a nasty initialization problem the in SA11xx RTSR register.
59 * See also the comments in sa1100_rtc_probe(). */
60 if (rtsr & (RTSR_ALE | RTSR_HZE)) {
61 /* This is the original code, before there was the if test
62 * above. This code does not clear interrupts that were not
63 * enabled. */
Rob Herring90d0ae82015-02-03 14:44:51 -060064 writel_relaxed((RTSR_AL | RTSR_HZ) & (rtsr >> 2), info->rtsr);
Marcelo Roberto Jimenez7decaa52010-10-18 22:35:54 +010065 } else {
66 /* For some reason, it is possible to enter this routine
67 * without interruptions enabled, it has been tested with
68 * several units (Bug in SA11xx chip?).
69 *
70 * This situation leads to an infinite "loop" of interrupt
71 * routine calling and as a result the processor seems to
72 * lock on its first call to open(). */
Rob Herring90d0ae82015-02-03 14:44:51 -060073 writel_relaxed(RTSR_AL | RTSR_HZ, info->rtsr);
Marcelo Roberto Jimenez7decaa52010-10-18 22:35:54 +010074 }
Richard Purdiee842f1c2006-03-27 01:16:46 -080075
76 /* clear alarm interrupt if it has occurred */
77 if (rtsr & RTSR_AL)
78 rtsr &= ~RTSR_ALE;
Rob Herring90d0ae82015-02-03 14:44:51 -060079 writel_relaxed(rtsr & (RTSR_ALE | RTSR_HZE), info->rtsr);
Richard Purdiee842f1c2006-03-27 01:16:46 -080080
81 /* update irq data & counter */
82 if (rtsr & RTSR_AL)
83 events |= RTC_AF | RTC_IRQF;
84 if (rtsr & RTSR_HZ)
85 events |= RTC_UF | RTC_IRQF;
86
Russell Kinga0164a52012-01-19 11:55:21 +000087 rtc_update_irq(rtc, 1, events);
Richard Purdiee842f1c2006-03-27 01:16:46 -080088
Haojian Zhuang3888c092012-02-21 11:51:13 +080089 spin_unlock(&info->lock);
Richard Purdiee842f1c2006-03-27 01:16:46 -080090
91 return IRQ_HANDLED;
92}
93
John Stultz16380c12011-02-02 17:02:41 -080094static int sa1100_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
95{
Rob Herring90d0ae82015-02-03 14:44:51 -060096 u32 rtsr;
Haojian Zhuang3888c092012-02-21 11:51:13 +080097 struct sa1100_rtc *info = dev_get_drvdata(dev);
98
99 spin_lock_irq(&info->lock);
Rob Herring90d0ae82015-02-03 14:44:51 -0600100 rtsr = readl_relaxed(info->rtsr);
John Stultz16380c12011-02-02 17:02:41 -0800101 if (enabled)
Rob Herring90d0ae82015-02-03 14:44:51 -0600102 rtsr |= RTSR_ALE;
John Stultz16380c12011-02-02 17:02:41 -0800103 else
Rob Herring90d0ae82015-02-03 14:44:51 -0600104 rtsr &= ~RTSR_ALE;
105 writel_relaxed(rtsr, info->rtsr);
Haojian Zhuang3888c092012-02-21 11:51:13 +0800106 spin_unlock_irq(&info->lock);
John Stultz16380c12011-02-02 17:02:41 -0800107 return 0;
108}
109
Richard Purdiee842f1c2006-03-27 01:16:46 -0800110static int sa1100_rtc_read_time(struct device *dev, struct rtc_time *tm)
111{
Rob Herring90d0ae82015-02-03 14:44:51 -0600112 struct sa1100_rtc *info = dev_get_drvdata(dev);
113
114 rtc_time_to_tm(readl_relaxed(info->rcnr), tm);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800115 return 0;
116}
117
118static int sa1100_rtc_set_time(struct device *dev, struct rtc_time *tm)
119{
Rob Herring90d0ae82015-02-03 14:44:51 -0600120 struct sa1100_rtc *info = dev_get_drvdata(dev);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800121 unsigned long time;
122 int ret;
123
124 ret = rtc_tm_to_time(tm, &time);
125 if (ret == 0)
Rob Herring90d0ae82015-02-03 14:44:51 -0600126 writel_relaxed(time, info->rcnr);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800127 return ret;
128}
129
130static int sa1100_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
131{
Russell Kinga0164a52012-01-19 11:55:21 +0000132 u32 rtsr;
Rob Herring90d0ae82015-02-03 14:44:51 -0600133 struct sa1100_rtc *info = dev_get_drvdata(dev);
David Brownell32b49da2007-02-20 13:58:13 -0800134
Rob Herring90d0ae82015-02-03 14:44:51 -0600135 rtsr = readl_relaxed(info->rtsr);
David Brownell32b49da2007-02-20 13:58:13 -0800136 alrm->enabled = (rtsr & RTSR_ALE) ? 1 : 0;
137 alrm->pending = (rtsr & RTSR_AL) ? 1 : 0;
Richard Purdiee842f1c2006-03-27 01:16:46 -0800138 return 0;
139}
140
141static int sa1100_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
142{
Haojian Zhuang3888c092012-02-21 11:51:13 +0800143 struct sa1100_rtc *info = dev_get_drvdata(dev);
Haojian Zhuang1d8c38c2012-02-20 19:49:30 +0800144 unsigned long time;
Russell Kinga0164a52012-01-19 11:55:21 +0000145 int ret;
Richard Purdiee842f1c2006-03-27 01:16:46 -0800146
Haojian Zhuang3888c092012-02-21 11:51:13 +0800147 spin_lock_irq(&info->lock);
Haojian Zhuang1d8c38c2012-02-20 19:49:30 +0800148 ret = rtc_tm_to_time(&alrm->time, &time);
149 if (ret != 0)
150 goto out;
Rob Herring90d0ae82015-02-03 14:44:51 -0600151 writel_relaxed(readl_relaxed(info->rtsr) &
152 (RTSR_HZE | RTSR_ALE | RTSR_AL), info->rtsr);
153 writel_relaxed(time, info->rtar);
Haojian Zhuang1d8c38c2012-02-20 19:49:30 +0800154 if (alrm->enabled)
Rob Herring90d0ae82015-02-03 14:44:51 -0600155 writel_relaxed(readl_relaxed(info->rtsr) | RTSR_ALE, info->rtsr);
Haojian Zhuang1d8c38c2012-02-20 19:49:30 +0800156 else
Rob Herring90d0ae82015-02-03 14:44:51 -0600157 writel_relaxed(readl_relaxed(info->rtsr) & ~RTSR_ALE, info->rtsr);
Haojian Zhuang1d8c38c2012-02-20 19:49:30 +0800158out:
Haojian Zhuang3888c092012-02-21 11:51:13 +0800159 spin_unlock_irq(&info->lock);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800160
Russell Kinga0164a52012-01-19 11:55:21 +0000161 return ret;
Richard Purdiee842f1c2006-03-27 01:16:46 -0800162}
163
164static int sa1100_rtc_proc(struct device *dev, struct seq_file *seq)
165{
Rob Herring90d0ae82015-02-03 14:44:51 -0600166 struct sa1100_rtc *info = dev_get_drvdata(dev);
167
168 seq_printf(seq, "trim/divider\t\t: 0x%08x\n", readl_relaxed(info->rttr));
169 seq_printf(seq, "RTSR\t\t\t: 0x%08x\n", readl_relaxed(info->rtsr));
Richard Purdiee842f1c2006-03-27 01:16:46 -0800170
171 return 0;
172}
173
David Brownellff8371a2006-09-30 23:28:17 -0700174static const struct rtc_class_ops sa1100_rtc_ops = {
Richard Purdiee842f1c2006-03-27 01:16:46 -0800175 .read_time = sa1100_rtc_read_time,
176 .set_time = sa1100_rtc_set_time,
177 .read_alarm = sa1100_rtc_read_alarm,
178 .set_alarm = sa1100_rtc_set_alarm,
179 .proc = sa1100_rtc_proc,
John Stultz16380c12011-02-02 17:02:41 -0800180 .alarm_irq_enable = sa1100_rtc_alarm_irq_enable,
Richard Purdiee842f1c2006-03-27 01:16:46 -0800181};
182
Rob Herring8c0961b2015-05-12 16:23:23 -0500183int sa1100_rtc_init(struct platform_device *pdev, struct sa1100_rtc *info)
Richard Purdiee842f1c2006-03-27 01:16:46 -0800184{
Russell Kinga0164a52012-01-19 11:55:21 +0000185 struct rtc_device *rtc;
Rob Herring8c0961b2015-05-12 16:23:23 -0500186 int ret;
Haojian Zhuang3888c092012-02-21 11:51:13 +0800187
Rob Herring8c0961b2015-05-12 16:23:23 -0500188 spin_lock_init(&info->lock);
Haojian Zhuang3888c092012-02-21 11:51:13 +0800189
Jingoo Han55d735e2013-04-29 16:20:54 -0700190 info->clk = devm_clk_get(&pdev->dev, NULL);
Haojian Zhuang8e8bbcb2012-02-23 23:36:37 +0800191 if (IS_ERR(info->clk)) {
192 dev_err(&pdev->dev, "failed to find rtc clock source\n");
Jingoo Han55d735e2013-04-29 16:20:54 -0700193 return PTR_ERR(info->clk);
Haojian Zhuang8e8bbcb2012-02-23 23:36:37 +0800194 }
Richard Purdiee842f1c2006-03-27 01:16:46 -0800195
Chao Xie0cc0c382013-02-21 16:45:17 -0800196 ret = clk_prepare_enable(info->clk);
197 if (ret)
Jingoo Han66600bb2013-07-03 15:06:35 -0700198 return ret;
Richard Purdiee842f1c2006-03-27 01:16:46 -0800199 /*
200 * According to the manual we should be able to let RTTR be zero
201 * and then a default diviser for a 32.768KHz clock is used.
202 * Apparently this doesn't work, at least for my SA1110 rev 5.
203 * If the clock divider is uninitialized then reset it to the
204 * default value to get the 1Hz clock.
205 */
Rob Herring90d0ae82015-02-03 14:44:51 -0600206 if (readl_relaxed(info->rttr) == 0) {
207 writel_relaxed(RTC_DEF_DIVIDER + (RTC_DEF_TRIM << 16), info->rttr);
Russell Kinga0164a52012-01-19 11:55:21 +0000208 dev_warn(&pdev->dev, "warning: "
209 "initializing default clock divider/trim value\n");
Richard Purdiee842f1c2006-03-27 01:16:46 -0800210 /* The current RTC value probably doesn't make sense either */
Rob Herring90d0ae82015-02-03 14:44:51 -0600211 writel_relaxed(0, info->rcnr);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800212 }
213
Jingoo Han55d735e2013-04-29 16:20:54 -0700214 rtc = devm_rtc_device_register(&pdev->dev, pdev->name, &sa1100_rtc_ops,
215 THIS_MODULE);
Haojian Zhuang3888c092012-02-21 11:51:13 +0800216 if (IS_ERR(rtc)) {
Rob Herring8c0961b2015-05-12 16:23:23 -0500217 clk_disable_unprepare(info->clk);
218 return PTR_ERR(rtc);
Haojian Zhuang3888c092012-02-21 11:51:13 +0800219 }
220 info->rtc = rtc;
Russell Kinga0164a52012-01-19 11:55:21 +0000221
Alexandre Belloni512053a2017-08-23 01:48:35 +0200222 rtc->max_user_freq = RTC_FREQ;
Alexandre Belloni512053a2017-08-23 01:48:35 +0200223
Marcelo Roberto Jimenez7decaa52010-10-18 22:35:54 +0100224 /* Fix for a nasty initialization problem the in SA11xx RTSR register.
225 * See also the comments in sa1100_rtc_interrupt().
226 *
227 * Sometimes bit 1 of the RTSR (RTSR_HZ) will wake up 1, which means an
228 * interrupt pending, even though interrupts were never enabled.
229 * In this case, this bit it must be reset before enabling
230 * interruptions to avoid a nonexistent interrupt to occur.
231 *
232 * In principle, the same problem would apply to bit 0, although it has
233 * never been observed to happen.
234 *
235 * This issue is addressed both here and in sa1100_rtc_interrupt().
236 * If the issue is not addressed here, in the times when the processor
237 * wakes up with the bit set there will be one spurious interrupt.
238 *
239 * The issue is also dealt with in sa1100_rtc_interrupt() to be on the
240 * safe side, once the condition that lead to this strange
241 * initialization is unknown and could in principle happen during
242 * normal processing.
243 *
244 * Notice that clearing bit 1 and 0 is accomplished by writting ONES to
245 * the corresponding bits in RTSR. */
Rob Herring90d0ae82015-02-03 14:44:51 -0600246 writel_relaxed(RTSR_AL | RTSR_HZ, info->rtsr);
Marcelo Roberto Jimenez7decaa52010-10-18 22:35:54 +0100247
Richard Purdiee842f1c2006-03-27 01:16:46 -0800248 return 0;
Rob Herring8c0961b2015-05-12 16:23:23 -0500249}
250EXPORT_SYMBOL_GPL(sa1100_rtc_init);
251
252static int sa1100_rtc_probe(struct platform_device *pdev)
253{
254 struct sa1100_rtc *info;
Rob Herring90d0ae82015-02-03 14:44:51 -0600255 struct resource *iores;
256 void __iomem *base;
Rob Herring8c0961b2015-05-12 16:23:23 -0500257 int irq_1hz, irq_alarm;
Alexandre Belloni512053a2017-08-23 01:48:35 +0200258 int ret;
Rob Herring8c0961b2015-05-12 16:23:23 -0500259
260 irq_1hz = platform_get_irq_byname(pdev, "rtc 1Hz");
261 irq_alarm = platform_get_irq_byname(pdev, "rtc alarm");
262 if (irq_1hz < 0 || irq_alarm < 0)
263 return -ENODEV;
264
265 info = devm_kzalloc(&pdev->dev, sizeof(struct sa1100_rtc), GFP_KERNEL);
266 if (!info)
267 return -ENOMEM;
268 info->irq_1hz = irq_1hz;
269 info->irq_alarm = irq_alarm;
270
Alexandre Belloni512053a2017-08-23 01:48:35 +0200271 ret = devm_request_irq(&pdev->dev, irq_1hz, sa1100_rtc_interrupt, 0,
272 "rtc 1Hz", &pdev->dev);
273 if (ret) {
274 dev_err(&pdev->dev, "IRQ %d already in use.\n", irq_1hz);
275 return ret;
276 }
277 ret = devm_request_irq(&pdev->dev, irq_alarm, sa1100_rtc_interrupt, 0,
278 "rtc Alrm", &pdev->dev);
279 if (ret) {
280 dev_err(&pdev->dev, "IRQ %d already in use.\n", irq_alarm);
281 return ret;
282 }
283
Rob Herring90d0ae82015-02-03 14:44:51 -0600284 iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
285 base = devm_ioremap_resource(&pdev->dev, iores);
286 if (IS_ERR(base))
287 return PTR_ERR(base);
288
289 if (IS_ENABLED(CONFIG_ARCH_SA1100) ||
290 of_device_is_compatible(pdev->dev.of_node, "mrvl,sa1100-rtc")) {
291 info->rcnr = base + 0x04;
292 info->rtsr = base + 0x10;
293 info->rtar = base + 0x00;
294 info->rttr = base + 0x08;
295 } else {
296 info->rcnr = base + 0x0;
297 info->rtsr = base + 0x8;
298 info->rtar = base + 0x4;
299 info->rttr = base + 0xc;
300 }
301
Rob Herring8c0961b2015-05-12 16:23:23 -0500302 platform_set_drvdata(pdev, info);
303 device_init_wakeup(&pdev->dev, 1);
304
305 return sa1100_rtc_init(pdev, info);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800306}
307
308static int sa1100_rtc_remove(struct platform_device *pdev)
309{
Haojian Zhuang3888c092012-02-21 11:51:13 +0800310 struct sa1100_rtc *info = platform_get_drvdata(pdev);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800311
Alexandre Belloni512053a2017-08-23 01:48:35 +0200312 if (info) {
313 spin_lock_irq(&info->lock);
314 writel_relaxed(0, info->rtsr);
315 spin_unlock_irq(&info->lock);
Chao Xie0cc0c382013-02-21 16:45:17 -0800316 clk_disable_unprepare(info->clk);
Alexandre Belloni512053a2017-08-23 01:48:35 +0200317 }
Russell Kinga0164a52012-01-19 11:55:21 +0000318
Richard Purdiee842f1c2006-03-27 01:16:46 -0800319 return 0;
320}
321
Jingoo Hanaaa92fa2013-04-29 16:19:59 -0700322#ifdef CONFIG_PM_SLEEP
Haojian Zhuang5d027cd2009-07-21 14:31:09 +0800323static int sa1100_rtc_suspend(struct device *dev)
Russell King6bc54e62007-11-12 22:49:58 +0000324{
Haojian Zhuang3888c092012-02-21 11:51:13 +0800325 struct sa1100_rtc *info = dev_get_drvdata(dev);
Haojian Zhuang5d027cd2009-07-21 14:31:09 +0800326 if (device_may_wakeup(dev))
Haojian Zhuang3888c092012-02-21 11:51:13 +0800327 enable_irq_wake(info->irq_alarm);
Russell King6bc54e62007-11-12 22:49:58 +0000328 return 0;
329}
330
Haojian Zhuang5d027cd2009-07-21 14:31:09 +0800331static int sa1100_rtc_resume(struct device *dev)
Russell King6bc54e62007-11-12 22:49:58 +0000332{
Haojian Zhuang3888c092012-02-21 11:51:13 +0800333 struct sa1100_rtc *info = dev_get_drvdata(dev);
Haojian Zhuang5d027cd2009-07-21 14:31:09 +0800334 if (device_may_wakeup(dev))
Haojian Zhuang3888c092012-02-21 11:51:13 +0800335 disable_irq_wake(info->irq_alarm);
Russell King6bc54e62007-11-12 22:49:58 +0000336 return 0;
337}
Russell King6bc54e62007-11-12 22:49:58 +0000338#endif
339
Jingoo Hanaaa92fa2013-04-29 16:19:59 -0700340static SIMPLE_DEV_PM_OPS(sa1100_rtc_pm_ops, sa1100_rtc_suspend,
341 sa1100_rtc_resume);
342
Sachin Kamatc8a60462013-02-21 16:44:28 -0800343#ifdef CONFIG_OF
Jingoo Handee21a62014-06-06 14:36:13 -0700344static const struct of_device_id sa1100_rtc_dt_ids[] = {
Haojian Zhuang8bec2e92012-03-05 19:26:42 +0800345 { .compatible = "mrvl,sa1100-rtc", },
346 { .compatible = "mrvl,mmp-rtc", },
347 {}
348};
349MODULE_DEVICE_TABLE(of, sa1100_rtc_dt_ids);
Sachin Kamatc8a60462013-02-21 16:44:28 -0800350#endif
Haojian Zhuang8bec2e92012-03-05 19:26:42 +0800351
Richard Purdiee842f1c2006-03-27 01:16:46 -0800352static struct platform_driver sa1100_rtc_driver = {
353 .probe = sa1100_rtc_probe,
354 .remove = sa1100_rtc_remove,
Richard Purdiee842f1c2006-03-27 01:16:46 -0800355 .driver = {
Haojian Zhuang5d027cd2009-07-21 14:31:09 +0800356 .name = "sa1100-rtc",
Haojian Zhuang5d027cd2009-07-21 14:31:09 +0800357 .pm = &sa1100_rtc_pm_ops,
Sachin Kamatc8a60462013-02-21 16:44:28 -0800358 .of_match_table = of_match_ptr(sa1100_rtc_dt_ids),
Richard Purdiee842f1c2006-03-27 01:16:46 -0800359 },
360};
361
Axel Lin0c4eae62012-01-10 15:10:48 -0800362module_platform_driver(sa1100_rtc_driver);
Richard Purdiee842f1c2006-03-27 01:16:46 -0800363
364MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
365MODULE_DESCRIPTION("SA11x0/PXA2xx Realtime Clock Driver (RTC)");
366MODULE_LICENSE("GPL");
Kay Sieversad28a072008-04-10 21:29:25 -0700367MODULE_ALIAS("platform:sa1100-rtc");