sa11x0_mcpreg.h revision 1.1 1 1.1 rjs /* $NetBSD: sa11x0_mcpreg.h,v 1.1 2001/07/30 10:17:21 rjs Exp $ */
2 1.1 rjs
3 1.1 rjs /*-
4 1.1 rjs * Copyright (c) 2001 The NetBSD Foundation, Inc. All rights reserved.
5 1.1 rjs *
6 1.1 rjs * This code is derived from software contributed to The NetBSD Foundation
7 1.1 rjs * by Ichiro FUKUHARA (ichiro (at) ichiro.org).
8 1.1 rjs *
9 1.1 rjs * Redistribution and use in source and binary forms, with or without
10 1.1 rjs * modification, are permitted provided that the following conditions
11 1.1 rjs * are met:
12 1.1 rjs * 1. Redistributions of source code must retain the above copyright
13 1.1 rjs * notice, this list of conditions and the following disclaimer.
14 1.1 rjs * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 rjs * notice, this list of conditions and the following disclaimer in the
16 1.1 rjs * documentation and/or other materials provided with the distribution.
17 1.1 rjs * 3. All advertising materials mentioning features or use of this software
18 1.1 rjs * must display the following acknowledgement:
19 1.1 rjs * This product includes software developed by the NetBSD
20 1.1 rjs * Foundation, Inc. and its contributors.
21 1.1 rjs * 4. Neither the name of The NetBSD Foundation nor the names of its
22 1.1 rjs * contributors may be used to endorse or promote products derived
23 1.1 rjs * from this software without specific prior written permission.
24 1.1 rjs *
25 1.1 rjs * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26 1.1 rjs * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 1.1 rjs * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 1.1 rjs * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29 1.1 rjs * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 1.1 rjs * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 1.1 rjs * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 1.1 rjs * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 1.1 rjs * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 1.1 rjs * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 1.1 rjs * POSSIBILITY OF SUCH DAMAGE.
36 1.1 rjs */
37 1.1 rjs
38 1.1 rjs /* SA11[01]0 MCP(Multimedia communications Port) */
39 1.1 rjs
40 1.1 rjs #define SAMCP_NPORTS 7
41 1.1 rjs
42 1.1 rjs #define SAMCP_CR0 0x00 /* MCP control register 0 */
43 1.1 rjs /* MCP control register 1 locate PPC area */
44 1.1 rjs
45 1.1 rjs #define SAMCP_DR0 0x08 /* MCP data register 0 */
46 1.1 rjs #define SAMCP_DR1 0x0C /* MCP data register 1 */
47 1.1 rjs #define SAMCP_DR2 0x10 /* MCP data register 2 */
48 1.1 rjs #define SAMCP_SR 0x18 /* MCP status register */
49 1.1 rjs
50 1.1 rjs /* MCP control register 0*/
51 1.1 rjs #define CR0_ASD
52 1.1 rjs #define CR0_TSD
53 1.1 rjs #define CR0_MCE (1 << 16) /* MCP enable */
54 1.1 rjs #define CR0_ECS (1 << 17) /* External clock used */
55 1.1 rjs #define CR0_ADM (1 << 18) /* A/D sampling mode */
56 1.1 rjs #define CR0_TTE (1 << 19) /* Telecom tx FIFO intr enable */
57 1.1 rjs #define CR0_TRE (1 << 20) /* Telecom rx FIFO intr enable */
58 1.1 rjs #define CR0_ATE (1 << 21) /* Audio tx FIFO intr enable */
59 1.1 rjs #define CR0_ARE (1 << 22) /* Audio rx FIFO intr enable */
60 1.1 rjs #define CR0_LBM (1 << 23) /* Output of serial shifter connect
61 1.1 rjs to Input of serial shifter internal */
62 1.1 rjs #define CR0_ECP(x) ((x) << 24) /* External clock prescaler */
63 1.1 rjs
64 1.1 rjs /* MCP control register 0 */
65 1.1 rjs #define CR1_CFS (1 << 20)
66 1.1 rjs
67 1.1 rjs /* MCP status register */
68 1.1 rjs #define SR_ATS (1 << 0) /* Audio transmit FIFO req-flag */
69 1.1 rjs #define SR_ARS (1 << 1) /* Audio receive FIFO req */
70 1.1 rjs #define SR_TTS (1 << 2) /* Telecom transmit FIFO req-flag */
71 1.1 rjs #define SR_TRS (1 << 3) /* Telecom receive FIFO req */
72 1.1 rjs #define SR_ATU (1 << 4) /* Audio transmit FIFO underrun */
73 1.1 rjs #define SR_ARO (1 << 5) /* Audio receive FIFO overrun */
74 1.1 rjs #define SR_TTU (1 << 6) /* Telecom transmit FIFO underrun */
75 1.1 rjs #define SR_TRO (1 << 7) /* Telecom receive FIFO overrun */
76 1.1 rjs #define SR_ANF (1 << 8) /* Audio transmit FIFO not full */
77 1.1 rjs #define SR_ANE (1 << 9) /* Audio receive FIFO not empty */
78 1.1 rjs #define SR_TNF (1 << 10) /* Telecom transmit FIFO not full */
79 1.1 rjs #define SR_TNE (1 << 11) /* Telecom receive FIFO not empty */
80 1.1 rjs #define SR_CWC (1 << 12) /* Codec write completed */
81 1.1 rjs #define SR_CRC (1 << 13) /* Codec read completed */
82 1.1 rjs #define SR_ACE (1 << 14) /* Audio codec enabled */
83 1.1 rjs #define SR_TCE (1 << 15) /* Telecom codec enabled */
84 1.1 rjs
85