Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112378
b: refs/heads/master
c: c46c948
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Russell King committed Oct 3, 2008
1 parent a8333dd commit df416c8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73b610affe0b24ecb808ef68a1b0a436a4cf7bd5
refs/heads/master: c46c948260f41af18b277c1eb1895d788d3605dc
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-pxa/include/mach/i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ struct i2c_pxa_platform_data {
unsigned int slave_addr;
struct i2c_slave_client *slave;
unsigned int class;
int use_pio;
unsigned int use_pio :1;
unsigned int fast_mode :1;
};

extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/mach-pxa/include/mach/pxa-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@
#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 */
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/i2c/busses/i2c-pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ struct pxa_i2c {
unsigned long iosize;

int irq;
int use_pio;
unsigned int use_pio :1;
unsigned int fast_mode :1;
};

#define _IBMR(i2c) ((i2c)->reg_base + (0x0 << (i2c)->reg_shift))
Expand Down Expand Up @@ -366,7 +367,7 @@ static void i2c_pxa_reset(struct pxa_i2c *i2c)
writel(i2c->slave_addr, _ISAR(i2c));

/* set control register values */
writel(I2C_ICR_INIT, _ICR(i2c));
writel(I2C_ICR_INIT | (i2c->fast_mode ? ICR_FM : 0), _ICR(i2c));

#ifdef CONFIG_I2C_PXA_SLAVE
dev_info(&i2c->adap.dev, "Enabling slave mode\n");
Expand Down Expand Up @@ -1010,6 +1011,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
if (plat) {
i2c->adap.class = plat->class;
i2c->use_pio = plat->use_pio;
i2c->fast_mode = plat->fast_mode;
}

if (i2c->use_pio) {
Expand Down

0 comments on commit df416c8

Please sign in to comment.