Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbe91325 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by David S. Miller
Browse files

can: at91_can: use correct bit to enable CAN_CTRLMODE_3_SAMPLES

parent b21d18b5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 * at91_can.c - CAN network driver for AT91 SoC CAN controller
 * at91_can.c - CAN network driver for AT91 SoC CAN controller
 *
 *
 * (C) 2007 by Hans J. Koch <hjk@linutronix.de>
 * (C) 2007 by Hans J. Koch <hjk@linutronix.de>
 * (C) 2008, 2009 by Marc Kleine-Budde <kernel@pengutronix.de>
 * (C) 2008, 2009, 2010 by Marc Kleine-Budde <kernel@pengutronix.de>
 *
 *
 * This software may be distributed under the terms of the GNU General
 * This software may be distributed under the terms of the GNU General
 * Public License ("GPL") version 2 as distributed in the 'COPYING'
 * Public License ("GPL") version 2 as distributed in the 'COPYING'
@@ -257,7 +257,7 @@ static int at91_set_bittiming(struct net_device *dev)
	const struct can_bittiming *bt = &priv->can.bittiming;
	const struct can_bittiming *bt = &priv->can.bittiming;
	u32 reg_br;
	u32 reg_br;


	reg_br = ((priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) << 24) |
	reg_br = ((priv->can.ctrlmode & CAN_CTRLMODE_3_SAMPLES) ? 1 << 24 : 0) |
		((bt->brp - 1) << 16) | ((bt->sjw - 1) << 12) |
		((bt->brp - 1) << 16) | ((bt->sjw - 1) << 12) |
		((bt->prop_seg - 1) << 8) | ((bt->phase_seg1 - 1) << 4) |
		((bt->prop_seg - 1) << 8) | ((bt->phase_seg1 - 1) << 4) |
		((bt->phase_seg2 - 1) << 0);
		((bt->phase_seg2 - 1) << 0);