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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips/] [vr41xx/] [common/] [ide.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * This file is subject to the terms and conditions of the GNU General Public
3
 * License.  See the file "COPYING" in the main directory of this archive
4
 * for more details.
5
 *
6
 * IDE routines for NEC VR4100 series standard configurations.
7
 *
8
 * Copyright (C) 1998, 1999, 2001 by Ralf Baechle
9
 * Copyright (C) 2003 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
10
 */
11
#include <linux/hdreg.h>
12
#include <linux/ide.h>
13
 
14
#include <asm/hdreg.h>
15
 
16
static int vr41xx_ide_default_irq(ide_ioreg_t base)
17
{
18
        return 0;
19
}
20
 
21
static ide_ioreg_t vr41xx_ide_default_io_base(int index)
22
{
23
        return 0;
24
}
25
 
26
static void vr41xx_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port,
27
                                       ide_ioreg_t ctrl_port, int *irq)
28
{
29
        ide_ioreg_t reg = data_port;
30
        int i;
31
 
32
        for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
33
                hw->io_ports[i] = reg;
34
                reg += 1;
35
        }
36
        if (ctrl_port) {
37
                hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
38
        } else {
39
                hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206;
40
        }
41
        if (irq != NULL)
42
                *irq = 0;
43
        hw->io_ports[IDE_IRQ_OFFSET] = 0;
44
}
45
 
46
struct ide_ops vr41xx_ide_ops = {
47
        .ide_default_irq        = &vr41xx_ide_default_irq,
48
        .ide_default_io_base    = &vr41xx_ide_default_io_base,
49
        .ide_init_hwif_ports    = &vr41xx_ide_init_hwif_ports
50
};

powered by: WebSVN 2.1.0

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