OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [hal/] [arm/] [sa11x0/] [ipaq/] [v2_0/] [include/] [ipaq.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
#ifndef CYGONCE_IPAQ_H
2
#define CYGONCE_IPAQ_H
3
 
4
//=============================================================================
5
//
6
//      ipaq.h
7
//
8
//      Platform specific support (register layout, etc)
9
//
10
//=============================================================================
11
//####ECOSGPLCOPYRIGHTBEGIN####
12
// -------------------------------------------
13
// This file is part of eCos, the Embedded Configurable Operating System.
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
15
// Copyright (C) 2002 Gary Thomas
16
//
17
// eCos is free software; you can redistribute it and/or modify it under
18
// the terms of the GNU General Public License as published by the Free
19
// Software Foundation; either version 2 or (at your option) any later version.
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
22
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
// for more details.
25
//
26
// You should have received a copy of the GNU General Public License along
27
// with eCos; if not, write to the Free Software Foundation, Inc.,
28
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
29
//
30
// As a special exception, if other files instantiate templates or use macros
31
// or inline functions from this file, or you compile this file and link it
32
// with other works to produce a work based on this file, this file does not
33
// by itself cause the resulting work to be covered by the GNU General Public
34
// License. However the source code for this file must still be made available
35
// in accordance with section (3) of the GNU General Public License.
36
//
37
// This exception does not invalidate any other reasons why a work based on
38
// this file might be covered by the GNU General Public License.
39
//
40
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
41
// at http://sources.redhat.com/ecos/ecos-license/
42
// -------------------------------------------
43
//####ECOSGPLCOPYRIGHTEND####
44
//=============================================================================
45
//#####DESCRIPTIONBEGIN####
46
//
47
// Author(s):    gthomas
48
// Contributors: gthomas, richard.panton@3glab.com
49
// Date:         2001-02-24
50
// Purpose:      Intel SA1110/iPAQ platform specific support routines
51
// Description: 
52
// Usage:        #include <cyg/hal/ipaq.h>
53
//
54
//####DESCRIPTIONEND####
55
//
56
//=============================================================================
57
 
58
 
59
#ifndef __ASSEMBLER__
60
//
61
// Extended GPIO
62
// Note: This register is write-only.  Thus a shadow copy is provided so that
63
// it may be safely updated/shared by multiple threads.
64
//
65
extern unsigned long _ipaq_EGPIO;  // Shadow copy
66
 
67
extern unsigned short _ipaq_LCD_params[(4*2)+1];  // Various LCD parameters
68
 
69
extern void ipaq_EGPIO(unsigned long mask, unsigned long value);
70
 
71
#endif
72
 
73
// 
74
// Signal assertion levels
75
//
76
#define _LOGIC_ONE(m)  (m & 0xFFFF)
77
#define _LOGIC_ZERO(m) (m & 0x0000)
78
 
79
//
80
// iPAQ Extended GPIO definitions
81
//
82
#define SA1110_EGPIO                    REG16_PTR(0x49000000)
83
#define SA1110_EIO_MIN                  0x0080
84
 
85
#define SA1110_EIO_VPP                  0x0001
86
# define SA1110_EIO_VPP_OFF                     _LOGIC_ZERO(SA1110_EIO_VPP)
87
# define SA1110_EIO_VPP_ON                      _LOGIC_ONE(SA1110_EIO_VPP)
88
#define SA1110_EIO_CF_RESET             0x0002
89
# define SA1110_EIO_CF_RESET_DISABLE            _LOGIC_ZERO(SA1110_EIO_CF_RESET)
90
# define SA1110_EIO_CF_RESET_ENABLE             _LOGIC_ONE(SA1110_EIO_CF_RESET)
91
#define SA1110_EIO_OPT_RESET            0x0004
92
# define SA1110_EIO_OPT_RESET_DISABLE           _LOGIC_ZERO(SA1110_EIO_OPT_RESET)
93
# define SA1110_EIO_OPT_RESET_ENABLE            _LOGIC_ONE(SA1110_EIO_OPT_RESET)
94
#define SA1110_EIO_CODEC_RESET          0x0008  // Active LOW
95
# define SA1110_EIO_CODEC_RESET_DISABLE         _LOGIC_ONE(SA1110_EIO_CODEC_RESET)
96
# define SA1110_EIO_CODEC_RESET_ENABLE          _LOGIC_ZERO(SA1110_EIO_CODEC_RESET)
97
#define SA1110_EIO_OPT_PWR              0x0010
98
# define SA1110_EIO_OPT_PWR_OFF                 _LOGIC_ZERO(SA1110_EIO_OPT_PWR)
99
# define SA1110_EIO_OPT_PWR_ON                  _LOGIC_ONE(SA1110_EIO_OPT_PWR)
100
#define SA1110_EIO_OPT                  0x0020
101
# define SA1110_EIO_OPT_OFF                     _LOGIC_ZERO(SA1110_EIO_OPT)
102
# define SA1110_EIO_OPT_ON                      _LOGIC_ONE(SA1110_EIO_OPT)
103
#define SA1110_EIO_LCD_3V3              0x0040
104
# define SA1110_EIO_LCD_3V3_OFF                 _LOGIC_ZERO(SA1110_EIO_LCD_3V3)
105
# define SA1110_EIO_LCD_3V3_ON                  _LOGIC_ONE(SA1110_EIO_LCD_3V3)
106
#define SA1110_EIO_RS232                0x0080
107
# define SA1110_EIO_RS232_OFF                   _LOGIC_ZERO(SA1110_EIO_RS232)
108
# define SA1110_EIO_RS232_ON                    _LOGIC_ONE(SA1110_EIO_RS232)
109
#define SA1110_EIO_LCD_CTRL             0x0100
110
# define SA1110_EIO_LCD_CTRL_OFF                _LOGIC_ZERO(SA1110_EIO_LCD_CTRL)
111
# define SA1110_EIO_LCD_CTRL_ON                 _LOGIC_ONE(SA1110_EIO_LCD_CTRL)
112
#define SA1110_EIO_IR                   0x0200
113
# define SA1110_EIO_IR_OFF                      _LOGIC_ZERO(SA1110_EIO_IR)
114
# define SA1110_EIO_IR_ON                       _LOGIC_ONE(SA1110_EIO_IR)
115
#define SA1110_EIO_AMP                  0x0400
116
# define SA1110_EIO_AMP_OFF                     _LOGIC_ZERO(SA1110_EIO_AMP)
117
# define SA1110_EIO_AMP_ON                      _LOGIC_ONE(SA1110_EIO_AMP)
118
#define SA1110_EIO_AUDIO                0x0800
119
# define SA1110_EIO_AUDIO_OFF                   _LOGIC_ZERO(SA1110_EIO_AUDIO)
120
# define SA1110_EIO_AUDIO_ON                    _LOGIC_ONE(SA1110_EIO_AUDIO)
121
#define SA1110_EIO_MUTE                 0x1000
122
# define SA1110_EIO_MUTE_OFF                    _LOGIC_ZERO(SA1110_EIO_MUTE)
123
# define SA1110_EIO_MUTE_ON                     _LOGIC_ONE(SA1110_EIO_MUTE)
124
#define SA1110_EIO_IR_FSEL              0x2000
125
# define SA1110_EIO_SIR                         _LOGIC_ZERO(SA1110_EIO_IR_FSEL)
126
# define SA1110_EIO_FIR                         _LOGIC_ONE(SA1110_EIO_IR_FSEL)
127
#define SA1110_EIO_LCD_5V               0x4000
128
# define SA1110_EIO_LCD_5V_OFF                  _LOGIC_ZERO(SA1110_EIO_LCD_5V)
129
# define SA1110_EIO_LCD_5V_ON                   _LOGIC_ONE(SA1110_EIO_LCD_5V)
130
#define SA1110_EIO_LCD_VDD              0x8000
131
# define SA1110_EIO_LCD_VDD_OFF                 _LOGIC_ZERO(SA1110_EIO_LCD_VDD)
132
# define SA1110_EIO_LCD_VDD_ON                  _LOGIC_ONE(SA1110_EIO_LCD_VDD)
133
 
134
//
135
// Special purpose GPIO interrupt mappings
136
//
137
#define SA1110_CF_IRQ               CYGNUM_HAL_INTERRUPT_GPIO21
138
#define SA1110_CF_DETECT            CYGNUM_HAL_INTERRUPT_GPIO17
139
 
140
//
141
// GPIO layout
142
//
143
#define SA1110_GPIO_CF_DETECT       0x00020000     // 0 = Compact Flash detect
144
#define SA1110_GPIO_CF_PRESENT      _LOGIC_ZERO(SA1110_GPIO_CF_DETECT)
145
#define SA1110_GPIO_CF_ABSENT       _LOGIC_ONE(SA1110_GPIO_CF_DETECT)
146
#define SA1110_GPIO_CF2_DETECT      0x00000200     // 0 = Second slot on 2-slot sleeve
147
#define SA1110_GPIO_CF2_PRESENT     _LOGIC_ZERO(SA1110_GPIO_CF2_DETECT)
148
#define SA1110_GPIO_CF2_ABSENT      _LOGIC_ONE(SA1110_GPIO_CF2_DETECT)
149
 
150
//
151
// PCMCIA controller in external sleeve
152
//
153
#define IPAQ_CF_CTRL                0x1A000000    // Slot 0 (same as single slot)
154
#define IPAQ_CF2_CTRL               0x19000000    // Slot 1
155
#define IPAQ_CF_CTRL_V5               0x0001   // 5v power enable
156
#define IPAQ_CF_CTRL_V5_ENABLE        _LOGIC_ZERO(IPAQ_CF_CTRL_V5)
157
#define IPAQ_CF_CTRL_V5_DISABLE       _LOGIC_ONE(IPAQ_CF_CTRL_V5)
158
#define IPAQ_CF_CTRL_V3               0x0002   // 3v power enable
159
#define IPAQ_CF_CTRL_V3_ENABLE        _LOGIC_ZERO(IPAQ_CF_CTRL_V3)
160
#define IPAQ_CF_CTRL_V3_DISABLE       _LOGIC_ONE(IPAQ_CF_CTRL_V3)
161
#define IPAQ_CF_CTRL_VCC              0x0004   // Vcc power enable
162
#define IPAQ_CF_CTRL_V12              0x0008   // 12v power enable
163
#define IPAQ_CF_CTRL_RESET            0x0010   // Reset card
164
#define IPAQ_CF_CTRL_RESET_ENABLE     _LOGIC_ONE(IPAQ_CF_CTRL_RESET)
165
#define IPAQ_CF_CTRL_RESET_DISABLE    _LOGIC_ZERO(IPAQ_CF_CTRL_RESET)
166
#define IPAQ_CF_CTRL_APOE             0x0020   // Auto power off
167
#define IPAQ_CF_CTRL_APOE_ENABLE      _LOGIC_ONE(IPAQ_CF_CTRL_APOE)
168
#define IPAQ_CF_CTRL_APOE_DISABLE     _LOGIC_ZERO(IPAQ_CF_CTRL_APOE)
169
#define IPAQ_CF_CTRL_CFE              0x0040   // Compact Flash [addressing] enable
170
#define IPAQ_CF_CTRL_SOE              0x0080   // Enable signal outputs
171
#define IPAQ_CF_CTRL_SOE_ENABLE       _LOGIC_ONE(IPAQ_CF_CTRL_SOE)
172
#define IPAQ_CF_CTRL_SOE_DISABLE      _LOGIC_ZERO(IPAQ_CF_CTRL_SOE)
173
#define IPAQ_CF_CTRL_SSP              0x0100   // Slot polarity; slot0=0, slot1=1
174
 
175
 
176
//
177
// LCD Controller
178
//
179
#define SA1110_LCCR0                SA11X0_REGISTER(0x30100000)
180
#define SA1110_LCSR                 SA11X0_REGISTER(0x30100004)
181
#define SA1110_DBAR1                SA11X0_REGISTER(0x30100010)
182
#define SA1110_DCAR1                SA11X0_REGISTER(0x30100014)
183
#define SA1110_DBAR2                SA11X0_REGISTER(0x30100018)
184
#define SA1110_DCAR2                SA11X0_REGISTER(0x3010001C)
185
#define SA1110_LCCR1                SA11X0_REGISTER(0x30100020)
186
#define SA1110_LCCR2                SA11X0_REGISTER(0x30100024)
187
#define SA1110_LCCR3                SA11X0_REGISTER(0x30100028)
188
 
189
/* end of ipaq.h                                                          */
190
#endif /* CYGONCE_IPAQ_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.