Commit 5ef2759c authored by Martin Dalecki's avatar Martin Dalecki Committed by Kai Germaschewski

[PATCH] 2.5.10 IDE 43

Some of the following is a bit of sensitive... but anyway it has to be done.

- Scarp "portability" macros ide_request_irq() and ide_free_irq().  What a
   great of a surprise in the face of a kernel nowadays ported to nearly any
   major CPU out there, but apparently no platform needs something special here.
   All of them are just using the normal request_irq() and free_irq(). If some
   unusual platform (read obsolete door blocker) I have overlooked intentionally
   needs something special - please just hack the platform specific
   request_irq() and free_irq()-  they are *far off* from being performance
   relevant. (Hint: You could use cooked default irq values to detect there
   whatever the caller was the ATA driver to decide what to do about it.)

- Kill ide_check_region() ide_request_region() and ide_release_region()
   altogether. Add comments explaining the code there.  Same arguments as above
   apply. Additionally we want to be able at some time to do for example mmapped
   PCI address space access on IA32 instead of port IO.

- Rewrite the initialization code to don't use check_region at all. Add some
   comments there, which explain what's actually happening.

- Fix creeping in of a c99 construct.

- Make the main interrupt handler take a channel as data instead of the
   hwgroup. This is the entity an interrupt is physically associated with. PCI
   interrupt sharing is handled in a generically anyway. Analogously the main
   data entity of a device request queue (q->queuedata) is the device and not
   the hwgroup.  However right now we are only able to push it down to the
   channel level. The intention is to advance the choose_drive() function to
   just check for equal interrupt values for serialization of request and
   thus to get rid of the hwgroup altogether.
