diff options
author | AnilKumar Ch <anilkumar@ti.com> | 2012-09-21 05:59:01 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-09-21 17:58:47 -0400 |
commit | 8212003260c600b9b55a79634fb29d0f7ec813d9 (patch) | |
tree | 4abda0ecb7fbaeacb9a9874fe54f79abac8726e3 /drivers/net/can/c_can/c_can.h | |
parent | 4cdd34b26826e89972c03043987b83f76e7ad510 (diff) |
can: c_can: Add d_can suspend resume support
Adds suspend resume support to DCAN driver which enables
DCAN power down mode bit (PDR). Then DCAN will ack the local
power-down mode by setting PDA bit in STATUS register.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/c_can/c_can.h')
-rw-r--r-- | drivers/net/can/c_can/c_can.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net/can/c_can/c_can.h index 1437a6dbdca5..e5ed41dafa1b 100644 --- a/drivers/net/can/c_can/c_can.h +++ b/drivers/net/can/c_can/c_can.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | enum reg { | 25 | enum reg { |
26 | C_CAN_CTRL_REG = 0, | 26 | C_CAN_CTRL_REG = 0, |
27 | C_CAN_CTRL_EX_REG, | ||
27 | C_CAN_STS_REG, | 28 | C_CAN_STS_REG, |
28 | C_CAN_ERR_CNT_REG, | 29 | C_CAN_ERR_CNT_REG, |
29 | C_CAN_BTR_REG, | 30 | C_CAN_BTR_REG, |
@@ -104,6 +105,7 @@ static const u16 reg_map_c_can[] = { | |||
104 | 105 | ||
105 | static const u16 reg_map_d_can[] = { | 106 | static const u16 reg_map_d_can[] = { |
106 | [C_CAN_CTRL_REG] = 0x00, | 107 | [C_CAN_CTRL_REG] = 0x00, |
108 | [C_CAN_CTRL_EX_REG] = 0x02, | ||
107 | [C_CAN_STS_REG] = 0x04, | 109 | [C_CAN_STS_REG] = 0x04, |
108 | [C_CAN_ERR_CNT_REG] = 0x08, | 110 | [C_CAN_ERR_CNT_REG] = 0x08, |
109 | [C_CAN_BTR_REG] = 0x0C, | 111 | [C_CAN_BTR_REG] = 0x0C, |
@@ -166,6 +168,7 @@ struct c_can_priv { | |||
166 | unsigned int tx_echo; | 168 | unsigned int tx_echo; |
167 | void *priv; /* for board-specific data */ | 169 | void *priv; /* for board-specific data */ |
168 | u16 irqstatus; | 170 | u16 irqstatus; |
171 | enum c_can_dev_id type; | ||
169 | }; | 172 | }; |
170 | 173 | ||
171 | struct net_device *alloc_c_can_dev(void); | 174 | struct net_device *alloc_c_can_dev(void); |
@@ -173,4 +176,9 @@ void free_c_can_dev(struct net_device *dev); | |||
173 | int register_c_can_dev(struct net_device *dev); | 176 | int register_c_can_dev(struct net_device *dev); |
174 | void unregister_c_can_dev(struct net_device *dev); | 177 | void unregister_c_can_dev(struct net_device *dev); |
175 | 178 | ||
179 | #ifdef CONFIG_PM | ||
180 | int c_can_power_up(struct net_device *dev); | ||
181 | int c_can_power_down(struct net_device *dev); | ||
182 | #endif | ||
183 | |||
176 | #endif /* C_CAN_H */ | 184 | #endif /* C_CAN_H */ |