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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [hal/] [arm/] [sa11x0/] [flexanet/] [v2_0/] [include/] [flexanet.h] - Blame information for rev 323

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

Line No. Rev Author Line
1 27 unneback
#ifndef CYGONCE_FLEXANET_H
2
#define CYGONCE_FLEXANET_H
3
 
4
/*=============================================================================
5
//
6
//      flexanet.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
//
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 version.
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23
// for more details.
24
//
25
// You should have received a copy of the GNU General Public License along
26
// with eCos; if not, write to the Free Software Foundation, Inc.,
27
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28
//
29
// As a special exception, if other files instantiate templates or use macros
30
// or inline functions from this file, or you compile this file and link it
31
// with other works to produce a work based on this file, this file does not
32
// by itself cause the resulting work to be covered by the GNU General Public
33
// License. However the source code for this file must still be made available
34
// in accordance with section (3) of the GNU General Public License.
35
//
36
// This exception does not invalidate any other reasons why a work based on
37
// this file might be covered by the GNU General Public License.
38
//
39
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
40
// at http://sources.redhat.com/ecos/ecos-license/
41
// -------------------------------------------
42
//####ECOSGPLCOPYRIGHTEND####
43
//=============================================================================
44
//#####DESCRIPTIONBEGIN####
45
//
46
// Author(s):    Jordi Colomer <jco@ict.es>
47
// Contributors: Jordi Colomer <jxo@ict.es>
48
// Date:         2001-06-15
49
// Purpose:      SA1110/Flexanet platform specific support routines
50
// Description:
51
// Usage:        #include <cyg/hal/flexanet.h>
52
//
53
//####DESCRIPTIONEND####
54
//
55
//===========================================================================*/
56
 
57
 
58
#ifndef __ASSEMBLER__
59
//
60
// Board Control Register
61
// Note: This register is write-only.  Thus a shadow copy is provided so that
62
// it may be safely updated/shared by multiple threads.
63
//
64
extern unsigned long _flexanet_BCR;  // Shadow copy
65
 
66
extern void flexanet_BCR(unsigned long mask, unsigned long value);
67
 
68
#endif
69
 
70
// 
71
// Signal assertion levels
72
//
73
#define SA1110_LOGIC_ONE(m)  (m & 0xFFFFFFFF)
74
#define SA1110_LOGIC_ZERO(m) (m & 0x00000000)
75
 
76
//
77
// GPIO settings
78
//
79
#define SA1110_GPIO_DIR       0x080037FE
80
#define SA1110_GPIO_ALT       0x080037FC
81
#define SA1110_GPIO_CLR       0x080037FE
82
#define SA1110_GPIO_SET       0x00000000
83
 
84
 
85
//
86
// Flexanet Board Control Register
87
//
88
#define SA1110_BOARD_CONTROL        REG32_PTR(0x10000000)
89
 
90
/* Power-up value */
91
#define SA1110_BCR_MIN              0x00000000
92
 
93
/* Mandatory bits */
94
#define SA1110_BCR_LED_GREEN  (1<<0)  /* General-purpose green LED (1 = on) */
95
#define SA1110_BCR_SPARE_1    (1<<1)  /* Not defined */
96
#define SA1110_BCR_CF1_RST    (1<<2)  /* Compact Flash Slot #1 Reset (1 = reset) */
97
#define SA1110_BCR_CF2_RST    (1<<3)  /* Compact Flash Slot #2 Reset (1 = reset) */
98
#define SA1110_BCR_GUI_NRST   (1<<4)  /* GUI board reset (0 = reset) */
99
#define SA1110_BCR_RTS1       (1<<5)  /* RS232 RTS for UART-1 */
100
#define SA1110_BCR_RTS3       (1<<6)  /* RS232 RTS for UART-3 */
101
#define SA1110_BCR_XCDBG0     (1<<7)  /* Not defined. Wired to XPLA3 for debug */
102
 
103
/* BCR extension, only required by L3-bus in some audio codecs */
104
#define SA1110_BCR_L3MOD      (1<<8)  /* L3-bus MODE signal */
105
#define SA1110_BCR_L3DAT      (1<<9)  /* L3-bus DATA signal */
106
#define SA1110_BCR_L3CLK      (1<<10) /* L3-bus CLK signal */
107
#define SA1110_BCR_SPARE_11   (1<<11) /* Not defined */
108
#define SA1110_BCR_SPARE_12   (1<<12) /* Not defined */
109
#define SA1110_BCR_SPARE_13   (1<<13) /* Not defined */
110
#define SA1110_BCR_SPARE_14   (1<<14) /* Not defined */
111
#define SA1110_BCR_SPARE_15   (1<<15) /* Not defined */
112
 
