aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorHeiko Stübner <heiko@sntech.de>2013-03-21 00:09:25 -0400
committerWolfram Sang <wsa@the-dreams.de>2013-03-24 05:30:57 -0400
commite636602ac2613da8c1777cb42443223994be4107 (patch)
tree0c46fafc9b13b515330ab15196a3052bf6bc1046 /drivers/i2c
parent1fdc66aefde6698a0fbc9159a6253c2d3a788779 (diff)
i2c: s3c2410: move mach/regs-iic.h into i2c-s3c2410 device driver
The register definitions are only used in the driver itself. This also removes the last dependency on plat/ includes from the i2c driver. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index f6b880ba1932..216fea12e2e9 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -42,9 +42,48 @@
42 42
43#include <asm/irq.h> 43#include <asm/irq.h>
44 44
45#include <plat/regs-iic.h>
46#include <linux/platform_data/i2c-s3c2410.h> 45#include <linux/platform_data/i2c-s3c2410.h>
47 46
47/* see s3c2410x user guide, v1.1, section 9 (p447) for more info */
48
49#define S3C2410_IICREG(x) (x)
50
51#define S3C2410_IICCON S3C2410_IICREG(0x00)
52#define S3C2410_IICSTAT S3C2410_IICREG(0x04)
53#define S3C2410_IICADD S3C2410_IICREG(0x08)
54#define S3C2410_IICDS S3C2410_IICREG(0x0C)
55#define S3C2440_IICLC S3C2410_IICREG(0x10)
56
57#define S3C2410_IICCON_ACKEN (1<<7)
58#define S3C2410_IICCON_TXDIV_16 (0<<6)
59#define S3C2410_IICCON_TXDIV_512 (1<<6)
60#define S3C2410_IICCON_IRQEN (1<<5)
61#define S3C2410_IICCON_IRQPEND (1<<4)
62#define S3C2410_IICCON_SCALE(x) ((x)&15)
63#define S3C2410_IICCON_SCALEMASK (0xf)
64
65#define S3C2410_IICSTAT_MASTER_RX (2<<6)
66#define S3C2410_IICSTAT_MASTER_TX (3<<6)
67#define S3C2410_IICSTAT_SLAVE_RX (0<<6)
68#define S3C2410_IICSTAT_SLAVE_TX (1<<6)
69#define S3C2410_IICSTAT_MODEMASK (3<<6)
70
71#define S3C2410_IICSTAT_START (1<<5)
72#define S3C2410_IICSTAT_BUSBUSY (1<<5)
73#define S3C2410_IICSTAT_TXRXEN (1<<4)
74#define S3C2410_IICSTAT_ARBITR (1<<3)
75#define S3C2410_IICSTAT_ASSLAVE (1<<2)
76#define S3C2410_IICSTAT_ADDR0 (1<<1)
77#define S3C2410_IICSTAT_LASTBIT (1<<0)
78
79#define S3C2410_IICLC_SDA_DELAY0 (0 << 0)
80#define S3C2410_IICLC_SDA_DELAY5 (1 << 0)
81#define S3C2410_IICLC_SDA_DELAY10 (2 << 0)
82#define S3C2410_IICLC_SDA_DELAY15 (3 << 0)
83#define S3C2410_IICLC_SDA_DELAY_MASK (3 << 0)
84
85#define S3C2410_IICLC_FILTER_ON (1<<2)
86
48/* Treat S3C2410 as baseline hardware, anything else is supported via quirks */ 87/* Treat S3C2410 as baseline hardware, anything else is supported via quirks */
49#define QUIRK_S3C2440 (1 << 0) 88#define QUIRK_S3C2440 (1 << 0)
50#define QUIRK_HDMIPHY (1 << 1) 89#define QUIRK_HDMIPHY (1 << 1)