OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-arm/] [arch-cl7500/] [ide.h] - Blame information for rev 1276

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 * linux/include/asm-arm/arch-cl7500/ide.h
3
 *
4
 * Copyright (c) 1997 Russell King
5
 *
6
 * Modifications:
7
 *  29-07-1998  RMK     Major re-work of IDE architecture specific code
8
 */
9
#include <asm/irq.h>
10
#include <asm/arch/hardware.h>
11
 
12
/*
13
 * Set up a hw structure for a specified data port, control port and IRQ.
14
 * This should follow whatever the default interface uses.
15
 */
16
static __inline__ void
17
ide_init_hwif_ports(hw_regs_t *hw, int data_port, int ctrl_port, int *irq)
18
{
19
        ide_ioreg_t reg = data_port;
20
        int i;
21
 
22
        memset(hw, 0, sizeof(*hw));
23
 
24
        for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
25
                hw->io_ports[i] = reg;
26
                reg += 1;
27
        }
28
        if (ctrl_port) {
29
                hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
30
        } else {
31
                hw->io_ports[IDE_CONTROL_OFFSET] = data_port + 0x206;
32
        }
33
        if (irq != NULL)
34
                *irq = 0;
35
        hw->io_ports[IDE_IRQ_OFFSET] = 0;
36
}
37
 
38
/*
39
 * This registers the standard ports for this architecture with the IDE
40
 * driver.
41
 */
42
static __inline__ void
43
ide_init_default_hwifs(void)
44
{
45
        hw_regs_t hw;
46
 
47
        ide_init_hwif_ports(&hw, ISASLOT_IO + 0x1f0, ISASLOT_IO + 0x3f6, NULL);
48
        hw.irq = IRQ_ISA_14;
49
        ide_register_hw(&hw, NULL);
50
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.