Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
i2c-ali1563.c File Reference
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/acpi.h>

Go to the source code of this file.

Macros

#define ALI1563_MAX_TIMEOUT   500
 
#define ALI1563_SMBBA   0x80
 
#define ALI1563_SMB_IOEN   1
 
#define ALI1563_SMB_HOSTEN   2
 
#define ALI1563_SMB_IOSIZE   16
 
#define SMB_HST_STS   (ali1563_smba + 0)
 
#define SMB_HST_CNTL1   (ali1563_smba + 1)
 
#define SMB_HST_CNTL2   (ali1563_smba + 2)
 
#define SMB_HST_CMD   (ali1563_smba + 3)
 
#define SMB_HST_ADD   (ali1563_smba + 4)
 
#define SMB_HST_DAT0   (ali1563_smba + 5)
 
#define SMB_HST_DAT1   (ali1563_smba + 6)
 
#define SMB_BLK_DAT   (ali1563_smba + 7)
 
#define HST_STS_BUSY   0x01
 
#define HST_STS_INTR   0x02
 
#define HST_STS_DEVERR   0x04
 
#define HST_STS_BUSERR   0x08
 
#define HST_STS_FAIL   0x10
 
#define HST_STS_DONE   0x80
 
#define HST_STS_BAD   0x1c
 
#define HST_CNTL1_TIMEOUT   0x80
 
#define HST_CNTL1_LAST   0x40
 
#define HST_CNTL2_KILL   0x04
 
#define HST_CNTL2_START   0x40
 
#define HST_CNTL2_QUICK   0x00
 
#define HST_CNTL2_BYTE   0x01
 
#define HST_CNTL2_BYTE_DATA   0x02
 
#define HST_CNTL2_WORD_DATA   0x03
 
#define HST_CNTL2_BLOCK   0x05
 
#define HST_CNTL2_SIZEMASK   0x38
 

Functions

 MODULE_DEVICE_TABLE (pci, ali1563_id_table)
 
 module_pci_driver (ali1563_pci_driver)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define ALI1563_MAX_TIMEOUT   500

i2c-ali1563.c - i2c driver for the ALi 1563 Southbridge

Copyright (C) 2004 Patrick Mochel 2005 Rudolf Marek r.mar.nosp@m.ek@a.nosp@m.ssemb.nosp@m.ler..nosp@m.cz

The 1563 southbridge is deceptively similar to the 1533, with a few notable exceptions. One of those happens to be the fact they upgraded the i2c core to be 2.0 compliant, and happens to be almost identical to the i2c controller found in the Intel 801 south bridges.

This driver is based on a mix of the 15x3, 1535, and i801 drivers, with a little help from the ALi 1563 spec.

This file is released under the GPLv2

Definition at line 26 of file i2c-ali1563.c.

#define ALI1563_SMB_HOSTEN   2

Definition at line 29 of file i2c-ali1563.c.

#define ALI1563_SMB_IOEN   1

Definition at line 28 of file i2c-ali1563.c.

#define ALI1563_SMB_IOSIZE   16

Definition at line 30 of file i2c-ali1563.c.

#define ALI1563_SMBBA   0x80

Definition at line 27 of file i2c-ali1563.c.

#define HST_CNTL1_LAST   0x40

Definition at line 51 of file i2c-ali1563.c.

#define HST_CNTL1_TIMEOUT   0x80

Definition at line 50 of file i2c-ali1563.c.

#define HST_CNTL2_BLOCK   0x05

Definition at line 59 of file i2c-ali1563.c.

#define HST_CNTL2_BYTE   0x01

Definition at line 56 of file i2c-ali1563.c.

#define HST_CNTL2_BYTE_DATA   0x02

Definition at line 57 of file i2c-ali1563.c.

#define HST_CNTL2_KILL   0x04

Definition at line 53 of file i2c-ali1563.c.

#define HST_CNTL2_QUICK   0x00

Definition at line 55 of file i2c-ali1563.c.

#define HST_CNTL2_SIZEMASK   0x38

Definition at line 62 of file i2c-ali1563.c.

#define HST_CNTL2_START   0x40

Definition at line 54 of file i2c-ali1563.c.

#define HST_CNTL2_WORD_DATA   0x03

Definition at line 58 of file i2c-ali1563.c.

#define HST_STS_BAD   0x1c

Definition at line 47 of file i2c-ali1563.c.

#define HST_STS_BUSERR   0x08

Definition at line 44 of file i2c-ali1563.c.

#define HST_STS_BUSY   0x01

Definition at line 41 of file i2c-ali1563.c.

#define HST_STS_DEVERR   0x04

Definition at line 43 of file i2c-ali1563.c.

#define HST_STS_DONE   0x80

Definition at line 46 of file i2c-ali1563.c.

#define HST_STS_FAIL   0x10

Definition at line 45 of file i2c-ali1563.c.

#define HST_STS_INTR   0x02

Definition at line 42 of file i2c-ali1563.c.

#define SMB_BLK_DAT   (ali1563_smba + 7)

Definition at line 39 of file i2c-ali1563.c.

#define SMB_HST_ADD   (ali1563_smba + 4)

Definition at line 36 of file i2c-ali1563.c.

#define SMB_HST_CMD   (ali1563_smba + 3)

Definition at line 35 of file i2c-ali1563.c.

#define SMB_HST_CNTL1   (ali1563_smba + 1)

Definition at line 33 of file i2c-ali1563.c.

#define SMB_HST_CNTL2   (ali1563_smba + 2)

Definition at line 34 of file i2c-ali1563.c.

#define SMB_HST_DAT0   (ali1563_smba + 5)

Definition at line 37 of file i2c-ali1563.c.

#define SMB_HST_DAT1   (ali1563_smba + 6)

Definition at line 38 of file i2c-ali1563.c.

#define SMB_HST_STS   (ali1563_smba + 0)

Definition at line 32 of file i2c-ali1563.c.

Function Documentation

MODULE_DEVICE_TABLE ( pci  ,
ali1563_id_table   
)
MODULE_LICENSE ( "GPL"  )
module_pci_driver ( ali1563_pci_driver  )