Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
tlclk.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/timer.h>
#include <linux/sysfs.h>
#include <linux/device.h>
#include <linux/miscdevice.h>
#include <linux/platform_device.h>
#include <asm/io.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  tlclk_alarms
 

Macros

#define RESET_ON   0x00
 
#define RESET_OFF   0x01
 
#define NORMAL_MODE   0x00
 
#define HOLDOVER_MODE   0x10
 
#define FREERUN_MODE   0x20
 
#define FILTER_6HZ   0x04
 
#define FILTER_12HZ   0x00
 
#define REF_CLK1_8kHz   0x00
 
#define REF_CLK2_19_44MHz   0x02
 
#define PRIMARY_CLOCK   0x00
 
#define SECONDARY_CLOCK   0x01
 
#define CLK_8kHz   0xff
 
#define CLK_16_384MHz   0xfb
 
#define CLK_1_544MHz   0x00
 
#define CLK_2_048MHz   0x01
 
#define CLK_4_096MHz   0x02
 
#define CLK_6_312MHz   0x03
 
#define CLK_8_192MHz   0x04
 
#define CLK_19_440MHz   0x06
 
#define CLK_8_592MHz   0x08
 
#define CLK_11_184MHz   0x09
 
#define CLK_34_368MHz   0x0b
 
#define CLK_44_736MHz   0x0a
 
#define AMC_B1   0
 
#define AMC_B2   1
 
#define HW_ENABLE   0x80
 
#define HW_DISABLE   0x00
 
#define PLL_HOLDOVER   0x40
 
#define LOST_CLOCK   0x00
 
#define UNLOCK_MASK   0x10
 
#define HOLDOVER_MASK   0x20
 
#define SEC_LOST_MASK   0x40
 
#define PRI_LOST_MASK   0x80
 
#define PRI_LOS_01_MASK   0x01
 
#define PRI_LOS_10_MASK   0x02
 
#define SEC_LOS_01_MASK   0x04
 
#define SEC_LOS_10_MASK   0x08
 
#define HOLDOVER_01_MASK   0x10
 
#define HOLDOVER_10_MASK   0x20
 
#define UNLOCK_01_MASK   0x40
 
#define UNLOCK_10_MASK   0x80
 
#define TLCLK_BASE   0xa08
 
#define TLCLK_REG0   TLCLK_BASE
 
#define TLCLK_REG1   (TLCLK_BASE+1)
 
#define TLCLK_REG2   (TLCLK_BASE+2)
 
#define TLCLK_REG3   (TLCLK_BASE+3)
 
#define TLCLK_REG4   (TLCLK_BASE+4)
 
#define TLCLK_REG5   (TLCLK_BASE+5)
 
#define TLCLK_REG6   (TLCLK_BASE+6)
 
#define TLCLK_REG7   (TLCLK_BASE+7)
 
#define SET_PORT_BITS(port, mask, val)   outb(((inb(port) & mask) | val), port)
 
#define TLCLK_MAJOR   0
 

