Home | History | Annotate | Line # | Download | only in podulebus
      1  1.1  reinoud /* $NetBSD: coscreg.h,v 1.1 2001/10/05 22:27:54 reinoud Exp $ */
      2  1.1  reinoud 
      3  1.1  reinoud /*
      4  1.1  reinoud  * Copyright (c) 1996 Mark Brinicombe
      5  1.1  reinoud  * All rights reserved.
      6  1.1  reinoud  *
      7  1.1  reinoud  * Redistribution and use in source and binary forms, with or without
      8  1.1  reinoud  * modification, are permitted provided that the following conditions
      9  1.1  reinoud  * are met:
     10  1.1  reinoud  * 1. Redistributions of source code must retain the above copyright
     11  1.1  reinoud  *    notice, this list of conditions and the following disclaimer.
     12  1.1  reinoud  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  reinoud  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  reinoud  *    documentation and/or other materials provided with the distribution.
     15  1.1  reinoud  * 3. All advertising materials mentioning features or use of this software
     16  1.1  reinoud  *    must display the following acknowledgement:
     17  1.1  reinoud  *	This product includes software developed by Mark Brinicombe
     18  1.1  reinoud  *      for the NetBSD Project.
     19  1.1  reinoud  * 4. Neither the name of the University nor the names of its contributors
     20  1.1  reinoud  *    may be used to endorse or promote products derived from this software
     21  1.1  reinoud  *    without specific prior written permission.
     22  1.1  reinoud  *
     23  1.1  reinoud  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     24  1.1  reinoud  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     25  1.1  reinoud  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     26  1.1  reinoud  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     27  1.1  reinoud  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     28  1.1  reinoud  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     29  1.1  reinoud  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     30  1.1  reinoud  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     31  1.1  reinoud  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     32  1.1  reinoud  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     33  1.1  reinoud  */
     34  1.1  reinoud 
     35  1.1  reinoud /*
     36  1.1  reinoud  * Termination and DMA enable registers provided by
     37  1.1  reinoud  * Andreas Gandor <andi (at) knipp.de>
     38  1.1  reinoud  */
     39  1.1  reinoud 
     40  1.1  reinoud #ifndef _COSCREG_H_
     41  1.1  reinoud #define _COSCREG_H_
     42  1.1  reinoud 
     43  1.1  reinoud #include <acorn32/podulebus/escvar.h>
     44  1.1  reinoud 
     45  1.1  reinoud typedef volatile unsigned short vu_short;
     46  1.1  reinoud 
     47  1.1  reinoud typedef struct cosc_regmap {
     48  1.1  reinoud 	esc_regmap_t	esc;
     49  1.1  reinoud 	vu_char		*chipreset;
     50  1.1  reinoud 	vu_char		*inten;
     51  1.1  reinoud 	vu_char		*status;
     52  1.1  reinoud 	vu_char		*term;
     53  1.1  reinoud 	vu_char		*led;
     54  1.1  reinoud } cosc_regmap_t;
     55  1.1  reinoud typedef cosc_regmap_t *cosc_regmap_p;
     56  1.1  reinoud 
     57  1.1  reinoud /*
     58  1.1  reinoud #define COSC_CONTROL_CHIPRESET
     59  1.1  reinoud #define	COSC_CONTROL_INTEN
     60  1.1  reinoud #define COSC_STATUS
     61  1.1  reinoud #define COSC_CONTROL_LED
     62  1.1  reinoud */
     63  1.1  reinoud 
     64  1.1  reinoud #define COSC_CONFIG_CONTROL_REG1	0x0ff0
     65  1.1  reinoud #define COSC_CONFIG_CONTROL_REG1_MASK	0x97
     66  1.1  reinoud #define COSC_CONFIG_CONTROL_REG2	0x0ff4
     67  1.1  reinoud #define COSC_CONFIG_CONTROL_REG2_MASK	0x07
     68  1.1  reinoud #define COSC_CONFIG_CONTROL_REG3	0x0ff8
     69  1.1  reinoud #define COSC_CONFIG_CONTROL_REG3_MASK	0x83
     70  1.1  reinoud #define COSC_CONFIG_CONTROL_REG4	0x0ffc
     71  1.1  reinoud #define COSC_CONFIG_CONTROL_REG4_MASK	0xec
     72  1.1  reinoud #define COSC_CONFIG_TERMINATION		0x1000
     73  1.1  reinoud #define COSC_CONFIG_TERMINATION_ON	0x01
     74  1.1  reinoud #define COSC_CONFIG_FIRST_SCANNED	0x1040	/* Used by RiscOS */
     75  1.1  reinoud #define COSC_CONFIG_INC_FURTHER_PARTS	0x1048	/* Used by RiscOS */
     76  1.1  reinoud #define COSC_CONFIG_SYNCH_MODE		0x1050
     77  1.1  reinoud #define COSC_CONFIG_SYNCH_MODE_ON	0x01
     78  1.1  reinoud #define COSC_CONFIG_SHUTDOWN		0x1054	/* Used by RiscOS */
     79  1.1  reinoud #define COSC_CONFIG_SHUTDOWN_SPINDOWN	0x01	/* Used by RiscOS */
     80  1.1  reinoud #define COSC_CONFIG_SHUTDOWN_EJECT	0x02	/* Used by RiscOS */
     81  1.1  reinoud #define COSC_CONFIG_DELAY_REMOVABLE	0x105c	/* Used by RiscOS */
     82  1.1  reinoud #define COSC_CONFIG_DELAY_HARDDISC	0x1060	/* Used by RiscOS */
     83  1.1  reinoud #define COSC_CONFIG_DELAY_BOOT		0x1064	/* Used by RiscOS */
     84  1.1  reinoud #define COSC_CONFIG_CDROM		0x1068	/* Used by RiscOS */
     85  1.1  reinoud 
     86  1.1  reinoud #define COSC_TERMINATION_CONTROL	0x2600
     87  1.1  reinoud #define COSC_TERMINATION_ON		0x00
     88  1.1  reinoud #define COSC_TERMINATION_OFF		0x01
     89  1.1  reinoud #define COSC_REGISTER_00		0x2800
     90  1.1  reinoud #define COSC_REGISTER_01		0x2a00
     91  1.1  reinoud #define COSC_PAGE_REGISTER		0x3000
     92  1.1  reinoud 
     93  1.1  reinoud #define COSC_ESCOFFSET_BASE		0x3c00
     94  1.1  reinoud #define COSC_ESCOFFSET_TCL		0x0000
     95  1.1  reinoud #define COSC_ESCOFFSET_TCM		0x0004
     96  1.1  reinoud #define COSC_ESCOFFSET_FIFO		0x0008
     97  1.1  reinoud #define COSC_ESCOFFSET_COMMAND		0x000c
     98  1.1  reinoud #define COSC_ESCOFFSET_DESTID		0x0010
     99  1.1  reinoud #define COSC_ESCOFFSET_TIMEOUT		0x0014
    100  1.1  reinoud #define COSC_ESCOFFSET_PERIOD		0x0018
    101  1.1  reinoud #define COSC_ESCOFFSET_OFFSET		0x001c
    102  1.1  reinoud #define COSC_ESCOFFSET_CONFIG1		0x0020
    103  1.1  reinoud #define COSC_ESCOFFSET_CLOCKCONV	0x0024
    104  1.1  reinoud #define COSC_ESCOFFSET_TEST		0x0028
    105  1.1  reinoud #define COSC_ESCOFFSET_CONFIG2		0x002c
    106  1.1  reinoud #define COSC_ESCOFFSET_CONFIG3		0x0030
    107  1.1  reinoud #define COSC_ESCOFFSET_CONFIG4		0x0034
    108  1.1  reinoud #define COSC_ESCOFFSET_TCH		0x0038
    109  1.1  reinoud #define COSC_ESCOFFSET_FIFOBOTTOM	0x003c
    110  1.1  reinoud 
    111  1.1  reinoud #endif /* _COSCREG_H_ */
    112