1 #ifndef CYGONCE_HAL_PLATFORM_INC
2 #define CYGONCE_HAL_PLATFORM_INC
3 ##=============================================================================
7 ## AKI3068NET "board" assembler header file
9 ##=============================================================================
10 #####ECOSGPLCOPYRIGHTBEGIN####
11 ## -------------------------------------------
12 ## This file is part of eCos, the Embedded Configurable Operating System.
13 ## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
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 version.
19 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 ## You should have received a copy of the GNU General Public License along
25 ## with eCos; if not, write to the Free Software Foundation, Inc.,
26 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 ## As a special exception, if other files instantiate templates or use macros
29 ## or inline functions from this file, or you compile this file and link it
30 ## with other works to produce a work based on this file, this file does not
31 ## by itself cause the resulting work to be covered by the GNU General Public
32 ## License. However the source code for this file must still be made available
33 ## in accordance with section (3) of the GNU General Public License.
35 ## This exception does not invalidate any other reasons why a work based on
36 ## this file might be covered by the GNU General Public License.
38 ## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
39 ## at http://sources.redhat.com/ecos/ecos-license/
40 ## -------------------------------------------
41 #####ECOSGPLCOPYRIGHTEND####
42 ##=============================================================================
43 #######DESCRIPTIONBEGIN####
45 ## Author(s): Yoshinori Saro
46 ## Contributors: Yoshinori Sato
48 ## Purpose: AKI3068NET "board" definitions.
49 ## Description: This file contains various definitions and macros that are
50 ## required for writing assembly code for the AKI3068NET board
51 ## Currently there are none
53 ## #include <cyg/hal/platform.inc>
57 ######DESCRIPTIONEND####
59 ##=============================================================================
61 #include <pkgconf/hal.h>
63 #include <cyg/hal/mod_regs_bsc.h>
64 #include <cyg/hal/mod_regs_pio.h>
66 ##-----------------------------------------------------------------------------
68 #if (CYGINT_HAL_PLF_IF_IDE != 0 && (CYGHWR_HAL_IDE_BUSWIDTH == 16))
69 #define ABWCR_VAL ~((1 << ((CYGHWR_HAL_IDE_REGISTER >> 21) & 7)) |\
70 (1 << ((CYGHWR_HAL_IDE_ALT_REGS >> 21) & 7)))
72 #define ABWCR_VAL 0xff
74 #if (CYGINT_HAL_PLF_IF_IDE != 0)
75 #define CSCR_VAL ((1 << ((CYGHWR_HAL_IDE_REGISTER >> 21) & 7)) |\
76 (1 << ((CYGHWR_HAL_IDE_ALT_REGS >> 21) & 7)))
79 #define CYGPKG_HAL_H8300_MEMC_DEFINED
81 #if defined(CYG_HAL_STARTUP_ROM)
86 mov.w #0x00ff,e2 ; internal I/O regs (2) high address
89 dec.w #1,e2 ; internal I/O regs (1) high address
95 #define INIT_REGS_DATA(REGS,DATA) \
96 .word (REGS & 0xffff),DATA
99 INIT_REGS_DATA(CYGARC_RTCOR,9)
100 INIT_REGS_DATA(CYGARC_RTMCSR,0x30)
101 INIT_REGS_DATA(CYGARC_DRCRB,0x98)
102 INIT_REGS_DATA(CYGARC_DRCRA,0x38)
103 INIT_REGS_DATA(CYGARC_ASTCR,0xfb)
104 INIT_REGS_DATA(CYGARC_ABWCR,ABWCR_VAL)
105 #if defined(CSCR_VAL)
106 INIT_REGS_DATA(CYGARC_CSCR,((CSCR_VAL) & 0xf0) | 0x0f)
108 INIT_REGS_DATA(CYGARC_WCRH ,0xff)
109 INIT_REGS_DATA(CYGARC_WCRL ,0xc8)
110 INIT_REGS_DATA(CYGARC_P1DDR,0xff)
111 INIT_REGS_DATA(CYGARC_P2DDR,0xff)
112 INIT_REGS_DATA(CYGARC_P5DDR,0x01)
113 INIT_REGS_DATA(CYGARC_P8DDR,0x0e)
116 ;; Thanks Hiroyuki Senshu & Hiroki Minematsu
118 ;; External peripheral setup delay
120 mov.l #420000,er0 ;wait 50ms
127 #define CYGPKG_HAL_H8300_DIAG_DEFINED
131 mov.b r0l,@CYGARC_PADDR
133 mov.b r0l,@CYGARC_PADR
136 .macro hal_diag_excpt_start
139 .macro hal_diag_intr_start
142 .macro hal_diag_restore
148 #if defined(CYGPKG_IO_ETH_DRIVERS)
149 #define CYGPKG_HAL_H8300_SAVED_VECTORS
150 .macro h8300_save_vectors
155 #------------------------------------------------------------------------------
156 #endif // ifndef CYGONCE_HAL_PLATFORM_INC
157 # end of platform.inc