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.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index eb26d2aca8b4..dde6ce963a19 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -944,32 +944,6 @@ static const struct i2c_algorithm i2c_pxa_pio_algorithm = {
944 .functionality = i2c_pxa_functionality, 944 .functionality = i2c_pxa_functionality,
945}; 945};
946 946
947static void i2c_pxa_enable(struct platform_device *dev)
948{
949 if (cpu_is_pxa27x()) {
950 switch (dev->id) {
951 case 0:
952 pxa_gpio_mode(GPIO117_I2CSCL_MD);
953 pxa_gpio_mode(GPIO118_I2CSDA_MD);
954 break;
955 case 1:
956 local_irq_disable();
957 PCFR |= PCFR_PI2CEN;
958 local_irq_enable();
959 break;
960 }
961 }
962}
963
964static void i2c_pxa_disable(struct platform_device *dev)
965{
966 if (cpu_is_pxa27x() && dev->id == 1) {
967 local_irq_disable();
968 PCFR &= ~PCFR_PI2CEN;
969 local_irq_enable();
970 }
971}
972
973#define res_len(r) ((r)->end - (r)->start + 1) 947#define res_len(r) ((r)->end - (r)->start + 1)
974static int i2c_pxa_probe(struct platform_device *dev) 948static int i2c_pxa_probe(struct platform_device *dev)
975{ 949{
@@ -1035,7 +1009,6 @@ static int i2c_pxa_probe(struct platform_device *dev)
1035#endif 1009#endif
1036 1010
1037 clk_enable(i2c->clk); 1011 clk_enable(i2c->clk);
1038 i2c_pxa_enable(dev);
1039 1012
1040 if (plat) { 1013 if (plat) {
1041 i2c->adap.class = plat->class; 1014 i2c->adap.class = plat->class;
@@ -1079,7 +1052,6 @@ eadapt:
1079 free_irq(irq, i2c); 1052 free_irq(irq, i2c);
1080ereqirq: 1053ereqirq:
1081 clk_disable(i2c->clk); 1054 clk_disable(i2c->clk);
1082 i2c_pxa_disable(dev);
1083 iounmap(i2c->reg_base); 1055 iounmap(i2c->reg_base);
1084eremap: 1056eremap:
1085 clk_put(i2c->clk); 1057 clk_put(i2c->clk);
@@ -1102,7 +1074,6 @@ static int __exit i2c_pxa_remove(struct platform_device *dev)
1102 1074
1103 clk_disable(i2c->clk); 1075 clk_disable(i2c->clk);
1104 clk_put(i2c->clk); 1076 clk_put(i2c->clk);
1105 i2c_pxa_disable(dev);
1106 1077
1107 iounmap(i2c->reg_base); 1078 iounmap(i2c->reg_base);
1108 release_mem_region(i2c->iobase, i2c->iosize); 1079 release_mem_region(i2c->iobase, i2c->iosize);