summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-rpc/ide.h
blob: 49463bae01a07db9b9f27e952f7205cedd835e75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * linux/include/asm-arm/arch-rpc/ide.h
 *
 * Copyright (c) 1997 Russell King
 */

static __inline__ int
ide_default_irq(ide_ioreg_t base)
{
	if (base == 0x1f0)
		return 9;
	return 0;
}

static __inline__ ide_ioreg_t
ide_default_io_base(int index)
{
	if (index == 0)
		return 0x1f0;
	return 0;
}

static __inline__ int
ide_default_stepping(int index)
{
	return 0;
}

static __inline__ void
ide_init_hwif_ports (ide_ioreg_t *p, ide_ioreg_t base, int stepping, int *irq)
{
	ide_ioreg_t port = base;
	ide_ioreg_t ctrl = base + 0x206;
	int i;

	i = 8;
	while (i--) {
		*p++ = port;
		port += 1 << stepping;
	}
	*p++ = ctrl;
	if (irq != NULL)
		irq = 0;
}