summaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/se/7619/io.c
blob: 176f1f39cd9db312a7cf85d74d8ef885dd07c213 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*
 *
 * linux/arch/sh/boards/se/7619/io.c
 *
 * Copyright (C) 2006  Yoshinori Sato
 *
 * I/O routine for Hitachi 7619 SolutionEngine.
 *
 */

#include <linux/kernel.h>
#include <linux/types.h>
#include <asm/io.h>
#include <asm/se7619.h>
#include <asm/irq.h>

/* FIXME: M3A-ZAB7 Compact Flash Slot support */

static inline void delay(void)
{
	ctrl_inw(0xa0000000);	/* Uncached ROM area (P2) */
}

#define badio(name,port) \
  printk("bad I/O operation (%s) for port 0x%lx at 0x%08x\n", \
	 #name, (port), (__u32) __builtin_return_address(0))

unsigned char se7619___inb(unsigned long port)
{
	badio(inb, port);
	return 0;
}

unsigned char se7619___inb_p(unsigned long port)
{
	badio(inb_p, port);
	delay();
	return 0;
}

unsigned short se7619___inw(unsigned long port)
{
	badio(inw, port);
	return 0;
}

unsigned int se7619___inl(unsigned long port)
{
	badio(inl, port);
	return 0;
}

void se7619___outb(unsigned char value, unsigned long port)
{
	badio(outb, port);
}

void se7619___outb_p(unsigned char value, unsigned long port)
{
	badio(outb_p, port);
	delay();
}

void se7619___outw(unsigned short value, unsigned long port)
{
	badio(outw, port);
}

void se7619___outl(unsigned int value, unsigned long port)
{
	badio(outl, port);
}

void se7619___insb(unsigned long port, void *addr, unsigned long count)
{
	badio(inw, port);
}

void se7619___insw(unsigned long port, void *addr, unsigned long count)
{
	badio(inw, port);
}

void se7619___insl(unsigned long port, void *addr, unsigned long count)
{
	badio(insl, port);
}

void se7619___outsb(unsigned long port, const void *addr, unsigned long count)
{
	badio(insl, port);
}

void se7619___outsw(unsigned long port, const void *addr, unsigned long count)
{
	badio(insl, port);
}

void se7619___outsl(unsigned long port, const void *addr, unsigned long count)
{
	badio(outsw, port);
}