aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorAndreas Larsson <andreas@gaisler.com>2012-10-04 09:59:10 -0400
committerMarc Kleine-Budde <mkl@pengutronix.de>2012-11-27 03:49:32 -0500
commit04df25107345451575a2c57843271cfe71d4c64c (patch)
treeae7e5f7e2068cac9a7b4fd369c45ef401e971c40 /drivers/net/can
parent080f40a6fa28dab299da7a652e444b1e2d9231e7 (diff)
can: sja1000: Make sja1000_of_platform selectable and compilable on SPARC
Signed-off-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/sja1000/Kconfig2
-rw-r--r--drivers/net/can/sja1000/sja1000_of_platform.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
index 559be87a0904..92f73c708a3d 100644
--- a/drivers/net/can/sja1000/Kconfig
+++ b/drivers/net/can/sja1000/Kconfig
@@ -21,7 +21,7 @@ config CAN_SJA1000_PLATFORM
21 21
22config CAN_SJA1000_OF_PLATFORM 22config CAN_SJA1000_OF_PLATFORM
23 tristate "Generic OF Platform Bus based SJA1000 driver" 23 tristate "Generic OF Platform Bus based SJA1000 driver"
24 depends on PPC_OF 24 depends on OF
25 ---help--- 25 ---help---
26 This driver adds support for the SJA1000 chips connected to 26 This driver adds support for the SJA1000 chips connected to
27 the OpenFirmware "platform bus" found on embedded systems with 27 the OpenFirmware "platform bus" found on embedded systems with
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
index f2683eb6a3d5..e45258d4369b 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -42,6 +42,8 @@
42#include <linux/can/dev.h> 42#include <linux/can/dev.h>
43 43
44#include <linux/of_platform.h> 44#include <linux/of_platform.h>
45#include <linux/of_address.h>
46#include <linux/of_irq.h>
45#include <asm/prom.h> 47#include <asm/prom.h>
46 48
47#include "sja1000.h" 49#include "sja1000.h"
@@ -59,13 +61,13 @@ MODULE_LICENSE("GPL v2");
59 61
60static u8 sja1000_ofp_read_reg(const struct sja1000_priv *priv, int reg) 62static u8 sja1000_ofp_read_reg(const struct sja1000_priv *priv, int reg)
61{ 63{
62 return in_8(priv->reg_base + reg); 64 return ioread8(priv->reg_base + reg);
63} 65}
64 66
65static void sja1000_ofp_write_reg(const struct sja1000_priv *priv, 67static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
66 int reg, u8 val) 68 int reg, u8 val)
67{ 69{
68 out_8(priv->reg_base + reg, val); 70 iowrite8(val, priv->reg_base + reg);
69} 71}
70 72
71static int __devexit sja1000_ofp_remove(struct platform_device *ofdev) 73static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)