diff options
author | Heiko Stübner <heiko@sntech.de> | 2013-03-21 00:09:25 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-03-24 05:30:57 -0400 |
commit | e636602ac2613da8c1777cb42443223994be4107 (patch) | |
tree | 0c46fafc9b13b515330ab15196a3052bf6bc1046 | |
parent | 1fdc66aefde6698a0fbc9159a6253c2d3a788779 (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>
-rw-r--r-- | arch/arm/mach-s3c24xx/mach-rx1950.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/devs.c | 1 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/regs-iic.h | 56 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 41 |
4 files changed, 40 insertions, 59 deletions
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c index 1f9ba2ae5288..43f3ac5a1c7a 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c | |||
@@ -56,7 +56,6 @@ | |||
56 | #include <plat/cpu.h> | 56 | #include <plat/cpu.h> |
57 | #include <plat/devs.h> | 57 | #include <plat/devs.h> |
58 | #include <plat/pm.h> | 58 | #include <plat/pm.h> |
59 | #include <plat/regs-iic.h> | ||
60 | #include <plat/regs-serial.h> | 59 | #include <plat/regs-serial.h> |
61 | 60 | ||
62 | #include "common.h" | 61 | #include "common.h" |
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c index 51afedda9ab6..76209c9506b8 100644 --- a/arch/arm/plat-samsung/devs.c +++ b/arch/arm/plat-samsung/devs.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #include <linux/platform_data/usb-s3c2410_udc.h> | 62 | #include <linux/platform_data/usb-s3c2410_udc.h> |
63 | #include <linux/platform_data/usb-ohci-s3c2410.h> | 63 | #include <linux/platform_data/usb-ohci-s3c2410.h> |
64 | #include <plat/usb-phy.h> | 64 | #include <plat/usb-phy.h> |
65 | #include <plat/regs-iic.h> | ||
66 | #include <plat/regs-serial.h> | 65 | #include <plat/regs-serial.h> |
67 | #include <plat/regs-spi.h> | 66 | #include <plat/regs-spi.h> |
68 | #include <linux/platform_data/spi-s3c64xx.h> | 67 | #include <linux/platform_data/spi-s3c64xx.h> |
diff --git a/arch/arm/plat-samsung/include/plat/regs-iic.h b/arch/arm/plat-samsung/include/plat/regs-iic.h deleted file mode 100644 index 2f7c17de8ac8..000000000000 --- a/arch/arm/plat-samsung/include/plat/regs-iic.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/regs-iic.h | ||
2 | * | ||
3 | * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * S3C2410 I2C Controller | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_REGS_IIC_H | ||
14 | #define __ASM_ARCH_REGS_IIC_H __FILE__ | ||
15 | |||
16 | /* see s3c2410x user guide, v1.1, section 9 (p447) for more info */ | ||
17 | |||
18 | #define S3C2410_IICREG(x) (x) | ||
19 | |||
20 | #define S3C2410_IICCON S3C2410_IICREG(0x00) | ||
21 | #define S3C2410_IICSTAT S3C2410_IICREG(0x04) | ||
22 | #define S3C2410_IICADD S3C2410_IICREG(0x08) | ||
23 | #define S3C2410_IICDS S3C2410_IICREG(0x0C) | ||
24 | #define S3C2440_IICLC S3C2410_IICREG(0x10) | ||
25 | |||
26 | #define S3C2410_IICCON_ACKEN (1<<7) | ||
27 | #define S3C2410_IICCON_TXDIV_16 (0<<6) | ||
28 | #define S3C2410_IICCON_TXDIV_512 (1<<6) | ||
29 | #define S3C2410_IICCON_IRQEN (1<<5) | ||
30 | #define S3C2410_IICCON_IRQPEND (1<<4) | ||
31 | #define S3C2410_IICCON_SCALE(x) ((x)&15) | ||
32 | #define S3C2410_IICCON_SCALEMASK (0xf) | ||
33 | |||
34 | #define S3C2410_IICSTAT_MASTER_RX (2<<6) | ||
35 | #define S3C2410_IICSTAT_MASTER_TX (3<<6) | ||
36 | #define S3C2410_IICSTAT_SLAVE_RX (0<<6) | ||
37 | #define S3C2410_IICSTAT_SLAVE_TX (1<<6) | ||
38 | #define S3C2410_IICSTAT_MODEMASK (3<<6) | ||
39 | |||
40 | #define S3C2410_IICSTAT_START (1<<5) | ||
41 | #define S3C2410_IICSTAT_BUSBUSY (1<<5) | ||
42 | #define S3C2410_IICSTAT_TXRXEN (1<<4) | ||
43 | #define S3C2410_IICSTAT_ARBITR (1<<3) | ||
44 | #define S3C2410_IICSTAT_ASSLAVE (1<<2) | ||
45 | #define S3C2410_IICSTAT_ADDR0 (1<<1) | ||
46 | #define S3C2410_IICSTAT_LASTBIT (1<<0) | ||
47 | |||
48 | #define S3C2410_IICLC_SDA_DELAY0 (0 << 0) | ||
49 | #define S3C2410_IICLC_SDA_DELAY5 (1 << 0) | ||
50 | #define S3C2410_IICLC_SDA_DELAY10 (2 << 0) | ||
51 | #define S3C2410_IICLC_SDA_DELAY15 (3 << 0) | ||
52 | #define S3C2410_IICLC_SDA_DELAY_MASK (3 << 0) | ||
53 | |||
54 | #define S3C2410_IICLC_FILTER_ON (1<<2) | ||
55 | |||
56 | #endif /* __ASM_ARCH_REGS_IIC_H */ | ||
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) |