Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04df2510 authored by Andreas Larsson's avatar Andreas Larsson Committed by Marc Kleine-Budde
Browse files

can: sja1000: Make sja1000_of_platform selectable and compilable on SPARC

parent 080f40a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -21,7 +21,7 @@ config CAN_SJA1000_PLATFORM


config CAN_SJA1000_OF_PLATFORM
config CAN_SJA1000_OF_PLATFORM
	tristate "Generic OF Platform Bus based SJA1000 driver"
	tristate "Generic OF Platform Bus based SJA1000 driver"
	depends on PPC_OF
	depends on OF
	---help---
	---help---
	  This driver adds support for the SJA1000 chips connected to
	  This driver adds support for the SJA1000 chips connected to
	  the OpenFirmware "platform bus" found on embedded systems with
	  the OpenFirmware "platform bus" found on embedded systems with
+4 −2
Original line number Original line Diff line number Diff line
@@ -42,6 +42,8 @@
#include <linux/can/dev.h>
#include <linux/can/dev.h>


#include <linux/of_platform.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <asm/prom.h>
#include <asm/prom.h>


#include "sja1000.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)
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,
static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
				  int reg, u8 val)
				  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)
static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)