patch-2.3.1 linux/arch/ppc/kernel/chrp_setup.c
Next file: linux/arch/ppc/kernel/mbx_setup.c
Previous file: linux/arch/ppc/kernel/apus_setup.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Thu May 13 11:00:08 1999
- Orig file:
v2.3.0/linux/arch/ppc/kernel/chrp_setup.c
- Orig date:
Tue May 11 08:24:32 1999
diff -u --recursive --new-file v2.3.0/linux/arch/ppc/kernel/chrp_setup.c linux/arch/ppc/kernel/chrp_setup.c
@@ -37,6 +37,7 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/pgtable.h>
+#include <linux/ide.h>
#include <asm/ide.h>
#include <asm/prom.h>
#include <asm/gg2.h>
@@ -561,16 +562,23 @@
ppc_generic_ide_fix_driveid(id);
}
-void chrp_ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int *irq)
+void
+chrp_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq)
{
- ide_ioreg_t port = base;
- int i = 8;
+ ide_ioreg_t reg = data_port;
+ int i;
- while (i--)
- *p++ = port++;
- *p++ = port;
- if (irq != NULL)
- *irq = chrp_ide_irq;
+ 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)
+ hw->irq = chrp_ide_irq;
}
EXPORT_SYMBOL(chrp_ide_irq);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)