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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [hal/] [h8300/] [edosk2674/] [current/] [include/] [platform.inc] - Blame information for rev 817

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

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_PLATFORM_INC
2
#define CYGONCE_HAL_PLATFORM_INC
3
##=============================================================================
4
##
5
##      platform.inc
6
##
7
##      EDOSK-2764 "board" assembler header file
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):    yoshinori sato
45
## Contributors: yoshinori sato
46
## Date:         2003-02-23
47
## Purpose:      EDOSK-2674 "board" definitions.
48
## Description:  This file contains various definitions and macros that are
49
##               required for writing assembly code for the am31 simulator.
50
##               Currently there are none
51
## Usage:
52
##               #include 
53
##               ...
54
##
55
##
56
######DESCRIPTIONEND####
57
##
58
##=============================================================================
59
 
60
#include 
61
 
62
#include 
63
#include 
64
#include 
65
#include 
66
 
67
##-----------------------------------------------------------------------------
68
 
69
#define CYGPKG_HAL_H8300_MEMC_DEFINED
70
        .macro  hal_memc_init
71
#if defined(CYG_HAL_STARTUP_ROM)
72
;BSC/GPIO setup
73
        mov.l   #init_regs,er0
74
        mov.w   #0xffff,e2
75
1:
76
        mov.w   @er0+,r2
77
        beq     2f
78
        mov.w   @er0+,r1
79
        mov.b   r1l,@er2
80
        bra     1b
81
 
82
#define INIT_REGS_DATA(REGS,DATA) \
83
        .word   ((REGS) & 0xffff),DATA
84
 
85
init_regs:
86
INIT_REGS_DATA(CYGARC_ASTCR,0xfb)
87
INIT_REGS_DATA(CYGARC_RDNCR,0x00)
88
INIT_REGS_DATA(CYGARC_ABWCR,0x80)
89
INIT_REGS_DATA(CYGARC_WTCRAH,0x27)
90
INIT_REGS_DATA(CYGARC_WTCRAL,0x77)
91
INIT_REGS_DATA(CYGARC_WTCRBH,0x71)
92
INIT_REGS_DATA(CYGARC_WTCRBL,0x22)
93
INIT_REGS_DATA(CYGARC_CSACRH,0x80)
94
INIT_REGS_DATA(CYGARC_CSACRL,0x80)
95
INIT_REGS_DATA(CYGARC_BROMCRH,0xa0)
96
INIT_REGS_DATA(CYGARC_BROMCRL,0xa0)
97
INIT_REGS_DATA(CYGARC_P3DDR,0x3a)
98
INIT_REGS_DATA(CYGARC_P3ODR,0x06)
99
INIT_REGS_DATA(CYGARC_PADDR,0xff)
100
INIT_REGS_DATA(CYGARC_PFDDR,0xfe)
101
INIT_REGS_DATA(CYGARC_PGDDR,0x0f)
102
INIT_REGS_DATA(CYGARC_PHDDR,0x0f)
103
INIT_REGS_DATA(CYGARC_PFCR0,0xff)
104
INIT_REGS_DATA(CYGARC_PFCR2,0x0d)
105
INIT_REGS_DATA(CYGARC_INTCR,0x28)
106
INIT_REGS_DATA(CYGARC_ITSR, 0xff)
107
INIT_REGS_DATA(CYGARC_ITSR+1,0x3f)
108
INIT_REGS_DATA(CYGARC_ISCRL, 0x55)
109
INIT_REGS_DATA(CYGARC_ISCRL+1,0x55)
110
INIT_REGS_DATA(CYGARC_MSTPCRL,0xf7)
111
 
112
        .word   0
113
2:
114
;SDRAM setup
115
#define SDRAM_SMR 0x400040
116
 
117
        mov.w   #0,r0
118
        mov.w   r0,@CYGARC_DRACCR:16
119
        mov.w   #0x188,r0
120
        mov.w   r0,@CYGARC_REFCR:16
121
        mov.w   #0x85b4,r0
122
        mov.w   r0,@CYGARC_DRAMCR:16
123
        mov.b   #0,r1l
124
        mov.b   r1l,@SDRAM_SMR
125
        mov.w   #0x84b4,r0
126
        mov.w   r0,@CYGARC_DRAMCR:16
127
 
128
;special thanks to Arizona Cooperative Power
129
#endif
130
        .endm
131
 
132
#if defined(CYGPKG_IO_ETH_DRIVERS)
133
#define CYGPKG_HAL_H8300_SAVED_VECTORS
134
        .macro  h8300_save_vectors
135
        .byte   16
136
        .endm
137
#endif
138
 
139
#------------------------------------------------------------------------------
140
#endif // ifndef CYGONCE_HAL_PLATFORM_INC
141
# end of platform.inc

powered by: WebSVN 2.1.0

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