parent 9dbf0015
......@@ -30,42 +30,8 @@ static void no_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
{
}
static int no_ide_request_irq(unsigned int irq,
void (*handler)(int,void *, struct pt_regs *),
unsigned long flags, const char *device,
void *dev_id)
{
panic("no_no_ide_request_irq called - shouldn't happen");
}
static void no_ide_free_irq(unsigned int irq, void *dev_id)
{
panic("no_ide_free_irq called - shouldn't happen");
}
static int no_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
panic("no_ide_check_region called - shouldn't happen");
}
static void no_ide_request_region(ide_ioreg_t from, unsigned int extent,
const char *name)
{
panic("no_ide_request_region called - shouldn't happen");
}
static void no_ide_release_region(ide_ioreg_t from, unsigned int extent)
{
panic("no_ide_release_region called - shouldn't happen");
}
struct ide_ops no_ide_ops = {
&no_ide_default_irq,
&no_ide_default_io_base,
&no_ide_init_hwif_ports,
&no_ide_request_irq,
&no_ide_free_irq,
&no_ide_check_region,
&no_ide_request_region,
&no_ide_release_region
&no_ide_init_hwif_ports
};
......@@ -62,42 +62,8 @@ static void std_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
hw->io_ports[IDE_IRQ_OFFSET] = 0;
}
static int std_ide_request_irq(unsigned int irq,
void (*handler)(int,void *, struct pt_regs *),
unsigned long flags, const char *device,
void *dev_id)
{
return request_irq(irq, handler, flags, device, dev_id);
}
static void std_ide_free_irq(unsigned int irq, void *dev_id)
{
free_irq(irq, dev_id);
}
static int std_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void std_ide_request_region(ide_ioreg_t from, unsigned int extent,
const char *name)
{
request_region(from, extent, name);
}
static void std_ide_release_region(ide_ioreg_t from, unsigned int extent)
{
release_region(from, extent);
}
struct ide_ops std_ide_ops = {
&std_ide_default_irq,
&std_ide_default_io_base,
&std_ide_init_hwif_ports,
&std_ide_request_irq,
&std_ide_free_irq,
&std_ide_check_region,
&std_ide_request_region,
&std_ide_release_region
&std_ide_init_hwif_ports
};
......@@ -29,42 +29,8 @@ static void no_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
{
}
static int no_ide_request_irq(unsigned int irq,
void (*handler)(int,void *, struct pt_regs *),
unsigned long flags, const char *device,
void *dev_id)
{
panic("no_no_ide_request_irq called - shouldn't happen");
}
static void no_ide_free_irq(unsigned int irq, void *dev_id)
{
panic("no_ide_free_irq called - shouldn't happen");
}
static int no_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
panic("no_ide_check_region called - shouldn't happen");
}
static void no_ide_request_region(ide_ioreg_t from, unsigned int extent,
const char *name)
{
panic("no_ide_request_region called - shouldn't happen");
}
static void no_ide_release_region(ide_ioreg_t from, unsigned int extent)
{
panic("no_ide_release_region called - shouldn't happen");
}
struct ide_ops no_ide_ops = {
&no_ide_default_irq,
&no_ide_default_io_base,
&no_ide_init_hwif_ports,
&no_ide_request_irq,
&no_ide_free_irq,
&no_ide_check_region,
&no_ide_request_region,
&no_ide_release_region
&no_ide_init_hwif_ports
};
......@@ -62,42 +62,8 @@ static void std_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
hw->io_ports[IDE_IRQ_OFFSET] = 0;
}
static int std_ide_request_irq(unsigned int irq,
void (*handler)(int,void *, struct pt_regs *),
unsigned long flags, const char *device,
void *dev_id)
{
return request_irq(irq, handler, flags, device, dev_id);
}
static void std_ide_free_irq(unsigned int irq, void *dev_id)
{
free_irq(irq, dev_id);
}
static int std_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void std_ide_request_region(ide_ioreg_t from, unsigned int extent,
const char *name)
{
request_region(from, extent, name);
}
static void std_ide_release_region(ide_ioreg_t from, unsigned int extent)
{
release_region(from, extent);
}
struct ide_ops std_ide_ops = {
&std_ide_default_irq,
&std_ide_default_io_base,
&std_ide_init_hwif_ports,
&std_ide_request_irq,
&std_ide_free_irq,
&std_ide_check_region,
&std_ide_request_region,
&std_ide_release_region
&std_ide_init_hwif_ports
};
......@@ -256,29 +256,6 @@ ppc4xx_progress(char *s, unsigned short hex)
* IDE stuff.
* should be generic for every IDE PCI chipset
*/
#if defined(CONFIG_BLK_DEV_IDE)
static int
ppc4xx_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void
ppc4xx_ide_request_region(ide_ioreg_t from, unsigned int extent,
const char *name)
{
request_region(from, extent, name);
return;
}
static void
ppc4xx_ide_release_region(ide_ioreg_t from, unsigned int extent)
{
release_region(from, extent);
return;
}
#endif
#if defined(CONFIG_BLK_DEV_IDEPCI)
static void
ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port,
......@@ -398,16 +375,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
** m8xx_setup.c, prep_setup.c use
** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
*/
#if defined (CONFIG_IDE)
ppc_ide_md.ide_request_region = ppc4xx_ide_request_region;
ppc_ide_md.ide_release_region = ppc4xx_ide_release_region;
ppc_ide_md.ide_check_region = ppc4xx_ide_check_region;
#if defined(CONFIG_BLK_DEV_IDEPCI)
#ifdef CONFIG_IDE
# if defined(CONFIG_BLK_DEV_IDEPCI)
ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports;
#elif defined (CONFIG_DMA_NONPCI) /* ON board IDE */
# elif defined (CONFIG_DMA_NONPCI) /* ON board IDE */
ppc_ide_md.default_irq = nonpci_ide_default_irq;
ppc_ide_md.ide_init_hwif = nonpci_ide_init_hwif_ports;
#endif
# endif
#endif
board_init();
......
......@@ -463,33 +463,6 @@ chrp_init2(void)
#endif /* CONFIG_VT && (CONFIG_ADB_KEYBOARD || CONFIG_INPUT) */
}
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/*
* IDE stuff.
*/
static int __chrp
chrp_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void __chrp
chrp_ide_request_region(ide_ioreg_t from,
unsigned int extent,
const char *name)
{
request_region(from, extent, name);
}
static void __chrp
chrp_ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
release_region(from, extent);
}
#endif
/*
* One of the main thing these mappings are needed for is so that
* xmon can get to the serial port early on. We probably should
......@@ -597,12 +570,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.smp_ops = &chrp_smp_ops;
#endif /* CONFIG_SMP */
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.ide_check_region = chrp_ide_check_region;
ppc_ide_md.ide_request_region = chrp_ide_request_region;
ppc_ide_md.ide_release_region = chrp_ide_release_region;
#endif
/*
* Print the banner, then scroll down so boot progress
* can be printed. -- Cort
......
......@@ -55,24 +55,6 @@ static unsigned int cpu_6xx[16] = {
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* IDE functions */
static int
k2_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void
k2_ide_request_region(ide_ioreg_t from, unsigned int extent,
const char *name)
{
request_region(from, extent, name);
}
static void
k2_ide_release_region(ide_ioreg_t from, unsigned int extent)
{
release_region(from, extent);
}
static void __init
k2_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
......@@ -373,9 +355,6 @@ void __init platform_init(unsigned long r3, unsigned long r4,
ppc_md.nvram_write_val = todc_direct_write_val;
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.ide_check_region = k2_ide_check_region;
ppc_ide_md.ide_request_region = k2_ide_request_region;
ppc_ide_md.ide_release_region = k2_ide_release_region;
ppc_ide_md.ide_init_hwif = k2_ide_init_hwif_ports;
#endif
}
......
......@@ -154,13 +154,6 @@ lopec_ide_default_irq(ide_ioreg_t base)
return 0;
}
static void
lopec_ide_request_region(ide_ioreg_t from, unsigned int to,
const char *name)
{
request_region(from, to, name);
}
static ide_ioreg_t
lopec_ide_default_io_base(int index)
{
......@@ -169,19 +162,6 @@ lopec_ide_default_io_base(int index)
return lopec_ide_regbase[index];
}
static int
lopec_ide_check_region(ide_ioreg_t from, unsigned int to)
{
return check_region(from, to);
}
static void
lopec_ide_release_region(ide_ioreg_t from, unsigned int to)
{
release_region(from, to);
}
static void __init
lopec_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data,
ide_ioreg_t ctl, int *irq)
......@@ -350,9 +330,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_ID_MODULE)
ppc_ide_md.default_irq = lopec_ide_default_irq;
ppc_ide_md.default_io_base = lopec_ide_default_io_base;
ppc_ide_md.ide_request_region = lopec_ide_request_region;
ppc_ide_md.ide_check_region = lopec_ide_check_region;
ppc_ide_md.ide_release_region = lopec_ide_release_region;
ppc_ide_md.ide_init_hwif = lopec_ide_init_hwif_ports;
#endif
}
......@@ -322,29 +322,6 @@ mcpn765_ide_default_io_base(int index)
return mcpn765_ide_regbase[index];
}
static int
mcpn765_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void
mcpn765_ide_request_region(ide_ioreg_t from,
unsigned int extent,
const char *name)
{
request_region(from, extent, name);
return;
}
static void
mcpn765_ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
release_region(from, extent);
return;
}
static void __init
mcpn765_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq)
......@@ -492,9 +469,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_irq = mcpn765_ide_default_irq;
ppc_ide_md.default_io_base = mcpn765_ide_default_io_base;
ppc_ide_md.ide_check_region = mcpn765_ide_check_region;
ppc_ide_md.ide_request_region = mcpn765_ide_request_region;
ppc_ide_md.ide_release_region = mcpn765_ide_release_region;
ppc_ide_md.ide_init_hwif = mcpn765_ide_init_hwif_ports;
#endif
......
......@@ -199,27 +199,6 @@ menf1_map_io(void)
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* IDE functions */
static int
menf1_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void
menf1_ide_request_region(ide_ioreg_t from,
unsigned int extent,
const char *name)
{
request_region(from, extent, name);
}
static void
menf1_ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
release_region(from, extent);
}
static void __init
menf1_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq)
......@@ -305,9 +284,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_io_base = menf1_ide_default_io_base;
ppc_ide_md.default_irq = menf1_ide_default_irq;
ppc_ide_md.ide_check_region = menf1_ide_check_region;
ppc_ide_md.ide_request_region = menf1_ide_request_region;
ppc_ide_md.ide_release_region = menf1_ide_release_region;
ppc_ide_md.ide_init_hwif = menf1_ide_init_hwif_ports;
#endif
}
......@@ -601,45 +601,6 @@ pmac_halt(void)
pmac_power_off();
}
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/*
* IDE stuff.
*/
static int __pmac
pmac_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
#ifdef CONFIG_BLK_DEV_IDE_PMAC
if (pmac_ide_check_base(from) >= 0)
return 0;
#endif
return check_region(from, extent);
}
static void __pmac
pmac_ide_request_region(ide_ioreg_t from,
unsigned int extent,
const char *name)
{
#ifdef CONFIG_BLK_DEV_IDE_PMAC
if (pmac_ide_check_base(from) >= 0)
return;
#endif
request_region(from, extent, name);
}
static void __pmac
pmac_ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
#ifdef CONFIG_BLK_DEV_IDE_PMAC
if (pmac_ide_check_base(from) >= 0)
return;
#endif
release_region(from, extent);
}
#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
/*
* Read in a property describing some pieces of memory.
*/
......@@ -796,12 +757,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
select_adb_keyboard();
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.ide_check_region = pmac_ide_check_region;
ppc_ide_md.ide_request_region = pmac_ide_request_region;
ppc_ide_md.ide_release_region = pmac_ide_release_region;
#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
#ifdef CONFIG_BOOTX_TEXT
ppc_md.progress = pmac_progress;
#endif /* CONFIG_BOOTX_TEXT */
......
......@@ -263,27 +263,6 @@ pplus_ide_default_io_base(int index)
}
}
static int
pplus_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void
pplus_ide_request_region(ide_ioreg_t from,
unsigned int extent,
const char *name)
{
request_region(from, extent, name);
}
static void
pplus_ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
release_region(from, extent);
}
static void __init
pplus_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
{
......@@ -528,9 +507,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_irq = pplus_ide_default_irq;
ppc_ide_md.default_io_base = pplus_ide_default_io_base;
ppc_ide_md.ide_check_region = pplus_ide_check_region;
ppc_ide_md.ide_request_region = pplus_ide_request_region;
ppc_ide_md.ide_release_region = pplus_ide_release_region;
ppc_ide_md.ide_init_hwif = pplus_ide_init_hwif_ports;
#endif
......
......@@ -733,27 +733,6 @@ prep_ide_default_io_base(int index)
return 0;
}
}
static int __prep
prep_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void __prep
prep_ide_request_region(ide_ioreg_t from,
unsigned int extent,
const char *name)
{
request_region(from, extent, name);
}
static void __prep
prep_ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
release_region(from, extent);
}
#endif
#ifdef CONFIG_SMP
......@@ -916,9 +895,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_irq = prep_ide_default_irq;
ppc_ide_md.default_io_base = prep_ide_default_io_base;
ppc_ide_md.ide_check_region = prep_ide_check_region;
ppc_ide_md.ide_request_region = prep_ide_request_region;
ppc_ide_md.ide_release_region = prep_ide_release_region;
#endif
#ifdef CONFIG_VT
......
......@@ -85,8 +85,8 @@ extern bd_t m8xx_board_info;
/* for pcmcia sandisk */
#ifdef CONFIG_IDE
#define MAX_HWIFS 1
#define ide_request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
# define MAX_HWIFS 1
# define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif
#endif
......
......@@ -72,8 +72,8 @@ extern bd_t m8xx_board_info;
#define _IO_BASE_SIZE 0x1000
#ifdef CONFIG_IDE
#define MAX_HWIFS 1
#define ide_request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
# define MAX_HWIFS 1
# define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif
/* We don't use the 8259.
......
......@@ -491,29 +491,6 @@ sandpoint_ide_default_io_base(int index)
return sandpoint_ide_regbase[index];
}
static int
sandpoint_ide_check_region(ide_ioreg_t from, unsigned int extent)
{
return check_region(from, extent);
}
static void
sandpoint_ide_request_region(ide_ioreg_t from,
unsigned int extent,
const char *name)
{
request_region(from, extent, name);
return;
}
static void
sandpoint_ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
release_region(from, extent);
return;
}
static void __init
sandpoint_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq)
......@@ -684,9 +661,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_irq = sandpoint_ide_default_irq;
ppc_ide_md.default_io_base = sandpoint_ide_default_io_base;
ppc_ide_md.ide_check_region = sandpoint_ide_check_region;
ppc_ide_md.ide_request_region = sandpoint_ide_request_region;
ppc_ide_md.ide_release_region = sandpoint_ide_release_region;
ppc_ide_md.ide_init_hwif = sandpoint_ide_init_hwif_ports;
#endif
......
This diff is collapsed.
This diff is collapsed.
......@@ -283,15 +283,6 @@ void __init ide_init_trm290(struct ata_channel *hwif)
old = inw(hwif->config_data) & ~1;
if (old != compat && inb(old+2) == 0xff) {
compat += (next_offset += 0x400); /* leave lower 10 bits untouched */
#if 1
if (ide_check_region(compat + 2, 1))
printk("Aieee %s: ide_check_region failure at 0x%04x\n", hwif->name, (compat + 2));
/*
* The region check is not needed; however.........
* Since this is the checked in ide-probe.c,
* this is only an assignment.
*/
#endif
hwif->io_ports[IDE_CONTROL_OFFSET] = compat + 2;
outw(compat|1, hwif->config_data);
printk("%s: control basereg workaround: old=0x%04x, new=0x%04x\n", hwif->name, old, inw(hwif->config_data) & ~1);
......
......@@ -105,12 +105,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -44,12 +44,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -119,20 +119,6 @@ typedef union {
#undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0
/* request and free a normal interrupt */
#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))
/* ide-probe.c calls ide_request_region and stuff on the io_ports defined,
* but since they are not actually memory-mapped in the ETRAX driver, we don't
* do anything.
*/
#define ide_check_region(from,extent) (0)
#define ide_request_region(from,extent,name) do {} while(0)
#define ide_release_region(from,extent) do {} while(0)
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -109,12 +109,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -115,12 +115,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -103,64 +103,6 @@ typedef union {
} b;
} control_t;
static __inline__ int ide_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *device, void *dev_id)
{
#ifdef CONFIG_AMIGA
if (MACH_IS_AMIGA)
return request_irq(irq, handler, 0, device, dev_id);
#endif /* CONFIG_AMIGA */
#ifdef CONFIG_Q40
if (MACH_IS_Q40)
return request_irq(irq, handler, 0, device, dev_id);
#endif /* CONFIG_Q40*/
#ifdef CONFIG_MAC
if (MACH_IS_MAC)
return request_irq(irq, handler, 0, device, dev_id);
#endif /* CONFIG_MAC */
return 0;
}
static __inline__ void ide_free_irq(unsigned int irq, void *dev_id)
{
#ifdef CONFIG_AMIGA
if (MACH_IS_AMIGA)
free_irq(irq, dev_id);
#endif /* CONFIG_AMIGA */
#ifdef CONFIG_Q40
if (MACH_IS_Q40)
free_irq(irq, dev_id);
#endif /* CONFIG_Q40*/
#ifdef CONFIG_MAC
if (MACH_IS_MAC)
free_irq(irq, dev_id);
#endif /* CONFIG_MAC */
}
/*
* We should really implement those some day.
*/
static __inline__ int ide_check_region (ide_ioreg_t from, unsigned int extent)
{
return 0;
}
static __inline__ void ide_request_region (ide_ioreg_t from, unsigned int extent, const char *name)
{
#ifdef CONFIG_Q40
if (MACH_IS_Q40)
request_region((q40ide_ioreg_t)from,extent,name);
#endif
}
static __inline__ void ide_release_region (ide_ioreg_t from, unsigned int extent)
{
#ifdef CONFIG_Q40
if (MACH_IS_Q40)
release_region((q40ide_ioreg_t)from,extent);
#endif
}
#undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0
......
......@@ -31,14 +31,6 @@ struct ide_ops {
ide_ioreg_t (*ide_default_io_base)(int index);
void (*ide_init_hwif_ports)(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq);
int (*ide_request_irq)(unsigned int irq, void (*handler)(int, void *,
struct pt_regs *), unsigned long flags,
const char *device, void *dev_id);
void (*ide_free_irq)(unsigned int irq, void *dev_id);
int (*ide_check_region) (ide_ioreg_t from, unsigned int extent);
void (*ide_request_region)(ide_ioreg_t from, unsigned int extent,
const char *name);
void (*ide_release_region)(ide_ioreg_t from, unsigned int extent);
};
extern struct ide_ops *ide_ops;
......@@ -112,34 +104,6 @@ typedef union {
} b;
} control_t;
static __inline__ int ide_request_irq(unsigned int irq, void (*handler)(int,void *, struct pt_regs *),
unsigned long flags, const char *device, void *dev_id)
{
return ide_ops->ide_request_irq(irq, handler, flags, device, dev_id);
}
static __inline__ void ide_free_irq(unsigned int irq, void *dev_id)
{
ide_ops->ide_free_irq(irq, dev_id);
}
static __inline__ int ide_check_region (ide_ioreg_t from, unsigned int extent)
{
return ide_ops->ide_check_region(from, extent);
}
static __inline__ void ide_request_region(ide_ioreg_t from,
unsigned int extent, const char *name)
{
ide_ops->ide_request_region(from, extent, name);
}
static __inline__ void ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
ide_ops->ide_release_region(from, extent);
}
#undef SUPPORT_VLB_SYNC
#define SUPPORT_VLB_SYNC 0
......
......@@ -34,14 +34,6 @@ struct ide_ops {
ide_ioreg_t (*ide_default_io_base)(int index);
void (*ide_init_hwif_ports)(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq);
int (*ide_request_irq)(unsigned int irq, void (*handler)(int, void *,
struct pt_regs *), unsigned long flags,
const char *device, void *dev_id);
void (*ide_free_irq)(unsigned int irq, void *dev_id);
int (*ide_check_region) (ide_ioreg_t from, unsigned int extent);
void (*ide_request_region)(ide_ioreg_t from, unsigned int extent,
const char *name);
void (*ide_release_region)(ide_ioreg_t from, unsigned int extent);
};
extern struct ide_ops *ide_ops;
......@@ -99,35 +91,6 @@ typedef union {
} b;
} control_t;
static __inline__ int ide_request_irq(unsigned int irq, void (*handler)(int,void *, struct pt_regs *),
unsigned long flags, const char *device, void *dev_id)
{
return ide_ops->ide_request_irq(irq, handler, flags, device, dev_id);
}
static __inline__ void ide_free_irq(unsigned int irq, void *dev_id)
{
ide_ops->ide_free_irq(irq, dev_id);
}
static __inline__ int ide_check_region (ide_ioreg_t from, unsigned int extent)
{
return ide_ops->ide_check_region(from, extent);
}
static __inline__ void ide_request_region(ide_ioreg_t from,
unsigned int extent, const char *name)
{
ide_ops->ide_request_region(from, extent, name);
}
static __inline__ void ide_release_region(ide_ioreg_t from,
unsigned int extent)
{
ide_ops->ide_release_region(from, extent);
}
#if defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__)
#ifdef insl
......
......@@ -104,12 +104,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -35,12 +35,6 @@ extern void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
struct ide_machdep_calls {
int (*default_irq)(ide_ioreg_t base);
ide_ioreg_t (*default_io_base)(int index);
int (*ide_check_region)(ide_ioreg_t from, unsigned int extent);
void (*ide_request_region)(ide_ioreg_t from,
unsigned int extent,
const char *name);
void (*ide_release_region)(ide_ioreg_t from,
unsigned int extent);
void (*ide_init_hwif)(hw_regs_t *hw,
ide_ioreg_t data_port,
ide_ioreg_t ctrl_port,
......@@ -118,25 +112,6 @@ static __inline__ void ide_init_default_hwifs(void)
#endif /* CONFIG_BLK_DEV_IDEPCI */
}
static __inline__ int ide_check_region (ide_ioreg_t from, unsigned int extent)
{
if (ppc_ide_md.ide_check_region)
return ppc_ide_md.ide_check_region(from, extent);
return 0;
}
static __inline__ void ide_request_region (ide_ioreg_t from, unsigned int extent, const char *name)
{
if (ppc_ide_md.ide_request_region)
ppc_ide_md.ide_request_region(from, extent, name);
}
static __inline__ void ide_release_region (ide_ioreg_t from, unsigned int extent)
{
if (ppc_ide_md.ide_release_region)
ppc_ide_md.ide_release_region(from, extent);
}
typedef union {
unsigned all : 8; /* all of the bits together */
struct {
......@@ -160,14 +135,6 @@ typedef union {
} b;
} control_t;
#if !defined(ide_request_irq)
#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id))
#endif
#if !defined(ide_free_irq)
#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id))
#endif
/*
* The following are not needed for the non-m68k ports
* unless direct IDE on 8xx
......
......@@ -77,12 +77,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -40,12 +40,6 @@ typedef union {
} b;
} control_t;
#define ide_request_irq(irq,hand,flg,dev,id) do {} while (0)
#define ide_free_irq(irq,dev_id) do {} while (0)
#define ide_check_region(from,extent) do {} while (0)
#define ide_request_region(from,extent,name) do {} while (0)
#define ide_release_region(from,extent) do {} while (0)
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -40,12 +40,6 @@ typedef union {
} b;
} control_t;
#define ide_request_irq(irq,hand,flg,dev,id) do {} while (0)
#define ide_free_irq(irq,dev_id) do {} while (0)
#define ide_check_region(from,extent) do {} while (0)
#define ide_request_region(from,extent,name) do {} while (0)
#define ide_release_region(from,extent) do {} while (0)
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -130,12 +130,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -96,33 +96,6 @@ typedef union {
} b;
} control_t;
static __inline__ int ide_request_irq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *name, void *devid)
{
return request_irq(irq, handler, SA_SHIRQ, name, devid);
}
static __inline__ void ide_free_irq(unsigned int irq, void *dev_id)
{
free_irq(irq, dev_id);
}
static __inline__ int ide_check_region(ide_ioreg_t base, unsigned int size)
{
/* We leave these empty because pcic.c calls sparc_alloc_io() */
return 0;
}
static __inline__ void ide_request_region(ide_ioreg_t base, unsigned int size,
const char *name)
{
}
static __inline__ void ide_release_region(ide_ioreg_t base, unsigned int size)
{
}
#undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0
......
......@@ -92,34 +92,6 @@ typedef union {
} b;
} control_t;
static __inline__ int ide_request_irq(unsigned int irq,
void (*handler)(int, void *, struct pt_regs *),
unsigned long flags, const char *name, void *devid)
{
return request_irq(irq, handler, SA_SHIRQ, name, devid);
}
static __inline__ void ide_free_irq(unsigned int irq, void *dev_id)
{
free_irq(irq, dev_id);
}
static __inline__ int ide_check_region(ide_ioreg_t base, unsigned int size)
{
return check_region(base, size);
}
static __inline__ void ide_request_region(ide_ioreg_t base, unsigned int size,
const char *name)
{
request_region(base, size, name);
}
static __inline__ void ide_release_region(ide_ioreg_t base, unsigned int size)
{
release_region(base, size);
}
#undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0
......
......@@ -109,12 +109,6 @@ typedef union {
} b;
} control_t;
#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))
#define ide_request_region(from,extent,name) request_region((from), (extent), (name))
#define ide_release_region(from,extent) release_region((from), (extent))
/*
* The following are not needed for the non-m68k ports
*/
......
......@@ -827,7 +827,7 @@ extern int drive_is_flashcard(ide_drive_t *drive);
int ide_spin_wait_hwgroup (ide_drive_t *drive);
void ide_timer_expiry (unsigned long data);
void ide_intr (int irq, void *dev_id, struct pt_regs *regs);
extern void ata_irq_request(int irq, void *data, struct pt_regs *regs);
void do_ide_request (request_queue_t * q);
void ide_init_subdrivers (void);
......
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