2019-03-15 16:35:08 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2009-01-07 01:42:24 +03:00
|
|
|
/*
|
|
|
|
* Driver for the RTC in Marvell SoCs.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/rtc.h>
|
|
|
|
#include <linux/bcd.h>
|
2015-06-08 17:16:14 +03:00
|
|
|
#include <linux/bitops.h>
|
2009-01-07 01:42:24 +03:00
|
|
|
#include <linux/io.h>
|
|
|
|
#include <linux/platform_device.h>
|
2012-03-07 03:53:57 +04:00
|
|
|
#include <linux/of.h>
|
2009-03-24 03:42:29 +03:00
|
|
|
#include <linux/delay.h>
|
2013-02-03 15:32:06 +04:00
|
|
|
#include <linux/clk.h>
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 11:04:11 +03:00
|
|
|
#include <linux/gfp.h>
|
2011-05-27 17:57:25 +04:00
|
|
|
#include <linux/module.h>
|
2009-01-07 01:42:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
#define RTC_TIME_REG_OFFS 0
|
|
|
|
#define RTC_SECONDS_OFFS 0
|
|
|
|
#define RTC_MINUTES_OFFS 8
|
|
|
|
#define RTC_HOURS_OFFS 16
|
|
|
|
#define RTC_WDAY_OFFS 24
|
2015-06-08 17:16:14 +03:00
|
|
|
#define RTC_HOURS_12H_MODE BIT(22) /* 12 hour mode */
|
2009-01-07 01:42:24 +03:00
|
|
|
|
|
|
|
#define RTC_DATE_REG_OFFS 4
|
|
|
|
#define RTC_MDAY_OFFS 0
|
|
|
|
#define RTC_MONTH_OFFS 8
|
|
|
|
#define RTC_YEAR_OFFS 16
|
|
|
|
|
2009-12-16 03:46:08 +03:00
|
|
|
#define RTC_ALARM_TIME_REG_OFFS 8
|
|
|
|
#define RTC_ALARM_DATE_REG_OFFS 0xc
|
2015-06-08 17:16:14 +03:00
|
|
|
#define RTC_ALARM_VALID BIT(7)
|
2009-12-16 03:46:08 +03:00
|
|
|
|
|
|
|
#define RTC_ALARM_INTERRUPT_MASK_REG_OFFS 0x10
|
|
|
|
#define RTC_ALARM_INTERRUPT_CASUE_REG_OFFS 0x14
|
2009-01-07 01:42:24 +03:00
|
|
|
|
|
|
|
struct rtc_plat_data {
|
|
|
|
struct rtc_device *rtc;
|
|
|
|
void __iomem *ioaddr;
|
2009-12-16 03:46:08 +03:00
|
|
|
int irq;
|
2013-02-03 15:32:06 +04:00
|
|
|
struct clk *clk;
|
2009-01-07 01:42:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
static int mv_rtc_set_time(struct device *dev, struct rtc_time *tm)
|
|
|
|
{
|
|
|
|
struct rtc_plat_data *pdata = dev_get_drvdata(dev);
|
|
|
|
void __iomem *ioaddr = pdata->ioaddr;
|
|
|
|
u32 rtc_reg;
|
|
|
|
|
|
|
|
rtc_reg = (bin2bcd(tm->tm_sec) << RTC_SECONDS_OFFS) |
|
|
|
|
(bin2bcd(tm->tm_min) << RTC_MINUTES_OFFS) |
|
|
|
|
(bin2bcd(tm->tm_hour) << RTC_HOURS_OFFS) |
|
|
|
|
(bin2bcd(tm->tm_wday) << RTC_WDAY_OFFS);
|
|
|
|
writel(rtc_reg, ioaddr + RTC_TIME_REG_OFFS);
|
|
|
|
|
|
|
|
rtc_reg = (bin2bcd(tm->tm_mday) << RTC_MDAY_OFFS) |
|
|
|
|
(bin2bcd(tm->tm_mon + 1) << RTC_MONTH_OFFS) |
|
|
|
|
(bin2bcd(tm->tm_year % 100) << RTC_YEAR_OFFS);
|
|
|
|
writel(rtc_reg, ioaddr + RTC_DATE_REG_OFFS);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int mv_rtc_read_time(struct device *dev, struct rtc_time *tm)
|
|
|
|
{
|
|
|
|
struct rtc_plat_data *pdata = dev_get_drvdata(dev);
|
|
|
|
void __iomem *ioaddr = pdata->ioaddr;
|
|
|
|
u32 rtc_time, rtc_date;
|
|
|
|
unsigned int year, month, day, hour, minute, second, wday;
|
|
|
|
|
|
|
|
rtc_time = readl(ioaddr + RTC_TIME_REG_OFFS);
|
|
|
|
rtc_date = readl(ioaddr + RTC_DATE_REG_OFFS);
|
|
|
|
|
|
|
|
second = rtc_time & 0x7f;
|
|
|
|
minute = (rtc_time >> RTC_MINUTES_OFFS) & 0x7f;
|
2015-06-08 17:16:15 +03:00
|
|
|
hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hour mode */
|
2009-01-07 01:42:24 +03:00
|
|
|
wday = (rtc_time >> RTC_WDAY_OFFS) & 0x7;
|
|
|
|
|
|
|
|
day = rtc_date & 0x3f;
|
|
|
|
month = (rtc_date >> RTC_MONTH_OFFS) & 0x3f;
|
|
|
|
year = (rtc_date >> RTC_YEAR_OFFS) & 0xff;
|
|
|
|
|
|
|
|
tm->tm_sec = bcd2bin(second);
|
|
|
|
tm->tm_min = bcd2bin(minute);
|
|
|
|
tm->tm_hour = bcd2bin(hour);
|
|
|
|
tm->tm_mday = bcd2bin(day);
|
|
|
|
tm->tm_wday = bcd2bin(wday);
|
|
|
|
tm->tm_mon = bcd2bin(month) - 1;
|
|
|
|
/* hw counts from year 2000, but tm_year is relative to 1900 */
|
|
|
|
tm->tm_year = bcd2bin(year) + 100;
|
|
|
|
|
2018-02-19 18:23:56 +03:00
|
|
|
return 0;
|
2009-01-07 01:42:24 +03:00
|
|
|
}
|
|
|
|
|
2009-12-16 03:46:08 +03:00
|
|
|
static int mv_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm)
|
|
|
|
{
|
|
|
|
struct rtc_plat_data *pdata = dev_get_drvdata(dev);
|
|
|
|
void __iomem *ioaddr = pdata->ioaddr;
|
|
|
|
u32 rtc_time, rtc_date;
|
|
|
|
unsigned int year, month, day, hour, minute, second, wday;
|
|
|
|
|
|
|
|
rtc_time = readl(ioaddr + RTC_ALARM_TIME_REG_OFFS);
|
|
|
|
rtc_date = readl(ioaddr + RTC_ALARM_DATE_REG_OFFS);
|
|
|
|
|
|
|
|
second = rtc_time & 0x7f;
|
|
|
|
minute = (rtc_time >> RTC_MINUTES_OFFS) & 0x7f;
|
2015-06-08 17:16:15 +03:00
|
|
|
hour = (rtc_time >> RTC_HOURS_OFFS) & 0x3f; /* assume 24 hour mode */
|
2009-12-16 03:46:08 +03:00
|
|
|
wday = (rtc_time >> RTC_WDAY_OFFS) & 0x7;
|
|
|
|
|
|
|
|
day = rtc_date & 0x3f;
|
|
|
|
month = (rtc_date >> RTC_MONTH_OFFS) & 0x3f;
|
|
|
|
year = (rtc_date >> RTC_YEAR_OFFS) & 0xff;
|
|
|
|
|
|
|
|
alm->time.tm_sec = bcd2bin(second);
|
|
|
|
alm->time.tm_min = bcd2bin(minute);
|
|
|
|
alm->time.tm_hour = bcd2bin(hour);
|
|
|
|
alm->time.tm_mday = bcd2bin(day);
|
|
|
|
alm->time.tm_wday = bcd2bin(wday);
|
|
|
|
alm->time.tm_mon = bcd2bin(month) - 1;
|
|
|
|
/* hw counts from year 2000, but tm_year is relative to 1900 */
|
|
|
|
alm->time.tm_year = bcd2bin(year) + 100;
|
|
|
|
|
|
|
|
alm->enabled = !!readl(ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS);
|
2018-10-02 01:05:25 +03:00
|
|
|
|
|
|
|
return rtc_valid_tm(&alm->time);
|
2009-12-16 03:46:08 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static int mv_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
|
|
|
|
{
|
|
|
|
struct rtc_plat_data *pdata = dev_get_drvdata(dev);
|
|
|
|
void __iomem *ioaddr = pdata->ioaddr;
|
|
|
|
u32 rtc_reg = 0;
|
|
|
|
|
|
|
|
if (alm->time.tm_sec >= 0)
|
|
|
|
rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_sec))
|
|
|
|
<< RTC_SECONDS_OFFS;
|
|
|
|
if (alm->time.tm_min >= 0)
|
|
|
|
rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_min))
|
|
|
|
<< RTC_MINUTES_OFFS;
|
|
|
|
if (alm->time.tm_hour >= 0)
|
|
|
|
rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_hour))
|
|
|
|
<< RTC_HOURS_OFFS;
|
|
|
|
|
|
|
|
writel(rtc_reg, ioaddr + RTC_ALARM_TIME_REG_OFFS);
|
|
|
|
|
|
|
|
if (alm->time.tm_mday >= 0)
|
|
|
|
rtc_reg = (RTC_ALARM_VALID | bin2bcd(alm->time.tm_mday))
|
|
|
|
<< RTC_MDAY_OFFS;
|
|
|
|
else
|
|
|
|
rtc_reg = 0;
|
|
|
|
|
|
|
|
if (alm->time.tm_mon >= 0)
|
|
|
|
rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_mon + 1))
|
|
|
|
<< RTC_MONTH_OFFS;
|
|
|
|
|
|
|
|
if (alm->time.tm_year >= 0)
|
|
|
|
rtc_reg |= (RTC_ALARM_VALID | bin2bcd(alm->time.tm_year % 100))
|
|
|
|
<< RTC_YEAR_OFFS;
|
|
|
|
|
|
|
|
writel(rtc_reg, ioaddr + RTC_ALARM_DATE_REG_OFFS);
|
|
|
|
writel(0, ioaddr + RTC_ALARM_INTERRUPT_CASUE_REG_OFFS);
|
|
|
|
writel(alm->enabled ? 1 : 0,
|
|
|
|
ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-02-03 04:02:41 +03:00
|
|
|
static int mv_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled)
|
2009-12-16 03:46:08 +03:00
|
|
|
{
|
2018-04-19 17:06:14 +03:00
|
|
|
struct rtc_plat_data *pdata = dev_get_drvdata(dev);
|
2009-12-16 03:46:08 +03:00
|
|
|
void __iomem *ioaddr = pdata->ioaddr;
|
|
|
|
|
|
|
|
if (pdata->irq < 0)
|
2011-02-03 04:02:41 +03:00
|
|
|
return -EINVAL; /* fall back into rtc-dev's emulation */
|
|
|
|
|
|
|
|
if (enabled)
|
2009-12-16 03:46:08 +03:00
|
|
|
writel(1, ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS);
|
2011-02-03 04:02:41 +03:00
|
|
|
else
|
|
|
|
writel(0, ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS);
|
2009-12-16 03:46:08 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static irqreturn_t mv_rtc_interrupt(int irq, void *data)
|
|
|
|
{
|
|
|
|
struct rtc_plat_data *pdata = data;
|
|
|
|
void __iomem *ioaddr = pdata->ioaddr;
|
|
|
|
|
|
|
|
/* alarm irq? */
|
|
|
|
if (!readl(ioaddr + RTC_ALARM_INTERRUPT_CASUE_REG_OFFS))
|
|
|
|
return IRQ_NONE;
|
|
|
|
|
|
|
|
/* clear interrupt */
|
|
|
|
writel(0, ioaddr + RTC_ALARM_INTERRUPT_CASUE_REG_OFFS);
|
|
|
|
rtc_update_irq(pdata->rtc, 1, RTC_IRQF | RTC_AF);
|
|
|
|
return IRQ_HANDLED;
|
|
|
|
}
|
|
|
|
|
2009-01-07 01:42:24 +03:00
|
|
|
static const struct rtc_class_ops mv_rtc_ops = {
|
|
|
|
.read_time = mv_rtc_read_time,
|
|
|
|
.set_time = mv_rtc_set_time,
|
|
|
|
};
|
|
|
|
|
2009-12-16 03:46:08 +03:00
|
|
|
static const struct rtc_class_ops mv_rtc_alarm_ops = {
|
|
|
|
.read_time = mv_rtc_read_time,
|
|
|
|
.set_time = mv_rtc_set_time,
|
|
|
|
.read_alarm = mv_rtc_read_alarm,
|
|
|
|
.set_alarm = mv_rtc_set_alarm,
|
2011-02-03 04:02:41 +03:00
|
|
|
.alarm_irq_enable = mv_rtc_alarm_irq_enable,
|
2009-12-16 03:46:08 +03:00
|
|
|
};
|
|
|
|
|
2013-04-30 03:18:21 +04:00
|
|
|
static int __init mv_rtc_probe(struct platform_device *pdev)
|
2009-01-07 01:42:24 +03:00
|
|
|
{
|
|
|
|
struct resource *res;
|
|
|
|
struct rtc_plat_data *pdata;
|
|
|
|
u32 rtc_time;
|
2013-02-03 15:32:06 +04:00
|
|
|
int ret = 0;
|
2009-01-07 01:42:24 +03:00
|
|
|
|
|
|
|
pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
|
|
|
|
if (!pdata)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
2013-09-12 01:24:27 +04:00
|
|
|
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
|
pdata->ioaddr = devm_ioremap_resource(&pdev->dev, res);
|
|
|
|
if (IS_ERR(pdata->ioaddr))
|
|
|
|
return PTR_ERR(pdata->ioaddr);
|
2009-01-07 01:42:24 +03:00
|
|
|
|
2013-02-03 15:32:06 +04:00
|
|
|
pdata->clk = devm_clk_get(&pdev->dev, NULL);
|
|
|
|
/* Not all SoCs require a clock.*/
|
|
|
|
if (!IS_ERR(pdata->clk))
|
|
|
|
clk_prepare_enable(pdata->clk);
|
|
|
|
|
2015-06-08 17:16:15 +03:00
|
|
|
/* make sure the 24 hour mode is enabled */
|
2009-01-07 01:42:24 +03:00
|
|
|
rtc_time = readl(pdata->ioaddr + RTC_TIME_REG_OFFS);
|
|
|
|
if (rtc_time & RTC_HOURS_12H_MODE) {
|
2015-06-08 17:16:15 +03:00
|
|
|
dev_err(&pdev->dev, "12 Hour mode is enabled but not supported.\n");
|
2013-02-03 15:32:06 +04:00
|
|
|
ret = -EINVAL;
|
|
|
|
goto out;
|
2009-01-07 01:42:24 +03:00
|
|
|
}
|
|
|
|
|
2009-03-24 03:42:29 +03:00
|
|
|
/* make sure it is actually functional */
|
|
|
|
if (rtc_time == 0x01000000) {
|
|
|
|
ssleep(1);
|
|
|
|
rtc_time = readl(pdata->ioaddr + RTC_TIME_REG_OFFS);
|
|
|
|
if (rtc_time == 0x01000000) {
|
|
|
|
dev_err(&pdev->dev, "internal RTC not ticking\n");
|
2013-02-03 15:32:06 +04:00
|
|
|
ret = -ENODEV;
|
|
|
|
goto out;
|
2009-03-24 03:42:29 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-16 03:46:08 +03:00
|
|
|
pdata->irq = platform_get_irq(pdev, 0);
|
|
|
|
|
2009-01-07 01:42:24 +03:00
|
|
|
platform_set_drvdata(pdev, pdata);
|
2009-12-16 03:46:08 +03:00
|
|
|
|
|
|
|
if (pdata->irq >= 0) {
|
|
|
|
device_init_wakeup(&pdev->dev, 1);
|
2013-04-30 03:19:08 +04:00
|
|
|
pdata->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
2009-12-16 03:46:08 +03:00
|
|
|
&mv_rtc_alarm_ops,
|
|
|
|
THIS_MODULE);
|
2013-04-30 03:19:08 +04:00
|
|
|
} else {
|
|
|
|
pdata->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
|
2009-12-16 03:46:08 +03:00
|
|
|
&mv_rtc_ops, THIS_MODULE);
|
2013-04-30 03:19:08 +04:00
|
|
|
}
|
2013-02-03 15:32:06 +04:00
|
|
|
if (IS_ERR(pdata->rtc)) {
|
|
|
|
ret = PTR_ERR(pdata->rtc);
|
|
|
|
goto out;
|
|
|
|
}
|
2009-01-07 01:42:24 +03:00
|
|
|
|
2009-12-16 03:46:08 +03:00
|
|
|
if (pdata->irq >= 0) {
|
|
|
|
writel(0, pdata->ioaddr + RTC_ALARM_INTERRUPT_MASK_REG_OFFS);
|
|
|
|
if (devm_request_irq(&pdev->dev, pdata->irq, mv_rtc_interrupt,
|
2012-03-24 02:02:34 +04:00
|
|
|
IRQF_SHARED,
|
2009-12-16 03:46:08 +03:00
|
|
|
pdev->name, pdata) < 0) {
|
|
|
|
dev_warn(&pdev->dev, "interrupt not available.\n");
|
|
|
|
pdata->irq = -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-01-07 01:42:24 +03:00
|
|
|
return 0;
|
2013-02-03 15:32:06 +04:00
|
|
|
out:
|
|
|
|
if (!IS_ERR(pdata->clk))
|
|
|
|
clk_disable_unprepare(pdata->clk);
|
|
|
|
|
|
|
|
return ret;
|
2009-01-07 01:42:24 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static int __exit mv_rtc_remove(struct platform_device *pdev)
|
|
|
|
{
|
|
|
|
struct rtc_plat_data *pdata = platform_get_drvdata(pdev);
|
|
|
|
|
2009-12-16 03:46:08 +03:00
|
|
|
if (pdata->irq >= 0)
|
|
|
|
device_init_wakeup(&pdev->dev, 0);
|
|
|
|
|
2013-02-03 15:32:06 +04:00
|
|
|
if (!IS_ERR(pdata->clk))
|
|
|
|
clk_disable_unprepare(pdata->clk);
|
|
|
|
|
2009-01-07 01:42:24 +03:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-07 03:53:57 +04:00
|
|
|
#ifdef CONFIG_OF
|
2014-06-07 01:35:57 +04:00
|
|
|
static const struct of_device_id rtc_mv_of_match_table[] = {
|
2012-07-18 21:22:54 +04:00
|
|
|
{ .compatible = "marvell,orion-rtc", },
|
2012-03-07 03:53:57 +04:00
|
|
|
{}
|
|
|
|
};
|
2015-08-27 14:52:02 +03:00
|
|
|
MODULE_DEVICE_TABLE(of, rtc_mv_of_match_table);
|
2012-03-07 03:53:57 +04:00
|
|
|
#endif
|
|
|
|
|
2009-01-07 01:42:24 +03:00
|
|
|
static struct platform_driver mv_rtc_driver = {
|
|
|
|
.remove = __exit_p(mv_rtc_remove),
|
|
|
|
.driver = {
|
|
|
|
.name = "rtc-mv",
|
2012-03-07 03:53:57 +04:00
|
|
|
.of_match_table = of_match_ptr(rtc_mv_of_match_table),
|
2009-01-07 01:42:24 +03:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2013-04-30 03:18:44 +04:00
|
|
|
module_platform_driver_probe(mv_rtc_driver, mv_rtc_probe);
|
2009-01-07 01:42:24 +03:00
|
|
|
|
|
|
|
MODULE_AUTHOR("Saeed Bishara <saeed@marvell.com>");
|
|
|
|
MODULE_DESCRIPTION("Marvell RTC driver");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_ALIAS("platform:rtc-mv");
|