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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_HAL_ARM_XSCALE_IXDP425_IXDP425_H
2
#define CYGONCE_HAL_ARM_XSCALE_IXDP425_IXDP425_H
3
 
4
/*=============================================================================
5
//
6
//      ixdp425.h
7
//
8
//      Platform specific support (register layout, etc)
9
//
10
//=============================================================================
11
// ####ECOSGPLCOPYRIGHTBEGIN####
12
// -------------------------------------------
13
// This file is part of eCos, the Embedded Configurable Operating System.
14
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
15
//
16
// eCos is free software; you can redistribute it and/or modify it under
17
// the terms of the GNU General Public License as published by the Free
18
// Software Foundation; either version 2 or (at your option) any later
19
// version.
20
//
21
// eCos is distributed in the hope that it will be useful, but WITHOUT
22
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
24
// for more details.
25
//
26
// You should have received a copy of the GNU General Public License
27
// along with eCos; if not, write to the Free Software Foundation, Inc.,
28
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
29
//
30
// As a special exception, if other files instantiate templates or use
31
// macros or inline functions from this file, or you compile this file
32
// and link it with other works to produce a work based on this file,
33
// this file does not by itself cause the resulting work to be covered by
34
// the GNU General Public License. However the source code for this file
35
// must still be made available in accordance with section (3) of the GNU
36
// General Public License v2.
37
//
38
// This exception does not invalidate any other reasons why a work based
39
// on this file might be covered by the GNU General Public License.
40
// -------------------------------------------
41
// ####ECOSGPLCOPYRIGHTEND####
42
//=============================================================================
43
//#####DESCRIPTIONBEGIN####
44
//
45
// Author(s):    msalter
46
// Contributors: msalter
47
// Date:         2002-12-10
48
// Purpose:      Intel IXDP425 specific support routines
49
// Description:
50
// Usage:        #include <cyg/hal/ixdp425.h>
51
//
52
//####DESCRIPTIONEND####
53
//
54
//===========================================================================*/
55
 
56
#include <pkgconf/system.h>
57
#include CYGHWR_MEMORY_LAYOUT_H
58
#include <pkgconf/hal_arm_xscale_ixdp425.h>
59
#include <cyg/hal/hal_ixp425.h>
60
 
61
// These must match setup in the page table in hal_platform_extras.h
62
#define SDRAM_PHYS_BASE                    0x00000000
63
#define SDRAM_BASE                         0x00000000
64
#define SDRAM_ALIAS_BASE                   0x10000000
65
#define SDRAM_UNCACHED_BASE                0x20000000
66
#define SDRAM_DC_BASE                      0x30000000
67
#define SDRAM_SIZE                         0x10000000  // 256MB
68
 
69
#define IXDP425_LED_BASE                   0x52000000
70
#define IXDP425_LED_SIZE                   0x00100000
71
#define IXDP425_LED_DATA                   REG16(0, IXDP425_LED_BASE)
72
 
73
#define IXDP_FLASH_BASE                    0x50000000
74
#define IXDP_FLASH_SIZE                    0x01000000
75
#define IXDP_FLASH_DC_BASE                 0xA0000000
76
#define IXDP_FLASH_UNCACHED_BASE           0xB0000000
77
 
78
// CS0 (flash optimum timing)
79
#define IXP425_EXP_CS0_INIT \
80
 (EXP_ADDR_T(3) | EXP_SETUP_T(3) | EXP_STROBE_T(15) | EXP_HOLD_T(3) | \
81
  EXP_RECOVERY_T(15) | EXP_SZ_16M | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN)
82
 
83
// CS2 (LED display)
84
#define IXP425_EXP_CS2_INIT  \
85
 (EXP_ADDR_T(3) | EXP_SETUP_T(3) | EXP_STROBE_T(15) | EXP_HOLD_T(3) | \
86
  EXP_RECOVERY_T(15) | EXP_SZ_512 | EXP_WR_EN | EXP_CS_EN)
87
 
88
#define IXP425_SDRAM_CONFIG_INIT  (SDRAM_CONFIG_CAS_3 | SDRAM_CONFIG_4x32Mx16)
89
#define IXP425_SDRAM_REFRESH_CNT  0x081
90
#define IXP425_SDRAM_SET_MODE_CMD SDRAM_IR_MODE_SET_CAS3
91
 
92
// ------------------------------------------------------------------------
93
// GPIO lines
94
 
95
#define GPIO_EEPROM_SDA  7
96
#define GPIO_EEPROM_SCL  6
97
#define GPIO_ENET1_INT_N 5
98
#define GPIO_ENET0_INT_N 4
99
#define GPIO_HSS0_INT_N  3
100
#define GPIO_HSS1_INT_N  2
101
#define GPIO_DSL_INT_N   1
102
 
103
// ------------------------------------------------------------------------
104
// 4 Digit Hex Display
105
//
106
// The board has two 4 hex digit display controlled by three board registers.
107
// Each digit has a decimal point and may be individually blanked.
108
 
109
#ifdef __ASSEMBLER__
110
        // Display hex digits in 'value' not masked by 'mask'.
111
        .macro DISPLAY value, reg0, reg1
112
        ldr    \reg0, =\value
113
        ldr    \reg1, =IXDP425_LED_DATA
114
        strh   \reg0, [\reg1]
115
#if 0
116
        // delay
117
        ldr     \reg0, =0x780000
118
    0:
119
        subs    \reg0, \reg0, #1
120
        bne     0b
121
#endif
122
        .endm
123
#else
124
static inline void HEX_DISPLAY(int value)
125
{
126
    *IXDP425_LED_DATA = value;
127
}
128
#endif // __ASSEMBLER__
129
 
130
// ------------------------------------------------------------------------
131
 
132
#endif // CYGONCE_HAL_ARM_XSCALE_IXDP425_IXDP425_H
133
// EOF ixdp425.h

powered by: WebSVN 2.1.0

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