diff options
author | briggs <briggs@cvs.openbsd.org> | 1997-02-23 06:05:06 +0000 |
---|---|---|
committer | briggs <briggs@cvs.openbsd.org> | 1997-02-23 06:05:06 +0000 |
commit | 6348d3694adc43550a2da122c7c545688180f4b2 (patch) | |
tree | 2297077ac7ecabb78e91846ac5b13585191665f9 /sys/arch/mac68k/dev/pm_direct.h | |
parent | 2cd5585c523ce43d9f0a358c93162be888c32779 (diff) |
Integrate code from John P. Wittkoski <jpw@netwizards.net> and
Takashi Hamada <hamada@next.etron.kanazawa-it.ac.jp>. This code
interfaces directly to the hardware to support the ADB on many
macs. It is enabled by "options HWDIRECT" in the configuration
file. At some point, this should probably become the default method
as interfacing to the ADB through the ROMs has been painful and sometimes
problematic.
This code should have functioning ADB support for:
II series (II, SE/30, IIx, IIcx)
IIsi series (IIsi, IIci, IIvx, IIvi)
LC II, LC III
Performa 400, 405, 430, 460, 465, 467, 600
Classic II, Color Classic, Color Classic II
PB 5XX series
Duo series
PB 140,145,145b,160,(160c?),165,165c,170,180,180c
Quadra 700,900,950
There is an off-chance that it will work on:
PB 150, PB 190
Quadra/Centris 605,610,630,650,660AV,800,840AV
LC 475,550,575,630
Performa 475,476,575,577,578,630
Note that functioning ADB support does not mean that everything else
will work. I obviously do not own all of the above machines (does
anyone? ;-)... Any reports are welcome.
Many thanks to John Wittkoski and Takashi Hamada!
Diffstat (limited to 'sys/arch/mac68k/dev/pm_direct.h')
-rw-r--r-- | sys/arch/mac68k/dev/pm_direct.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/sys/arch/mac68k/dev/pm_direct.h b/sys/arch/mac68k/dev/pm_direct.h new file mode 100644 index 00000000000..99b5cf067bb --- /dev/null +++ b/sys/arch/mac68k/dev/pm_direct.h @@ -0,0 +1,53 @@ +/* pm_direct.h 1.0 01/02/97 Takashi Hamada */ + +/* + * Copyright (C) 1997 Takashi Hamada + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Takashi Hamada. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Public declarations that other routines may need. + */ + +/* data structure of the command of the Power Manager */ +typedef struct { + short command; /* command of the Power Manager */ + short num_data; /* number of data */ + char *s_buf; /* pointer to buffer for sending */ + char *r_buf; /* pointer to buffer for receiving */ + char data[32]; /* data buffer (is it too much?) */ +} PMData; + +int pmgrop(PMData *); + +extern void pm_setup_adb __P((void)); +extern void pm_check_adb_devices __P((int)); +extern void pm_intr __P((void)); +extern int pm_adb_op __P((u_char *, void *, void *, int)); +extern void pm_init_adb_device __P((void)); + |