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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-sh64/] [ide.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 *  linux/include/asm-sh64/ide.h
3
 *
4
 *  Copyright (C) 1994-1996  Linus Torvalds & authors
5
 */
6
 
7
/*
8
 *  This file contains the sh64 architecture specific IDE code.
9
 */
10
 
11
#ifndef __ASM_SH64_IDE_H
12
#define __ASM_SH64_IDE_H
13
 
14
#ifdef __KERNEL__
15
 
16
#ifndef MAX_HWIFS
17
#define MAX_HWIFS       4
18
#endif
19
 
20
#if 0
21
#include <asm/arch/ide.h>
22
#endif
23
 
24
#define ide_default_io_base(i)          ((ide_ioreg_t)0)
25
#define ide_default_irq(b)              (0)
26
 
27
static __inline__ void ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, 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
static __inline__ void ide_init_default_hwifs(void)
47
{
48
#ifndef CONFIG_BLK_DEV_IDEPCI
49
        hw_regs_t hw;
50
        int index;
51
 
52
        for(index = 0; index < MAX_HWIFS; index++) {
53
                ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, NULL);
54
                hw.irq = ide_default_irq(ide_default_io_base(index));
55
                ide_register_hw(&hw, NULL);
56
        }
57
#endif /* CONFIG_BLK_DEV_IDEPCI */
58
}
59
 
60
#include <asm-generic/ide_iops.h>
61
 
62
 
63
#endif /* __KERNEL__ */
64
 
65
#endif /* __ASM_SH64_IDE_H */

powered by: WebSVN 2.1.0

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