summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2017-08-10 21:53:55 -0400
committerFranklin Wei <git@fwei.tk>2017-08-10 21:53:55 -0400
commit0dbf7017beab7925d14b788f5157d68b88a3b452 (patch)
treecdf4045a1a39bd88f35026d9c6e65170dbde5992
parentca228d3d8781876e58aecf9434b7760fd2bb4b93 (diff)
downloadrockbox-0dbf7017beab7925d14b788f5157d68b88a3b452.tar.gz
rockbox-0dbf7017beab7925d14b788f5157d68b88a3b452.zip
Remove bad mutex_* calls in telechips i2c driver
These were being called in a cpu mode they shouldn't have been, leading to panics. Change-Id: I7fbd0e4af5c6cbaf7177f9dafa901b3924617d7f
-rw-r--r--firmware/target/arm/i2c-telechips.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/firmware/target/arm/i2c-telechips.c b/firmware/target/arm/i2c-telechips.c
index 84381ddbf0..3ce2c05568 100644
--- a/firmware/target/arm/i2c-telechips.c
+++ b/firmware/target/arm/i2c-telechips.c
@@ -36,11 +36,8 @@ static inline void delay_loop(void)
36 36
37#define DELAY delay_loop() 37#define DELAY delay_loop()
38 38
39static struct mutex i2c_mtx;
40
41void i2c_init(void) 39void i2c_init(void)
42{ 40{
43 mutex_init(&i2c_mtx);
44} 41}
45 42
46void i2c_start(void) 43void i2c_start(void)
@@ -152,7 +149,6 @@ int i2c_getack(void)
152int i2c_write(int device, const unsigned char* buf, int count ) 149int i2c_write(int device, const unsigned char* buf, int count )
153{ 150{
154 int i = 0; 151 int i = 0;
155 mutex_lock(&i2c_mtx);
156 152
157 i2c_start(); 153 i2c_start();
158 i2c_outb(device & 0xfe); 154 i2c_outb(device & 0xfe);
@@ -163,7 +159,6 @@ int i2c_write(int device, const unsigned char* buf, int count )
163 } 159 }
164 160
165 i2c_stop(); 161 i2c_stop();
166 mutex_unlock(&i2c_mtx);
167 return 0; 162 return 0;
168} 163}
169 164
@@ -172,7 +167,6 @@ int i2c_write(int device, const unsigned char* buf, int count )
172int i2c_readmem(int device, int address, unsigned char* buf, int count ) 167int i2c_readmem(int device, int address, unsigned char* buf, int count )
173{ 168{
174 int i = 0; 169 int i = 0;
175 mutex_lock(&i2c_mtx);
176 170
177 i2c_start(); 171 i2c_start();
178 i2c_outb(device & 0xfe); 172 i2c_outb(device & 0xfe);
@@ -193,6 +187,5 @@ int i2c_readmem(int device, int address, unsigned char* buf, int count )
193 187
194exit: 188exit:
195 i2c_stop(); 189 i2c_stop();
196 mutex_unlock(&i2c_mtx);
197 return 0; 190 return 0;
198} 191}