Commit f3ba1503 authored by David S. Miller's avatar David S. Miller

Merge branch 'can/mscan' of git://git.pengutronix.de/git/mkl/linux-2.6

parents c6865cb3 665d7eb8
...@@ -62,7 +62,7 @@ static enum can_state state_map[] = { ...@@ -62,7 +62,7 @@ static enum can_state state_map[] = {
static int mscan_set_mode(struct net_device *dev, u8 mode) static int mscan_set_mode(struct net_device *dev, u8 mode)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
int ret = 0; int ret = 0;
int i; int i;
u8 canctl1; u8 canctl1;
...@@ -138,7 +138,7 @@ static int mscan_set_mode(struct net_device *dev, u8 mode) ...@@ -138,7 +138,7 @@ static int mscan_set_mode(struct net_device *dev, u8 mode)
static int mscan_start(struct net_device *dev) static int mscan_start(struct net_device *dev)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
u8 canrflg; u8 canrflg;
int err; int err;
...@@ -178,7 +178,7 @@ static int mscan_restart(struct net_device *dev) ...@@ -178,7 +178,7 @@ static int mscan_restart(struct net_device *dev)
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
if (priv->type == MSCAN_TYPE_MPC5121) { if (priv->type == MSCAN_TYPE_MPC5121) {
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
priv->can.state = CAN_STATE_ERROR_ACTIVE; priv->can.state = CAN_STATE_ERROR_ACTIVE;
WARN(!(in_8(&regs->canmisc) & MSCAN_BOHOLD), WARN(!(in_8(&regs->canmisc) & MSCAN_BOHOLD),
...@@ -199,7 +199,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -199,7 +199,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
{ {
struct can_frame *frame = (struct can_frame *)skb->data; struct can_frame *frame = (struct can_frame *)skb->data;
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
int i, rtr, buf_id; int i, rtr, buf_id;
u32 can_id; u32 can_id;
...@@ -305,7 +305,7 @@ static enum can_state check_set_state(struct net_device *dev, u8 canrflg) ...@@ -305,7 +305,7 @@ static enum can_state check_set_state(struct net_device *dev, u8 canrflg)
static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame) static void mscan_get_rx_frame(struct net_device *dev, struct can_frame *frame)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
u32 can_id; u32 can_id;
int i; int i;
...@@ -343,7 +343,7 @@ static void mscan_get_err_frame(struct net_device *dev, struct can_frame *frame, ...@@ -343,7 +343,7 @@ static void mscan_get_err_frame(struct net_device *dev, struct can_frame *frame,
u8 canrflg) u8 canrflg)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
struct net_device_stats *stats = &dev->stats; struct net_device_stats *stats = &dev->stats;
enum can_state old_state; enum can_state old_state;
...@@ -406,7 +406,7 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota) ...@@ -406,7 +406,7 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
{ {
struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi); struct mscan_priv *priv = container_of(napi, struct mscan_priv, napi);
struct net_device *dev = napi->dev; struct net_device *dev = napi->dev;
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
struct net_device_stats *stats = &dev->stats; struct net_device_stats *stats = &dev->stats;
int npackets = 0; int npackets = 0;
int ret = 1; int ret = 1;
...@@ -453,7 +453,7 @@ static irqreturn_t mscan_isr(int irq, void *dev_id) ...@@ -453,7 +453,7 @@ static irqreturn_t mscan_isr(int irq, void *dev_id)
{ {
struct net_device *dev = (struct net_device *)dev_id; struct net_device *dev = (struct net_device *)dev_id;
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
struct net_device_stats *stats = &dev->stats; struct net_device_stats *stats = &dev->stats;
u8 cantier, cantflg, canrflg; u8 cantier, cantflg, canrflg;
irqreturn_t ret = IRQ_NONE; irqreturn_t ret = IRQ_NONE;
...@@ -537,7 +537,7 @@ static int mscan_do_set_mode(struct net_device *dev, enum can_mode mode) ...@@ -537,7 +537,7 @@ static int mscan_do_set_mode(struct net_device *dev, enum can_mode mode)
static int mscan_do_set_bittiming(struct net_device *dev) static int mscan_do_set_bittiming(struct net_device *dev)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
struct can_bittiming *bt = &priv->can.bittiming; struct can_bittiming *bt = &priv->can.bittiming;
u8 btr0, btr1; u8 btr0, btr1;
...@@ -559,7 +559,7 @@ static int mscan_open(struct net_device *dev) ...@@ -559,7 +559,7 @@ static int mscan_open(struct net_device *dev)
{ {
int ret; int ret;
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
/* common open */ /* common open */
ret = open_candev(dev); ret = open_candev(dev);
...@@ -598,7 +598,7 @@ static int mscan_open(struct net_device *dev) ...@@ -598,7 +598,7 @@ static int mscan_open(struct net_device *dev)
static int mscan_close(struct net_device *dev) static int mscan_close(struct net_device *dev)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
netif_stop_queue(dev); netif_stop_queue(dev);
napi_disable(&priv->napi); napi_disable(&priv->napi);
...@@ -622,7 +622,7 @@ static const struct net_device_ops mscan_netdev_ops = { ...@@ -622,7 +622,7 @@ static const struct net_device_ops mscan_netdev_ops = {
int register_mscandev(struct net_device *dev, int mscan_clksrc) int register_mscandev(struct net_device *dev, int mscan_clksrc)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
u8 ctl1; u8 ctl1;
ctl1 = in_8(&regs->canctl1); ctl1 = in_8(&regs->canctl1);
...@@ -659,7 +659,7 @@ int register_mscandev(struct net_device *dev, int mscan_clksrc) ...@@ -659,7 +659,7 @@ int register_mscandev(struct net_device *dev, int mscan_clksrc)
void unregister_mscandev(struct net_device *dev) void unregister_mscandev(struct net_device *dev)
{ {
struct mscan_priv *priv = netdev_priv(dev); struct mscan_priv *priv = netdev_priv(dev);
struct mscan_regs *regs = (struct mscan_regs *)priv->reg_base; struct mscan_regs __iomem *regs = priv->reg_base;
mscan_set_mode(dev, MSCAN_INIT_MODE); mscan_set_mode(dev, MSCAN_INIT_MODE);
clrbits8(&regs->canctl1, MSCAN_CANE); clrbits8(&regs->canctl1, MSCAN_CANE);
unregister_candev(dev); unregister_candev(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment