diff options
-rw-r--r-- | drivers/media/rc/ite-cir.c | 46 |
1 files changed, 18 insertions, 28 deletions
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index 253837e5183c..d1dec5c25324 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c | |||
@@ -1250,11 +1250,9 @@ static void it8709_disable(struct ite_dev *dev) | |||
1250 | ite_dbg("%s called", __func__); | 1250 | ite_dbg("%s called", __func__); |
1251 | 1251 | ||
1252 | /* clear out all interrupt enable flags */ | 1252 | /* clear out all interrupt enable flags */ |
1253 | it8709_wr(dev, | 1253 | it8709_wr(dev, it8709_rr(dev, IT85_C0IER) & |
1254 | it8709_rr(dev, | 1254 | ~(IT85_IEC | IT85_RFOIE | IT85_RDAIE | IT85_TLDLIE), |
1255 | IT85_C0IER) & ~(IT85_IEC | IT85_RFOIE | | 1255 | IT85_C0IER); |
1256 | IT85_RDAIE | | ||
1257 | IT85_TLDLIE), IT85_C0IER); | ||
1258 | 1256 | ||
1259 | /* disable the receiver */ | 1257 | /* disable the receiver */ |
1260 | it8709_disable_rx(dev); | 1258 | it8709_disable_rx(dev); |
@@ -1270,11 +1268,9 @@ static void it8709_init_hardware(struct ite_dev *dev) | |||
1270 | ite_dbg("%s called", __func__); | 1268 | ite_dbg("%s called", __func__); |
1271 | 1269 | ||
1272 | /* disable all the interrupts */ | 1270 | /* disable all the interrupts */ |
1273 | it8709_wr(dev, | 1271 | it8709_wr(dev, it8709_rr(dev, IT85_C0IER) & |
1274 | it8709_rr(dev, | 1272 | ~(IT85_IEC | IT85_RFOIE | IT85_RDAIE | IT85_TLDLIE), |
1275 | IT85_C0IER) & ~(IT85_IEC | IT85_RFOIE | | 1273 | IT85_C0IER); |
1276 | IT85_RDAIE | | ||
1277 | IT85_TLDLIE), IT85_C0IER); | ||
1278 | 1274 | ||
1279 | /* program the baud rate divisor */ | 1275 | /* program the baud rate divisor */ |
1280 | it8709_wr(dev, ITE_BAUDRATE_DIVISOR & 0xff, IT85_C0BDLR); | 1276 | it8709_wr(dev, ITE_BAUDRATE_DIVISOR & 0xff, IT85_C0BDLR); |
@@ -1282,28 +1278,22 @@ static void it8709_init_hardware(struct ite_dev *dev) | |||
1282 | IT85_C0BDHR); | 1278 | IT85_C0BDHR); |
1283 | 1279 | ||
1284 | /* program the C0MSTCR register defaults */ | 1280 | /* program the C0MSTCR register defaults */ |
1285 | it8709_wr(dev, (it8709_rr(dev, IT85_C0MSTCR) & ~(IT85_ILSEL | | 1281 | it8709_wr(dev, (it8709_rr(dev, IT85_C0MSTCR) & |
1286 | IT85_ILE | 1282 | ~(IT85_ILSEL | IT85_ILE | IT85_FIFOTL |
1287 | | IT85_FIFOTL | 1283 | | IT85_FIFOCLR | IT85_RESET)) | IT85_FIFOTL_DEFAULT, |
1288 | | | 1284 | IT85_C0MSTCR); |
1289 | IT85_FIFOCLR | ||
1290 | | | ||
1291 | IT85_RESET)) | ||
1292 | | IT85_FIFOTL_DEFAULT, IT85_C0MSTCR); | ||
1293 | 1285 | ||
1294 | /* program the C0RCR register defaults */ | 1286 | /* program the C0RCR register defaults */ |
1295 | it8709_wr(dev, | 1287 | it8709_wr(dev, (it8709_rr(dev, IT85_C0RCR) & |
1296 | (it8709_rr(dev, IT85_C0RCR) & | 1288 | ~(IT85_RXEN | IT85_RDWOS | IT85_RXEND | IT85_RXACT |
1297 | ~(IT85_RXEN | IT85_RDWOS | IT85_RXEND | 1289 | | IT85_RXDCR)) | ITE_RXDCR_DEFAULT, |
1298 | | IT85_RXACT | IT85_RXDCR)) | | 1290 | IT85_C0RCR); |
1299 | ITE_RXDCR_DEFAULT, IT85_C0RCR); | ||
1300 | 1291 | ||
1301 | /* program the C0TCR register defaults */ | 1292 | /* program the C0TCR register defaults */ |
1302 | it8709_wr(dev, (it8709_rr(dev, IT85_C0TCR) | 1293 | it8709_wr(dev, (it8709_rr(dev, IT85_C0TCR) & ~(IT85_TXMPM | IT85_TXMPW)) |
1303 | &~(IT85_TXMPM | IT85_TXMPW)) | 1294 | | IT85_TXRLE | IT85_TXENDF | IT85_TXMPM_DEFAULT |
1304 | |IT85_TXRLE | IT85_TXENDF | | 1295 | | IT85_TXMPW_DEFAULT, |
1305 | IT85_TXMPM_DEFAULT | | 1296 | IT85_C0TCR); |
1306 | IT85_TXMPW_DEFAULT, IT85_C0TCR); | ||
1307 | 1297 | ||
1308 | /* program the carrier parameters */ | 1298 | /* program the carrier parameters */ |
1309 | ite_set_carrier_params(dev); | 1299 | ite_set_carrier_params(dev); |