Skip to content

Commit

Permalink
ide: remove ide_default_io_ctl() macro
Browse files Browse the repository at this point in the history
It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y
and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]).

Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
  • Loading branch information
bzolnier committed Apr 17, 2008
1 parent 5c50427 commit 9dfcd15
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 34 deletions.
2 changes: 1 addition & 1 deletion drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static void __init init_ide_data (void)
for (index = 0; index < MAX_HWIFS; ++index) {
ide_hwif_t *hwif = &ide_hwifs[index];
unsigned long io_addr = ide_default_io_base(index);
unsigned long ctl_addr = ide_default_io_ctl(io_addr);
unsigned long ctl_addr = io_addr + 0x206;

ide_init_port_data(hwif, index);

Expand Down
2 changes: 0 additions & 2 deletions include/asm-alpha/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ static inline unsigned long ide_default_io_base(int index)
}
}

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#ifdef CONFIG_PCI
#define ide_init_default_irq(base) (0)
#else
Expand Down
8 changes: 0 additions & 8 deletions include/asm-arm/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
#define MAX_HWIFS 4
#endif

#if !defined(CONFIG_ARCH_L7200)
# ifdef CONFIG_ARCH_CLPS7500
# define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
# else
# define ide_default_io_ctl(base) (0)
# endif
#endif /* !ARCH_L7200 */

#define __ide_mm_insw(port,addr,len) readsw(port,addr,len)
#define __ide_mm_insl(port,addr,len) readsl(port,addr,len)
#define __ide_mm_outsw(port,addr,len) writesw(port,addr,len)
Expand Down
4 changes: 0 additions & 4 deletions include/asm-blackfin/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

#define MAX_HWIFS 1

/* Legacy ... BLK_DEV_IDECS */
#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */


#include <asm-generic/ide_iops.h>

/****************************************************************************/
Expand Down
2 changes: 0 additions & 2 deletions include/asm-ia64/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ static inline unsigned long ide_default_io_base(int index)
}
}

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#ifdef CONFIG_PCI
#define ide_init_default_irq(base) (0)
#else
Expand Down
2 changes: 0 additions & 2 deletions include/asm-m32r/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ static __inline__ unsigned long ide_default_io_base(int index)
}
}

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#ifdef CONFIG_BLK_DEV_IDEPCI
#define ide_init_default_irq(base) (0)
#else
Expand Down
2 changes: 0 additions & 2 deletions include/asm-mips/mach-generic/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ static __inline__ unsigned long ide_default_io_base(int index)
}
}

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#ifdef CONFIG_BLK_DEV_IDEPCI
#define ide_init_default_irq(base) (0)
#else
Expand Down
2 changes: 0 additions & 2 deletions include/asm-parisc/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#define MAX_HWIFS 2
#endif

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
Expand Down
2 changes: 0 additions & 2 deletions include/asm-powerpc/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ static __inline__ unsigned long ide_default_io_base(int index)

#endif /* __powerpc64__ */

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#endif /* __KERNEL__ */

#endif /* _ASM_POWERPC_IDE_H */
3 changes: 0 additions & 3 deletions include/asm-sh/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@

#ifdef __KERNEL__


#define ide_default_io_ctl(base) (0)

#include <asm-generic/ide_iops.h>

#endif /* __KERNEL__ */
Expand Down
2 changes: 0 additions & 2 deletions include/asm-sparc/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#undef MAX_HWIFS
#define MAX_HWIFS 2

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#define __ide_insl(data_reg, buffer, wcount) \
__ide_insw(data_reg, buffer, (wcount)<<1)
#define __ide_outsl(data_reg, buffer, wcount) \
Expand Down
2 changes: 0 additions & 2 deletions include/asm-sparc64/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
# endif
#endif

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#define __ide_insl(data_reg, buffer, wcount) \
__ide_insw(data_reg, buffer, (wcount)<<1)
#define __ide_outsl(data_reg, buffer, wcount) \
Expand Down
2 changes: 0 additions & 2 deletions include/asm-x86/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ static __inline__ unsigned long ide_default_io_base(int index)
}
}

#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */

#ifdef CONFIG_BLK_DEV_IDEPCI
#define ide_init_default_irq(base) (0)
#else
Expand Down

0 comments on commit 9dfcd15

Please sign in to comment.