Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtc-davinci.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/rtc.h>
#include <linux/bcd.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/slab.h>

Go to the source code of this file.

Data Structures

struct  davinci_rtc
 

Macros

#define DAVINCI_PRTCIF_PID   0x00
 
#define PRTCIF_CTLR   0x04
 
#define PRTCIF_LDATA   0x08
 
#define PRTCIF_UDATA   0x0C
 
#define PRTCIF_INTEN   0x10
 
#define PRTCIF_INTFLG   0x14
 
#define PRTCIF_CTLR_BUSY   BIT(31)
 
#define PRTCIF_CTLR_SIZE   BIT(25)
 
#define PRTCIF_CTLR_DIR   BIT(24)
 
#define PRTCIF_CTLR_BENU_MSB   BIT(23)
 
#define PRTCIF_CTLR_BENU_3RD_BYTE   BIT(22)
 
#define PRTCIF_CTLR_BENU_2ND_BYTE   BIT(21)
 
#define PRTCIF_CTLR_BENU_LSB   BIT(20)
 
#define PRTCIF_CTLR_BENU_MASK   (0x00F00000)
 
#define PRTCIF_CTLR_BENL_MSB   BIT(19)
 
#define PRTCIF_CTLR_BENL_3RD_BYTE   BIT(18)
 
#define PRTCIF_CTLR_BENL_2ND_BYTE   BIT(17)
 
#define PRTCIF_CTLR_BENL_LSB   BIT(16)
 
#define PRTCIF_CTLR_BENL_MASK   (0x000F0000)
 
#define PRTCIF_INTEN_RTCSS   BIT(1)
 
#define PRTCIF_INTEN_RTCIF   BIT(0)
 
#define PRTCIF_INTEN_MASK
 
#define PRTCIF_INTFLG_RTCSS   BIT(1)
 
#define PRTCIF_INTFLG_RTCIF   BIT(0)
 
#define PRTCIF_INTFLG_MASK
 
#define PRTCSS_RTC_INTC_EXTENA1   (0x0C)
 
#define PRTCSS_RTC_CTRL   (0x10)
 
#define PRTCSS_RTC_WDT   (0x11)
 
#define PRTCSS_RTC_TMR0   (0x12)
 
#define PRTCSS_RTC_TMR1   (0x13)
 
#define PRTCSS_RTC_CCTRL   (0x14)
 
#define PRTCSS_RTC_SEC   (0x15)
 
#define PRTCSS_RTC_MIN   (0x16)
 
#define PRTCSS_RTC_HOUR   (0x17)
 
#define PRTCSS_RTC_DAY0   (0x18)
 
#define PRTCSS_RTC_DAY1   (0x19)
 
#define PRTCSS_RTC_AMIN   (0x1A)
 
#define PRTCSS_RTC_AHOUR   (0x1B)
 
#define PRTCSS_RTC_ADAY0   (0x1C)
 
#define PRTCSS_RTC_ADAY1   (0x1D)
 
#define PRTCSS_RTC_CLKC_CNT   (0x20)
 
#define PRTCSS_RTC_INTC_EXTENA1_MASK   (0x07)
 
#define PRTCSS_RTC_CTRL_WDTBUS   BIT(7)
 
#define PRTCSS_RTC_CTRL_WEN   BIT(6)
 
#define PRTCSS_RTC_CTRL_WDRT   BIT(5)
 
#define PRTCSS_RTC_CTRL_WDTFLG   BIT(4)
 
#define PRTCSS_RTC_CTRL_TE   BIT(3)
 
#define PRTCSS_RTC_CTRL_TIEN   BIT(2)
 
#define PRTCSS_RTC_CTRL_TMRFLG   BIT(1)
 
#define PRTCSS_RTC_CTRL_TMMD   BIT(0)
 
#define PRTCSS_RTC_CCTRL_CALBUSY   BIT(7)
 
#define PRTCSS_RTC_CCTRL_DAEN   BIT(5)
 
#define PRTCSS_RTC_CCTRL_HAEN   BIT(4)
 
#define PRTCSS_RTC_CCTRL_MAEN   BIT(3)
 
#define PRTCSS_RTC_CCTRL_ALMFLG   BIT(2)
 
#define PRTCSS_RTC_CCTRL_AIEN   BIT(1)
 
#define PRTCSS_RTC_CCTRL_CAEN   BIT(0)
 

