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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [sa11x0/] [ipaq/] [current/] [include/] [ipaq.h] - Blame information for rev 856

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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