diff options
Diffstat (limited to 'drivers/net/can/mscan/mscan.c')
-rw-r--r-- | drivers/net/can/mscan/mscan.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/net/can/mscan/mscan.c b/drivers/net/can/mscan/mscan.c index 49542cab9df4..2539ebe21bc4 100644 --- a/drivers/net/can/mscan/mscan.c +++ b/drivers/net/can/mscan/mscan.c | |||
@@ -35,31 +35,6 @@ | |||
35 | 35 | ||
36 | #include "mscan.h" | 36 | #include "mscan.h" |
37 | 37 | ||
38 | #define MSCAN_NORMAL_MODE 0 | ||
39 | #define MSCAN_SLEEP_MODE MSCAN_SLPRQ | ||
40 | #define MSCAN_INIT_MODE (MSCAN_INITRQ | MSCAN_SLPRQ) | ||
41 | #define MSCAN_POWEROFF_MODE (MSCAN_CSWAI | MSCAN_SLPRQ) | ||
42 | #define MSCAN_SET_MODE_RETRIES 255 | ||
43 | #define MSCAN_ECHO_SKB_MAX 3 | ||
44 | |||
45 | #define BTR0_BRP_MASK 0x3f | ||
46 | #define BTR0_SJW_SHIFT 6 | ||
47 | #define BTR0_SJW_MASK (0x3 << BTR0_SJW_SHIFT) | ||
48 | |||
49 | #define BTR1_TSEG1_MASK 0xf | ||
50 | #define BTR1_TSEG2_SHIFT 4 | ||
51 | #define BTR1_TSEG2_MASK (0x7 << BTR1_TSEG2_SHIFT) | ||
52 | #define BTR1_SAM_SHIFT 7 | ||
53 | |||
54 | #define BTR0_SET_BRP(brp) (((brp) - 1) & BTR0_BRP_MASK) | ||
55 | #define BTR0_SET_SJW(sjw) ((((sjw) - 1) << BTR0_SJW_SHIFT) & \ | ||
56 | BTR0_SJW_MASK) | ||
57 | |||
58 | #define BTR1_SET_TSEG1(tseg1) (((tseg1) - 1) & BTR1_TSEG1_MASK) | ||
59 | #define BTR1_SET_TSEG2(tseg2) ((((tseg2) - 1) << BTR1_TSEG2_SHIFT) & \ | ||
60 | BTR1_TSEG2_MASK) | ||
61 | #define BTR1_SET_SAM(sam) ((sam) ? 1 << BTR1_SAM_SHIFT : 0) | ||
62 | |||
63 | static struct can_bittiming_const mscan_bittiming_const = { | 38 | static struct can_bittiming_const mscan_bittiming_const = { |
64 | .name = "mscan", | 39 | .name = "mscan", |
65 | .tseg1_min = 4, | 40 | .tseg1_min = 4, |
@@ -78,10 +53,6 @@ struct mscan_state { | |||
78 | u8 cantier; | 53 | u8 cantier; |
79 | }; | 54 | }; |
80 | 55 | ||
81 | #define F_RX_PROGRESS 0 | ||
82 | #define F_TX_PROGRESS 1 | ||
83 | #define F_TX_WAIT_ALL 2 | ||
84 | |||
85 | static enum can_state state_map[] = { | 56 | static enum can_state state_map[] = { |
86 | CAN_STATE_ERROR_ACTIVE, | 57 | CAN_STATE_ERROR_ACTIVE, |
87 | CAN_STATE_ERROR_WARNING, | 58 | CAN_STATE_ERROR_WARNING, |