113
/* Board Status Register */
114
#define SA1110_BSR_CTS1       (1<<0)  /* RS232 CTS for UART-1 */
115
#define SA1110_BSR_CTS3       (1<<1)  /* RS232 CTS for UART-3 */
116
#define SA1110_BSR_DSR1       (1<<2)  /* RS232 DSR for UART-1 */
117
#define SA1110_BSR_DSR3       (1<<3)  /* RS232 DSR for UART-3 */
118
#define SA1110_BSR_ID0        (1<<4)  /* Board identification */
119
#define SA1110_BSR_ID1        (1<<5)
120
#define SA1110_BSR_CFG0       (1<<6)  /* Board configuration options */
121
#define SA1110_BSR_CFG1       (1<<7)
122
 
123
/* GPIOs for which the generic definition doesn't say much */
124
#define SA1110_GPIO_CF1_NCD         (1<<14)  /* Card Detect from CF slot #1 */
125
#define SA1110_GPIO_CF2_NCD         (1<<15)  /* Card Detect from CF slot #2 */
126
#define SA1110_GPIO_CF1_IRQ         (1<<16)  /* IRQ from CF slot #1 */
127
#define SA1110_SA1110_GPIO_CF2_IRQ  (1<<17)  /* IRQ from CF slot #2 */
128
#define SA1110_GPIO_APP_IRQ         (1<<18)  /* Extra IRQ from application bus */
129
#define SA1110_GPIO_RADIO_REF       (1<<20)  /* Ref. clock for UART3 (Radio) */
130
#define SA1110_GPIO_CF1_BVD1            (1<<21)  /* BVD1 from CF slot #1 */
131
#define SA1110_GPIO_CF2_BVD1        (1<<22)  /* BVD1 from CF slot #2 */
132
#define SA1110_GPIO_GUI_IRQ             (1<<23)  /* IRQ from GUI board (i.e., UCB1300) */
133
#define SA1110_GPIO_ETH_IRQ             (1<<24)  /* IRQ from Ethernet controller */
134
#define SA1110_GPIO_INTIP_IRQ           (1<<25)  /* Measurement IRQ (INTIP) */
135
#define SA1110_GPIO_XMI_IRQ             (1<<26)  /* External Module Insertion interrupt */
136
 
137
/* IRQ mappings from GPIOs */
138
#define SA1110_IRQ_GPIO_CF1_CD          CYGNUM_HAL_INTERRUPT_GPIO14
139
#define SA1110_IRQ_GPIO_CF2_CD      CYGNUM_HAL_INTERRUPT_GPIO15
140
#define SA1110_IRQ_GPIO_CF1_IRQ     CYGNUM_HAL_INTERRUPT_GPIO16
141
#define SA1110_IRQ_GPIO_CF2_IRQ     CYGNUM_HAL_INTERRUPT_GPIO17
142
#define SA1110_IRQ_GPIO_APP         CYGNUM_HAL_INTERRUPT_GPIO18
143
#define SA1110_IRQ_GPIO_CF1_BVD1    CYGNUM_HAL_INTERRUPT_GPIO21
144
#define SA1110_IRQ_GPIO_CF2_BVD1    CYGNUM_HAL_INTERRUPT_GPIO22
145
#define SA1110_IRQ_GPIO_GUI         CYGNUM_HAL_INTERRUPT_GPIO23
146
#define SA1110_IRQ_GPIO_ETH         CYGNUM_HAL_INTERRUPT_GPIO24
147
#define SA1110_IRQ_GPIO_INTIP       CYGNUM_HAL_INTERRUPT_GPIO25
148
 
149
/* On-Board Ethernet (physical addrs) */
150
#define SA1110_FHH_ETH_IOBASE       0x18000000  /* I/O base */
151
#define SA1110_FHH_ETH_MMBASE       0x18800000  /* Attribute-memory base */
152
 
153
/*---------------------------------------------------------------------------*/
154
/* end of flexanet.h                                                          */
155
#endif /* CYGONCE_FLEXANET_H */

powered by: WebSVN 2.1.0

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