diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-06-17 13:25:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-06-17 13:25:08 +0000 |
commit | 59223edaa18759982db0a8aced0e77457d10c68e (patch) | |
tree | 89354903b01fa0a447bffeefe00df3044495db2e /include/asm-sparc64/ide.h | |
parent | db7d4daea91e105e3859cf461d7e53b9b77454b2 (diff) |
Merge with Linux 2.3.6. Sorry, this isn't tested on silicon, I don't
have a MIPS box at hand.
Diffstat (limited to 'include/asm-sparc64/ide.h')
-rw-r--r-- | include/asm-sparc64/ide.h | 61 |
1 files changed, 38 insertions, 23 deletions
diff --git a/include/asm-sparc64/ide.h b/include/asm-sparc64/ide.h index 191b95cb2..c8db43d59 100644 --- a/include/asm-sparc64/ide.h +++ b/include/asm-sparc64/ide.h @@ -1,4 +1,4 @@ -/* $Id: ide.h,v 1.12 1999/04/17 14:25:29 davem Exp $ +/* $Id: ide.h,v 1.14 1999/05/15 05:02:35 davem Exp $ * ide.h: Ultra/PCI specific IDE glue. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) @@ -11,8 +11,8 @@ #ifdef __KERNEL__ #include <asm/pgtable.h> - -typedef unsigned long ide_ioreg_t; +#include <asm/io.h> +#include <asm/hdreg.h> #undef MAX_HWIFS #define MAX_HWIFS 2 @@ -29,21 +29,42 @@ static __inline__ ide_ioreg_t ide_default_io_base(int index) return 0; } -static __inline__ void ide_init_hwif_ports(ide_ioreg_t *p, ide_ioreg_t base, int *irq) +static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) { + ide_ioreg_t reg = data_port; int i; - /* These are simply offsets from base. */ - for (i = 0; i < 8; i++) - *p++ = base++; - /* PCI code needs to figure out these. */ - for ( ; i < 10; i++) - *p++ = 0; - /* PCI code needs to figure out this. */ + for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { + hw->io_ports[i] = reg; + reg += 1; + } + if (ctrl_port) { + hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; + } else { + hw->io_ports[IDE_CONTROL_OFFSET] = 0; + } if (irq != NULL) *irq = 0; } +/* + * This registers the standard ports for this architecture with the IDE + * driver. + */ +static __inline__ void ide_init_default_hwifs(void) +{ +#ifdef __DO_I_NEED_THIS + hw_regs_t hw; + int index; + + for (index = 0; index < MAX_HWIFS; index++) { + ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, 0); + hw.irq = ide_default_irq(ide_default_io_base(index)); + ide_register_hw(&hw, NULL); + } +#endif /* __DO_I_NEED_THIS */ +} + typedef union { unsigned int all : 8; /* all of the bits together */ struct { @@ -92,11 +113,6 @@ static __inline__ void ide_release_region(ide_ioreg_t base, unsigned int size) #undef HD_DATA #define HD_DATA ((ide_ioreg_t)0) -static __inline__ int ide_ack_intr(ide_ioreg_t status_port, ide_ioreg_t irq_port) -{ - return 1; -} - /* From m68k code... */ #ifdef insl @@ -255,13 +271,12 @@ static __inline__ void ide_fix_driveid(struct hd_driveid *id) } } -static __inline__ void ide_release_lock (int *ide_lock) -{ -} - -static __inline__ void ide_get_lock (int *ide_lock, void (*handler)(int, void *, struct pt_regs *), void *data) -{ -} +/* + * The following are not needed for the non-m68k ports + */ +#define ide_ack_intr(hwif) (1) +#define ide_release_lock(lock) do {} while (0) +#define ide_get_lock(lock, hdlr, data) do {} while (0) #endif /* __KERNEL__ */ |