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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [sh/] [edk7708/] [current/] [src/] [edk.S] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
##=============================================================================
2
##
3
##      edk.S
4
##
5
##      EDK board hardware setup
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 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):   jskov
43
## Contributors:jskov
44
## Date:        1999-05-03
45
## Purpose:     EDK7708 board hardware setup
46
## Description: This file contains any code needed to initialize the
47
##              hardware on a Hitachi SH3 EDK7708 board.
48
##
49
######DESCRIPTIONEND####
50
##
51
##=============================================================================
52
 
53
#include 
54
#include 
55
 
56
        .globl  _hal_hardware_init
57
_hal_hardware_init:
58
 
59
        // Set up the Bus State Controller
60
        mov.l    $BSC_settings_table,r3
61
1:      mov.w    @r3+,r0                // Address (or zero)
62
        cmp/eq   #0,r0
63
        bt       2f
64
        mov.w    @r3+,r1                // data
65
        bra      1b
66
         mov.w    r1,@r0                // delay slot
67
 
68
2:
69
        rts
70
         nop
71
 
72
        .align  2
73
$BSC_settings_table:
74
        .long   BSC_settings_table
75
BSC_settings_table:
76
        # These are the settings set by the Hitachi ROM Monitor.
77
 
78
        # BCR2: Bus size of areas 1-6 to 32 bits
79
        .word   CYGARC_REG_BCR2
80
        .word   0x3ffc
81
        # BCR1: Areas 2 and 3 are SDRAM
82
        .word   CYGARC_REG_BCR1
83
        .word   0x080c
84
        # BCR2: Bus size of areas 1-6 to 32 bits [note: second write!]
85
        .word   CYGARC_REG_BCR2
86
        .word   0x3ffc
87
        # WCR1: 3 wait-state cycles inserted for all areas
88
        .word   CYGARC_REG_WCR1
89
        .word   0x3fff
90
        # WCR2: extra wait states and full pitch for burst
91
        .word   CYGARC_REG_WCR2
92
        .word   0xffd7
93
        # MCR: RAS/CAS & burst timing area 2/3
94
        .word   CYGARC_REG_MCR
95
        .word   0x963c
96
#if 0
97
        # DCR: RAS/CAS & burst timing area 2
98
        .word   CYGARC_REG_DCR
99
        .word   0x0000
100
        # PCR: PCMCIA disabled
101
        .word   CYGARC_REG_PCR
102
        .word   0x0000
103
#endif
104
        # RTCNT: refresh counter (needs a5 in top byte to accept write)
105
        .word   CYGARC_REG_RTCNT
106
        .word   (0xa500 | 0x0000)
107
        # RTCOR: refresh time constant (needs a5 in top byte to accept write)
108
        .word   CYGARC_REG_RTCOR
109
        .word   (0xa500 | 0x003b)
110
        # RFCR:  refresh count register (needs a4 in top byte to accept write)
111
        .word   CYGARC_REG_RFCR
112
        .word   (0xa400 | 0x0000)
113
        # RTCSR: refresh timer control (needs a5 in top byte to accept write)
114
        .word   CYGARC_REG_RTCSR
115
        .word   (0xa500 | 0x0008)
116
 
117
        # Set SDMR to 0x220
118
        .word    0xd880
119
        .word    0
120
 
121
        # Table end
122
        .word   0
123
 
124
#------------------------------------------------------------------------------
125
# end of edk.S

powered by: WebSVN 2.1.0

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