Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Eric Miao and committed by
Russell King
283afa06 e7f3c600

+39 -44
+1 -43
arch/arm/mach-pxa/include/mach/pxa-regs.h
··· 418 418 419 419 420 420 /* 421 - * I2C registers 421 + * I2C registers - moved into drivers/i2c/busses/i2c-pxa.c 422 422 */ 423 - 424 - #define IBMR __REG(0x40301680) /* I2C Bus Monitor Register - IBMR */ 425 - #define IDBR __REG(0x40301688) /* I2C Data Buffer Register - IDBR */ 426 - #define ICR __REG(0x40301690) /* I2C Control Register - ICR */ 427 - #define ISR __REG(0x40301698) /* I2C Status Register - ISR */ 428 - #define ISAR __REG(0x403016A0) /* I2C Slave Address Register - ISAR */ 429 - 430 - #define PWRIBMR __REG(0x40f00180) /* Power I2C Bus Monitor Register-IBMR */ 431 - #define PWRIDBR __REG(0x40f00188) /* Power I2C Data Buffer Register-IDBR */ 432 - #define PWRICR __REG(0x40f00190) /* Power I2C Control Register - ICR */ 433 - #define PWRISR __REG(0x40f00198) /* Power I2C Status Register - ISR */ 434 - #define PWRISAR __REG(0x40f001A0) /*Power I2C Slave Address Register-ISAR */ 435 - 436 - #define ICR_START (1 << 0) /* start bit */ 437 - #define ICR_STOP (1 << 1) /* stop bit */ 438 - #define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */ 439 - #define ICR_TB (1 << 3) /* transfer byte bit */ 440 - #define ICR_MA (1 << 4) /* master abort */ 441 - #define ICR_SCLE (1 << 5) /* master clock enable */ 442 - #define ICR_IUE (1 << 6) /* unit enable */ 443 - #define ICR_GCD (1 << 7) /* general call disable */ 444 - #define ICR_ITEIE (1 << 8) /* enable tx interrupts */ 445 - #define ICR_IRFIE (1 << 9) /* enable rx interrupts */ 446 - #define ICR_BEIE (1 << 10) /* enable bus error ints */ 447 - #define ICR_SSDIE (1 << 11) /* slave STOP detected int enable */ 448 - #define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */ 449 - #define ICR_SADIE (1 << 13) /* slave address detected int enable */ 450 - #define ICR_UR (1 << 14) /* unit reset */ 451 - #define ICR_FM (1 << 15) /* fast mode */ 452 - 453 - #define ISR_RWM (1 << 0) /* read/write mode */ 454 - #define ISR_ACKNAK (1 << 1) /* ack/nak status */ 455 - #define ISR_UB (1 << 2) /* unit busy */ 456 - #define ISR_IBB (1 << 3) /* bus busy */ 457 - #define ISR_SSD (1 << 4) /* slave stop detected */ 458 - #define ISR_ALD (1 << 5) /* arbitration loss detected */ 459 - #define ISR_ITE (1 << 6) /* tx buffer empty */ 460 - #define ISR_IRF (1 << 7) /* rx buffer full */ 461 - #define ISR_GCAD (1 << 8) /* general call address detected */ 462 - #define ISR_SAD (1 << 9) /* slave address detected */ 463 - #define ISR_BED (1 << 10) /* bus error no ACK/NAK */ 464 - 465 423 466 424 /* 467 425 * Serial Audio Controller
+38 -1
drivers/i2c/busses/i2c-pxa.c
··· 38 38 #include <asm/irq.h> 39 39 #include <asm/io.h> 40 40 #include <mach/i2c.h> 41 - #include <mach/pxa-regs.h> 41 + 42 + /* 43 + * I2C registers and bit definitions 44 + */ 45 + #define IBMR (0x00) 46 + #define IDBR (0x08) 47 + #define ICR (0x10) 48 + #define ISR (0x18) 49 + #define ISAR (0x20) 50 + 51 + #define ICR_START (1 << 0) /* start bit */ 52 + #define ICR_STOP (1 << 1) /* stop bit */ 53 + #define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */ 54 + #define ICR_TB (1 << 3) /* transfer byte bit */ 55 + #define ICR_MA (1 << 4) /* master abort */ 56 + #define ICR_SCLE (1 << 5) /* master clock enable */ 57 + #define ICR_IUE (1 << 6) /* unit enable */ 58 + #define ICR_GCD (1 << 7) /* general call disable */ 59 + #define ICR_ITEIE (1 << 8) /* enable tx interrupts */ 60 + #define ICR_IRFIE (1 << 9) /* enable rx interrupts */ 61 + #define ICR_BEIE (1 << 10) /* enable bus error ints */ 62 + #define ICR_SSDIE (1 << 11) /* slave STOP detected int enable */ 63 + #define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */ 64 + #define ICR_SADIE (1 << 13) /* slave address detected int enable */ 65 + #define ICR_UR (1 << 14) /* unit reset */ 66 + #define ICR_FM (1 << 15) /* fast mode */ 67 + 68 + #define ISR_RWM (1 << 0) /* read/write mode */ 69 + #define ISR_ACKNAK (1 << 1) /* ack/nak status */ 70 + #define ISR_UB (1 << 2) /* unit busy */ 71 + #define ISR_IBB (1 << 3) /* bus busy */ 72 + #define ISR_SSD (1 << 4) /* slave stop detected */ 73 + #define ISR_ALD (1 << 5) /* arbitration loss detected */ 74 + #define ISR_ITE (1 << 6) /* tx buffer empty */ 75 + #define ISR_IRF (1 << 7) /* rx buffer full */ 76 + #define ISR_GCAD (1 << 8) /* general call address detected */ 77 + #define ISR_SAD (1 << 9) /* slave address detected */ 78 + #define ISR_BED (1 << 10) /* bus error no ACK/NAK */ 42 79 43 80 struct pxa_i2c { 44 81 spinlock_t lock;