Commit d886cb58 authored by Al Viro's avatar Al Viro

[PATCH] trivial annotations in rio

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a8bd6070
...@@ -51,7 +51,7 @@ struct Error { ...@@ -51,7 +51,7 @@ struct Error {
}; };
struct DownLoad { struct DownLoad {
char *DataP; char __user *DataP;
unsigned int Count; unsigned int Count;
unsigned int ProductCode; unsigned int ProductCode;
}; };
...@@ -83,18 +83,18 @@ struct PortSetup { ...@@ -83,18 +83,18 @@ struct PortSetup {
struct LpbReq { struct LpbReq {
unsigned int Host; unsigned int Host;
unsigned int Link; unsigned int Link;
struct LPB *LpbP; struct LPB __user *LpbP;
}; };
struct RupReq { struct RupReq {
unsigned int HostNum; unsigned int HostNum;
unsigned int RupNum; unsigned int RupNum;
struct RUP *RupP; struct RUP __user *RupP;
}; };
struct PortReq { struct PortReq {
unsigned int SysPort; unsigned int SysPort;
struct Port *PortP; struct Port __user *PortP;
}; };
struct StreamInfo { struct StreamInfo {
...@@ -105,12 +105,12 @@ struct StreamInfo { ...@@ -105,12 +105,12 @@ struct StreamInfo {
struct HostReq { struct HostReq {
unsigned int HostNum; unsigned int HostNum;
struct Host *HostP; struct Host __user *HostP;
}; };
struct HostDpRam { struct HostDpRam {
unsigned int HostNum; unsigned int HostNum;
struct DpRam *DpRamP; struct DpRam __user *DpRamP;
}; };
struct DebugCtrl { struct DebugCtrl {
......
...@@ -46,7 +46,7 @@ int RIOBootCodeRTA(struct rio_info *, struct DownLoad *); ...@@ -46,7 +46,7 @@ int RIOBootCodeRTA(struct rio_info *, struct DownLoad *);
int RIOBootCodeHOST(struct rio_info *, struct DownLoad *); int RIOBootCodeHOST(struct rio_info *, struct DownLoad *);
int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *); int RIOBootCodeUNKNOWN(struct rio_info *, struct DownLoad *);
void msec_timeout(struct Host *); void msec_timeout(struct Host *);
int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT *); int RIOBootRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *);
int RIOBootOk(struct rio_info *, struct Host *, unsigned long); int RIOBootOk(struct rio_info *, struct Host *, unsigned long);
int RIORtaBound(struct rio_info *, unsigned int); int RIORtaBound(struct rio_info *, unsigned int);
void rio_fill_host_slot(int, int, unsigned int, struct Host *); void rio_fill_host_slot(int, int, unsigned int, struct Host *);
...@@ -55,8 +55,8 @@ void rio_fill_host_slot(int, int, unsigned int, struct Host *); ...@@ -55,8 +55,8 @@ void rio_fill_host_slot(int, int, unsigned int, struct Host *);
int RIOFoadRta(struct Host *, struct Map *); int RIOFoadRta(struct Host *, struct Map *);
int RIOZombieRta(struct Host *, struct Map *); int RIOZombieRta(struct Host *, struct Map *);
int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *)); int RIOCommandRta(struct rio_info *, unsigned long, int (*func) (struct Host *, struct Map *));
int RIOIdentifyRta(struct rio_info *, void *); int RIOIdentifyRta(struct rio_info *, void __user *);
int RIOKillNeighbour(struct rio_info *, void *); int RIOKillNeighbour(struct rio_info *, void __user *);
int RIOSuspendBootRta(struct Host *, int, int); int RIOSuspendBootRta(struct Host *, int, int);
int RIOFoadWakeup(struct rio_info *); int RIOFoadWakeup(struct rio_info *);
struct CmdBlk *RIOGetCmdBlk(void); struct CmdBlk *RIOGetCmdBlk(void);
...@@ -68,7 +68,8 @@ int RIORFlushEnable(unsigned long, struct CmdBlk *); ...@@ -68,7 +68,8 @@ int RIORFlushEnable(unsigned long, struct CmdBlk *);
int RIOUnUse(unsigned long, struct CmdBlk *); int RIOUnUse(unsigned long, struct CmdBlk *);
/* rioctrl.c */ /* rioctrl.c */
int riocontrol(struct rio_info *, dev_t, int, caddr_t, int); int riocontrol(struct rio_info *, dev_t, int, unsigned long, int);
int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char); int RIOPreemptiveCmd(struct rio_info *, struct Port *, unsigned char);
/* rioinit.c */ /* rioinit.c */
...@@ -77,13 +78,13 @@ void RIOInitHosts(struct rio_info *, struct RioHostInfo *); ...@@ -77,13 +78,13 @@ void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
void RIOISAinit(struct rio_info *, int); void RIOISAinit(struct rio_info *, int);
int RIODoAT(struct rio_info *, int, int); int RIODoAT(struct rio_info *, int, int);
caddr_t RIOCheckForATCard(int); caddr_t RIOCheckForATCard(int);
int RIOAssignAT(struct rio_info *, int, caddr_t, int); int RIOAssignAT(struct rio_info *, int, void __iomem *, int);
int RIOBoardTest(unsigned long, caddr_t, unsigned char, int); int RIOBoardTest(unsigned long, void __iomem *, unsigned char, int);
void RIOAllocDataStructs(struct rio_info *); void RIOAllocDataStructs(struct rio_info *);
void RIOSetupDataStructs(struct rio_info *); void RIOSetupDataStructs(struct rio_info *);
int RIODefaultName(struct rio_info *, struct Host *, unsigned int); int RIODefaultName(struct rio_info *, struct Host *, unsigned int);
struct rioVersion *RIOVersid(void); struct rioVersion *RIOVersid(void);
void RIOHostReset(unsigned int, struct DpRam *, unsigned int); void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int);
/* riointr.c */ /* riointr.c */
void RIOTxEnable(char *); void RIOTxEnable(char *);
...@@ -95,14 +96,14 @@ int RIOParam(struct Port *, int, int, int); ...@@ -95,14 +96,14 @@ int RIOParam(struct Port *, int, int, int);
int RIODelay(struct Port *PortP, int); int RIODelay(struct Port *PortP, int);
int RIODelay_ni(struct Port *PortP, int); int RIODelay_ni(struct Port *PortP, int);
void ms_timeout(struct Port *); void ms_timeout(struct Port *);
int can_add_transmit(struct PKT **, struct Port *); int can_add_transmit(struct PKT __iomem **, struct Port *);
void add_transmit(struct Port *); void add_transmit(struct Port *);
void put_free_end(struct Host *, struct PKT *); void put_free_end(struct Host *, struct PKT __iomem *);
int can_remove_receive(struct PKT **, struct Port *); int can_remove_receive(struct PKT __iomem **, struct Port *);
void remove_receive(struct Port *); void remove_receive(struct Port *);
/* rioroute.c */ /* rioroute.c */
int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT *); int RIORouteRup(struct rio_info *, unsigned int, struct Host *, struct PKT __iomem *);
void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int); void RIOFixPhbs(struct rio_info *, struct Host *, unsigned int);
unsigned int GetUnitType(unsigned int); unsigned int GetUnitType(unsigned int);
int RIOSetChange(struct rio_info *); int RIOSetChange(struct rio_info *);
...@@ -139,7 +140,7 @@ int rio_isr_thread(char *); ...@@ -139,7 +140,7 @@ int rio_isr_thread(char *);
struct rio_info *rio_info_store(int cmd, struct rio_info *p); struct rio_info *rio_info_store(int cmd, struct rio_info *p);
#endif #endif
extern void rio_copy_to_card(void *to, void *from, int len); extern void rio_copy_to_card(void __iomem *to, void *from, int len);
extern int rio_minor(struct tty_struct *tty); extern int rio_minor(struct tty_struct *tty);
extern int rio_ismodem(struct tty_struct *tty); extern int rio_ismodem(struct tty_struct *tty);
......
...@@ -48,8 +48,8 @@ struct Host { ...@@ -48,8 +48,8 @@ struct Host {
unsigned char Ivec; /* POLLED or ivec number */ unsigned char Ivec; /* POLLED or ivec number */
unsigned char Mode; /* Control stuff */ unsigned char Mode; /* Control stuff */
unsigned char Slot; /* Slot */ unsigned char Slot; /* Slot */
caddr_t Caddr; /* KV address of DPRAM */ void __iomem *Caddr; /* KV address of DPRAM */
struct DpRam *CardP; /* KV address of DPRAM, with overlay */ struct DpRam __iomem *CardP; /* KV address of DPRAM, with overlay */
unsigned long PaddrP; /* Phys. address of DPRAM */ unsigned long PaddrP; /* Phys. address of DPRAM */
char Name[MAX_NAME_LEN]; /* The name of the host */ char Name[MAX_NAME_LEN]; /* The name of the host */
unsigned int UniqueNum; /* host unique number */ unsigned int UniqueNum; /* host unique number */
...@@ -57,7 +57,7 @@ struct Host { ...@@ -57,7 +57,7 @@ struct Host {
unsigned int WorkToBeDone; /* set to true each interrupt */ unsigned int WorkToBeDone; /* set to true each interrupt */
unsigned int InIntr; /* Being serviced? */ unsigned int InIntr; /* Being serviced? */
unsigned int IntSrvDone; /* host's interrupt has been serviced */ unsigned int IntSrvDone; /* host's interrupt has been serviced */
void (*Copy) (void *, void *, int); /* copy func */ void (*Copy) (void *, void __iomem *, int); /* copy func */
struct timer_list timer; struct timer_list timer;
/* /*
** I M P O R T A N T ! ** I M P O R T A N T !
...@@ -83,11 +83,11 @@ struct Host { ...@@ -83,11 +83,11 @@ struct Host {
struct Top Topology[LINKS_PER_UNIT]; /* one per link */ struct Top Topology[LINKS_PER_UNIT]; /* one per link */
struct Map Mapping[MAX_RUP]; /* Mappings for host */ struct Map Mapping[MAX_RUP]; /* Mappings for host */
struct PHB *PhbP; /* Pointer to the PHB array */ struct PHB __iomem *PhbP; /* Pointer to the PHB array */
unsigned short *PhbNumP; /* Ptr to Number of PHB's */ unsigned short __iomem *PhbNumP; /* Ptr to Number of PHB's */
struct LPB *LinkStrP; /* Link Structure Array */ struct LPB __iomem *LinkStrP; /* Link Structure Array */
struct RUP *RupP; /* Sixteen real rups here */ struct RUP __iomem *RupP; /* Sixteen real rups here */
struct PARM_MAP *ParmMapP; /* points to the parmmap */ struct PARM_MAP __iomem *ParmMapP; /* points to the parmmap */
unsigned int ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */ unsigned int ExtraUnits[MAX_EXTRA_UNITS]; /* unknown things */
unsigned int NumExtraBooted; /* how many of the above */ unsigned int NumExtraBooted; /* how many of the above */
/* /*
......
...@@ -40,7 +40,7 @@ struct Port { ...@@ -40,7 +40,7 @@ struct Port {
struct gs_port gs; struct gs_port gs;
int PortNum; /* RIO port no., 0-511 */ int PortNum; /* RIO port no., 0-511 */
struct Host *HostP; struct Host *HostP;
caddr_t Caddr; void __iomem *Caddr;
unsigned short HostPort; /* Port number on host card */ unsigned short HostPort; /* Port number on host card */
unsigned char RupNum; /* Number of RUP for port */ unsigned char RupNum; /* Number of RUP for port */
unsigned char ID2; /* Second ID of RTA for port */ unsigned char ID2; /* Second ID of RTA for port */
...@@ -92,13 +92,13 @@ struct Port { ...@@ -92,13 +92,13 @@ struct Port {
#define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */ #define RIO_RTSFLOW 0x0400 /* RIO's own RTSFLOW flag */
struct PHB *PhbP; /* pointer to PHB for port */ struct PHB __iomem *PhbP; /* pointer to PHB for port */
u16 *TxAdd; /* Add packets here */ u16 __iomem *TxAdd; /* Add packets here */
u16 *TxStart; /* Start of add array */ u16 __iomem *TxStart; /* Start of add array */
u16 *TxEnd; /* End of add array */ u16 __iomem *TxEnd; /* End of add array */
u16 *RxRemove; /* Remove packets here */ u16 __iomem *RxRemove; /* Remove packets here */
u16 *RxStart; /* Start of remove array */ u16 __iomem *RxStart; /* Start of remove array */
u16 *RxEnd; /* End of remove array */ u16 __iomem *RxEnd; /* End of remove array */
unsigned int RtaUniqueNum; /* Unique number of RTA */ unsigned int RtaUniqueNum; /* Unique number of RTA */
unsigned short PortState; /* status of port */ unsigned short PortState; /* status of port */
unsigned short ModemState; /* status of modem lines */ unsigned short ModemState; /* status of modem lines */
......
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
** RIO_OBJ takes hostp->Caddr and a UNIX pointer to an object and ** RIO_OBJ takes hostp->Caddr and a UNIX pointer to an object and
** returns the offset into the DP RAM area. ** returns the offset into the DP RAM area.
*/ */
#define RIO_PTR(C,O) (((unsigned char *)(C))+(0xFFFF&(O))) #define RIO_PTR(C,O) (((unsigned char __iomem *)(C))+(0xFFFF&(O)))
#define RIO_OFF(C,O) ((long)(O)-(long)(C)) #define RIO_OFF(C,O) ((unsigned char __iomem *)(O)-(unsigned char __iomem *)(C))
/* /*
** How to convert from various different device number formats: ** How to convert from various different device number formats:
......
...@@ -333,7 +333,7 @@ int RIODelay_ni(struct Port *PortP, int njiffies) ...@@ -333,7 +333,7 @@ int RIODelay_ni(struct Port *PortP, int njiffies)
return !RIO_FAIL; return !RIO_FAIL;
} }
void rio_copy_to_card(void *to, void *from, int len) void rio_copy_to_card(void __iomem *to, void *from, int len)
{ {
rio_memcpy_toio(NULL, to, from, len); rio_memcpy_toio(NULL, to, from, len);
} }
...@@ -573,7 +573,7 @@ static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd ...@@ -573,7 +573,7 @@ static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd
func_enter(); func_enter();
/* The "dev" argument isn't used. */ /* The "dev" argument isn't used. */
rc = riocontrol(p, 0, cmd, (void *) arg, capable(CAP_SYS_ADMIN)); rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN));
func_exit(); func_exit();
return rc; return rc;
...@@ -583,6 +583,7 @@ extern int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, ...@@ -583,6 +583,7 @@ extern int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command,
static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg) static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd, unsigned long arg)
{ {
void __user *argp = (void __user *)arg;
int rc; int rc;
struct Port *PortP; struct Port *PortP;
int ival; int ival;
...@@ -594,14 +595,14 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd ...@@ -594,14 +595,14 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
rc = 0; rc = 0;
switch (cmd) { switch (cmd) {
case TIOCSSOFTCAR: case TIOCSSOFTCAR:
if ((rc = get_user(ival, (unsigned int *) arg)) == 0) { if ((rc = get_user(ival, (unsigned __user *) argp)) == 0) {
tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (ival ? CLOCAL : 0); tty->termios->c_cflag = (tty->termios->c_cflag & ~CLOCAL) | (ival ? CLOCAL : 0);
} }
break; break;
case TIOCGSERIAL: case TIOCGSERIAL:
rc = -EFAULT; rc = -EFAULT;
if (access_ok(VERIFY_WRITE, (void *) arg, sizeof(struct serial_struct))) if (access_ok(VERIFY_WRITE, argp, sizeof(struct serial_struct)))
rc = gs_getserial(&PortP->gs, (struct serial_struct *) arg); rc = gs_getserial(&PortP->gs, argp);
break; break;
case TCSBRK: case TCSBRK:
if (PortP->State & RIO_DELETED) { if (PortP->State & RIO_DELETED) {
...@@ -631,8 +632,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd ...@@ -631,8 +632,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
break; break;
case TIOCSSERIAL: case TIOCSSERIAL:
rc = -EFAULT; rc = -EFAULT;
if (access_ok(VERIFY_READ, (void *) arg, sizeof(struct serial_struct))) if (access_ok(VERIFY_READ, argp, sizeof(struct serial_struct)))
rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg); rc = gs_setserial(&PortP->gs, argp);
break; break;
default: default:
rc = -ENOIOCTLCMD; rc = -ENOIOCTLCMD;
...@@ -919,7 +920,7 @@ static void __exit rio_release_drivers(void) ...@@ -919,7 +920,7 @@ static void __exit rio_release_drivers(void)
static void fix_rio_pci(struct pci_dev *pdev) static void fix_rio_pci(struct pci_dev *pdev)
{ {
unsigned long hwbase; unsigned long hwbase;
unsigned char *rebase; unsigned char __iomem *rebase;
unsigned int t; unsigned int t;
#define CNTRL_REG_OFFSET 0x50 #define CNTRL_REG_OFFSET 0x50
...@@ -999,7 +1000,7 @@ static int __init rio_init(void) ...@@ -999,7 +1000,7 @@ static int __init rio_init(void)
if (((1 << hp->Ivec) & rio_irqmask) == 0) if (((1 << hp->Ivec) & rio_irqmask) == 0)
hp->Ivec = 0; hp->Ivec = 0;
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
hp->CardP = (struct DpRam *) hp->Caddr; hp->CardP = (struct DpRam __iomem *) hp->Caddr;
hp->Type = RIO_PCI; hp->Type = RIO_PCI;
hp->Copy = rio_copy_to_card; hp->Copy = rio_copy_to_card;
hp->Mode = RIO_PCI_BOOT_FROM_RAM; hp->Mode = RIO_PCI_BOOT_FROM_RAM;
...@@ -1021,7 +1022,7 @@ static int __init rio_init(void) ...@@ -1021,7 +1022,7 @@ static int __init rio_init(void)
p->RIONumHosts++; p->RIONumHosts++;
found++; found++;
} else { } else {
iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr)); iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
} }
} }
...@@ -1047,7 +1048,7 @@ static int __init rio_init(void) ...@@ -1047,7 +1048,7 @@ static int __init rio_init(void)
hp->Ivec = 0; hp->Ivec = 0;
hp->Ivec |= 0x8000; /* Mark as non-sharable */ hp->Ivec |= 0x8000; /* Mark as non-sharable */
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
hp->CardP = (struct DpRam *) hp->Caddr; hp->CardP = (struct DpRam __iomem *) hp->Caddr;
hp->Type = RIO_PCI; hp->Type = RIO_PCI;
hp->Copy = rio_copy_to_card; hp->Copy = rio_copy_to_card;
hp->Mode = RIO_PCI_BOOT_FROM_RAM; hp->Mode = RIO_PCI_BOOT_FROM_RAM;
...@@ -1070,7 +1071,7 @@ static int __init rio_init(void) ...@@ -1070,7 +1071,7 @@ static int __init rio_init(void)
p->RIONumHosts++; p->RIONumHosts++;
found++; found++;
} else { } else {
iounmap((char *) (p->RIOHosts[p->RIONumHosts].Caddr)); iounmap(p->RIOHosts[p->RIONumHosts].Caddr);
} }
#else #else
printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n"); printk(KERN_ERR "Found an older RIO PCI card, but the driver is not " "compiled to support it.\n");
...@@ -1085,7 +1086,7 @@ static int __init rio_init(void) ...@@ -1085,7 +1086,7 @@ static int __init rio_init(void)
/* There was something about the IRQs of these cards. 'Forget what.--REW */ /* There was something about the IRQs of these cards. 'Forget what.--REW */
hp->Ivec = 0; hp->Ivec = 0;
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN); hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP, RIO_WINDOW_LEN);
hp->CardP = (struct DpRam *) hp->Caddr; hp->CardP = (struct DpRam __iomem *) hp->Caddr;
hp->Type = RIO_AT; hp->Type = RIO_AT;
hp->Copy = rio_copy_to_card; /* AT card PCI???? - PVDL hp->Copy = rio_copy_to_card; /* AT card PCI???? - PVDL
* -- YES! this is now a normal copy. Only the * -- YES! this is now a normal copy. Only the
...@@ -1111,7 +1112,7 @@ static int __init rio_init(void) ...@@ -1111,7 +1112,7 @@ static int __init rio_init(void)
} }
if (!okboard) if (!okboard)
iounmap((char *) (hp->Caddr)); iounmap(hp->Caddr);
} }
} }
......
...@@ -131,24 +131,24 @@ struct vpd_prom { ...@@ -131,24 +131,24 @@ struct vpd_prom {
#ifdef CONFIG_RIO_OLDPCI #ifdef CONFIG_RIO_OLDPCI
static inline void *rio_memcpy_toio(void *dummy, void *dest, void *source, int n) static inline void __iomem *rio_memcpy_toio(void __iomem *dummy, void __iomem *dest, void *source, int n)
{ {
char *dst = dest; char __iomem *dst = dest;
char *src = source; char *src = source;
while (n--) { while (n--) {
writeb(*src++, dst++); writeb(*src++, dst++);
(void) readb(dummy); (void) readb(dummy); /* WTF? */
} }
return dest; return dest;
} }
static inline void *rio_memcpy_fromio(void *dest, void *source, int n) static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n)
{ {
char *dst = dest; char *dst = dest;
char *src = source; char __iomem *src = source;
while (n--) while (n--)
*dst++ = readb(src++); *dst++ = readb(src++);
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
#include "cmdblk.h" #include "cmdblk.h"
#include "route.h" #include "route.h"
static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd *PktCmdP); static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd __iomem *PktCmdP);
static const unsigned char RIOAtVec2Ctrl[] = { static const unsigned char RIOAtVec2Ctrl[] = {
/* 0 */ INTERRUPT_DISABLE, /* 0 */ INTERRUPT_DISABLE,
...@@ -204,13 +204,13 @@ void rio_start_card_running(struct Host *HostP) ...@@ -204,13 +204,13 @@ void rio_start_card_running(struct Host *HostP)
int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
{ {
struct Host *HostP; struct Host *HostP;
u8 *Cad; u8 __iomem *Cad;
PARM_MAP *ParmMapP; PARM_MAP __iomem *ParmMapP;
int RupN; int RupN;
int PortN; int PortN;
unsigned int host; unsigned int host;
u8 *StartP; u8 __iomem *StartP;
u8 *DestP; u8 __iomem *DestP;
int wait_count; int wait_count;
u16 OldParmMap; u16 OldParmMap;
u16 offset; /* It is very important that this is a u16 */ u16 offset; /* It is very important that this is a u16 */
...@@ -262,7 +262,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -262,7 +262,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
** Ensure that the host really is stopped. ** Ensure that the host really is stopped.
** Disable it's external bus & twang its reset line. ** Disable it's external bus & twang its reset line.
*/ */
RIOHostReset(HostP->Type, (struct DpRam *) HostP->CardP, HostP->Slot); RIOHostReset(HostP->Type, HostP->CardP, HostP->Slot);
/* /*
** Copy the data directly from user space to the SRAM. ** Copy the data directly from user space to the SRAM.
...@@ -366,7 +366,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -366,7 +366,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
** a short branch to 0x7FF8, where a long branch is coded. ** a short branch to 0x7FF8, where a long branch is coded.
*/ */
DestP = (u8 *) &Cad[0x7FF8]; /* <<<---- READ THE ABOVE COMMENTS */ DestP = &Cad[0x7FF8]; /* <<<---- READ THE ABOVE COMMENTS */
#define NFIX(N) (0x60 | (N)) /* .O = (~(.O + N))<<4 */ #define NFIX(N) (0x60 | (N)) /* .O = (~(.O + N))<<4 */
#define PFIX(N) (0x20 | (N)) /* .O = (.O + N)<<4 */ #define PFIX(N) (0x20 | (N)) /* .O = (.O + N)<<4 */
...@@ -438,7 +438,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -438,7 +438,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail\n"); rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail\n");
HostP->Flags &= ~RUN_STATE; HostP->Flags &= ~RUN_STATE;
HostP->Flags |= RC_STUFFED; HostP->Flags |= RC_STUFFED;
RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot ); RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot );
continue; continue;
} }
...@@ -453,9 +453,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -453,9 +453,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
/* /*
** Grab a 32 bit pointer to the parmmap structure ** Grab a 32 bit pointer to the parmmap structure
*/ */
ParmMapP = (PARM_MAP *) RIO_PTR(Cad, readw(&HostP->__ParmMapR)); ParmMapP = (PARM_MAP __iomem *) RIO_PTR(Cad, readw(&HostP->__ParmMapR));
rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %p\n", ParmMapP); rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %p\n", ParmMapP);
ParmMapP = (PARM_MAP *) ((unsigned long) Cad + readw(&HostP->__ParmMapR)); ParmMapP = (PARM_MAP __iomem *)(Cad + readw(&HostP->__ParmMapR));
rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %p\n", ParmMapP); rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %p\n", ParmMapP);
/* /*
...@@ -468,7 +468,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -468,7 +468,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
rio_dprintk(RIO_DEBUG_BOOT, "Links = 0x%x\n", readw(&ParmMapP->links)); rio_dprintk(RIO_DEBUG_BOOT, "Links = 0x%x\n", readw(&ParmMapP->links));
HostP->Flags &= ~RUN_STATE; HostP->Flags &= ~RUN_STATE;
HostP->Flags |= RC_STUFFED; HostP->Flags |= RC_STUFFED;
RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot ); RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot );
continue; continue;
} }
...@@ -491,7 +491,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -491,7 +491,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
rio_dprintk(RIO_DEBUG_BOOT, "Timedout waiting for init_done\n"); rio_dprintk(RIO_DEBUG_BOOT, "Timedout waiting for init_done\n");
HostP->Flags &= ~RUN_STATE; HostP->Flags &= ~RUN_STATE;
HostP->Flags |= RC_STUFFED; HostP->Flags |= RC_STUFFED;
RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot ); RIOHostReset( HostP->Type, HostP->CardP, HostP->Slot );
continue; continue;
} }
...@@ -512,10 +512,10 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -512,10 +512,10 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
** 32 bit pointers for the driver in ioremap space. ** 32 bit pointers for the driver in ioremap space.
*/ */
HostP->ParmMapP = ParmMapP; HostP->ParmMapP = ParmMapP;
HostP->PhbP = (struct PHB *) RIO_PTR(Cad, readw(&ParmMapP->phb_ptr)); HostP->PhbP = (struct PHB __iomem *) RIO_PTR(Cad, readw(&ParmMapP->phb_ptr));
HostP->RupP = (struct RUP *) RIO_PTR(Cad, readw(&ParmMapP->rups)); HostP->RupP = (struct RUP __iomem *) RIO_PTR(Cad, readw(&ParmMapP->rups));
HostP->PhbNumP = (unsigned short *) RIO_PTR(Cad, readw(&ParmMapP->phb_num_ptr)); HostP->PhbNumP = (unsigned short __iomem *) RIO_PTR(Cad, readw(&ParmMapP->phb_num_ptr));
HostP->LinkStrP = (struct LPB *) RIO_PTR(Cad, readw(&ParmMapP->link_str_ptr)); HostP->LinkStrP = (struct LPB __iomem *) RIO_PTR(Cad, readw(&ParmMapP->link_str_ptr));
/* /*
** point the UnixRups at the real Rups ** point the UnixRups at the real Rups
...@@ -540,7 +540,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -540,7 +540,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
for (PortN = p->RIOFirstPortsMapped; PortN < p->RIOLastPortsMapped + PORTS_PER_RTA; PortN++) { for (PortN = p->RIOFirstPortsMapped; PortN < p->RIOLastPortsMapped + PORTS_PER_RTA; PortN++) {
if (p->RIOPortp[PortN]->HostP == HostP) { if (p->RIOPortp[PortN]->HostP == HostP) {
struct Port *PortP = p->RIOPortp[PortN]; struct Port *PortP = p->RIOPortp[PortN];
struct PHB *PhbP; struct PHB __iomem *PhbP;
/* int oldspl; */ /* int oldspl; */
if (!PortP->Mapped) if (!PortP->Mapped)
...@@ -551,12 +551,12 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -551,12 +551,12 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
PortP->PhbP = PhbP; PortP->PhbP = PhbP;
PortP->TxAdd = (u16 *) RIO_PTR(Cad, readw(&PhbP->tx_add)); PortP->TxAdd = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->tx_add));
PortP->TxStart = (u16 *) RIO_PTR(Cad, readw(&PhbP->tx_start)); PortP->TxStart = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->tx_start));
PortP->TxEnd = (u16 *) RIO_PTR(Cad, readw(&PhbP->tx_end)); PortP->TxEnd = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->tx_end));
PortP->RxRemove = (u16 *) RIO_PTR(Cad, readw(&PhbP->rx_remove)); PortP->RxRemove = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->rx_remove));
PortP->RxStart = (u16 *) RIO_PTR(Cad, readw(&PhbP->rx_start)); PortP->RxStart = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->rx_start));
PortP->RxEnd = (u16 *) RIO_PTR(Cad, readw(&PhbP->rx_end)); PortP->RxEnd = (u16 __iomem *) RIO_PTR(Cad, readw(&PhbP->rx_end));
rio_spin_unlock_irqrestore(&PortP->portSem, flags); rio_spin_unlock_irqrestore(&PortP->portSem, flags);
/* /*
...@@ -601,9 +601,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp) ...@@ -601,9 +601,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
* return 1. If we havent, then return 0. * return 1. If we havent, then return 0.
*/ */
int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT *PacketP) int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT __iomem *PacketP)
{ {
struct PktCmd *PktCmdP = (struct PktCmd *) PacketP->data; struct PktCmd __iomem *PktCmdP = (struct PktCmd __iomem *) PacketP->data;
struct PktCmd_M *PktReplyP; struct PktCmd_M *PktReplyP;
struct CmdBlk *CmdBlkP; struct CmdBlk *CmdBlkP;
unsigned int sequence; unsigned int sequence;
...@@ -722,7 +722,7 @@ int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct ...@@ -722,7 +722,7 @@ int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
* RtaUniq is the booted RTA. * RtaUniq is the booted RTA.
*/ */
static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd *PktCmdP) static int RIOBootComplete(struct rio_info *p, struct Host *HostP, unsigned int Rup, struct PktCmd __iomem *PktCmdP)
{ {
struct Map *MapP = NULL; struct Map *MapP = NULL;
struct Map *MapP2 = NULL; struct Map *MapP2 = NULL;
......
...@@ -180,7 +180,7 @@ int RIOCommandRta(struct rio_info *p, unsigned long RtaUnique, int (*func) (stru ...@@ -180,7 +180,7 @@ int RIOCommandRta(struct rio_info *p, unsigned long RtaUnique, int (*func) (stru
} }
int RIOIdentifyRta(struct rio_info *p, void * arg) int RIOIdentifyRta(struct rio_info *p, void __user * arg)
{ {
unsigned int Host; unsigned int Host;
...@@ -245,7 +245,7 @@ int RIOIdentifyRta(struct rio_info *p, void * arg) ...@@ -245,7 +245,7 @@ int RIOIdentifyRta(struct rio_info *p, void * arg)
} }
int RIOKillNeighbour(struct rio_info *p, void * arg) int RIOKillNeighbour(struct rio_info *p, void __user * arg)
{ {
uint Host; uint Host;
uint ID; uint ID;
...@@ -370,9 +370,9 @@ int RIOFoadWakeup(struct rio_info *p) ...@@ -370,9 +370,9 @@ int RIOFoadWakeup(struct rio_info *p)
/* /*
** Incoming command on the COMMAND_RUP to be processed. ** Incoming command on the COMMAND_RUP to be processed.
*/ */
static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struct PKT * PacketP) static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struct PKT __iomem *PacketP)
{ {
struct PktCmd *PktCmdP = (struct PktCmd *) PacketP->data; struct PktCmd __iomem *PktCmdP = (struct PktCmd __iomem *)PacketP->data;
struct Port *PortP; struct Port *PortP;
struct UnixRup *UnixRupP; struct UnixRup *UnixRupP;
unsigned short SysPort; unsigned short SysPort;
...@@ -601,7 +601,7 @@ int RIOQueueCmdBlk(struct Host *HostP, uint Rup, struct CmdBlk *CmdBlkP) ...@@ -601,7 +601,7 @@ int RIOQueueCmdBlk(struct Host *HostP, uint Rup, struct CmdBlk *CmdBlkP)
/* /*
** Whammy! blat that pack! ** Whammy! blat that pack!
*/ */
HostP->Copy((caddr_t) & CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT)); HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT));
/* /*
** place command packet on the pending position. ** place command packet on the pending position.
...@@ -655,7 +655,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) ...@@ -655,7 +655,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
{ {
struct CmdBlk *CmdBlkP; struct CmdBlk *CmdBlkP;
struct UnixRup *UnixRupP; struct UnixRup *UnixRupP;
struct PKT *PacketP; struct PKT __iomem *PacketP;
unsigned short Rup; unsigned short Rup;
unsigned long flags; unsigned long flags;
...@@ -676,7 +676,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) ...@@ -676,7 +676,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
if (readw(&UnixRupP->RupP->rxcontrol) != RX_RUP_INACTIVE) { if (readw(&UnixRupP->RupP->rxcontrol) != RX_RUP_INACTIVE) {
int FreeMe; int FreeMe;
PacketP = (struct PKT *) RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->rxpkt)); PacketP = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->rxpkt));
switch (readb(&PacketP->dest_port)) { switch (readb(&PacketP->dest_port)) {
case BOOT_RUP: case BOOT_RUP:
...@@ -696,7 +696,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) ...@@ -696,7 +696,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
FreeMe = RIOCommandRup(p, Rup, HostP, PacketP); FreeMe = RIOCommandRup(p, Rup, HostP, PacketP);
if (PacketP->data[5] == MEMDUMP) { if (PacketP->data[5] == MEMDUMP) {
rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", *(unsigned short *) & (PacketP->data[6])); rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", *(unsigned short *) & (PacketP->data[6]));
HostP->Copy((caddr_t) & (PacketP->data[8]), (caddr_t) p->RIOMemDump, 32); HostP->Copy(&(PacketP->data[8]), p->RIOMemDump, 32);
} }
rio_spin_lock_irqsave(&UnixRupP->RupLock, flags); rio_spin_lock_irqsave(&UnixRupP->RupLock, flags);
break; break;
...@@ -782,7 +782,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) ...@@ -782,7 +782,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
/* /*
** Whammy! blat that pack! ** Whammy! blat that pack!
*/ */
HostP->Copy((caddr_t) & CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT)); HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT));
/* /*
** remove the command from the rup command queue... ** remove the command from the rup command queue...
...@@ -824,7 +824,7 @@ int RIOWFlushMark(unsigned long iPortP, struct CmdBlk *CmdBlkP) ...@@ -824,7 +824,7 @@ int RIOWFlushMark(unsigned long iPortP, struct CmdBlk *CmdBlkP)
int RIORFlushEnable(unsigned long iPortP, struct CmdBlk *CmdBlkP) int RIORFlushEnable(unsigned long iPortP, struct CmdBlk *CmdBlkP)
{ {
struct Port *PortP = (struct Port *) iPortP; struct Port *PortP = (struct Port *) iPortP;
struct PKT *PacketP; struct PKT __iomem *PacketP;
unsigned long flags; unsigned long flags;
rio_spin_lock_irqsave(&PortP->portSem, flags); rio_spin_lock_irqsave(&PortP->portSem, flags);
......
This diff is collapsed.
...@@ -79,7 +79,7 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; ...@@ -79,7 +79,7 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3";
int RIOPCIinit(struct rio_info *p, int Mode); int RIOPCIinit(struct rio_info *p, int Mode);
static int RIOScrub(int, u8 *, int); static int RIOScrub(int, u8 __iomem *, int);
/** /**
...@@ -92,10 +92,10 @@ static int RIOScrub(int, u8 *, int); ...@@ -92,10 +92,10 @@ static int RIOScrub(int, u8 *, int);
** bits > 0 indicates 16 bit operation. ** bits > 0 indicates 16 bit operation.
*/ */
int RIOAssignAT(struct rio_info *p, int Base, caddr_t virtAddr, int mode) int RIOAssignAT(struct rio_info *p, int Base, void __iomem *virtAddr, int mode)
{ {
int bits; int bits;
struct DpRam *cardp = (struct DpRam *)virtAddr; struct DpRam __iomem *cardp = (struct DpRam __iomem *)virtAddr;
if ((Base < ONE_MEG) || (mode & BYTE_ACCESS_MODE)) if ((Base < ONE_MEG) || (mode & BYTE_ACCESS_MODE))
bits = BYTE_OPERATION; bits = BYTE_OPERATION;
...@@ -107,7 +107,7 @@ int RIOAssignAT(struct rio_info *p, int Base, caddr_t virtAddr, int mode) ...@@ -107,7 +107,7 @@ int RIOAssignAT(struct rio_info *p, int Base, caddr_t virtAddr, int mode)
** transient stuff. ** transient stuff.
*/ */
p->RIOHosts[p->RIONumHosts].Caddr = virtAddr; p->RIOHosts[p->RIONumHosts].Caddr = virtAddr;
p->RIOHosts[p->RIONumHosts].CardP = (struct DpRam *)virtAddr; p->RIOHosts[p->RIONumHosts].CardP = virtAddr;
/* /*
** Revision 01 AT host cards don't support WORD operations, ** Revision 01 AT host cards don't support WORD operations,
...@@ -151,10 +151,10 @@ static u8 val[] = { ...@@ -151,10 +151,10 @@ static u8 val[] = {
** RAM test a board. ** RAM test a board.
** Nothing too complicated, just enough to check it out. ** Nothing too complicated, just enough to check it out.
*/ */
int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slot) int RIOBoardTest(unsigned long paddr, void __iomem *caddr, unsigned char type, int slot)
{ {
struct DpRam *DpRam = (struct DpRam *)caddr; struct DpRam __iomem *DpRam = caddr;
char *ram[4]; void __iomem *ram[4];
int size[4]; int size[4];
int op, bank; int op, bank;
int nbanks; int nbanks;
...@@ -179,12 +179,12 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo ...@@ -179,12 +179,12 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
size[2] = DP_SRAM3_SIZE; size[2] = DP_SRAM3_SIZE;
size[3] = DP_SCRATCH_SIZE; size[3] = DP_SCRATCH_SIZE;
ram[0] = (char *)&DpRam->DpSram1[0]; ram[0] = DpRam->DpSram1;
ram[1] = (char *)&DpRam->DpSram2[0]; ram[1] = DpRam->DpSram2;
ram[2] = (char *)&DpRam->DpSram3[0]; ram[2] = DpRam->DpSram3;
nbanks = (type == RIO_PCI) ? 3 : 4; nbanks = (type == RIO_PCI) ? 3 : 4;
if (nbanks == 4) if (nbanks == 4)
ram[3] = (char *)&DpRam->DpScratch[0]; ram[3] = DpRam->DpScratch;
if (nbanks == 3) { if (nbanks == 3) {
...@@ -202,7 +202,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo ...@@ -202,7 +202,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
*/ */
for (op=0; op<TEST_END; op++) { for (op=0; op<TEST_END; op++) {
for (bank=0; bank<nbanks; bank++) { for (bank=0; bank<nbanks; bank++) {
if (RIOScrub(op, (u8 *)ram[bank], size[bank]) == RIO_FAIL) { if (RIOScrub(op, ram[bank], size[bank]) == RIO_FAIL) {
rio_dprintk (RIO_DEBUG_INIT, "RIO-init: RIOScrub band %d, op %d failed\n", rio_dprintk (RIO_DEBUG_INIT, "RIO-init: RIOScrub band %d, op %d failed\n",
bank, op); bank, op);
return RIO_FAIL; return RIO_FAIL;
...@@ -227,7 +227,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo ...@@ -227,7 +227,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
** to check that the data from the previous phase was retained. ** to check that the data from the previous phase was retained.
*/ */
static int RIOScrub(int op, u8 *ram, int size) static int RIOScrub(int op, u8 __iomem *ram, int size)
{ {
int off; int off;
unsigned char oldbyte; unsigned char oldbyte;
...@@ -393,7 +393,7 @@ struct rioVersion *RIOVersid(void) ...@@ -393,7 +393,7 @@ struct rioVersion *RIOVersid(void)
return &stVersion; return &stVersion;
} }
void RIOHostReset(unsigned int Type, struct DpRam *DpRamP, unsigned int Slot) void RIOHostReset(unsigned int Type, struct DpRam __iomem *DpRamP, unsigned int Slot)
{ {
/* /*
** Reset the Tpu ** Reset the Tpu
......
...@@ -102,7 +102,7 @@ void RIOTxEnable(char *en) ...@@ -102,7 +102,7 @@ void RIOTxEnable(char *en)
struct rio_info *p; struct rio_info *p;
struct tty_struct *tty; struct tty_struct *tty;
int c; int c;
struct PKT *PacketP; struct PKT __iomem *PacketP;
unsigned long flags; unsigned long flags;
PortP = (struct Port *) en; PortP = (struct Port *) en;
...@@ -144,7 +144,7 @@ void RIOTxEnable(char *en) ...@@ -144,7 +144,7 @@ void RIOTxEnable(char *en)
if (c == 0) if (c == 0)
break; break;
rio_memcpy_toio(PortP->HostP->Caddr, (caddr_t) PacketP->data, PortP->gs.xmit_buf + PortP->gs.xmit_tail, c); rio_memcpy_toio(PortP->HostP->Caddr, PacketP->data, PortP->gs.xmit_buf + PortP->gs.xmit_tail, c);
/* udelay (1); */ /* udelay (1); */
writeb(c, &(PacketP->len)); writeb(c, &(PacketP->len));
...@@ -219,7 +219,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) ...@@ -219,7 +219,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
for (port = p->RIOFirstPortsBooted; port < p->RIOLastPortsBooted + PORTS_PER_RTA; port++) { for (port = p->RIOFirstPortsBooted; port < p->RIOLastPortsBooted + PORTS_PER_RTA; port++) {
struct Port *PortP = p->RIOPortp[port]; struct Port *PortP = p->RIOPortp[port];
struct tty_struct *ttyP; struct tty_struct *ttyP;
struct PKT *PacketP; struct PKT __iomem *PacketP;
/* /*
** not mapped in - most of the RIOPortp[] information ** not mapped in - most of the RIOPortp[] information
...@@ -298,7 +298,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) ...@@ -298,7 +298,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
for (port = p->RIOFirstPortsBooted; port < p->RIOLastPortsBooted + PORTS_PER_RTA; port++) { for (port = p->RIOFirstPortsBooted; port < p->RIOLastPortsBooted + PORTS_PER_RTA; port++) {
struct Port *PortP = p->RIOPortp[port]; struct Port *PortP = p->RIOPortp[port];
struct tty_struct *ttyP; struct tty_struct *ttyP;
struct PKT *PacketP; struct PKT __iomem *PacketP;
/* /*
** not mapped in - most of the RIOPortp[] information ** not mapped in - most of the RIOPortp[] information
...@@ -427,13 +427,13 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) ...@@ -427,13 +427,13 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
while (PortP->WflushFlag && can_add_transmit(&PacketP, PortP) && (PortP->InUse == NOT_INUSE)) { while (PortP->WflushFlag && can_add_transmit(&PacketP, PortP) && (PortP->InUse == NOT_INUSE)) {
int p; int p;
struct PktCmd *PktCmdP; struct PktCmd __iomem *PktCmdP;
rio_dprintk(RIO_DEBUG_INTR, "Add WFLUSH marker to data queue\n"); rio_dprintk(RIO_DEBUG_INTR, "Add WFLUSH marker to data queue\n");
/* /*
** make it look just like a WFLUSH command ** make it look just like a WFLUSH command
*/ */
PktCmdP = (struct PktCmd *) &PacketP->data[0]; PktCmdP = (struct PktCmd __iomem *) &PacketP->data[0];
writeb(WFLUSH, &PktCmdP->Command); writeb(WFLUSH, &PktCmdP->Command);
...@@ -525,9 +525,9 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP) ...@@ -525,9 +525,9 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP)
{ {
struct tty_struct *TtyP; struct tty_struct *TtyP;
unsigned short transCount; unsigned short transCount;
struct PKT *PacketP; struct PKT __iomem *PacketP;
register unsigned int DataCnt; register unsigned int DataCnt;
unsigned char *ptr; unsigned char __iomem *ptr;
unsigned char *buf; unsigned char *buf;
int copied = 0; int copied = 0;
...@@ -625,7 +625,7 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP) ...@@ -625,7 +625,7 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP)
** to '#define', (this is the only place ___DEBUG_IT___ occurs in the ** to '#define', (this is the only place ___DEBUG_IT___ occurs in the
** driver). ** driver).
*/ */
ptr = (unsigned char *) PacketP->data + PortP->RxDataStart; ptr = (unsigned char __iomem *) PacketP->data + PortP->RxDataStart;
tty_prepare_flip_string(TtyP, &buf, transCount); tty_prepare_flip_string(TtyP, &buf, transCount);
rio_memcpy_fromio(buf, ptr, transCount); rio_memcpy_fromio(buf, ptr, transCount);
......
...@@ -154,8 +154,8 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -154,8 +154,8 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
{ {
struct tty_struct *TtyP; struct tty_struct *TtyP;
int retval; int retval;
struct phb_param *phb_param_ptr; struct phb_param __iomem *phb_param_ptr;
struct PKT *PacketP; struct PKT __iomem *PacketP;
int res; int res;
u8 Cor1 = 0, Cor2 = 0, Cor4 = 0, Cor5 = 0; u8 Cor1 = 0, Cor2 = 0, Cor4 = 0, Cor5 = 0;
u8 TxXon = 0, TxXoff = 0, RxXon = 0, RxXoff = 0; u8 TxXon = 0, TxXoff = 0, RxXon = 0, RxXoff = 0;
...@@ -235,7 +235,7 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -235,7 +235,7 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
rio_dprintk(RIO_DEBUG_PARAM, "can_add_transmit() returns %x\n", res); rio_dprintk(RIO_DEBUG_PARAM, "can_add_transmit() returns %x\n", res);
rio_dprintk(RIO_DEBUG_PARAM, "Packet is %p\n", PacketP); rio_dprintk(RIO_DEBUG_PARAM, "Packet is %p\n", PacketP);
phb_param_ptr = (struct phb_param *) PacketP->data; phb_param_ptr = (struct phb_param __iomem *) PacketP->data;
switch (TtyP->termios->c_cflag & CSIZE) { switch (TtyP->termios->c_cflag & CSIZE) {
...@@ -580,11 +580,11 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag) ...@@ -580,11 +580,11 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
** We can add another packet to a transmit queue if the packet pointer pointed ** We can add another packet to a transmit queue if the packet pointer pointed
** to by the TxAdd pointer has PKT_IN_USE clear in its address. ** to by the TxAdd pointer has PKT_IN_USE clear in its address.
*/ */
int can_add_transmit(struct PKT **PktP, struct Port *PortP) int can_add_transmit(struct PKT __iomem **PktP, struct Port *PortP)
{ {
struct PKT *tp; struct PKT __iomem *tp;
*PktP = tp = (struct PKT *) RIO_PTR(PortP->Caddr, readw(PortP->TxAdd)); *PktP = tp = (struct PKT __iomem *) RIO_PTR(PortP->Caddr, readw(PortP->TxAdd));
return !((unsigned long) tp & PKT_IN_USE); return !((unsigned long) tp & PKT_IN_USE);
} }
...@@ -608,9 +608,9 @@ void add_transmit(struct Port *PortP) ...@@ -608,9 +608,9 @@ void add_transmit(struct Port *PortP)
* Put a packet onto the end of the * Put a packet onto the end of the
* free list * free list
****************************************/ ****************************************/
void put_free_end(struct Host *HostP, struct PKT *PktP) void put_free_end(struct Host *HostP, struct PKT __iomem *PktP)
{ {
struct rio_free_list *tmp_pointer; struct rio_free_list __iomem *tmp_pointer;
unsigned short old_end, new_end; unsigned short old_end, new_end;
unsigned long flags; unsigned long flags;
...@@ -625,15 +625,15 @@ void put_free_end(struct Host *HostP, struct PKT *PktP) ...@@ -625,15 +625,15 @@ void put_free_end(struct Host *HostP, struct PKT *PktP)
if ((old_end = readw(&HostP->ParmMapP->free_list_end)) != TPNULL) { if ((old_end = readw(&HostP->ParmMapP->free_list_end)) != TPNULL) {
new_end = RIO_OFF(HostP->Caddr, PktP); new_end = RIO_OFF(HostP->Caddr, PktP);
tmp_pointer = (struct rio_free_list *) RIO_PTR(HostP->Caddr, old_end); tmp_pointer = (struct rio_free_list __iomem *) RIO_PTR(HostP->Caddr, old_end);
writew(new_end, &tmp_pointer->next); writew(new_end, &tmp_pointer->next);
writew(old_end, &((struct rio_free_list *) PktP)->prev); writew(old_end, &((struct rio_free_list __iomem *) PktP)->prev);
writew(TPNULL, &((struct rio_free_list *) PktP)->next); writew(TPNULL, &((struct rio_free_list __iomem *) PktP)->next);
writew(new_end, &HostP->ParmMapP->free_list_end); writew(new_end, &HostP->ParmMapP->free_list_end);
} else { /* First packet on the free list this should never happen! */ } else { /* First packet on the free list this should never happen! */
rio_dprintk(RIO_DEBUG_PFE, "put_free_end(): This should never happen\n"); rio_dprintk(RIO_DEBUG_PFE, "put_free_end(): This should never happen\n");
writew(RIO_OFF(HostP->Caddr, PktP), &HostP->ParmMapP->free_list_end); writew(RIO_OFF(HostP->Caddr, PktP), &HostP->ParmMapP->free_list_end);
tmp_pointer = (struct rio_free_list *) PktP; tmp_pointer = (struct rio_free_list __iomem *) PktP;
writew(TPNULL, &tmp_pointer->prev); writew(TPNULL, &tmp_pointer->prev);
writew(TPNULL, &tmp_pointer->next); writew(TPNULL, &tmp_pointer->next);
} }
...@@ -647,10 +647,10 @@ void put_free_end(struct Host *HostP, struct PKT *PktP) ...@@ -647,10 +647,10 @@ void put_free_end(struct Host *HostP, struct PKT *PktP)
** relevant packet, [having cleared the PKT_IN_USE bit]. If PKT_IN_USE is clear, ** relevant packet, [having cleared the PKT_IN_USE bit]. If PKT_IN_USE is clear,
** then can_remove_receive() returns 0. ** then can_remove_receive() returns 0.
*/ */
int can_remove_receive(struct PKT **PktP, struct Port *PortP) int can_remove_receive(struct PKT __iomem **PktP, struct Port *PortP)
{ {
if (readw(PortP->RxRemove) & PKT_IN_USE) { if (readw(PortP->RxRemove) & PKT_IN_USE) {
*PktP = (struct PKT *) RIO_PTR(PortP->Caddr, readw(PortP->RxRemove) & ~PKT_IN_USE); *PktP = (struct PKT __iomem *) RIO_PTR(PortP->Caddr, readw(PortP->RxRemove) & ~PKT_IN_USE);
return 1; return 1;
} }
return 0; return 0;
......
...@@ -86,9 +86,9 @@ static void RIOConCon(struct rio_info *, struct Host *, unsigned int, unsigned i ...@@ -86,9 +86,9 @@ static void RIOConCon(struct rio_info *, struct Host *, unsigned int, unsigned i
** Incoming on the ROUTE_RUP ** Incoming on the ROUTE_RUP
** I wrote this while I was tired. Forgive me. ** I wrote this while I was tired. Forgive me.
*/ */
int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT * PacketP) int RIORouteRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct PKT __iomem * PacketP)
{ {
struct PktCmd *PktCmdP = (struct PktCmd *) PacketP->data; struct PktCmd __iomem *PktCmdP = (struct PktCmd __iomem *) PacketP->data;
struct PktCmd_M *PktReplyP; struct PktCmd_M *PktReplyP;
struct CmdBlk *CmdBlkP; struct CmdBlk *CmdBlkP;
struct Port *PortP; struct Port *PortP;
...@@ -517,8 +517,8 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit) ...@@ -517,8 +517,8 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit)
for (port = 0; port < PORTS_PER_RTA; port++, PortN++) { for (port = 0; port < PORTS_PER_RTA; port++, PortN++) {
unsigned short dest_port = port + 8; unsigned short dest_port = port + 8;
u16 *TxPktP; u16 __iomem *TxPktP;
struct PKT *Pkt; struct PKT __iomem *Pkt;
PortP = p->RIOPortp[PortN]; PortP = p->RIOPortp[PortN];
...@@ -555,12 +555,12 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit) ...@@ -555,12 +555,12 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit)
** card. This needs to be translated into a 32 bit pointer ** card. This needs to be translated into a 32 bit pointer
** so it can be accessed from the driver. ** so it can be accessed from the driver.
*/ */
Pkt = (struct PKT *) RIO_PTR(HostP->Caddr, readw(TxPktP)); Pkt = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(TxPktP));
/* /*
** If the packet is used, reset it. ** If the packet is used, reset it.
*/ */
Pkt = (struct PKT *) ((unsigned long) Pkt & ~PKT_IN_USE); Pkt = (struct PKT __iomem *) ((unsigned long) Pkt & ~PKT_IN_USE);
writeb(dest_unit, &Pkt->dest_unit); writeb(dest_unit, &Pkt->dest_unit);
writeb(dest_port, &Pkt->dest_port); writeb(dest_port, &Pkt->dest_port);
} }
......
...@@ -534,8 +534,8 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP) ...@@ -534,8 +534,8 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP)
if (PortP->SecondBlock) { if (PortP->SecondBlock) {
u16 dest_unit = HostMapP->ID; u16 dest_unit = HostMapP->ID;
u16 dest_port = port - SysPort; u16 dest_port = port - SysPort;
u16 *TxPktP; u16 __iomem *TxPktP;
struct PKT *Pkt; struct PKT __iomem *Pkt;
for (TxPktP = PortP->TxStart; TxPktP <= PortP->TxEnd; TxPktP++) { for (TxPktP = PortP->TxStart; TxPktP <= PortP->TxEnd; TxPktP++) {
/* /*
...@@ -545,7 +545,7 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP) ...@@ -545,7 +545,7 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP)
** a 32 bit pointer so it can be ** a 32 bit pointer so it can be
** accessed from the driver. ** accessed from the driver.
*/ */
Pkt = (struct PKT *) RIO_PTR(HostP->Caddr, readw(&*TxPktP)); Pkt = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(&*TxPktP));
rio_dprintk(RIO_DEBUG_TABLE, "Tx packet (%x) destination: Old %x:%x New %x:%x\n", *TxPktP, Pkt->dest_unit, Pkt->dest_port, dest_unit, dest_port); rio_dprintk(RIO_DEBUG_TABLE, "Tx packet (%x) destination: Old %x:%x New %x:%x\n", *TxPktP, Pkt->dest_unit, Pkt->dest_port, dest_unit, dest_port);
writew(dest_unit, &Pkt->dest_unit); writew(dest_unit, &Pkt->dest_unit);
writew(dest_port, &Pkt->dest_port); writew(dest_port, &Pkt->dest_port);
...@@ -781,13 +781,13 @@ int RIOReMapPorts(struct rio_info *p, struct Host *HostP, struct Map *HostMapP) ...@@ -781,13 +781,13 @@ int RIOReMapPorts(struct rio_info *p, struct Host *HostP, struct Map *HostMapP)
** unless the host has been booted ** unless the host has been booted
*/ */
if ((HostP->Flags & RUN_STATE) == RC_RUNNING) { if ((HostP->Flags & RUN_STATE) == RC_RUNNING) {
struct PHB *PhbP = PortP->PhbP = &HostP->PhbP[HostPort]; struct PHB __iomem *PhbP = PortP->PhbP = &HostP->PhbP[HostPort];
PortP->TxAdd = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_add)); PortP->TxAdd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_add));
PortP->TxStart = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_start)); PortP->TxStart = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_start));
PortP->TxEnd = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_end)); PortP->TxEnd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_end));
PortP->RxRemove = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_remove)); PortP->RxRemove = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_remove));
PortP->RxStart = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_start)); PortP->RxStart = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_start));
PortP->RxEnd = (u16 *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_end)); PortP->RxEnd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_end));
} else } else
PortP->PhbP = NULL; PortP->PhbP = NULL;
......
...@@ -576,7 +576,7 @@ static void RIOClearUp(struct Port *PortP) ...@@ -576,7 +576,7 @@ static void RIOClearUp(struct Port *PortP)
*/ */
int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, int len, int arg) int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command, int len, int arg)
{ {
struct PKT *PacketP; struct PKT __iomem *PacketP;
int retries = 20; /* at 10 per second -> 2 seconds */ int retries = 20; /* at 10 per second -> 2 seconds */
unsigned long flags; unsigned long flags;
......
...@@ -44,7 +44,7 @@ static char *_unixrup_h_sccs_ = "@(#)unixrup.h 1.2"; ...@@ -44,7 +44,7 @@ static char *_unixrup_h_sccs_ = "@(#)unixrup.h 1.2";
struct UnixRup { struct UnixRup {
struct CmdBlk *CmdsWaitingP; /* Commands waiting to be done */ struct CmdBlk *CmdsWaitingP; /* Commands waiting to be done */
struct CmdBlk *CmdPendingP; /* The command currently being sent */ struct CmdBlk *CmdPendingP; /* The command currently being sent */
struct RUP *RupP; /* the Rup to send it to */ struct RUP __iomem *RupP; /* the Rup to send it to */
unsigned int Id; /* Id number */ unsigned int Id; /* Id number */
unsigned int BaseSysPort; /* SysPort of first tty on this RTA */ unsigned int BaseSysPort; /* SysPort of first tty on this RTA */
unsigned int ModTypes; /* Modules on this RTA */ unsigned int ModTypes; /* Modules on this RTA */
......
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