Commit b0134e31 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] ide: add IDE_ARCH_OBSOLETE_DEFAULTS

per jgarzik's suggestion

Define it in <asm/ide.h> if ide_default_io_base(),
ide_default_irq() and ide_init_default_irq() are needed.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 24ec0430
......@@ -19,6 +19,8 @@
#define MAX_HWIFS CONFIG_IDE_MAX_HWIFS
#endif
#define IDE_ARCH_OBSOLETE_DEFAULTS
static inline int ide_default_irq(unsigned long base)
{
switch (base) {
......
......@@ -21,13 +21,6 @@
# include <asm/arch/ide.h> /* obsolete + broken */
#endif
/*
* We always use the new IDE port registering,
* so these are fixed here.
*/
#define ide_default_io_base(i) (0)
#define ide_default_irq(b) (0)
#if !defined(CONFIG_ARCH_L7200) && !defined(CONFIG_ARCH_LH7A40X)
# define IDE_ARCH_OBSOLETE_INIT
# ifdef CONFIG_ARCH_CLPS7500
......@@ -37,8 +30,6 @@
# endif
#endif /* !ARCH_L7200 && !ARCH_LH7A40X */
#define ide_init_default_irq(base) (0)
#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)
......
......@@ -26,15 +26,6 @@
#define __ide_mm_outsw(port,addr,len) writesw(port,addr,len)
#define __ide_mm_outsl(port,addr,len) writesl(port,addr,len)
#define ide_init_default_irq(base) (0)
/*
* We always use the new IDE port registering,
* so these are fixed here.
*/
#define ide_default_io_base(i) (0)
#define ide_default_irq(b) (0)
#define IDE_ARCH_OBSOLETE_INIT
#define ide_default_io_ctl(base) (0)
......
......@@ -16,11 +16,6 @@
#ifdef __KERNEL__
/****************************************************************************/
#define ide_default_irq(base) (0)
#define ide_default_io_base(index) (0)
#define ide_init_default_irq(base) (0)
#define MAX_HWIFS 1
#include <asm-generic/ide_iops.h>
......
......@@ -23,6 +23,8 @@
# endif
#endif
#define IDE_ARCH_OBSOLETE_DEFAULTS
static __inline__ int ide_default_irq(unsigned long base)
{
switch (base) {
......
......@@ -25,6 +25,8 @@
# endif
#endif
#define IDE_ARCH_OBSOLETE_DEFAULTS
static inline int ide_default_irq(unsigned long base)
{
switch (base) {
......
......@@ -50,19 +50,6 @@
#define MAX_HWIFS 4 /* same as the other archs */
#endif
static __inline__ int ide_default_irq(unsigned long base)
{
return 0;
}
static __inline__ unsigned long ide_default_io_base(int index)
{
return 0;
}
#define ide_init_default_irq(base) (0)
/*
* Get rid of defs from io.h - ide has its private and conflicting versions
* Since so far no single m68k platform uses ISA/PCI I/O space for IDE, we
......
......@@ -20,6 +20,8 @@
# endif
#endif
#define IDE_ARCH_OBSOLETE_DEFAULTS
static inline int ide_default_irq(unsigned long base)
{
switch (base) {
......
......@@ -19,14 +19,9 @@
#define MAX_HWIFS 2
#endif
#define ide_default_irq(base) (0)
#define ide_default_io_base(index) (0)
#define IDE_ARCH_OBSOLETE_INIT
#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
#define ide_init_default_irq(base) (0)
#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_check_region(from,extent) check_region((from), (extent))
......
......@@ -43,6 +43,8 @@ extern struct ide_machdep_calls ppc_ide_md;
#undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0
#define IDE_ARCH_OBSOLETE_DEFAULTS
static __inline__ int ide_default_irq(unsigned long base)
{
if (ppc_ide_md.default_irq)
......
......@@ -22,14 +22,9 @@
# define MAX_HWIFS 4
#endif
static inline int ide_default_irq(unsigned long base) { return 0; }
static inline unsigned long ide_default_io_base(int index) { return 0; }
#define IDE_ARCH_OBSOLETE_INIT
#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
#define ide_init_default_irq(base) (0)
#endif /* __KERNEL__ */
#endif /* __ASMPPC64_IDE_H */
......@@ -22,6 +22,8 @@
#define MAX_HWIFS 2
#endif
#define IDE_ARCH_OBSOLETE_DEFAULTS
static inline int ide_default_irq_hp600(unsigned long base)
{
switch (base) {
......
......@@ -19,21 +19,9 @@
#undef MAX_HWIFS
#define MAX_HWIFS 2
static __inline__ int ide_default_irq(unsigned long base)
{
return 0;
}
static __inline__ unsigned long ide_default_io_base(int index)
{
return 0;
}
#define IDE_ARCH_OBSOLETE_INIT
#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
#define ide_init_default_irq(base) (0)
#define __ide_insl(data_reg, buffer, wcount) \
__ide_insw(data_reg, buffer, (wcount)<<1)
#define __ide_outsl(data_reg, buffer, wcount) \
......
......@@ -24,21 +24,9 @@
# endif
#endif
static __inline__ int ide_default_irq(unsigned long base)
{
return 0;
}
static __inline__ unsigned long ide_default_io_base(int index)
{
return 0;
}
#define IDE_ARCH_OBSOLETE_INIT
#define ide_default_io_ctl(base) ((base) + 0x206) /* obsolete */
#define ide_init_default_irq(base) (0)
#define __ide_insl(data_reg, buffer, wcount) \
__ide_insw(data_reg, buffer, (wcount)<<1)
#define __ide_outsl(data_reg, buffer, wcount) \
......
......@@ -305,6 +305,13 @@ static inline void ide_std_init_ports(hw_regs_t *hw,
#include <asm/ide.h>
/* needed on alpha, x86/x86_64, ia64, mips, ppc32 and sh */
#ifndef IDE_ARCH_OBSOLETE_DEFAULTS
# define ide_default_io_base(index) (0)
# define ide_default_irq(base) (0)
# define ide_init_default_irq(base) (0)
#endif
/*
* ide_init_hwif_ports() is OBSOLETE and will be removed in 2.7 series.
* New ports shouldn't define IDE_ARCH_OBSOLETE_INIT in <asm/ide.h>.
......
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