aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-10-08 10:56:07 -0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-10-13 11:42:35 -0400
commit42160a041db89807691b2a3fbf42e36a98b6019e (patch)
tree308778977364397d66dd26c9981e8c231fda3bad
parentba61a8d9d780980e8284355a0be750897e7af212 (diff)
can: at91: remove at91_can_data
struct at91_can_data was used to pass a callback to the driver, allowing it to switch the transceiver on and off. As all at91 boards are now using DT, this is not used anymore, remove that structure. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--drivers/net/can/at91_can.c21
-rw-r--r--include/linux/platform_data/atmel.h5
2 files changed, 0 insertions, 26 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 945c0955a967..8b3275d7792a 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -8,15 +8,6 @@
8 * Public License ("GPL") version 2 as distributed in the 'COPYING' 8 * Public License ("GPL") version 2 as distributed in the 'COPYING'
9 * file from the main directory of the linux kernel source. 9 * file from the main directory of the linux kernel source.
10 * 10 *
11 *
12 * Your platform definition file should specify something like:
13 *
14 * static struct at91_can_data ek_can_data = {
15 * transceiver_switch = sam9263ek_transceiver_switch,
16 * };
17 *
18 * at91_add_device_can(&ek_can_data);
19 *
20 */ 11 */
21 12
22#include <linux/clk.h> 13#include <linux/clk.h>
@@ -33,7 +24,6 @@
33#include <linux/spinlock.h> 24#include <linux/spinlock.h>
34#include <linux/string.h> 25#include <linux/string.h>
35#include <linux/types.h> 26#include <linux/types.h>
36#include <linux/platform_data/atmel.h>
37 27
38#include <linux/can/dev.h> 28#include <linux/can/dev.h>
39#include <linux/can/error.h> 29#include <linux/can/error.h>
@@ -324,15 +314,6 @@ static inline u32 at91_can_id_to_reg_mid(canid_t can_id)
324 return reg_mid; 314 return reg_mid;
325} 315}
326 316
327/*
328 * Swtich transceiver on or off
329 */
330static void at91_transceiver_switch(const struct at91_priv *priv, int on)
331{
332 if (priv->pdata && priv->pdata->transceiver_switch)
333 priv->pdata->transceiver_switch(on);
334}
335
336static void at91_setup_mailboxes(struct net_device *dev) 317static void at91_setup_mailboxes(struct net_device *dev)
337{ 318{
338 struct at91_priv *priv = netdev_priv(dev); 319 struct at91_priv *priv = netdev_priv(dev);
@@ -416,7 +397,6 @@ static void at91_chip_start(struct net_device *dev)
416 397
417 at91_set_bittiming(dev); 398 at91_set_bittiming(dev);
418 at91_setup_mailboxes(dev); 399 at91_setup_mailboxes(dev);
419 at91_transceiver_switch(priv, 1);
420 400
421 /* enable chip */ 401 /* enable chip */
422 if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) 402 if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
@@ -444,7 +424,6 @@ static void at91_chip_stop(struct net_device *dev, enum can_state state)
444 reg_mr = at91_read(priv, AT91_MR); 424 reg_mr = at91_read(priv, AT91_MR);
445 at91_write(priv, AT91_MR, reg_mr & ~AT91_MR_CANEN); 425 at91_write(priv, AT91_MR, reg_mr & ~AT91_MR_CANEN);
446 426
447 at91_transceiver_switch(priv, 0);
448 priv->can.state = state; 427 priv->can.state = state;
449} 428}
450 429
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
index 527a85c61924..c121ddf74f7f 100644
--- a/include/linux/platform_data/atmel.h
+++ b/include/linux/platform_data/atmel.h
@@ -74,11 +74,6 @@ struct atmel_uart_data {
74 struct serial_rs485 rs485; /* rs485 settings */ 74 struct serial_rs485 rs485; /* rs485 settings */
75}; 75};
76 76
77/* CAN */
78struct at91_can_data {
79 void (*transceiver_switch)(int on);
80};
81
82/* FIXME: this needs a better location, but gets stuff building again */ 77/* FIXME: this needs a better location, but gets stuff building again */
83extern int at91_suspend_entering_slow_clock(void); 78extern int at91_suspend_entering_slow_clock(void);
84 79