Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

rtc-mxc.c File Reference


Detailed Description

Real Time Clock interface.

This file contains Real Time Clock interface for Linux.

Definition in file rtc-mxc.c.

#include <linux/rtc.h>
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/uaccess.h>
#include <mach/hardware.h>

Go to the source code of this file.

Classes

struct  rtc_plat_data

Defines

#define MAX_PIE_FREQ   512
#define MAX_PIE_NUM   9
#define MXC_EXTERNAL_RTC_ERR   -1
#define MXC_EXTERNAL_RTC_NONE   -2
#define MXC_EXTERNAL_RTC_OK   0
#define MXC_RTC_ALARM   1
#define MXC_RTC_TIME   0
#define PIT_ALL_ON
#define RTC_1HZ_BIT   (1 << 4)
#define RTC_2HZ_BIT   (1 << 7)
#define RTC_AF   0x20
#define RTC_ALM_BIT   (1 << 2)
#define RTC_ALRM_HM   0x08
#define RTC_ALRM_SEC   0x0C
#define RTC_DAYALARM   0x24
#define RTC_DAYR   0x20
#define RTC_ENABLE_BIT   (1 << 7)
#define RTC_HOURMIN   0x00
#define RTC_INPUT_CLK_32000HZ   (0x01 << 5)
#define RTC_INPUT_CLK_32768HZ   (0x00 << 5)
#define RTC_INPUT_CLK_38400HZ   (0x02 << 5)
#define RTC_IRQF   0x80
#define RTC_PF   0x40
#define RTC_RTCCTL   0x10
#define RTC_RTCIENR   0x18
#define RTC_RTCISR   0x14
#define RTC_SAM0_BIT   (1 << 8)
#define RTC_SAM1_BIT   (1 << 9)
#define RTC_SAM2_BIT   (1 << 10)
#define RTC_SAM3_BIT   (1 << 11)
#define RTC_SAM4_BIT   (1 << 12)
#define RTC_SAM5_BIT   (1 << 13)
#define RTC_SAM6_BIT   (1 << 14)
#define RTC_SAM7_BIT   (1 << 15)
#define RTC_SECOND   0x04
#define RTC_STPWCH   0x1C
#define RTC_SW_BIT   (1 << 0)
#define RTC_TEST1   0x28
#define RTC_TEST2   0x2C
#define RTC_TEST3   0x30
#define RTC_UF   0x10
#define RTC_VERSION   "1.0"

Functions

static DEFINE_SPINLOCK (rtc_lock)
 device_initcall_sync (mxc_rtc_init)
static u32 get_alarm_or_time (struct device *dev, int time_alarm)
 MODULE_AUTHOR ("Freescale Semiconductor, Inc.")
 MODULE_DESCRIPTION ("Realtime Clock Driver (RTC)")
 module_exit (mxc_rtc_exit)
 MODULE_LICENSE ("GPL")
static void __exit mxc_rtc_exit (void)
static int __init mxc_rtc_init (void)
static irqreturn_t mxc_rtc_interrupt (int irq, void *dev_id)
static int mxc_rtc_ioctl (struct device *dev, unsigned int cmd, unsigned long arg)
static int mxc_rtc_open (struct device *dev)
static int mxc_rtc_probe (struct platform_device *pdev)
static int mxc_rtc_proc (struct device *dev, struct seq_file *sq)
static int mxc_rtc_read_alarm (struct device *dev, struct rtc_wkalrm *alrm)
static int mxc_rtc_read_time (struct device *dev, struct rtc_time *tm)
static void mxc_rtc_release (struct device *dev)
static int __exit mxc_rtc_remove (struct platform_device *pdev)
static int mxc_rtc_resume (struct platform_device *pdev)
static int mxc_rtc_set_alarm (struct device *dev, struct rtc_wkalrm *alrm)
static int mxc_rtc_set_time (struct device *dev, struct rtc_time *tm)
static int mxc_rtc_suspend (struct platform_device *pdev, pm_message_t state)
static int rtc_update_alarm (struct device *dev, struct rtc_time *alrm)
static void set_alarm_or_time (struct device *dev, int time_alarm, u32 time)

Variables

static struct rtc_time g_rtc_alarm
static struct timespec mxc_rtc_delta
static struct platform_driver mxc_rtc_driver
static struct rtc_class_ops mxc_rtc_ops
const u32 PIE_BIT_DEF [MAX_PIE_NUM][2]
static u32 rtc_freq = 2
static unsigned long rtc_status


Generated by  Doxygen 1.6.0   Back to index