Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
rtc-pxa.c File Reference
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/module.h>
#include <linux/rtc.h>
#include <linux/seq_file.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <mach/hardware.h>

Go to the source code of this file.

Data Structures

struct  pxa_rtc
 

Macros

#define TIMER_FREQ   CLOCK_TICK_RATE
 
#define RTC_DEF_DIVIDER   (32768 - 1)
 
#define RTC_DEF_TRIM   0
 
#define MAXFREQ_PERIODIC   1000
 
#define RTSR_PICE   (1 << 15) /* Periodic interrupt count enable */
 
#define RTSR_PIALE   (1 << 14) /* Periodic interrupt Alarm enable */
 
#define RTSR_PIAL   (1 << 13) /* Periodic interrupt detected */
 
#define RTSR_SWALE2   (1 << 11) /* RTC stopwatch alarm2 enable */
 
#define RTSR_SWAL2   (1 << 10) /* RTC stopwatch alarm2 detected */
 
#define RTSR_SWALE1   (1 << 9) /* RTC stopwatch alarm1 enable */
 
#define RTSR_SWAL1   (1 << 8) /* RTC stopwatch alarm1 detected */
 
#define RTSR_RDALE2   (1 << 7) /* RTC alarm2 enable */
 
#define RTSR_RDAL2   (1 << 6) /* RTC alarm2 detected */
 
#define RTSR_RDALE1   (1 << 5) /* RTC alarm1 enable */
 
#define RTSR_RDAL1   (1 << 4) /* RTC alarm1 detected */
 
#define RTSR_HZE   (1 << 3) /* HZ interrupt enable */
 
#define RTSR_ALE   (1 << 2) /* RTC alarm interrupt enable */
 
#define RTSR_HZ   (1 << 1) /* HZ rising-edge detected */
 
#define RTSR_AL   (1 << 0) /* RTC alarm detected */
 
#define RTSR_TRIG_MASK
 
#define RYxR_YEAR_S   9
 
#define RYxR_YEAR_MASK   (0xfff << RYxR_YEAR_S)
 
#define RYxR_MONTH_S   5
 
#define RYxR_MONTH_MASK   (0xf << RYxR_MONTH_S)
 
#define RYxR_DAY_MASK   0x1f
 
#define RDxR_HOUR_S   12
 
#define RDxR_HOUR_MASK   (0x1f << RDxR_HOUR_S)
 
#define RDxR_MIN_S   6
 
#define RDxR_MIN_MASK   (0x3f << RDxR_MIN_S)
 
#define RDxR_SEC_MASK   0x3f
 
#define RTSR   0x08
 
#define RTTR   0x0c
 
#define RDCR   0x10
 
#define RYCR   0x14
 
#define RDAR1   0x18
 
#define RYAR1   0x1c
 
#define RTCPICR   0x34
 
#define PIAR   0x38
 
#define rtc_readl(pxa_rtc, reg)   __raw_readl((pxa_rtc)->base + (reg))
 
#define rtc_writel(pxa_rtc, reg, value)   __raw_writel((value), (pxa_rtc)->base + (reg))
 

Functions

 module_init (pxa_rtc_init)
 
 module_exit (pxa_rtc_exit)
 
 MODULE_AUTHOR ("Robert Jarzmik <[email protected]>")
 
 MODULE_DESCRIPTION ("PXA27x/PXA3xx Realtime Clock Driver (RTC)")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:pxa-rtc")
 

Macro Definition Documentation

#define MAXFREQ_PERIODIC   1000

Definition at line 38 of file rtc-pxa.c.

#define PIAR   0x38

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

#define RDAR1   0x18

Definition at line 75 of file rtc-pxa.c.

#define RDCR   0x10

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

#define RDxR_HOUR_MASK   (0x1f << RDxR_HOUR_S)

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

#define RDxR_HOUR_S   12

Definition at line 65 of file rtc-pxa.c.

#define RDxR_MIN_MASK   (0x3f << RDxR_MIN_S)

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

#define RDxR_MIN_S   6

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

#define RDxR_SEC_MASK   0x3f

Definition at line 69 of file rtc-pxa.c.

#define RTC_DEF_DIVIDER   (32768 - 1)

Definition at line 36 of file rtc-pxa.c.

#define RTC_DEF_TRIM   0

Definition at line 37 of file rtc-pxa.c.

#define rtc_readl (   pxa_rtc,
  reg 
)    __raw_readl((pxa_rtc)->base + (reg))

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

#define rtc_writel (   pxa_rtc,
  reg,
  value 
)    __raw_writel((value), (pxa_rtc)->base + (reg))

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

#define RTCPICR   0x34

Definition at line 77 of file rtc-pxa.c.

#define RTSR   0x08

Definition at line 71 of file rtc-pxa.c.

#define RTSR_AL   (1 << 0) /* RTC alarm detected */

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

#define RTSR_ALE   (1 << 2) /* RTC alarm interrupt enable */

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

#define RTSR_HZ   (1 << 1) /* HZ rising-edge detected */

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

#define RTSR_HZE   (1 << 3) /* HZ interrupt enable */

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

#define RTSR_PIAL   (1 << 13) /* Periodic interrupt detected */

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

#define RTSR_PIALE   (1 << 14) /* Periodic interrupt Alarm enable */

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

#define RTSR_PICE   (1 << 15) /* Periodic interrupt count enable */

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

#define RTSR_RDAL1   (1 << 4) /* RTC alarm1 detected */

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

#define RTSR_RDAL2   (1 << 6) /* RTC alarm2 detected */

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

#define RTSR_RDALE1   (1 << 5) /* RTC alarm1 enable */

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

#define RTSR_RDALE2   (1 << 7) /* RTC alarm2 enable */

Definition at line 50 of file rtc-pxa.c.

#define RTSR_SWAL1   (1 << 8) /* RTC stopwatch alarm1 detected */

Definition at line 49 of file rtc-pxa.c.

#define RTSR_SWAL2   (1 << 10) /* RTC stopwatch alarm2 detected */

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

#define RTSR_SWALE1   (1 << 9) /* RTC stopwatch alarm1 enable */

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

#define RTSR_SWALE2   (1 << 11) /* RTC stopwatch alarm2 enable */

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

#define RTSR_TRIG_MASK
Value:

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

#define RTTR   0x0c

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

#define RYAR1   0x1c

Definition at line 76 of file rtc-pxa.c.

#define RYCR   0x14

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

#define RYxR_DAY_MASK   0x1f

Definition at line 64 of file rtc-pxa.c.

#define RYxR_MONTH_MASK   (0xf << RYxR_MONTH_S)

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

#define RYxR_MONTH_S   5

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

#define RYxR_YEAR_MASK   (0xfff << RYxR_YEAR_S)

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

#define RYxR_YEAR_S   9

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

#define TIMER_FREQ   CLOCK_TICK_RATE

Definition at line 35 of file rtc-pxa.c.

Function Documentation

MODULE_ALIAS ( "platform:pxa-rtc )
MODULE_AUTHOR ( "Robert Jarzmik <[email protected]>"  )
MODULE_DESCRIPTION ( "PXA27x/PXA3xx Realtime Clock Driver (RTC)"  )
module_exit ( pxa_rtc_exit  )
module_init ( pxa_rtc_init  )
MODULE_LICENSE ( "GPL"  )