#include <linux/delay.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#define RTC_STATUS …
#define RTC_STATUS_ALARM1 …
#define RTC_STATUS_ALARM2 …
#define RTC_IRQ1_CONF …
#define RTC_IRQ2_CONF …
#define RTC_IRQ_AL_EN …
#define RTC_IRQ_FREQ_EN …
#define RTC_IRQ_FREQ_1HZ …
#define RTC_CCR …
#define RTC_CCR_MODE …
#define RTC_CONF_TEST …
#define RTC_NOMINAL_TIMING …
#define RTC_TIME …
#define RTC_ALARM1 …
#define RTC_ALARM2 …
#define RTC_38X_BRIDGE_TIMING_CTL …
#define RTC_38X_PERIOD_OFFS …
#define RTC_38X_PERIOD_MASK …
#define RTC_38X_READ_DELAY_OFFS …
#define RTC_38X_READ_DELAY_MASK …
#define RTC_8K_BRIDGE_TIMING_CTL0 …
#define RTC_8K_WRCLK_PERIOD_OFFS …
#define RTC_8K_WRCLK_PERIOD_MASK …
#define RTC_8K_WRCLK_SETUP_OFFS …
#define RTC_8K_WRCLK_SETUP_MASK …
#define RTC_8K_BRIDGE_TIMING_CTL1 …
#define RTC_8K_READ_DELAY_OFFS …
#define RTC_8K_READ_DELAY_MASK …
#define RTC_8K_ISR …
#define RTC_8K_IMR …
#define RTC_8K_ALARM2 …
#define SOC_RTC_INTERRUPT …
#define SOC_RTC_ALARM1 …
#define SOC_RTC_ALARM2 …
#define SOC_RTC_ALARM1_MASK …
#define SOC_RTC_ALARM2_MASK …
#define SAMPLE_NR …
struct value_to_freq { … };
struct armada38x_rtc { … };
#define ALARM1 …
#define ALARM2 …
#define ALARM_REG(base, alarm) …
struct armada38x_rtc_data { … };
static void rtc_delayed_write(u32 val, struct armada38x_rtc *rtc, int offset)
{ … }
static void rtc_update_38x_mbus_timing_params(struct armada38x_rtc *rtc)
{ … }
static void rtc_update_8k_mbus_timing_params(struct armada38x_rtc *rtc)
{ … }
static u32 read_rtc_register(struct armada38x_rtc *rtc, u8 rtc_reg)
{ … }
static u32 read_rtc_register_38x_wa(struct armada38x_rtc *rtc, u8 rtc_reg)
{ … }
static void armada38x_clear_isr(struct armada38x_rtc *rtc)
{ … }
static void armada38x_unmask_interrupt(struct armada38x_rtc *rtc)
{ … }
static void armada8k_clear_isr(struct armada38x_rtc *rtc)
{ … }
static void armada8k_unmask_interrupt(struct armada38x_rtc *rtc)
{ … }
static int armada38x_rtc_read_time(struct device *dev, struct rtc_time *tm)
{ … }
static void armada38x_rtc_reset(struct armada38x_rtc *rtc)
{ … }
static int armada38x_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ … }
static int armada38x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int armada38x_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
{ … }
static int armada38x_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{ … }
static irqreturn_t armada38x_rtc_alarm_irq(int irq, void *data)
{ … }
static long armada38x_ppb_convert(long ppb)
{ … }
static int armada38x_rtc_read_offset(struct device *dev, long *offset)
{ … }
static int armada38x_rtc_set_offset(struct device *dev, long offset)
{ … }
static const struct rtc_class_ops armada38x_rtc_ops = …;
static const struct armada38x_rtc_data armada38x_data = …;
static const struct armada38x_rtc_data armada8k_data = …;
static const struct of_device_id armada38x_rtc_of_match_table[] = …;
MODULE_DEVICE_TABLE(of, armada38x_rtc_of_match_table);
static __init int armada38x_rtc_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int armada38x_rtc_suspend(struct device *dev)
{ … }
static int armada38x_rtc_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(armada38x_rtc_pm_ops,
armada38x_rtc_suspend, armada38x_rtc_resume);
static struct platform_driver armada38x_rtc_driver = …;
module_platform_driver_probe(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;