Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sch56xx-common.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/watchdog.h>
#include <linux/miscdevice.h>
#include <linux/uaccess.h>
#include <linux/kref.h>
#include <linux/slab.h>
#include "sch56xx-common.h"

Go to the source code of this file.

Data Structures

struct  sch56xx_watchdog_data
 

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define SIO_SCH56XX_LD_EM   0x0C /* Embedded uController Logical Dev */
 
#define SIO_UNLOCK_KEY   0x55 /* Key to enable Super-I/O */
 
#define SIO_LOCK_KEY   0xAA /* Key to disable Super-I/O */
 
#define SIO_REG_LDSEL   0x07 /* Logical device select */
 
#define SIO_REG_DEVID   0x20 /* Device ID */
 
#define SIO_REG_ENABLE   0x30 /* Logical device enable */
 
#define SIO_REG_ADDR   0x66 /* Logical device address (2 bytes) */
 
#define SIO_SCH5627_ID   0xC6 /* Chipset ID */
 
#define SIO_SCH5636_ID   0xC7 /* Chipset ID */
 
#define REGION_LENGTH   10
 
#define SCH56XX_CMD_READ   0x02
 
#define SCH56XX_CMD_WRITE   0x03
 
#define SCH56XX_REG_WDOG_PRESET   0x58B
 
#define SCH56XX_REG_WDOG_CONTROL   0x58C
 
#define SCH56XX_WDOG_TIME_BASE_SEC   0x01
 
#define SCH56XX_REG_WDOG_OUTPUT_ENABLE   0x58E
 
#define SCH56XX_WDOG_OUTPUT_ENABLE   0x02
 

Functions

 module_param (nowayout, int, 0)
 
 MODULE_PARM_DESC (nowayout,"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")")
 
int sch56xx_read_virtual_reg (u16 addr, u16 reg)
 
 EXPORT_SYMBOL (sch56xx_read_virtual_reg)
 
int sch56xx_write_virtual_reg (u16 addr, u16 reg, u8 val)
 
 EXPORT_SYMBOL (sch56xx_write_virtual_reg)
 
int sch56xx_read_virtual_reg16 (u16 addr, u16 reg)
 
 EXPORT_SYMBOL (sch56xx_read_virtual_reg16)
 
int sch56xx_read_virtual_reg12 (u16 addr, u16 msb_reg, u16 lsn_reg, int high_nibble)
 
 EXPORT_SYMBOL (sch56xx_read_virtual_reg12)
 
struct sch56xx_watchdog_datasch56xx_watchdog_register (struct device *parent, u16 addr, u32 revision, struct mutex *io_lock, int check_enabled)
 
 EXPORT_SYMBOL (sch56xx_watchdog_register)
 
void sch56xx_watchdog_unregister (struct sch56xx_watchdog_data *data)
 
 EXPORT_SYMBOL (sch56xx_watchdog_unregister)
 
 MODULE_DESCRIPTION ("SMSC SCH56xx Hardware Monitoring Common Code")
 
 MODULE_AUTHOR ("Hans de Goede <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 module_init (sch56xx_init)
 
 module_exit (sch56xx_exit)
 

Macro Definition Documentation

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 20 of file sch56xx-common.c.

#define REGION_LENGTH   10

Definition at line 55 of file sch56xx-common.c.

#define SCH56XX_CMD_READ   0x02

Definition at line 57 of file sch56xx-common.c.

#define SCH56XX_CMD_WRITE   0x03

Definition at line 58 of file sch56xx-common.c.

#define SCH56XX_REG_WDOG_CONTROL   0x58C

Definition at line 62 of file sch56xx-common.c.

#define SCH56XX_REG_WDOG_OUTPUT_ENABLE   0x58E

Definition at line 64 of file sch56xx-common.c.

#define SCH56XX_REG_WDOG_PRESET   0x58B

Definition at line 61 of file sch56xx-common.c.

#define SCH56XX_WDOG_OUTPUT_ENABLE   0x02

Definition at line 65 of file sch56xx-common.c.

#define SCH56XX_WDOG_TIME_BASE_SEC   0x01

Definition at line 63 of file sch56xx-common.c.

#define SIO_LOCK_KEY   0xAA /* Key to disable Super-I/O */

Definition at line 45 of file sch56xx-common.c.

#define SIO_REG_ADDR   0x66 /* Logical device address (2 bytes) */

Definition at line 50 of file sch56xx-common.c.

#define SIO_REG_DEVID   0x20 /* Device ID */

Definition at line 48 of file sch56xx-common.c.

#define SIO_REG_ENABLE   0x30 /* Logical device enable */

Definition at line 49 of file sch56xx-common.c.

#define SIO_REG_LDSEL   0x07 /* Logical device select */

Definition at line 47 of file sch56xx-common.c.

#define SIO_SCH5627_ID   0xC6 /* Chipset ID */

Definition at line 52 of file sch56xx-common.c.

#define SIO_SCH5636_ID   0xC7 /* Chipset ID */

Definition at line 53 of file sch56xx-common.c.

#define SIO_SCH56XX_LD_EM   0x0C /* Embedded uController Logical Dev */

Definition at line 43 of file sch56xx-common.c.

#define SIO_UNLOCK_KEY   0x55 /* Key to enable Super-I/O */

Definition at line 44 of file sch56xx-common.c.

Function Documentation

EXPORT_SYMBOL ( sch56xx_read_virtual_reg  )
EXPORT_SYMBOL ( sch56xx_write_virtual_reg  )
EXPORT_SYMBOL ( sch56xx_read_virtual_reg16  )
EXPORT_SYMBOL ( sch56xx_read_virtual_reg12  )
EXPORT_SYMBOL ( sch56xx_watchdog_register  )
EXPORT_SYMBOL ( sch56xx_watchdog_unregister  )
MODULE_AUTHOR ( "Hans de Goede <[email protected]>"  )
MODULE_DESCRIPTION ( "SMSC SCH56xx Hardware Monitoring Common Code )
module_exit ( sch56xx_exit  )
module_init ( sch56xx_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( nowayout  ,
int  ,
 
)
MODULE_PARM_DESC ( nowayout  ,
"Watchdog cannot be stopped once started (default="__MODULE_STRING(WATCHDOG_NOWAYOUT)")"   
)
int sch56xx_read_virtual_reg ( u16  addr,
u16  reg 
)

Definition at line 207 of file sch56xx-common.c.

int sch56xx_read_virtual_reg12 ( u16  addr,
u16  msb_reg,
u16  lsn_reg,
int  high_nibble 
)

Definition at line 236 of file sch56xx-common.c.

int sch56xx_read_virtual_reg16 ( u16  addr,
u16  reg 
)

Definition at line 219 of file sch56xx-common.c.

struct sch56xx_watchdog_data* sch56xx_watchdog_register ( struct device parent,
u16  addr,
u32  revision,
struct mutex io_lock,
int  check_enabled 
)
read

Definition at line 422 of file sch56xx-common.c.

void sch56xx_watchdog_unregister ( struct sch56xx_watchdog_data data)

Definition at line 494 of file sch56xx-common.c.

int sch56xx_write_virtual_reg ( u16  addr,
u16  reg,
u8  val 
)

Definition at line 213 of file sch56xx-common.c.