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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [frv/] [arch/] [current/] [include/] [fr-v.h] - Blame information for rev 838

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

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      fr-v.h
4
//
5
//      HAL misc board support definitions for Fujitsu FR-V chips
6
//
7
//==========================================================================
8
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
9
// -------------------------------------------                              
10
// This file is part of eCos, the Embedded Configurable Operating System.   
11
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
12
//
13
// eCos is free software; you can redistribute it and/or modify it under    
14
// the terms of the GNU General Public License as published by the Free     
15
// Software Foundation; either version 2 or (at your option) any later      
16
// version.                                                                 
17
//
18
// eCos is distributed in the hope that it will be useful, but WITHOUT      
19
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
20
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
21
// for more details.                                                        
22
//
23
// You should have received a copy of the GNU General Public License        
24
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
25
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
26
//
27
// As a special exception, if other files instantiate templates or use      
28
// macros or inline functions from this file, or you compile this file      
29
// and link it with other works to produce a work based on this file,       
30
// this file does not by itself cause the resulting work to be covered by   
31
// the GNU General Public License. However the source code for this file    
32
// must still be made available in accordance with section (3) of the GNU   
33
// General Public License v2.                                               
34
//
35
// This exception does not invalidate any other reasons why a work based    
36
// on this file might be covered by the GNU General Public License.         
37
// -------------------------------------------                              
38
// ####ECOSGPLCOPYRIGHTEND####                                              
39
//==========================================================================
40
//#####DESCRIPTIONBEGIN####
41
//
42
// Author(s):    gthomas
43
// Contributors: gthomas
44
// Date:         2001-09-07
45
// Purpose:      Platform register definitions
46
// Description:  
47
//
48
//####DESCRIPTIONEND####
49
//
50
//========================================================================*/
51
 
52
#ifndef __HAL_FRV_H__
53
#define __HAL_FRV_H__ 1
54
 
55
// Common
56
 
57
#if 0
58
// Processor status register
59
#define _PSR_PIVL_SHIFT 3
60
#define _PSR_PIVL_MASK  (0xF<<(_PSR_PIVL_SHIFT))  // Interrupt mask level
61
#define _PSR_S          (1<<2)                    // Supervisor state
62
#define _PSR_PS         (1<<1)                    // Previous supervisor state
63
#define _PSR_ET         (1<<0)                    // Enable interrupts
64
#define _PSR_CM         (1<<12)                   // Enable conditionals
65
 
66
// Hardware status register
67
#define _HSR0_ICE       (1<<31)                   // Instruction cache enable
68
#define _HSR0_DCE       (1<<30)                   // Data cache enable
69
#define _HSR0_IMMU      (1<<26)                   // Instruction MMU enable
70
#define _HSR0_DMMU      (1<<25)                   // Data MMU enable
71
#endif
72
// Debug Control Register
73
#define _DCR_EBE        (1 << 30) // Exception break enable bit 
74
#define _DCR_SE         (1 << 29) // Single-step break enable bit 
75
#define _DCR_IBM        (1 << 28) // Instruction Break Mask (disable bit)
76
#define _DCR_DRBE0      (1 << 19) // READ dbar0
77
#define _DCR_DWBE0      (1 << 18) // WRITE dbar0
78
#define _DCR_DDBE0      (1 << 17) // Data-match for access to dbar0
79
#define _DCR_DBASE0     (1 << 17) // offset
80
#define _DCR_DRBE1      (1 << 16)
81
#define _DCR_DWBE1      (1 << 15)
82
#define _DCR_DDBE1      (1 << 14)
83
#define _DCR_DBASE1     (1 << 14)
84
//#define _DCR_DRBE2      (1 << 13) // 2 and 3 not supported in real hardware
85
//#define _DCR_DWBE2      (1 << 12)
86
//#define _DCR_DDBE2      (1 << 11)
87
//#define _DCR_DRBE3      (1 << 10)
88
//#define _DCR_DWBE3      (1 << 9)
89
//#define _DCR_DDBE3      (1 << 8)
90
#define _DCR_IBE0       (1 << 7)
91
#define _DCR_IBCE0      (1 << 6)
92
#define _DCR_IBE1       (1 << 5)
93
#define _DCR_IBCE1      (1 << 4)
94
#define _DCR_IBE2       (1 << 3)
95
#define _DCR_IBCE2      (1 << 2)
96
#define _DCR_IBE3       (1 << 1)
97
#define _DCR_IBCE3      (1 << 0)
98
 
99
// Break PSR Save Register
100
#define _BPSR_BS        (1 << 12)
101
#define _BPSR_BET       (1 << 0)
102
 
103
// Break Request Register
104
#define _BRR_EB         (1 << 30)
105
#define _BRR_CB         (1 << 29)
106
#define _BRR_TB         (1 << 28)
107
#define _BRR_DB0        (1 << 11)
108
#define _BRR_DB1        (1 << 10)
109
#define _BRR_IB0        (1 << 7)
110
#define _BRR_IB1        (1 << 6)
111
#define _BRR_IB2        (1 << 5)
112
#define _BRR_IB3        (1 << 4)
113
#define _BRR_CBB        (1 << 3)
114
#define _BRR_BB         (1 << 2)
115
#define _BRR_SB         (1 << 1)
116
#define _BRR_ST         (1 << 0)
117
 
