diff options
author | Stefano Babic <sbabic@denx.de> | 2016-12-16 09:53:52 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-12-16 09:53:52 +0100 |
commit | f2465934b46235287e07473fa4919035ba1a2b68 (patch) | |
tree | ce6d4480a31d592dfee52222b620329a9c75b055 /drivers/i2c/s3c24x0_i2c.h | |
parent | 51efabac487d832632f9797a94ed2ba6fe98e718 (diff) | |
parent | 53e8ca22538c2cec691fe74098684a359302688c (diff) | |
download | u-boot-imx-f2465934b46235287e07473fa4919035ba1a2b68.zip u-boot-imx-f2465934b46235287e07473fa4919035ba1a2b68.tar.gz u-boot-imx-f2465934b46235287e07473fa4919035ba1a2b68.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'drivers/i2c/s3c24x0_i2c.h')
-rw-r--r-- | drivers/i2c/s3c24x0_i2c.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/i2c/s3c24x0_i2c.h b/drivers/i2c/s3c24x0_i2c.h index 1ae73d2..aa10fc7 100644 --- a/drivers/i2c/s3c24x0_i2c.h +++ b/drivers/i2c/s3c24x0_i2c.h @@ -59,4 +59,26 @@ struct s3c24x0_i2c_bus { unsigned clk_cycle; unsigned clk_div; }; + +#define I2C_WRITE 0 +#define I2C_READ 1 + +#define I2C_OK 0 +#define I2C_NOK 1 +#define I2C_NACK 2 +#define I2C_NOK_LA 3 /* Lost arbitration */ +#define I2C_NOK_TOUT 4 /* time out */ + +/* S3C I2C Controller bits */ +#define I2CSTAT_BSY 0x20 /* Busy bit */ +#define I2CSTAT_NACK 0x01 /* Nack bit */ +#define I2CCON_ACKGEN 0x80 /* Acknowledge generation */ +#define I2CCON_IRPND 0x10 /* Interrupt pending bit */ +#define I2C_MODE_MT 0xC0 /* Master Transmit Mode */ +#define I2C_MODE_MR 0x80 /* Master Receive Mode */ +#define I2C_START_STOP 0x20 /* START / STOP */ +#define I2C_TXRX_ENA 0x10 /* I2C Tx/Rx enable */ + +#define I2C_TIMEOUT_MS 10 /* 10 ms */ + #endif /* _S3C24X0_I2C_H */ |