Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ibmasr.c File Reference
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/timer.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
#include <linux/dmi.h>
#include <linux/io.h>
#include <linux/uaccess.h>

Go to the source code of this file.

Data Structures

struct  ibmasr_id
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define TOPAZ_ASR_REG_OFFSET   4
 
#define TOPAZ_ASR_TOGGLE   0x40
 
#define TOPAZ_ASR_DISABLE   0x80
 
#define PEARL_BASE   0xe04
 
#define PEARL_WRITE   0xe06
 
#define PEARL_READ   0xe07
 
#define PEARL_ASR_DISABLE_MASK   0x80 /* bit 7: disable = 1, enable = 0 */
 
#define PEARL_ASR_TOGGLE_MASK   0x40 /* bit 6: 0, then 1, then 0 */
 
#define JASPER_ASR_REG_OFFSET   0x38
 
#define JASPER_ASR_DISABLE_MASK   0x01 /* bit 0: disable = 1, enable = 0 */
 
#define JASPER_ASR_TOGGLE_MASK   0x02 /* bit 1: 0, then 1, then 0 */
 
#define JUNIPER_BASE_ADDRESS   0x54b /* Base address of Juniper ASR */
 
#define JUNIPER_ASR_DISABLE_MASK   0x01 /* bit 0: disable = 1 enable = 0 */
 
#define JUNIPER_ASR_TOGGLE_MASK   0x02 /* bit 1: 0, then 1, then 0 */
 
#define SPRUCE_BASE_ADDRESS   0x118e /* Base address of Spruce ASR */
 
#define SPRUCE_ASR_DISABLE_MASK   0x01 /* bit 1: disable = 1 enable = 0 */
 
#define SPRUCE_ASR_TOGGLE_MASK   0x02 /* bit 0: 0, then 1, then 0 */
 

Enumerations

enum  {
  ASMTYPE_UNKNOWN, ASMTYPE_TOPAZ, ASMTYPE_JASPER, ASMTYPE_PEARL,
  ASMTYPE_JUNIPER, ASMTYPE_SPRUCE
}
 

Functions

 module_init (ibmasr_init)
 
 module_exit (ibmasr_exit)
 
 module_param (nowayout, bool, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
 MODULE_DESCRIPTION ("IBM Automatic Server Restart driver")
 
 MODULE_AUTHOR ("Andrey Panin")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_MISCDEV (WATCHDOG_MINOR)
 

Macro Definition Documentation

#define JASPER_ASR_DISABLE_MASK   0x01 /* bit 0: disable = 1, enable = 0 */

Definition at line 51 of file ibmasr.c.

#define JASPER_ASR_REG_OFFSET   0x38

Definition at line 49 of file ibmasr.c.

#define JASPER_ASR_TOGGLE_MASK   0x02 /* bit 1: 0, then 1, then 0 */

Definition at line 52 of file ibmasr.c.

#define JUNIPER_ASR_DISABLE_MASK   0x01 /* bit 0: disable = 1 enable = 0 */

Definition at line 55 of file ibmasr.c.

#define JUNIPER_ASR_TOGGLE_MASK   0x02 /* bit 1: 0, then 1, then 0 */

Definition at line 56 of file ibmasr.c.

#define JUNIPER_BASE_ADDRESS   0x54b /* Base address of Juniper ASR */

Definition at line 54 of file ibmasr.c.

#define PEARL_ASR_DISABLE_MASK   0x80 /* bit 7: disable = 1, enable = 0 */

Definition at line 45 of file ibmasr.c.

#define PEARL_ASR_TOGGLE_MASK   0x40 /* bit 6: 0, then 1, then 0 */

Definition at line 46 of file ibmasr.c.

#define PEARL_BASE   0xe04

Definition at line 41 of file ibmasr.c.

#define PEARL_READ   0xe07

Definition at line 43 of file ibmasr.c.

#define PEARL_WRITE   0xe06

Definition at line 42 of file ibmasr.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 13 of file ibmasr.c.

#define SPRUCE_ASR_DISABLE_MASK   0x01 /* bit 1: disable = 1 enable = 0 */

Definition at line 59 of file ibmasr.c.

#define SPRUCE_ASR_TOGGLE_MASK   0x02 /* bit 0: 0, then 1, then 0 */

Definition at line 60 of file ibmasr.c.

#define SPRUCE_BASE_ADDRESS   0x118e /* Base address of Spruce ASR */

Definition at line 58 of file ibmasr.c.

#define TOPAZ_ASR_DISABLE   0x80

Definition at line 38 of file ibmasr.c.

#define TOPAZ_ASR_REG_OFFSET   4

Definition at line 36 of file ibmasr.c.

#define TOPAZ_ASR_TOGGLE   0x40

Definition at line 37 of file ibmasr.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
ASMTYPE_UNKNOWN 
ASMTYPE_TOPAZ 
ASMTYPE_JASPER 
ASMTYPE_PEARL 
ASMTYPE_JUNIPER 
ASMTYPE_SPRUCE 

Definition at line 27 of file ibmasr.c.

Function Documentation

MODULE_ALIAS_MISCDEV ( WATCHDOG_MINOR  )
MODULE_AUTHOR ( "Andrey Panin"  )
MODULE_DESCRIPTION ( "IBM Automatic Server Restart driver )
module_exit ( ibmasr_exit  )
module_init ( ibmasr_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( nowayout  ,
bool  ,
 
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)