118
// Programmable timers
119
#define _FRVGEN_TCSR0   0xFEFF9400                // Timer 0 control/status
120
#define _FRVGEN_TCSR1   0xFEFF9408                // Timer 1 control/status
121
#define _FRVGEN_TCSR2   0xFEFF9410                // Timer 2 control/status
122
#define _FRVGEN_TCxSR_TOUT 0x80                     // Status - TOUT signal 
123
#define _FRVGEN_TCTR    0xFEFF9418                // Timer control
124
#define _FRVGEN_TCTR_SEL0 (0<<6)                    // Select timer 0
125
#define _FRVGEN_TCTR_SEL1 (1<<6)                    // Select timer 1
126
#define _FRVGEN_TCTR_SEL2 (2<<6)                    // Select timer 2
127
#define _FRVGEN_TCTR_RB   (3<<6)                    // Timer read back
128
#define _FRVGEN_TCTR_RB_NCOUNT   (1<<5)                    // Count data suppress
129
#define _FRVGEN_TCTR_RB_NSTATUS  (1<<4)                    // Status data suppress
130
#define _FRVGEN_TCTR_RB_CTR2     (1<<3)                    // Read data for counter #2
131
#define _FRVGEN_TCTR_RB_CTR1     (1<<2)                    // Read data for counter #1
132
#define _FRVGEN_TCTR_RB_CTR0     (1<<1)                    // Read data for counter #0
133
#define _FRVGEN_TCTR_LATCH (0<<4)                   // Counter latch command
134
#define _FRVGEN_TCTR_R8LO  (1<<4)                   // Read low 8 bits
135
#define _FRVGEN_TCTR_R8HI  (2<<4)                   // Read high 8 bits
136
#define _FRVGEN_TCTR_RLOHI (3<<4)                   // Read/write 8 lo then 8 hi
137
#define _FRVGEN_TCTR_MODE0 (0<<1)                   // Mode 0 - terminal interrupt count
138
#define _FRVGEN_TCTR_MODE2 (2<<1)                   // Mode 2 - rate generator
139
#define _FRVGEN_TCTR_MODE4 (4<<1)                   // Mode 4 - software trigger strobe
140
#define _FRVGEN_TCTR_MODE5 (5<<1)                   // Mode 5 - hardware trigger strobe
141
#define _FRVGEN_TPRV    0xFEFF9420                // Timer prescale
142
#define _FRVGEN_TPRCKSL 0xFEFF9428                // Prescale clock
143
#define _FRVGEN_TCKSL0  0xFEFF9430                // Timer 0 clock select
144
#define _FRVGEN_TCKSL1  0xFEFF9438                // Timer 1 clock select
145
#define _FRVGEN_TCKSL2  0xFEFF9440                // Timer 2 clock select
146
 
147
// Interrupt & clock control
148
#define _FRVGEN_CLK_CTRL 0xFEFF9A00               // Clock control
149
#define _FRVGEN_CLK_CTRL_P0 (1<<8)                   // division rate of bus and resource clocks
150
#define _FRVGEN_IRC_TM0  0xFEFF9800               // Trigger mode 0 register (unused)
151
#define _FRVGEN_IRC_TM1  0xFEFF9808               // Trigger mode 1 register
152
#define _FRVGEN_IRC_RS   0xFEFF9810               // Request sense
153
#define _FRVGEN_IRC_RC   0xFEFF9818               // Request clear
154
#define _FRVGEN_IRC_MASK 0xFEFF9820               // Mask
155
#define _FRVGEN_IRC_IRL  0xFEFF9828               // Interrupt level read (encoded)
156
#define _FRVGEN_IRC_IRR0 0xFEFF9840               // Interrupt routing #0 (unused)
157
#define _FRVGEN_IRC_IRR1 0xFEFF9848               // Interrupt routing #1 (unused)
158
#define _FRVGEN_IRC_IRR2 0xFEFF9850               // Interrupt routing #2 (unused)
159
#define _FRVGEN_IRC_IRR3 0xFEFF9858               // Interrupt routing #3
160
#define _FRVGEN_IRC_IRR4 0xFEFF9860               // Interrupt routing #4
161
#define _FRVGEN_IRC_IRR5 0xFEFF9868               // Interrupt routing #5
162
#define _FRVGEN_IRC_IRR6 0xFEFF9870               // Interrupt routing #6
163
#define _FRVGEN_IRC_IRR7 0xFEFF9878               // Interrupt routing #7
164
#define _FRVGEN_IRC_ITM0 0xFEFF9880               // Internal trigger mode #0
165
#define _FRVGEN_IRC_ITM1 0xFEFF9888               // Internal trigger mode #1
166
 
167
// Serial ports - 16550 compatible
168
#define _FRVGEN_UART0   0xFEFF9C00
169
#define _FRVGEN_UART1   0xFEFF9C40
170
 
171
// Serial port prescaler
172
#define _FRVGEN_UCPSR   0xFEFF9C90
173
#define _FRVGEN_UCPVR   0xFEFF9C98
174
 
175
// Reset register
176
#define _FRVGEN_HW_RESET_STAT_P (1<<10)              // Last reset was power-on
177
#define _FRVGEN_HW_RESET_STAT_H (1<<9)               // Last reset was hard reset
178
#define _FRVGEN_HW_RESET_STAT_S (1<<8)               // Last reset was soft reset
179
#define _FRVGEN_HW_RESET_HR     (1<<1)               // Force hard reset
180
#define _FRVGEN_HW_RESET_SR     (1<<0)               // Force soft reset
181
 
182
#endif // __HAL_FRV_H__

powered by: WebSVN 2.1.0

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