[ARM] pxa: move i2c register and bit definitions into i2c-pxa.c
Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
@ -38,7 +38,44 @@
|
||||
#include <asm/irq.h>
|
||||
#include <asm/io.h>
|
||||
#include <mach/i2c.h>
|
||||
#include <mach/pxa-regs.h>
|
||||
|
||||
/*
|
||||
* I2C registers and bit definitions
|
||||
*/
|
||||
#define IBMR (0x00)
|
||||
#define IDBR (0x08)
|
||||
#define ICR (0x10)
|
||||
#define ISR (0x18)
|
||||
#define ISAR (0x20)
|
||||
|
||||
#define ICR_START (1 << 0) /* start bit */
|
||||
#define ICR_STOP (1 << 1) /* stop bit */
|
||||
#define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */
|
||||
#define ICR_TB (1 << 3) /* transfer byte bit */
|
||||
#define ICR_MA (1 << 4) /* master abort */
|
||||
#define ICR_SCLE (1 << 5) /* master clock enable */
|
||||
#define ICR_IUE (1 << 6) /* unit enable */
|
||||
#define ICR_GCD (1 << 7) /* general call disable */
|
||||
#define ICR_ITEIE (1 << 8) /* enable tx interrupts */
|
||||
#define ICR_IRFIE (1 << 9) /* enable rx interrupts */
|
||||
#define ICR_BEIE (1 << 10) /* enable bus error ints */
|
||||
#define ICR_SSDIE (1 << 11) /* slave STOP detected int enable */
|
||||
#define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */
|
||||
#define ICR_SADIE (1 << 13) /* slave address detected int enable */
|
||||
#define ICR_UR (1 << 14) /* unit reset */
|
||||
#define ICR_FM (1 << 15) /* fast mode */
|
||||
|
||||
#define ISR_RWM (1 << 0) /* read/write mode */
|
||||
#define ISR_ACKNAK (1 << 1) /* ack/nak status */
|
||||
#define ISR_UB (1 << 2) /* unit busy */
|
||||
#define ISR_IBB (1 << 3) /* bus busy */
|
||||
#define ISR_SSD (1 << 4) /* slave stop detected */
|
||||
#define ISR_ALD (1 << 5) /* arbitration loss detected */
|
||||
#define ISR_ITE (1 << 6) /* tx buffer empty */
|
||||
#define ISR_IRF (1 << 7) /* rx buffer full */
|
||||
#define ISR_GCAD (1 << 8) /* general call address detected */
|
||||
#define ISR_SAD (1 << 9) /* slave address detected */
|
||||
#define ISR_BED (1 << 10) /* bus error no ACK/NAK */
|
||||
|
||||
struct pxa_i2c {
|
||||
spinlock_t lock;
|
||||
|
Reference in New Issue
Block a user