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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [arm/] [xscale/] [iop310/] [current/] [include/] [hal_var_ints.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_VAR_INTS_H
2
#define CYGONCE_HAL_VAR_INTS_H
3
//==========================================================================
4
//
5
//      hal_var_ints.h
6
//
7
//      HAL Interrupt and clock support
8
//
9
//==========================================================================
10
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
11
// -------------------------------------------                              
12
// This file is part of eCos, the Embedded Configurable Operating System.   
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under    
16
// the terms of the GNU General Public License as published by the Free     
17
// Software Foundation; either version 2 or (at your option) any later      
18
// version.                                                                 
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT      
21
// ANY 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        
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
28
//
29
// As a special exception, if other files instantiate templates or use      
30
// macros or inline functions from this file, or you compile this file      
31
// and link it with other works to produce a work based on this file,       
32
// this file does not by itself cause the resulting work to be covered by   
33
// the GNU General Public License. However the source code for this file    
34
// must still be made available in accordance with section (3) of the GNU   
35
// General Public License v2.                                               
36
//
37
// This exception does not invalidate any other reasons why a work based    
38
// on this file might be covered by the GNU General Public License.         
39
// -------------------------------------------                              
40
// ####ECOSGPLCOPYRIGHTEND####                                              
41
//==========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):    msalter
45
// Contributors: msalter, gthomas
46
// Date:         2001-12-03
47
// Purpose:      Define Interrupt support
48
// Description:  The interrupt details for XScale CPUs are defined here.
49
// Usage:
50
//               #include <pkgconf/system.h>
51
//               #include CYGBLD_HAL_VARIANT_H
52
//               #include CYGBLD_HAL_VAR_INTS_H
53
//
54
//               ...
55
//              
56
//
57
//####DESCRIPTIONEND####
58
//
59
//==========================================================================
60
 
61
#include <cyg/hal/hal_iop310.h>         // registers
62
#include <cyg/hal/hal_io.h>             // IO macros
63
#include <cyg/hal/hal_platform_ints.h>  // Platform overrides, setups, etc
64
 
65
// *** 80200 CPU ***
66
#define CYGNUM_HAL_INTERRUPT_reserved0     0
67
#define CYGNUM_HAL_INTERRUPT_PMU_PMN0_OVFL 1 // See Ch.12 - Performance Mon.
68
#define CYGNUM_HAL_INTERRUPT_PMU_PMN1_OVFL 2 // PMU counter 0/1 overflow
69
#define CYGNUM_HAL_INTERRUPT_PMU_CCNT_OVFL 3 // PMU clock overflow
70
#define CYGNUM_HAL_INTERRUPT_BCU_INTERRUPT 4 // See Ch.11 - Bus Control Unit
71
#define CYGNUM_HAL_INTERRUPT_NIRQ          5 // external IRQ
72
#define CYGNUM_HAL_INTERRUPT_NFIQ          6 // external FIQ
73
 
74
// *** XINT6 interrupts ***
75
#define CYGNUM_HAL_INTERRUPT_DMA_0         7
76
#define CYGNUM_HAL_INTERRUPT_DMA_1         8
77
#define CYGNUM_HAL_INTERRUPT_DMA_2         9
78
#define CYGNUM_HAL_INTERRUPT_GTSC         10 // Global Time Stamp Counter
79
#define CYGNUM_HAL_INTERRUPT_PEC          11 // Performance Event Counter
80
#define CYGNUM_HAL_INTERRUPT_AAIP         12 // application accelerator unit
81
 
82
// *** XINT7 interrupts ***
83
// I2C interrupts
84
#define CYGNUM_HAL_INTERRUPT_I2C_TX_EMPTY 13
85
#define CYGNUM_HAL_INTERRUPT_I2C_RX_FULL  14
86
#define CYGNUM_HAL_INTERRUPT_I2C_BUS_ERR  15
87
#define CYGNUM_HAL_INTERRUPT_I2C_STOP     16
88
#define CYGNUM_HAL_INTERRUPT_I2C_LOSS     17
89
#define CYGNUM_HAL_INTERRUPT_I2C_ADDRESS  18
90
// Messaging Unit interrupts
91
#define CYGNUM_HAL_INTERRUPT_MESSAGE_0           19
92
#define CYGNUM_HAL_INTERRUPT_MESSAGE_1           20
93
#define CYGNUM_HAL_INTERRUPT_DOORBELL            21
94
#define CYGNUM_HAL_INTERRUPT_NMI_DOORBELL        22 // FIQ
95
#define CYGNUM_HAL_INTERRUPT_QUEUE_POST          23
96
#define CYGNUM_HAL_INTERRUPT_OUTBOUND_QUEUE_FULL 24 // FIQ
97
#define CYGNUM_HAL_INTERRUPT_INDEX_REGISTER      25
98
// PCI Address Translation Unit
99
#define CYGNUM_HAL_INTERRUPT_BIST                26
100
 
101
// *** External board interrupts (XINT3) ***
102
#define CYGNUM_HAL_INTERRUPT_XINT3_BIT0   27
103
#define CYGNUM_HAL_INTERRUPT_XINT3_BIT1   28
104
#define CYGNUM_HAL_INTERRUPT_XINT3_BIT2   29
105
#define CYGNUM_HAL_INTERRUPT_XINT3_BIT3   30
106
#define CYGNUM_HAL_INTERRUPT_XINT3_BIT4   31
107
#define CYGNUM_HAL_INTERRUPT_XINT3_BITS    5 // Number of significant bits
108
 
109
// *** NMI Interrupts go to FIQ ***
110
#define CYGNUM_HAL_INTERRUPT_MCU_ERR       35
111
#define CYGNUM_HAL_INTERRUPT_PATU_ERR      36
112
#define CYGNUM_HAL_INTERRUPT_SATU_ERR      37
113
#define CYGNUM_HAL_INTERRUPT_PBDG_ERR      38
114
#define CYGNUM_HAL_INTERRUPT_SBDG_ERR      39
115
#define CYGNUM_HAL_INTERRUPT_DMA0_ERR      40
116
#define CYGNUM_HAL_INTERRUPT_DMA1_ERR      41
117
#define CYGNUM_HAL_INTERRUPT_DMA2_ERR      42
118
#define CYGNUM_HAL_INTERRUPT_MU_ERR        43
119
#define CYGNUM_HAL_INTERRUPT_reserved52    44
120
#define CYGNUM_HAL_INTERRUPT_AAU_ERR       45
121
#define CYGNUM_HAL_INTERRUPT_BIU_ERR       46
122
 
123
// *** ATU FIQ sources ***
124
#define CYGNUM_HAL_INTERRUPT_P_SERR        47
125
#define CYGNUM_HAL_INTERRUPT_S_SERR        48
126
 
127
#define CYGNUM_HAL_ISR_MIN               0
128
#define CYGNUM_HAL_ISR_MAX               48
129
 
130
#define CYGNUM_HAL_ISR_COUNT            (CYGNUM_HAL_ISR_MAX+1)
131
 
132
externC void hal_delay_us(cyg_uint32 usecs);
133
#define HAL_DELAY_US(n)          hal_delay_us(n);
134
 
135
//----------------------------------------------------------------------------
136
// Reset.
137
 
138
// FIXME - Can we reset the board?
139
#define HAL_PLATFORM_RESET()   CYG_EMPTY_STATEMENT
140
 
141
#define HAL_PLATFORM_RESET_ENTRY 0x00000000
142
 
143
// ------------------------------------------------------------------------
144
// Dynamically set the timer interrupt rate.
145
// Not for application use at all.
146
 
147
externC void
148
hal_clock_reinitialize(          int *pfreq,    /* inout */
149
                        unsigned int *pperiod,  /* inout */
150
                        unsigned int old_hz );  /* in */
151
 
152
#define HAL_CLOCK_REINITIALIZE( _freq, _period, _old_hz ) \
153
        hal_clock_reinitialize( &_freq, &_period, _old_hz )
154
 
155
#endif // CYGONCE_HAL_VAR_INTS_H
156
// EOF hal_var_ints.h

powered by: WebSVN 2.1.0

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