Skip to content

Commit

Permalink
can: sja1000: Make sja1000_of_platform selectable and compilable on S…
Browse files Browse the repository at this point in the history
…PARC

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Andreas Larsson authored and Marc Kleine-Budde committed Nov 27, 2012
1 parent 080f40a commit 04df251
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/can/sja1000/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/can/sja1000/sja1000_of_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down

0 comments on commit 04df251

Please sign in to comment.