canctl1 = in_8(®s->canctl1);
if ((mode & MSCAN_SLPRQ) && !(canctl1 & MSCAN_SLPAK)) {
- out_8(®s->canctl0,
- in_8(®s->canctl0) | MSCAN_SLPRQ);
+ setbits8(®s->canctl0, MSCAN_SLPRQ);
for (i = 0; i < MSCAN_SET_MODE_RETRIES; i++) {
if (in_8(®s->canctl1) & MSCAN_SLPAK)
break;
}
if ((mode & MSCAN_INITRQ) && !(canctl1 & MSCAN_INITAK)) {
- out_8(®s->canctl0,
- in_8(®s->canctl0) | MSCAN_INITRQ);
+ setbits8(®s->canctl0, MSCAN_INITRQ);
for (i = 0; i < MSCAN_SET_MODE_RETRIES; i++) {
if (in_8(®s->canctl1) & MSCAN_INITAK)
break;
priv->can.state = CAN_STATE_STOPPED;
if (mode & MSCAN_CSWAI)
- out_8(®s->canctl0,
- in_8(®s->canctl0) | MSCAN_CSWAI);
+ setbits8(®s->canctl0, MSCAN_CSWAI);
} else {
canctl1 = in_8(®s->canctl1);
if (canctl1 & (MSCAN_SLPAK | MSCAN_INITAK)) {
- out_8(®s->canctl0, in_8(®s->canctl0) &
- ~(MSCAN_SLPRQ | MSCAN_INITRQ));
+ clrbits8(®s->canctl0, MSCAN_SLPRQ | MSCAN_INITRQ);
for (i = 0; i < MSCAN_SET_MODE_RETRIES; i++) {
canctl1 = in_8(®s->canctl1);
if (!(canctl1 & (MSCAN_INITAK | MSCAN_SLPAK)))
*/
out_8(®s->cantier, 0);
out_8(®s->canrier, 0);
- out_8(®s->canctl0, in_8(®s->canctl0) |
- MSCAN_SLPRQ | MSCAN_INITRQ);
+ setbits8(®s->canctl0, MSCAN_SLPRQ | MSCAN_INITRQ);
can_bus_off(dev);
break;
default:
priv->open_time = jiffies;
- out_8(®s->canctl1, in_8(®s->canctl1) & ~MSCAN_LISTEN);
+ clrbits8(®s->canctl1, MSCAN_LISTEN);
ret = mscan_start(dev);
if (ret)
struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base;
mscan_set_mode(dev, MSCAN_INIT_MODE);
- out_8(®s->canctl1, in_8(®s->canctl1) & ~MSCAN_CANE);
+ clrbits8(®s->canctl1, MSCAN_CANE);
unregister_candev(dev);
}
EXPORT_SYMBOL_GPL(unregister_mscandev);