Functions

 MODULE_AUTHOR ("Sebastien Bouchard <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 module_init (tlclk_init)
 
 module_exit (tlclk_cleanup)
 

Macro Definition Documentation

#define AMC_B1   0

Definition at line 90 of file tlclk.c.

#define AMC_B2   1

Definition at line 91 of file tlclk.c.

#define CLK_11_184MHz   0x09

Definition at line 85 of file tlclk.c.

#define CLK_16_384MHz   0xfb

Definition at line 75 of file tlclk.c.

#define CLK_19_440MHz   0x06

Definition at line 82 of file tlclk.c.

#define CLK_1_544MHz   0x00

Definition at line 77 of file tlclk.c.

#define CLK_2_048MHz   0x01

Definition at line 78 of file tlclk.c.

#define CLK_34_368MHz   0x0b

Definition at line 86 of file tlclk.c.

#define CLK_44_736MHz   0x0a

Definition at line 87 of file tlclk.c.

#define CLK_4_096MHz   0x02

Definition at line 79 of file tlclk.c.

#define CLK_6_312MHz   0x03

Definition at line 80 of file tlclk.c.

#define CLK_8_192MHz   0x04

Definition at line 81 of file tlclk.c.

#define CLK_8_592MHz   0x08

Definition at line 84 of file tlclk.c.

#define CLK_8kHz   0xff

Definition at line 74 of file tlclk.c.

#define FILTER_12HZ   0x00

Definition at line 63 of file tlclk.c.

#define FILTER_6HZ   0x04

Definition at line 62 of file tlclk.c.

#define FREERUN_MODE   0x20

Definition at line 59 of file tlclk.c.

#define HOLDOVER_01_MASK   0x10

Definition at line 115 of file tlclk.c.

#define HOLDOVER_10_MASK   0x20

Definition at line 116 of file tlclk.c.

#define HOLDOVER_MASK   0x20

Definition at line 103 of file tlclk.c.

#define HOLDOVER_MODE   0x10

Definition at line 58 of file tlclk.c.

#define HW_DISABLE   0x00

Definition at line 95 of file tlclk.c.

#define HW_ENABLE   0x80

Definition at line 94 of file tlclk.c.

#define LOST_CLOCK   0x00

Definition at line 99 of file tlclk.c.

#define NORMAL_MODE   0x00

Definition at line 57 of file tlclk.c.

#define PLL_HOLDOVER   0x40

Definition at line 98 of file tlclk.c.

#define PRI_LOS_01_MASK   0x01

Definition at line 109 of file tlclk.c.

#define PRI_LOS_10_MASK   0x02

Definition at line 110 of file tlclk.c.

#define PRI_LOST_MASK   0x80

Definition at line 105 of file tlclk.c.

#define PRIMARY_CLOCK   0x00

Definition at line 70 of file tlclk.c.

#define REF_CLK1_8kHz   0x00

Definition at line 66 of file tlclk.c.

#define REF_CLK2_19_44MHz   0x02

Definition at line 67 of file tlclk.c.

#define RESET_OFF   0x01

Definition at line 54 of file tlclk.c.

#define RESET_ON   0x00

Definition at line 53 of file tlclk.c.

#define SEC_LOS_01_MASK   0x04

Definition at line 112 of file tlclk.c.

#define SEC_LOS_10_MASK   0x08

Definition at line 113 of file tlclk.c.

#define SEC_LOST_MASK   0x40

Definition at line 104 of file tlclk.c.

#define SECONDARY_CLOCK   0x01

Definition at line 71 of file tlclk.c.

#define SET_PORT_BITS (   port,
  mask,
  val 
)    outb(((inb(port) & mask) | val), port)

Definition at line 145 of file tlclk.c.

#define TLCLK_BASE   0xa08

Definition at line 135 of file tlclk.c.

#define TLCLK_MAJOR   0

Definition at line 148 of file tlclk.c.

#define TLCLK_REG0   TLCLK_BASE

Definition at line 136 of file tlclk.c.

#define TLCLK_REG1   (TLCLK_BASE+1)

Definition at line 137 of file tlclk.c.

#define TLCLK_REG2   (TLCLK_BASE+2)

Definition at line 138 of file tlclk.c.

#define TLCLK_REG3   (TLCLK_BASE+3)

Definition at line 139 of file tlclk.c.

#define TLCLK_REG4   (TLCLK_BASE+4)

Definition at line 140 of file tlclk.c.

#define TLCLK_REG5   (TLCLK_BASE+5)

Definition at line 141 of file tlclk.c.

#define TLCLK_REG6   (TLCLK_BASE+6)

Definition at line 142 of file tlclk.c.

#define TLCLK_REG7   (TLCLK_BASE+7)

Definition at line 143 of file tlclk.c.

#define UNLOCK_01_MASK   0x40

Definition at line 118 of file tlclk.c.

#define UNLOCK_10_MASK   0x80

Definition at line 119 of file tlclk.c.

#define UNLOCK_MASK   0x10

Definition at line 102 of file tlclk.c.

Function Documentation

MODULE_AUTHOR ( "Sebastien Bouchard <[email protected]>"  )
module_exit ( tlclk_cleanup  )
module_init ( tlclk_init  )
MODULE_LICENSE ( "GPL"  )