]> git.karo-electronics.de Git - linux-beck.git/commitdiff
can: sja1000: Make sja1000_of_platform selectable and compilable on SPARC
authorAndreas Larsson <andreas@gaisler.com>
Thu, 4 Oct 2012 13:59:10 +0000 (15:59 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 27 Nov 2012 08:49:32 +0000 (09:49 +0100)
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/sja1000/Kconfig
drivers/net/can/sja1000/sja1000_of_platform.c

index 559be87a09040803501987841c08f7b05a71157e..92f73c708a3d7c3ec80133fb4b2f05872fd11849 100644 (file)
@@ -21,7 +21,7 @@ config CAN_SJA1000_PLATFORM
 
 config CAN_SJA1000_OF_PLATFORM
        tristate "Generic OF Platform Bus based SJA1000 driver"
-       depends on PPC_OF
+       depends on OF
        ---help---
          This driver adds support for the SJA1000 chips connected to
          the OpenFirmware "platform bus" found on embedded systems with
index f2683eb6a3d588a7dff7af9f8830a79dc18206c7..e45258d4369bb0fb721f3bfbc1a09832b26e57f9 100644 (file)
@@ -42,6 +42,8 @@
 #include <linux/can/dev.h>
 
 #include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/of_irq.h>
 #include <asm/prom.h>
 
 #include "sja1000.h"
@@ -59,13 +61,13 @@ MODULE_LICENSE("GPL v2");
 
 static u8 sja1000_ofp_read_reg(const struct sja1000_priv *priv, int reg)
 {
-       return in_8(priv->reg_base + reg);
+       return ioread8(priv->reg_base + reg);
 }
 
 static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
                                  int reg, u8 val)
 {
-       out_8(priv->reg_base + reg, val);
+       iowrite8(val, priv->reg_base + reg);
 }
 
 static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)