io.c 1.8 KB
Newer Older
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
/*
 *
 * 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))

28
unsigned char se7619_inb(unsigned long port)
29 30 31 32 33
{
	badio(inb, port);
	return 0;
}

34
unsigned char se7619_inb_p(unsigned long port)
35 36 37 38 39 40
{
	badio(inb_p, port);
	delay();
	return 0;
}

41
unsigned short se7619_inw(unsigned long port)
42 43 44 45 46
{
	badio(inw, port);
	return 0;
}

47
unsigned int se7619_inl(unsigned long port)
48 49 50 51 52
{
	badio(inl, port);
	return 0;
}

53
void se7619_outb(unsigned char value, unsigned long port)
54 55 56 57
{
	badio(outb, port);
}

58
void se7619_outb_p(unsigned char value, unsigned long port)
59 60 61 62 63
{
	badio(outb_p, port);
	delay();
}

64
void se7619_outw(unsigned short value, unsigned long port)
65 66 67 68
{
	badio(outw, port);
}

69
void se7619_outl(unsigned int value, unsigned long port)
70 71 72 73
{
	badio(outl, port);
}

74
void se7619_insb(unsigned long port, void *addr, unsigned long count)
75 76 77 78
{
	badio(inw, port);
}

79
void se7619_insw(unsigned long port, void *addr, unsigned long count)
80 81 82 83
{
	badio(inw, port);
}

84
void se7619_insl(unsigned long port, void *addr, unsigned long count)
85 86 87 88
{
	badio(insl, port);
}

89
void se7619_outsb(unsigned long port, const void *addr, unsigned long count)
90 91 92 93
{
	badio(insl, port);
}

94
void se7619_outsw(unsigned long port, const void *addr, unsigned long count)
95 96 97 98
{
	badio(insl, port);
}

99
void se7619_outsl(unsigned long port, const void *addr, unsigned long count)
100 101 102
{
	badio(outsw, port);
}