pfcreg.h revision 1.2.2.1 1 /* $NetBSD: pfcreg.h,v 1.2.2.1 2001/03/12 13:29:19 bouyer Exp $ */
2
3 /*-
4 * Copyright (C) 1999 SAITOH Masanobu. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #ifndef _PFCREG_H_
30 #define _PFCREG_H_
31
32 /* address definitions for pin function controller (PFC)*/
33
34 #if !defined(SH4)
35
36 /* SH3 definition */
37
38 #define SHREG_PCTR (*(volatile unsigned short *) 0xFFFFFF76)
39 #define SHREG_PDTR (*(volatile unsigned char *) 0xFFFFFF78)
40 #define SHREG_SCSPTR (*(volatile unsigned char *) 0xFFFFFF7C)
41
42 #if defined(SH7709) || defined(SH7709A)
43 #define SHREG_PACR (*(volatile unsigned short *)0xa4000100)
44 #define SHREG_PBCR (*(volatile unsigned short *)0xa4000102)
45 #define SHREG_PCCR (*(volatile unsigned short *)0xa4000104)
46 #define SHREG_PDCR (*(volatile unsigned short *)0xa4000106)
47 #define SHREG_PECR (*(volatile unsigned short *)0xa4000108)
48 #define SHREG_PFCR (*(volatile unsigned short *)0xa400010a)
49 #define SHREG_PGCR (*(volatile unsigned short *)0xa400010c)
50 #define SHREG_PHCR (*(volatile unsigned short *)0xa400010e)
51 #define SHREG_PJCR (*(volatile unsigned short *)0xa4000110)
52 #define SHREG_PKCR (*(volatile unsigned short *)0xa4000112)
53 #define SHREG_PLCR (*(volatile unsigned short *)0xa4000114)
54 #define SHREG_SCPCR (*(volatile unsigned short *)0xa4000116)
55
56 #define SHREG_PADR (*(volatile unsigned char *)0xa4000120)
57 #define SHREG_PBDR (*(volatile unsigned char *)0xa4000122)
58 #define SHREG_PCDR (*(volatile unsigned char *)0xa4000124)
59 #define SHREG_PDDR (*(volatile unsigned char *)0xa4000126)
60 #define SHREG_PEDR (*(volatile unsigned char *)0xa4000128)
61 #define SHREG_PFDR (*(volatile unsigned char *)0xa400012a)
62 #define SHREG_PGDR (*(volatile unsigned char *)0xa400012c)
63 #define SHREG_PHDR (*(volatile unsigned char *)0xa400012e)
64 #define SHREG_PJDR (*(volatile unsigned char *)0xa4000130)
65 #define SHREG_PKDR (*(volatile unsigned char *)0xa4000132)
66 #define SHREG_PLDR (*(volatile unsigned char *)0xa4000134)
67 #define SHREG_SCPDR (*(volatile unsigned char *)0xa4000136)
68 #endif
69
70 #else
71
72 /* SH4 definitions */
73
74 #define SHREG_PCTRA (*(volatile unsigned int *) 0xff80002c)
75 #define SHREG_PDTRA (*(volatile unsigned short *) 0xff800030)
76 #define SHREG_PCTRB (*(volatile unsigned int *) 0xff800040)
77 #define SHREG_PDTRB (*(volatile unsigned short *) 0xff800044)
78 #define SHREG_GPIOIC (*(volatile unsigned short *) 0xff800048)
79 #define SHREG_SCSPTR1 (*(volatile unsigned char *) 0xffe0001c)
80 #define SHREG_SCSPTR2 (*(volatile unsigned short *) 0xffe80020)
81
82 #endif
83
84 #endif /* _PFCREG_H_ */
85