Commit 767b80a9 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] asm/ide.h: ide_ioreg_t cleanup

ide_ioreg_t is deprecated and hasn't been used by IDE driver for some time.
Use unsigned long directly on alpha, arm26, arm, mips, parisc, ppc64 and sh.

asm-ia64/ide.h (ide_ioreg_t is unsigned short) and asm-m68knommu/ide.h
(broken - ide_ioreg_t is not defined) are the only users of ide_ioreg_t left.
parent 76fff7db
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#define MAX_HWIFS CONFIG_IDE_MAX_HWIFS #define MAX_HWIFS CONFIG_IDE_MAX_HWIFS
#endif #endif
static __inline__ int ide_default_irq(ide_ioreg_t base) static inline int ide_default_irq(unsigned long base)
{ {
switch (base) { switch (base) {
case 0x1f0: return 14; case 0x1f0: return 14;
...@@ -31,7 +31,7 @@ static __inline__ int ide_default_irq(ide_ioreg_t base) ...@@ -31,7 +31,7 @@ static __inline__ int ide_default_irq(ide_ioreg_t base)
} }
} }
static __inline__ ide_ioreg_t ide_default_io_base(int index) static inline unsigned long ide_default_io_base(int index)
{ {
switch (index) { switch (index) {
case 0: return 0x1f0; case 0: return 0x1f0;
...@@ -43,9 +43,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index) ...@@ -43,9 +43,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index)
} }
} }
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
......
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = (ide_ioreg_t) data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += 1; reg += 1;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
......
...@@ -18,23 +18,21 @@ ...@@ -18,23 +18,21 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg; unsigned long reg = data_port;
int i; int i;
int regincr = 1; int regincr = 1;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
reg = (ide_ioreg_t)data_port;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += regincr; reg += regincr;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) *irq = 0; if (irq) *irq = 0;
} }
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
} }
......
...@@ -12,17 +12,17 @@ ...@@ -12,17 +12,17 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = (ide_ioreg_t) data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += 1; reg += 1;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
......
...@@ -23,23 +23,21 @@ ...@@ -23,23 +23,21 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg; unsigned long reg = data_port;
int i; int i;
int regincr = 1; int regincr = 1;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
reg = (ide_ioreg_t)data_port;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += regincr; reg += regincr;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = (ide_ioreg_t) data_port; unsigned long reg = data_port;
int i; int i;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
...@@ -28,7 +28,7 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) ...@@ -28,7 +28,7 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += 1; reg += 1;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = (ide_ioreg_t) data_port; unsigned long reg = data_port;
int i; int i;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
...@@ -35,7 +35,7 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) ...@@ -35,7 +35,7 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += 1; reg += 1;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
......
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg; unsigned long reg = data_port;
int i; int i;
int regincr = 1; int regincr = 1;
/* The Empeg board has the first two address lines unused */ /* The Empeg board has the first two address lines unused */
if (machine_is_empeg()) if (machine_is_empeg())
regincr = 1 << 2; regincr = 1 << 2;
...@@ -36,15 +36,13 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) ...@@ -36,15 +36,13 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
reg = (ide_ioreg_t)data_port;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += regincr; reg += regincr;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = (ide_ioreg_t) data_port; unsigned long reg = data_port;
int i; int i;
memset(hw, 0, sizeof(*hw)); memset(hw, 0, sizeof(*hw));
...@@ -26,7 +26,7 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) ...@@ -26,7 +26,7 @@ ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += 1; reg += 1;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
* We always use the new IDE port registering, * We always use the new IDE port registering,
* so these are fixed here. * so these are fixed here.
*/ */
#define ide_default_io_base(i) ((ide_ioreg_t)0) #define ide_default_io_base(i) (0)
#define ide_default_irq(b) (0) #define ide_default_irq(b) (0)
#define __ide_mm_insw(port,addr,len) readsw(port,addr,len) #define __ide_mm_insw(port,addr,len) readsw(port,addr,len)
......
...@@ -30,17 +30,17 @@ ...@@ -30,17 +30,17 @@
* Set up a hw structure for a specified data port, control port and IRQ. * Set up a hw structure for a specified data port, control port and IRQ.
* This should follow whatever the default interface uses. * This should follow whatever the default interface uses.
*/ */
static __inline__ void static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq) unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = (ide_ioreg_t) data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg; hw->io_ports[i] = reg;
reg += 1; reg += 1;
} }
hw->io_ports[IDE_CONTROL_OFFSET] = (ide_ioreg_t) ctrl_port; hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
if (irq) if (irq)
*irq = 0; *irq = 0;
} }
...@@ -67,7 +67,7 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -67,7 +67,7 @@ static __inline__ void ide_init_default_hwifs(void)
* We always use the new IDE port registering, * We always use the new IDE port registering,
* so these are fixed here. * so these are fixed here.
*/ */
#define ide_default_io_base(i) ((ide_ioreg_t)0) #define ide_default_io_base(i) (0)
#define ide_default_irq(b) (0) #define ide_default_irq(b) (0)
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
...@@ -34,7 +34,7 @@ static inline int ide_default_irq(unsigned long base) ...@@ -34,7 +34,7 @@ static inline int ide_default_irq(unsigned long base)
} }
} }
static inline ide_ioreg_t ide_default_io_base(int index) static inline unsigned long ide_default_io_base(int index)
{ {
switch (index) { switch (index) {
case 0: return 0x1f0; case 0: return 0x1f0;
......
...@@ -20,11 +20,12 @@ ...@@ -20,11 +20,12 @@
#endif #endif
#define ide_default_irq(base) (0) #define ide_default_irq(base) (0)
#define ide_default_io_base(index) ((ide_ioreg_t)0) #define ide_default_io_base(index) (0)
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
......
...@@ -22,12 +22,13 @@ ...@@ -22,12 +22,13 @@
# define MAX_HWIFS 4 # define MAX_HWIFS 4
#endif #endif
static __inline__ int ide_default_irq(ide_ioreg_t base) { return 0; } static inline int ide_default_irq(unsigned long base) { return 0; }
static __inline__ ide_ioreg_t ide_default_io_base(int index) { return 0; } static inline unsigned long ide_default_io_base(int index) { return 0; }
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#define MAX_HWIFS 2 #define MAX_HWIFS 2
#endif #endif
static __inline__ int ide_default_irq_hp600(ide_ioreg_t base) static inline int ide_default_irq_hp600(unsigned long base)
{ {
switch (base) { switch (base) {
case 0x01f0: return 93; case 0x01f0: return 93;
...@@ -32,7 +32,7 @@ static __inline__ int ide_default_irq_hp600(ide_ioreg_t base) ...@@ -32,7 +32,7 @@ static __inline__ int ide_default_irq_hp600(ide_ioreg_t base)
} }
} }
static __inline__ int ide_default_irq(ide_ioreg_t base) static inline int ide_default_irq(unsigned long base)
{ {
if (MACH_HP600) { if (MACH_HP600) {
return ide_default_irq_hp600(base); return ide_default_irq_hp600(base);
...@@ -45,7 +45,7 @@ static __inline__ int ide_default_irq(ide_ioreg_t base) ...@@ -45,7 +45,7 @@ static __inline__ int ide_default_irq(ide_ioreg_t base)
} }
} }
static __inline__ ide_ioreg_t ide_default_io_base_hp600(int index) static inline unsigned long ide_default_io_base_hp600(int index)
{ {
switch (index) { switch (index) {
case 0: case 0:
...@@ -57,7 +57,7 @@ static __inline__ ide_ioreg_t ide_default_io_base_hp600(int index) ...@@ -57,7 +57,7 @@ static __inline__ ide_ioreg_t ide_default_io_base_hp600(int index)
} }
} }
static __inline__ ide_ioreg_t ide_default_io_base(int index) static inline unsigned long ide_default_io_base(int index)
{ {
if (MACH_HP600) { if (MACH_HP600) {
return ide_default_io_base_hp600(index); return ide_default_io_base_hp600(index);
...@@ -72,9 +72,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index) ...@@ -72,9 +72,10 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index)
} }
} }
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) static inline void ide_init_hwif_ports(hw_regs_t *hw, unsigned long data_port,
unsigned long ctrl_port, int *irq)
{ {
ide_ioreg_t reg = data_port; unsigned long reg = data_port;
int i; int i;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
......
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