Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324790
b: refs/heads/master
c: 64802dc
h: refs/heads/master
v: v3
  • Loading branch information
Jens Taprogge authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent 6f46017 commit e79f189
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cea2f7cdff2af520dfeb99eec7a0a0d729a3720f
refs/heads/master: 64802dc8ed1e31ccc4d05f5d3ef7d215600589cb
29 changes: 8 additions & 21 deletions trunk/drivers/staging/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/tty_flip.h>
#include <linux/slab.h>
#include <linux/atomic.h>
#include <linux/io.h>
#include "../ipack.h"
#include "ipoctal.h"
#include "scc2698.h"
Expand Down Expand Up @@ -61,30 +62,20 @@ static inline void ipoctal_write_io_reg(struct ipoctal *ipoctal,
unsigned char *dest,
unsigned char value)
{
unsigned long offset;

offset = ((void __iomem *) dest) - ipoctal->dev->io_space.address;
ipoctal->dev->bus->ops->write8(ipoctal->dev, IPACK_IO_SPACE, offset,
value);
iowrite8(value, dest);
}

static inline void ipoctal_write_cr_cmd(struct ipoctal *ipoctal,
unsigned char *dest,
unsigned char value)
u8 __iomem *dest,
u8 value)
{
ipoctal_write_io_reg(ipoctal, dest, value);
}

static inline unsigned char ipoctal_read_io_reg(struct ipoctal *ipoctal,
unsigned char *src)
{
unsigned long offset;
unsigned char value;

offset = ((void __iomem *) src) - ipoctal->dev->io_space.address;
ipoctal->dev->bus->ops->read8(ipoctal->dev, IPACK_IO_SPACE, offset,
&value);
return value;
return ioread8(src);
}

static struct ipoctal *ipoctal_find_board(struct tty_struct *tty)
Expand Down Expand Up @@ -331,14 +322,11 @@ static int ipoctal_check_model(struct ipack_device *dev, unsigned char *id)
unsigned char manufacturerID;
unsigned char board_id;

dev->bus->ops->read8(dev, IPACK_ID_SPACE,
IPACK_IDPROM_OFFSET_MANUFACTURER_ID, &manufacturerID);
manufacturerID = ioread8(dev->id_space.address + IPACK_IDPROM_OFFSET_MANUFACTURER_ID);
if (manufacturerID != IP_OCTAL_MANUFACTURER_ID)
return -ENODEV;

dev->bus->ops->read8(dev, IPACK_ID_SPACE,
IPACK_IDPROM_OFFSET_MODEL, (unsigned char *)&board_id);

board_id = ioread8(dev->id_space.address + IPACK_IDPROM_OFFSET_MODEL);
switch (board_id) {
case IP_OCTAL_232_ID:
case IP_OCTAL_422_ID:
Expand Down Expand Up @@ -449,8 +437,7 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
*/
ipoctal->dev->bus->ops->request_irq(ipoctal->dev, vector,
ipoctal_irq_handler, ipoctal);
ipoctal->dev->bus->ops->write8(ipoctal->dev, IPACK_MEM_SPACE, 1,
vector);
iowrite8(vector, ipoctal->dev->mem_space.address + 1);

/* Register the TTY device */

Expand Down

0 comments on commit e79f189

Please sign in to comment.