3 Copyright 2002 Broadcom Corp. All Rights Reserved.
5 This program is free software; you can distribute it and/or modify it
6 under the terms of the GNU General Public License (Version 2) as
7 published by the Free Software Foundation.
9 This program is distributed in the hope it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
20 #ifndef __BCM6345_MAP_H
21 #define __BCM6345_MAP_H
28 #include "6345_intr.h"
30 typedef struct IntControl {
34 #define USB_CLK_EN 0x0100
35 #define EMAC_CLK_EN 0x0080
36 #define UART_CLK_EN 0x0008
37 #define CPU_CLK_EN 0x0001
40 #define SOFT_RESET 0x00000001
46 #define EI_SENSE_SHFT 0
47 #define EI_STATUS_SHFT 4
48 #define EI_CLEAR_SHFT 8
49 #define EI_MASK_SHFT 12
50 #define EI_INSENS_SHFT 16
51 #define EI_LEVEL_SHFT 20
54 #define INTC_BASE 0xfffe0000
55 #define PERF ((volatile IntControl * const) INTC_BASE)
57 #define TIMR_BASE 0xfffe0200
58 typedef struct Timer {
72 #define TIMERENABLE 0x80000000
73 #define RSTCNTCLR 0x40000000
77 uint32 WatchDogDefCount;
79 /* Write 0xff00 0x00ff to Start timer
80 * Write 0xee00 0x00ee to Stop and re-load default count
81 * Read from this register returns current watch dog count
85 /* Number of 40-MHz ticks for WD Reset pulse to last */
89 #define TIMER ((volatile Timer * const) TIMR_BASE)
91 typedef struct UartChannel {
94 #define BRGEN 0x80 /* Control register bit defs */
97 #define TXPARITYEN 0x08
98 #define TXPARITYEVEN 0x04
99 #define RXPARITYEN 0x02
100 #define RXPARITYEVEN 0x01
102 #define BITS5SYM 0x00
103 #define BITS6SYM 0x10
104 #define BITS7SYM 0x20
105 #define BITS8SYM 0x30
106 #define XMITBREAK 0x40
111 #define RSTTXFIFOS 0x80
112 #define RSTRXFIFOS 0x40
121 byte DeltaIPEdgeNoSense;
122 byte DeltaIPConfig_Mask;
126 #define TXUNDERR 0x0002
127 #define TXOVFERR 0x0004
128 #define TXFIFOEMT 0x0020
129 #define RXOVFERR 0x0080
130 #define RXFIFONE 0x0800
131 #define RXFRAMERR 0x1000
132 #define RXPARERR 0x2000
141 #define UART_BASE 0xfffe0300
142 #define UART ((volatile Uart * const) UART_BASE)
144 typedef struct GpioControl {
158 #define GPIO_BASE 0xfffe0400
159 #define GPIO ((volatile GpioControl * const) GPIO_BASE)
161 #define GPIO_NUM_MAX_BITS_MASK 0x0f
162 #define GPIO_NUM_TO_MASK(X) (1 << ((X) & GPIO_NUM_MAX_BITS_MASK))