aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-pxa.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-pxa.c')
-rw-r--r--drivers/i2c/busses/i2c-pxa.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index eb69fbadc9cb..dde6ce963a19 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -39,7 +39,6 @@
39#include <asm/io.h> 39#include <asm/io.h>
40#include <asm/arch/i2c.h> 40#include <asm/arch/i2c.h>
41#include <asm/arch/pxa-regs.h> 41#include <asm/arch/pxa-regs.h>
42#include <asm/arch/pxa2xx-gpio.h>
43 42
44struct pxa_i2c { 43struct pxa_i2c {
45 spinlock_t lock; 44 spinlock_t lock;
@@ -945,32 +944,6 @@ static const struct i2c_algorithm i2c_pxa_pio_algorithm = {
945 .functionality = i2c_pxa_functionality, 944 .functionality = i2c_pxa_functionality,
946}; 945};
947 946
948static void i2c_pxa_enable(struct platform_device *dev)
949{
950 if (cpu_is_pxa27x()) {
951 switch (dev->id) {
952 case 0:
953 pxa_gpio_mode(GPIO117_I2CSCL_MD);
954 pxa_gpio_mode(GPIO118_I2CSDA_MD);
955 break;
956 case 1:
957 local_irq_disable();
958 PCFR |= PCFR_PI2CEN;
959 local_irq_enable();
960 break;
961 }
962 }
963}
964
965static void i2c_pxa_disable(struct platform_device *dev)
966{
967 if (cpu_is_pxa27x() && dev->id == 1) {
968 local_irq_disable();
969 PCFR &= ~PCFR_PI2CEN;
970 local_irq_enable();
971 }
972}
973
974#define res_len(r) ((r)->end - (r)->start + 1) 947#define res_len(r) ((r)->end - (r)->start + 1)
975static int i2c_pxa_probe(struct platform_device *dev) 948static int i2c_pxa_probe(struct platform_device *dev)
976{ 949{
@@ -1036,7 +1009,6 @@ static int i2c_pxa_probe(struct platform_device *dev)
1036#endif 1009#endif
1037 1010
1038 clk_enable(i2c->clk); 1011 clk_enable(i2c->clk);
1039 i2c_pxa_enable(dev);
1040 1012
1041 if (plat) { 1013 if (plat) {
1042 i2c->adap.class = plat->class; 1014 i2c->adap.class = plat->class;
@@ -1080,7 +1052,6 @@ eadapt:
1080 free_irq(irq, i2c); 1052 free_irq(irq, i2c);
1081ereqirq: 1053ereqirq:
1082 clk_disable(i2c->clk); 1054 clk_disable(i2c->clk);
1083 i2c_pxa_disable(dev);
1084 iounmap(i2c->reg_base); 1055 iounmap(i2c->reg_base);
1085eremap: 1056eremap:
1086 clk_put(i2c->clk); 1057 clk_put(i2c->clk);
@@ -1103,7 +1074,6 @@ static int __exit i2c_pxa_remove(struct platform_device *dev)
1103 1074
1104 clk_disable(i2c->clk); 1075 clk_disable(i2c->clk);
1105 clk_put(i2c->clk); 1076 clk_put(i2c->clk);
1106 i2c_pxa_disable(dev);
1107 1077
1108 iounmap(i2c->reg_base); 1078 iounmap(i2c->reg_base);
1109 release_mem_region(i2c->iobase, i2c->iosize); 1079 release_mem_region(i2c->iobase, i2c->iosize);