Commit c01fc8a9 authored by Anton Altaparmakov's avatar Anton Altaparmakov

Merge bk://linuxvm.bkbits.net/linus-2.5 into cantab.net:/usr/src/tng

parents dfeb4845 045c90fe
...@@ -27,7 +27,9 @@ volatile struct baboon *baboon; ...@@ -27,7 +27,9 @@ volatile struct baboon *baboon;
void baboon_irq(int, void *, struct pt_regs *); void baboon_irq(int, void *, struct pt_regs *);
#if 0
extern int macide_ack_intr(struct ata_channel *); extern int macide_ack_intr(struct ata_channel *);
#endif
/* /*
* Baboon initialization. * Baboon initialization.
......
...@@ -30,42 +30,8 @@ static void no_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -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 = { struct ide_ops no_ide_ops = {
&no_ide_default_irq, &no_ide_default_irq,
&no_ide_default_io_base, &no_ide_default_io_base,
&no_ide_init_hwif_ports, &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
}; };
...@@ -62,42 +62,8 @@ static void std_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -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; 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 = { struct ide_ops std_ide_ops = {
&std_ide_default_irq, &std_ide_default_irq,
&std_ide_default_io_base, &std_ide_default_io_base,
&std_ide_init_hwif_ports, &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
}; };
...@@ -29,42 +29,8 @@ static void no_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -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 = { struct ide_ops no_ide_ops = {
&no_ide_default_irq, &no_ide_default_irq,
&no_ide_default_io_base, &no_ide_default_io_base,
&no_ide_init_hwif_ports, &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
}; };
...@@ -62,42 +62,8 @@ static void std_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ...@@ -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; 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 = { struct ide_ops std_ide_ops = {
&std_ide_default_irq, &std_ide_default_irq,
&std_ide_default_io_base, &std_ide_default_io_base,
&std_ide_init_hwif_ports, &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
}; };
...@@ -256,29 +256,6 @@ ppc4xx_progress(char *s, unsigned short hex) ...@@ -256,29 +256,6 @@ ppc4xx_progress(char *s, unsigned short hex)
* IDE stuff. * IDE stuff.
* should be generic for every IDE PCI chipset * 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) #if defined(CONFIG_BLK_DEV_IDEPCI)
static void static void
ppc4xx_ide_init_hwif_ports(hw_regs_t * hw, ide_ioreg_t data_port, 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, ...@@ -398,16 +375,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
** m8xx_setup.c, prep_setup.c use ** m8xx_setup.c, prep_setup.c use
** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ** defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
*/ */
#if defined (CONFIG_IDE) #ifdef CONFIG_IDE
ppc_ide_md.ide_request_region = ppc4xx_ide_request_region; # if defined(CONFIG_BLK_DEV_IDEPCI)
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)
ppc_ide_md.ide_init_hwif = ppc4xx_ide_init_hwif_ports; 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.default_irq = nonpci_ide_default_irq;
ppc_ide_md.ide_init_hwif = nonpci_ide_init_hwif_ports; ppc_ide_md.ide_init_hwif = nonpci_ide_init_hwif_ports;
#endif # endif
#endif #endif
board_init(); board_init();
......
...@@ -463,33 +463,6 @@ chrp_init2(void) ...@@ -463,33 +463,6 @@ chrp_init2(void)
#endif /* CONFIG_VT && (CONFIG_ADB_KEYBOARD || CONFIG_INPUT) */ #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 * 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 * 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, ...@@ -597,12 +570,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.smp_ops = &chrp_smp_ops; ppc_md.smp_ops = &chrp_smp_ops;
#endif /* CONFIG_SMP */ #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 * Print the banner, then scroll down so boot progress
* can be printed. -- Cort * can be printed. -- Cort
......
...@@ -55,24 +55,6 @@ static unsigned int cpu_6xx[16] = { ...@@ -55,24 +55,6 @@ static unsigned int cpu_6xx[16] = {
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* IDE functions */ /* 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 static void __init
k2_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, 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, ...@@ -373,9 +355,6 @@ void __init platform_init(unsigned long r3, unsigned long r4,
ppc_md.nvram_write_val = todc_direct_write_val; ppc_md.nvram_write_val = todc_direct_write_val;
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) #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; ppc_ide_md.ide_init_hwif = k2_ide_init_hwif_ports;
#endif #endif
} }
......
...@@ -154,13 +154,6 @@ lopec_ide_default_irq(ide_ioreg_t base) ...@@ -154,13 +154,6 @@ lopec_ide_default_irq(ide_ioreg_t base)
return 0; 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 static ide_ioreg_t
lopec_ide_default_io_base(int index) lopec_ide_default_io_base(int index)
{ {
...@@ -169,19 +162,6 @@ lopec_ide_default_io_base(int index) ...@@ -169,19 +162,6 @@ lopec_ide_default_io_base(int index)
return lopec_ide_regbase[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 static void __init
lopec_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data, lopec_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data,
ide_ioreg_t ctl, int *irq) ide_ioreg_t ctl, int *irq)
...@@ -350,9 +330,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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) #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_irq = lopec_ide_default_irq;
ppc_ide_md.default_io_base = lopec_ide_default_io_base; 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; ppc_ide_md.ide_init_hwif = lopec_ide_init_hwif_ports;
#endif #endif
} }
...@@ -322,29 +322,6 @@ mcpn765_ide_default_io_base(int index) ...@@ -322,29 +322,6 @@ mcpn765_ide_default_io_base(int index)
return mcpn765_ide_regbase[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 static void __init
mcpn765_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, mcpn765_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq) ide_ioreg_t ctrl_port, int *irq)
...@@ -492,9 +469,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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) #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_irq = mcpn765_ide_default_irq;
ppc_ide_md.default_io_base = mcpn765_ide_default_io_base; 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; ppc_ide_md.ide_init_hwif = mcpn765_ide_init_hwif_ports;
#endif #endif
......
...@@ -199,27 +199,6 @@ menf1_map_io(void) ...@@ -199,27 +199,6 @@ menf1_map_io(void)
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* IDE functions */ /* 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 static void __init
menf1_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, menf1_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq) ide_ioreg_t ctrl_port, int *irq)
...@@ -305,9 +284,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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) #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_io_base = menf1_ide_default_io_base;
ppc_ide_md.default_irq = menf1_ide_default_irq; 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; ppc_ide_md.ide_init_hwif = menf1_ide_init_hwif_ports;
#endif #endif
} }
...@@ -601,45 +601,6 @@ pmac_halt(void) ...@@ -601,45 +601,6 @@ pmac_halt(void)
pmac_power_off(); 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. * Read in a property describing some pieces of memory.
*/ */
...@@ -796,12 +757,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -796,12 +757,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
select_adb_keyboard(); 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 #ifdef CONFIG_BOOTX_TEXT
ppc_md.progress = pmac_progress; ppc_md.progress = pmac_progress;
#endif /* CONFIG_BOOTX_TEXT */ #endif /* CONFIG_BOOTX_TEXT */
......
...@@ -263,27 +263,6 @@ pplus_ide_default_io_base(int index) ...@@ -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 static void __init
pplus_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) 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, ...@@ -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) #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_irq = pplus_ide_default_irq;
ppc_ide_md.default_io_base = pplus_ide_default_io_base; 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; ppc_ide_md.ide_init_hwif = pplus_ide_init_hwif_ports;
#endif #endif
......
...@@ -733,27 +733,6 @@ prep_ide_default_io_base(int index) ...@@ -733,27 +733,6 @@ prep_ide_default_io_base(int index)
return 0; 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 #endif
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -916,9 +895,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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) #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_irq = prep_ide_default_irq;
ppc_ide_md.default_io_base = prep_ide_default_io_base; 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 #endif
#ifdef CONFIG_VT #ifdef CONFIG_VT
......
...@@ -85,8 +85,8 @@ extern bd_t m8xx_board_info; ...@@ -85,8 +85,8 @@ extern bd_t m8xx_board_info;
/* for pcmcia sandisk */ /* for pcmcia sandisk */
#ifdef CONFIG_IDE #ifdef CONFIG_IDE
#define MAX_HWIFS 1 # define MAX_HWIFS 1
#define ide_request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id)) # define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif #endif
#endif #endif
......
...@@ -72,8 +72,8 @@ extern bd_t m8xx_board_info; ...@@ -72,8 +72,8 @@ extern bd_t m8xx_board_info;
#define _IO_BASE_SIZE 0x1000 #define _IO_BASE_SIZE 0x1000
#ifdef CONFIG_IDE #ifdef CONFIG_IDE
#define MAX_HWIFS 1 # define MAX_HWIFS 1
#define ide_request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id)) # define request_irq(irq,hand,flg,dev,id) request_8xxirq((irq),(hand),(flg),(dev),(id))
#endif #endif
/* We don't use the 8259. /* We don't use the 8259.
......
...@@ -491,29 +491,6 @@ sandpoint_ide_default_io_base(int index) ...@@ -491,29 +491,6 @@ sandpoint_ide_default_io_base(int index)
return sandpoint_ide_regbase[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 static void __init
sandpoint_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, sandpoint_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq) ide_ioreg_t ctrl_port, int *irq)
...@@ -684,9 +661,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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) #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_irq = sandpoint_ide_default_irq;
ppc_ide_md.default_io_base = sandpoint_ide_default_io_base; 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; ppc_ide_md.ide_init_hwif = sandpoint_ide_init_hwif_ports;
#endif #endif
......
...@@ -5,9 +5,7 @@ ...@@ -5,9 +5,7 @@
* May be copied or modified under the terms of the GNU General Public License * May be copied or modified under the terms of the GNU General Public License
* *
* Special Thanks to Mark for his Six years of work. * Special Thanks to Mark for his Six years of work.
*/ *
/*
* This module provides support for the bus-master IDE DMA functions * This module provides support for the bus-master IDE DMA functions
* of various PCI chipsets, including the Intel PIIX (i82371FB for * of various PCI chipsets, including the Intel PIIX (i82371FB for
* the 430 FX chipset), the PIIX3 (i82371SB for the 430 HX/VX and * the 430 FX chipset), the PIIX3 (i82371SB for the 430 HX/VX and
...@@ -215,33 +213,16 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive) ...@@ -215,33 +213,16 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive)
return ide_error(drive, "dma_intr", stat); return ide_error(drive, "dma_intr", stat);
} }
static int ide_build_sglist(struct ata_channel *hwif, struct request *rq)
{
request_queue_t *q = &hwif->drives[DEVICE_NR(rq->rq_dev) & 1].queue;
struct scatterlist *sg = hwif->sg_table;
int nents;
nents = blk_rq_map_sg(q, rq, hwif->sg_table);
if (rq->q && nents > rq->nr_phys_segments)
printk("ide-dma: received %d phys segments, build %d\n", rq->nr_phys_segments, nents);
if (rq_data_dir(rq) == READ)
hwif->sg_dma_direction = PCI_DMA_FROMDEVICE;
else
hwif->sg_dma_direction = PCI_DMA_TODEVICE;
return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction);
}
/* /*
* FIXME: taskfiles should be a map of pages, not a long virt address... /jens * FIXME: taskfiles should be a map of pages, not a long virt address... /jens
* FIXME: I agree with Jens --mdcki! * FIXME: I agree with Jens --mdcki!
*/ */
static int raw_build_sglist(struct ata_channel *ch, struct request *rq) static int build_sglist(struct ata_channel *ch, struct request *rq)
{ {
struct scatterlist *sg = ch->sg_table; struct scatterlist *sg = ch->sg_table;
int nents = 0; int nents = 0;
if (rq->flags & REQ_DRIVE_ACB) {
struct ata_taskfile *args = rq->special; struct ata_taskfile *args = rq->special;
#if 1 #if 1
unsigned char *virt_addr = rq->buffer; unsigned char *virt_addr = rq->buffer;
...@@ -258,13 +239,16 @@ static int raw_build_sglist(struct ata_channel *ch, struct request *rq) ...@@ -258,13 +239,16 @@ static int raw_build_sglist(struct ata_channel *ch, struct request *rq)
else else
ch->sg_dma_direction = PCI_DMA_FROMDEVICE; ch->sg_dma_direction = PCI_DMA_FROMDEVICE;
/*
* FIXME: This depends upon a hard coded page size!
*/
if (sector_count > 128) { if (sector_count > 128) {
memset(&sg[nents], 0, sizeof(*sg)); memset(&sg[nents], 0, sizeof(*sg));
sg[nents].page = virt_to_page(virt_addr); sg[nents].page = virt_to_page(virt_addr);
sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK; sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
sg[nents].length = 128 * SECTOR_SIZE; sg[nents].length = 128 * SECTOR_SIZE;
nents++; ++nents;
virt_addr = virt_addr + (128 * SECTOR_SIZE); virt_addr = virt_addr + (128 * SECTOR_SIZE);
sector_count -= 128; sector_count -= 128;
} }
...@@ -272,8 +256,19 @@ static int raw_build_sglist(struct ata_channel *ch, struct request *rq) ...@@ -272,8 +256,19 @@ static int raw_build_sglist(struct ata_channel *ch, struct request *rq)
sg[nents].page = virt_to_page(virt_addr); sg[nents].page = virt_to_page(virt_addr);
sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK; sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
sg[nents].length = sector_count * SECTOR_SIZE; sg[nents].length = sector_count * SECTOR_SIZE;
nents++; ++nents;
} else {
nents = blk_rq_map_sg(rq->q, rq, ch->sg_table);
if (rq->q && nents > rq->nr_phys_segments)
printk("ide-dma: received %d phys segments, build %d\n", rq->nr_phys_segments, nents);
if (rq_data_dir(rq) == READ)
ch->sg_dma_direction = PCI_DMA_FROMDEVICE;
else
ch->sg_dma_direction = PCI_DMA_TODEVICE;
}
return pci_map_sg(ch->pci_dev, sg, nents, ch->sg_dma_direction); return pci_map_sg(ch->pci_dev, sg, nents, ch->sg_dma_direction);
} }
...@@ -295,11 +290,7 @@ int ide_build_dmatable (ide_drive_t *drive, ide_dma_action_t func) ...@@ -295,11 +290,7 @@ int ide_build_dmatable (ide_drive_t *drive, ide_dma_action_t func)
int i; int i;
struct scatterlist *sg; struct scatterlist *sg;
if (HWGROUP(drive)->rq->flags & REQ_DRIVE_ACB) { hwif->sg_nents = i = build_sglist(hwif, HWGROUP(drive)->rq);
hwif->sg_nents = i = raw_build_sglist(hwif, HWGROUP(drive)->rq);
} else {
hwif->sg_nents = i = ide_build_sglist(hwif, HWGROUP(drive)->rq);
}
if (!i) if (!i)
return 0; return 0;
......
This diff is collapsed.
This diff is collapsed.
...@@ -283,15 +283,6 @@ void __init ide_init_trm290(struct ata_channel *hwif) ...@@ -283,15 +283,6 @@ void __init ide_init_trm290(struct ata_channel *hwif)
old = inw(hwif->config_data) & ~1; old = inw(hwif->config_data) & ~1;
if (old != compat && inb(old+2) == 0xff) { if (old != compat && inb(old+2) == 0xff) {
compat += (next_offset += 0x400); /* leave lower 10 bits untouched */ 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; hwif->io_ports[IDE_CONTROL_OFFSET] = compat + 2;
outw(compat|1, hwif->config_data); 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); 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 { ...@@ -105,12 +105,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -44,12 +44,6 @@ typedef union { ...@@ -44,12 +44,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -119,20 +119,6 @@ typedef union { ...@@ -119,20 +119,6 @@ typedef union {
#undef SUPPORT_SLOW_DATA_PORTS #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -109,12 +109,6 @@ typedef union { ...@@ -109,12 +109,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -115,12 +115,6 @@ typedef union { ...@@ -115,12 +115,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -103,64 +103,6 @@ typedef union { ...@@ -103,64 +103,6 @@ typedef union {
} b; } b;
} control_t; } 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 #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
......
...@@ -31,14 +31,6 @@ struct ide_ops { ...@@ -31,14 +31,6 @@ struct ide_ops {
ide_ioreg_t (*ide_default_io_base)(int index); ide_ioreg_t (*ide_default_io_base)(int index);
void (*ide_init_hwif_ports)(hw_regs_t *hw, ide_ioreg_t data_port, void (*ide_init_hwif_ports)(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq); 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; extern struct ide_ops *ide_ops;
...@@ -112,34 +104,6 @@ typedef union { ...@@ -112,34 +104,6 @@ typedef union {
} b; } b;
} control_t; } 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 #undef SUPPORT_VLB_SYNC
#define SUPPORT_VLB_SYNC 0 #define SUPPORT_VLB_SYNC 0
......
...@@ -34,14 +34,6 @@ struct ide_ops { ...@@ -34,14 +34,6 @@ struct ide_ops {
ide_ioreg_t (*ide_default_io_base)(int index); ide_ioreg_t (*ide_default_io_base)(int index);
void (*ide_init_hwif_ports)(hw_regs_t *hw, ide_ioreg_t data_port, void (*ide_init_hwif_ports)(hw_regs_t *hw, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, int *irq); 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; extern struct ide_ops *ide_ops;
...@@ -99,35 +91,6 @@ typedef union { ...@@ -99,35 +91,6 @@ typedef union {
} b; } b;
} control_t; } 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__) #if defined(CONFIG_SWAP_IO_SPACE) && defined(__MIPSEB__)
#ifdef insl #ifdef insl
......
...@@ -104,12 +104,6 @@ typedef union { ...@@ -104,12 +104,6 @@ typedef union {
} b; } b;
} control_t; } 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 * 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); ...@@ -35,12 +35,6 @@ extern void ppc_generic_ide_fix_driveid(struct hd_driveid *id);
struct ide_machdep_calls { struct ide_machdep_calls {
int (*default_irq)(ide_ioreg_t base); int (*default_irq)(ide_ioreg_t base);
ide_ioreg_t (*default_io_base)(int index); 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, void (*ide_init_hwif)(hw_regs_t *hw,
ide_ioreg_t data_port, ide_ioreg_t data_port,
ide_ioreg_t ctrl_port, ide_ioreg_t ctrl_port,
...@@ -118,25 +112,6 @@ static __inline__ void ide_init_default_hwifs(void) ...@@ -118,25 +112,6 @@ static __inline__ void ide_init_default_hwifs(void)
#endif /* CONFIG_BLK_DEV_IDEPCI */ #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 { typedef union {
unsigned all : 8; /* all of the bits together */ unsigned all : 8; /* all of the bits together */
struct { struct {
...@@ -160,14 +135,6 @@ typedef union { ...@@ -160,14 +135,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
* unless direct IDE on 8xx * unless direct IDE on 8xx
......
...@@ -77,12 +77,6 @@ typedef union { ...@@ -77,12 +77,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -40,12 +40,6 @@ typedef union { ...@@ -40,12 +40,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -40,12 +40,6 @@ typedef union { ...@@ -40,12 +40,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -130,12 +130,6 @@ typedef union { ...@@ -130,12 +130,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -96,33 +96,6 @@ typedef union { ...@@ -96,33 +96,6 @@ typedef union {
} b; } b;
} control_t; } 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 #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
......
...@@ -92,34 +92,6 @@ typedef union { ...@@ -92,34 +92,6 @@ typedef union {
} b; } b;
} control_t; } 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 #undef SUPPORT_SLOW_DATA_PORTS
#define SUPPORT_SLOW_DATA_PORTS 0 #define SUPPORT_SLOW_DATA_PORTS 0
......
...@@ -109,12 +109,6 @@ typedef union { ...@@ -109,12 +109,6 @@ typedef union {
} b; } b;
} control_t; } 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 * The following are not needed for the non-m68k ports
*/ */
......
...@@ -73,7 +73,6 @@ typedef unsigned char byte; /* used everywhere */ ...@@ -73,7 +73,6 @@ typedef unsigned char byte; /* used everywhere */
*/ */
#define DMA_PIO_RETRY 1 /* retrying in PIO */ #define DMA_PIO_RETRY 1 /* retrying in PIO */
#define HWIF(drive) ((drive)->channel)
#define HWGROUP(drive) (drive->channel->hwgroup) #define HWGROUP(drive) (drive->channel->hwgroup)
/* /*
...@@ -254,7 +253,7 @@ void ide_setup_ports(hw_regs_t *hw, ...@@ -254,7 +253,7 @@ void ide_setup_ports(hw_regs_t *hw,
#endif #endif
/* /*
* Now for the data we need to maintain per-drive: ide_drive_t * Device types - the nomenclature is analogous to SCSI code.
*/ */
#define ATA_DISK 0x20 #define ATA_DISK 0x20
...@@ -266,7 +265,10 @@ void ide_setup_ports(hw_regs_t *hw, ...@@ -266,7 +265,10 @@ void ide_setup_ports(hw_regs_t *hw,
#define ATA_NO_LUN 0x7f #define ATA_NO_LUN 0x7f
struct ide_settings_s; struct ide_settings_s;
/* structure describing an ATA/ATAPI device */
/*
* ATA/ATAPI device structure :
*/
typedef typedef
struct ata_device { struct ata_device {
struct ata_channel * channel; struct ata_channel * channel;
...@@ -401,7 +403,6 @@ struct ata_channel { ...@@ -401,7 +403,6 @@ struct ata_channel {
struct device dev; /* device handle */ struct device dev; /* device handle */
int unit; /* channel number */ int unit; /* channel number */
struct ata_channel *next; /* for linked-list in ide_hwgroup_t */
struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */ struct hwgroup_s *hwgroup; /* actually (ide_hwgroup_t *) */
ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */ ide_ioreg_t io_ports[IDE_NR_PORTS]; /* task file registers */
...@@ -516,13 +517,10 @@ typedef int (ide_expiry_t)(ide_drive_t *); ...@@ -516,13 +517,10 @@ typedef int (ide_expiry_t)(ide_drive_t *);
#define IDE_DMA 2 /* DMA in progress */ #define IDE_DMA 2 /* DMA in progress */
typedef struct hwgroup_s { typedef struct hwgroup_s {
ide_handler_t *handler;/* irq handler, if active */ ide_handler_t *handler; /* irq handler, if active */
unsigned long flags; /* BUSY, SLEEPING */ unsigned long flags; /* BUSY, SLEEPING */
ide_drive_t *drive; /* current drive */ struct ata_device *drive; /* current drive */
struct ata_channel *hwif; /* ptr to current hwif in linked-list */
struct request *rq; /* current request */ struct request *rq; /* current request */
struct timer_list timer; /* failsafe timer */ struct timer_list timer; /* failsafe timer */
struct request wrq; /* local copy of current write rq */ struct request wrq; /* local copy of current write rq */
unsigned long poll_timeout; /* timeout value during long polls */ unsigned long poll_timeout; /* timeout value during long polls */
...@@ -827,7 +825,7 @@ extern int drive_is_flashcard(ide_drive_t *drive); ...@@ -827,7 +825,7 @@ extern int drive_is_flashcard(ide_drive_t *drive);
int ide_spin_wait_hwgroup (ide_drive_t *drive); int ide_spin_wait_hwgroup (ide_drive_t *drive);
void ide_timer_expiry (unsigned long data); 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 do_ide_request (request_queue_t * q);
void ide_init_subdrivers (void); 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