lubbock_reg.h revision 1.2 1 1.2 nathanw /* $NetBSD: lubbock_reg.h,v 1.2 2004/09/10 15:27:10 nathanw Exp $ */
2 1.1 bsh
3 1.1 bsh /*
4 1.1 bsh * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved.
5 1.1 bsh * Written by Hiroyuki Bessho for Genetec Corporation.
6 1.1 bsh *
7 1.1 bsh * Redistribution and use in source and binary forms, with or without
8 1.1 bsh * modification, are permitted provided that the following conditions
9 1.1 bsh * are met:
10 1.1 bsh * 1. Redistributions of source code must retain the above copyright
11 1.1 bsh * notice, this list of conditions and the following disclaimer.
12 1.1 bsh * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 bsh * notice, this list of conditions and the following disclaimer in the
14 1.1 bsh * documentation and/or other materials provided with the distribution.
15 1.1 bsh * 3. The name of Genetec Corporation may not be used to endorse or
16 1.1 bsh * promote products derived from this software without specific prior
17 1.1 bsh * written permission.
18 1.1 bsh *
19 1.1 bsh * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``AS IS'' AND
20 1.1 bsh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 1.1 bsh * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 1.1 bsh * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GENETEC CORPORATION
23 1.1 bsh * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 1.1 bsh * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 1.1 bsh * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.1 bsh * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 1.1 bsh * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 1.1 bsh * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.1 bsh * POSSIBILITY OF SUCH DAMAGE.
30 1.1 bsh */
31 1.1 bsh
32 1.1 bsh
33 1.1 bsh #ifndef _EVBARM_LUBBOCK_REG_H
34 1.1 bsh #define _EVBARM_LUBBOCK_REG_H
35 1.1 bsh
36 1.1 bsh #include <arm/xscale/pxa2x0reg.h>
37 1.1 bsh
38 1.1 bsh /* lubbock on-board IOs */
39 1.2 nathanw #define LUBBOCK_OBIO_PBASE PXA2X0_CS2_START /* Physical address */
40 1.1 bsh #define LUBBOCK_OBIO_SIZE 0x00000100
41 1.1 bsh
42 1.1 bsh #define LUBBOCK_SRAM_PBASE (PXA2X0_CS2_START+0x02000000)
43 1.1 bsh #define LUBBOCK_SRAM_SIZE 0x00100000
44 1.1 bsh
45 1.1 bsh #define LUBBOCK_91C96_PBASE PXA2X0_CS3_START
46 1.1 bsh #define LUBBOCK_91C96_IO LUBBOCK_91C96_PBASE
47 1.1 bsh #define LUBBOCK_91C96_ATTRMEM (LUBBOCK_91C96_PBASE+0x02000000)
48 1.1 bsh
49 1.1 bsh
50 1.1 bsh /* SA-1111 companion chip registers */
51 1.1 bsh #define LUBBOCK_SACC_PBASE PXA2X0_CS4_START
52 1.1 bsh
53 1.1 bsh /*
54 1.1 bsh * Logical mapping for onboard/integrated peripherals
55 1.1 bsh */
56 1.1 bsh #define LUBBOCK_IO_AREA_VBASE 0xfd000000
57 1.1 bsh #define LUBBOCK_OBIO_VBASE 0xfd000000
58 1.1 bsh #define LUBBOCK_GPIO_VBASE 0xfd100000
59 1.1 bsh #define LUBBOCK_CLKMAN_VBASE 0xfd200000
60 1.1 bsh #define LUBBOCK_INTCTL_VBASE 0xfd300000
61 1.1 bsh #define LUBBOCK_VBASE_FREE 0xfd400000
62 1.1 bsh /* FFUART and/or BTUART are mapped to this area when
63 1.1 bsh used for console or kgdb port */
64 1.1 bsh
65 1.1 bsh /*
66 1.1 bsh * Onboard register address
67 1.1 bsh * (offset from LUBBOCK_OBIO_PBASE)
68 1.1 bsh */
69 1.1 bsh #define LUBBOCK_SYSTEMID 0x0000
70 1.1 bsh #define LUBBOCK_HEXLED 0x0010
71 1.1 bsh #define LUBBOCK_LEDCTL 0x0040
72 1.1 bsh #define LUBBOCK_CONFIGSW 0x0050
73 1.1 bsh #define LUBBOCK_USERSW 0x0060
74 1.1 bsh #define LUBBOCK_MISCWR 0x0080
75 1.1 bsh #define MISCWR_S1PWR (3U<<14)
76 1.1 bsh #define MISCWR_LCDDISP (1U<<8)
77 1.1 bsh #define MISCWR_IRDAMODE (1U<<4) /* 1=FIR, 0=SIR */
78 1.1 bsh #define MISCWR_GREENLED (1U<<3)
79 1.1 bsh #define MISCWR_ENETEN16 (1U<<2)
80 1.1 bsh #define MISCWR_PCRESET (1U<<1) /* Processor card reset */
81 1.1 bsh #define MSICWR_SYSRESET (1U<<0)
82 1.1 bsh #define LUBBOCK_MISCRD 0x0090
83 1.1 bsh #define LUBBOCK_INTRMASK 0x00c0
84 1.1 bsh #define LUBBOCK_INTRCTL 0x00d0
85 1.1 bsh
86 1.1 bsh #define ioreg_read(a) (*(volatile unsigned *)(a))
87 1.1 bsh #define ioreg_write(a,v) (*(volatile unsigned *)(a)=(v))
88 1.1 bsh
89 1.1 bsh #define ioreg16_read(a) (*(volatile uint16_t *)(a))
90 1.1 bsh #define ioreg16_write(a,v) (*(volatile uint16_t *)(a)=(v))
91 1.1 bsh
92 1.1 bsh #define ioreg8_read(a) (*(volatile uint8_t *)(a))
93 1.1 bsh #define ioreg8_write(a,v) (*(volatile uint8_t *)(a)=(v))
94 1.1 bsh
95 1.1 bsh #endif /* _EVBARM_LUBBOCK_REG_H */
96