1/* 2 * FILE NAME 3 * include/asm-mips/vr41xx/vrc4173.h 4 * 5 * BRIEF MODULE DESCRIPTION 6 * Include file for NEC VRC4173. 7 * 8 * This file is subject to the terms and conditions of the GNU General Public 9 * License. See the file "COPYING" in the main directory of this archive 10 * for more details. 11 * 12 * Copyright (C) 2000 by Michael R. McDonald 13 * 14 * Copyright 2001,2002 Montavista Software Inc. 15 * Author: Yoichi Yuasa 16 * yyuasa@mvista.com or source@mvista.com 17 */ 18#ifndef __NEC_VRC4173_H 19#define __NEC_VRC4173_H 20 21#include <asm/io.h> 22 23/* 24 * Interrupt Number 25 */ 26#define VRC4173_IRQ_BASE 72 27#define VRC4173_USB_IRQ (VRC4173_IRQ_BASE + 0) 28#define VRC4173_PCMCIA2_IRQ (VRC4173_IRQ_BASE + 1) 29#define VRC4173_PCMCIA1_IRQ (VRC4173_IRQ_BASE + 2) 30#define VRC4173_PS2CH2_IRQ (VRC4173_IRQ_BASE + 3) 31#define VRC4173_PS2CH1_IRQ (VRC4173_IRQ_BASE + 4) 32#define VRC4173_PIU_IRQ (VRC4173_IRQ_BASE + 5) 33#define VRC4173_AIU_IRQ (VRC4173_IRQ_BASE + 6) 34#define VRC4173_KIU_IRQ (VRC4173_IRQ_BASE + 7) 35#define VRC4173_GIU_IRQ (VRC4173_IRQ_BASE + 8) 36#define VRC4173_AC97_IRQ (VRC4173_IRQ_BASE + 9) 37#define VRC4173_AC97INT1_IRQ (VRC4173_IRQ_BASE + 10) 38#define VRC4173_DOZEPIU_IRQ (VRC4173_IRQ_BASE + 13) 39#define VRC4173_IRQ_LAST VRC4173_DOZEPIU_IRQ 40 41/* 42 * PCI I/O accesses 43 */ 44extern unsigned long vrc4173_io_offset; 45 46#define set_vrc4173_io_offset(offset) do { vrc4173_io_offset = (offset); } while (0) 47 48#define vrc4173_outb(val,port) outb((val), vrc4173_io_offset+(port)) 49#define vrc4173_outw(val,port) outw((val), vrc4173_io_offset+(port)) 50#define vrc4173_outl(val,port) outl((val), vrc4173_io_offset+(port)) 51#define vrc4173_outb_p(val,port) outb_p((val), vrc4173_io_offset+(port)) 52#define vrc4173_outw_p(val,port) outw_p((val), vrc4173_io_offset+(port)) 53#define vrc4173_outl_p(val,port) outl_p((val), vrc4173_io_offset+(port)) 54 55#define vrc4173_inb(port) inb(vrc4173_io_offset+(port)) 56#define vrc4173_inw(port) inw(vrc4173_io_offset+(port)) 57#define vrc4173_inl(port) inl(vrc4173_io_offset+(port)) 58#define vrc4173_inb_p(port) inb_p(vrc4173_io_offset+(port)) 59#define vrc4173_inw_p(port) inw_p(vrc4173_io_offset+(port)) 60#define vrc4173_inl_p(port) inl_p(vrc4173_io_offset+(port)) 61 62#define vrc4173_outsb(port,addr,count) outsb(vrc4173_io_offset+(port),(addr),(count)) 63#define vrc4173_outsw(port,addr,count) outsw(vrc4173_io_offset+(port),(addr),(count)) 64#define vrc4173_outsl(port,addr,count) outsl(vrc4173_io_offset+(port),(addr),(count)) 65 66#define vrc4173_insb(port,addr,count) insb(vrc4173_io_offset+(port),(addr),(count)) 67#define vrc4173_insw(port,addr,count) insw(vrc4173_io_offset+(port),(addr),(count)) 68#define vrc4173_insl(port,addr,count) insl(vrc4173_io_offset+(port),(addr),(count)) 69 70/* 71 * Clock Mask Unit 72 */ 73extern void vrc4173_clock_supply(u16 mask); 74extern void vrc4173_clock_mask(u16 mask); 75 76/* 77 * General-Purpose I/O Unit 78 */ 79enum { 80 PS2CH1_SELECT, 81 PS2CH2_SELECT, 82 TOUCHPANEL_SELECT, 83 KIU8_SELECT, 84 KIU10_SELECT, 85 KIU12_SELECT, 86 GPIO_SELECT 87}; 88 89extern void vrc4173_select_function(int func); 90 91#endif /* __NEC_VRC4173_H */ 92