Functions

 module_init (rtc_init)
 
 module_exit (rtc_exit)
 
 MODULE_AUTHOR ("Miguel Aguilar <[email protected]>")
 
 MODULE_DESCRIPTION ("Texas Instruments DaVinci PRTC Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DAVINCI_PRTCIF_PID   0x00

Definition at line 43 of file rtc-davinci.c.

#define PRTCIF_CTLR   0x04

Definition at line 44 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENL_2ND_BYTE   BIT(17)

Definition at line 61 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENL_3RD_BYTE   BIT(18)

Definition at line 60 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENL_LSB   BIT(16)

Definition at line 62 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENL_MASK   (0x000F0000)

Definition at line 63 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENL_MSB   BIT(19)

Definition at line 59 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENU_2ND_BYTE   BIT(21)

Definition at line 56 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENU_3RD_BYTE   BIT(22)

Definition at line 55 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENU_LSB   BIT(20)

Definition at line 57 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENU_MASK   (0x00F00000)

Definition at line 58 of file rtc-davinci.c.

#define PRTCIF_CTLR_BENU_MSB   BIT(23)

Definition at line 54 of file rtc-davinci.c.

#define PRTCIF_CTLR_BUSY   BIT(31)

Definition at line 51 of file rtc-davinci.c.

#define PRTCIF_CTLR_DIR   BIT(24)

Definition at line 53 of file rtc-davinci.c.

#define PRTCIF_CTLR_SIZE   BIT(25)

Definition at line 52 of file rtc-davinci.c.

#define PRTCIF_INTEN   0x10

Definition at line 47 of file rtc-davinci.c.

#define PRTCIF_INTEN_MASK
Value:

Definition at line 68 of file rtc-davinci.c.

#define PRTCIF_INTEN_RTCIF   BIT(0)

Definition at line 67 of file rtc-davinci.c.

#define PRTCIF_INTEN_RTCSS   BIT(1)

Definition at line 66 of file rtc-davinci.c.

#define PRTCIF_INTFLG   0x14

Definition at line 48 of file rtc-davinci.c.

#define PRTCIF_INTFLG_MASK
Value:

Definition at line 74 of file rtc-davinci.c.

#define PRTCIF_INTFLG_RTCIF   BIT(0)

Definition at line 73 of file rtc-davinci.c.

#define PRTCIF_INTFLG_RTCSS   BIT(1)

Definition at line 72 of file rtc-davinci.c.

#define PRTCIF_LDATA   0x08

Definition at line 45 of file rtc-davinci.c.

#define PRTCIF_UDATA   0x0C

Definition at line 46 of file rtc-davinci.c.

#define PRTCSS_RTC_ADAY0   (0x1C)

Definition at line 91 of file rtc-davinci.c.

#define PRTCSS_RTC_ADAY1   (0x1D)

Definition at line 92 of file rtc-davinci.c.

#define PRTCSS_RTC_AHOUR   (0x1B)

Definition at line 90 of file rtc-davinci.c.

#define PRTCSS_RTC_AMIN   (0x1A)

Definition at line 89 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL   (0x14)

Definition at line 83 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL_AIEN   BIT(1)

Definition at line 114 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL_ALMFLG   BIT(2)

Definition at line 113 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL_CAEN   BIT(0)

Definition at line 115 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL_CALBUSY   BIT(7)

Definition at line 109 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL_DAEN   BIT(5)

Definition at line 110 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL_HAEN   BIT(4)

Definition at line 111 of file rtc-davinci.c.

#define PRTCSS_RTC_CCTRL_MAEN   BIT(3)

Definition at line 112 of file rtc-davinci.c.

#define PRTCSS_RTC_CLKC_CNT   (0x20)

Definition at line 93 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL   (0x10)

Definition at line 79 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_TE   BIT(3)

Definition at line 103 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_TIEN   BIT(2)

Definition at line 104 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_TMMD   BIT(0)

Definition at line 106 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_TMRFLG   BIT(1)

Definition at line 105 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_WDRT   BIT(5)

Definition at line 101 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_WDTBUS   BIT(7)

Definition at line 99 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_WDTFLG   BIT(4)

Definition at line 102 of file rtc-davinci.c.

#define PRTCSS_RTC_CTRL_WEN   BIT(6)

Definition at line 100 of file rtc-davinci.c.

#define PRTCSS_RTC_DAY0   (0x18)

Definition at line 87 of file rtc-davinci.c.

#define PRTCSS_RTC_DAY1   (0x19)

Definition at line 88 of file rtc-davinci.c.

#define PRTCSS_RTC_HOUR   (0x17)

Definition at line 86 of file rtc-davinci.c.

#define PRTCSS_RTC_INTC_EXTENA1   (0x0C)

Definition at line 78 of file rtc-davinci.c.

#define PRTCSS_RTC_INTC_EXTENA1_MASK   (0x07)

Definition at line 96 of file rtc-davinci.c.

#define PRTCSS_RTC_MIN   (0x16)

Definition at line 85 of file rtc-davinci.c.

#define PRTCSS_RTC_SEC   (0x15)

Definition at line 84 of file rtc-davinci.c.

#define PRTCSS_RTC_TMR0   (0x12)

Definition at line 81 of file rtc-davinci.c.

#define PRTCSS_RTC_TMR1   (0x13)

Definition at line 82 of file rtc-davinci.c.

#define PRTCSS_RTC_WDT   (0x11)

Definition at line 80 of file rtc-davinci.c.

Function Documentation

MODULE_AUTHOR ( "Miguel Aguilar <[email protected]>"  )
MODULE_DESCRIPTION ( "Texas Instruments DaVinci PRTC Driver"  )
module_exit ( rtc_exit  )
module_init ( rtc_init  )
MODULE_LICENSE ( "GPL"  )