spicreg.h revision 93071
169873Snsayer/*
269873Snsayer * Copyright (c) 2000  Nick Sayer
369873Snsayer * All rights reserved.
469873Snsayer *
569873Snsayer * Redistribution and use in source and binary forms, with or without
669873Snsayer * modification, are permitted provided that the following conditions
769873Snsayer * are met:
869873Snsayer * 1. Redistributions of source code must retain the above copyright
969873Snsayer *    notice, this list of conditions and the following disclaimer.
1069873Snsayer * 2. Redistributions in binary form must reproduce the above copyright
1169873Snsayer *    notice, this list of conditions and the following disclaimer in the
1269873Snsayer *    documentation and/or other materials provided with the distribution.
1369873Snsayer *
1469873Snsayer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1569873Snsayer * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1669873Snsayer * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1769873Snsayer * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1869873Snsayer * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1969873Snsayer * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2069873Snsayer * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2169873Snsayer * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2269873Snsayer * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2369873Snsayer * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2469873Snsayer * SUCH DAMAGE.
2569873Snsayer *
2669873Snsayer * $FreeBSD: head/sys/i386/isa/spicreg.h 93071 2002-03-24 03:07:07Z will $
2769873Snsayer *
2869873Snsayer */
2969873Snsayer
3069873Snsayer#define CDEV_MAJOR	160
3169873Snsayer
3269873Snsayer/*
3369873Snsayer * Find the PCI device that holds the G10 register needed to map in the SPIC
3469873Snsayer */
3569873Snsayer#define PIIX4_BUS	0
3669873Snsayer#define PIIX4_SLOT	7
3769873Snsayer#define PIIX4_FUNC	3
3869873Snsayer#define PIIX4_DEVID	0x71138086
3969873Snsayer
4069873Snsayer#define G10A	(0x64)
4169873Snsayer#define G10L	(G10A + 2)
4269873Snsayer
4369873Snsayer#define SPIC_IRQ_PORT	0x8034
4469873Snsayer#define SPIC_IRQ_SHIFT	22
4593071Swill
4693071Swill/* Define SPIC model type */
4793071Swill#define SPIC_DEVICE_MODEL_TYPE1       1
4893071Swill#define SPIC_DEVICE_MODEL_TYPE2       2
4993071Swill
5093071Swill/* type2 series specifics */
5193071Swill#define SPIC_SIRQ                     0x9b
5293071Swill#define SPIC_SLOB                     0x9c
5393071Swill#define SPIC_SHIB                     0x9d
5493071Swill
5593071Swill/* ioports used for brightness and type2 events */
5693071Swill#define SPIC_DATA_IOPORT      0x62
5793071Swill#define SPIC_CST_IOPORT       0x66
58