source: SVN/cambria/redboot/packages/hal/arm/xscale/kixrp435/current/include/kixrp435.h @ 1

Last change on this file since 1 was 1, checked in by Tim Harvey, 2 years ago

restored latest version of files from server backup

Signed-off-by: Tim Harvey <tharvey@…>

File size: 5.5 KB
Line 
1#ifndef CYGONCE_HAL_ARM_XSCALE_KIXRP435_KIXRP435_H
2#define CYGONCE_HAL_ARM_XSCALE_KIXRP435_KIXRP435_H
3
4/*=============================================================================
5//
6//      kixrp435.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) 2007 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 version.
19//
20// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
21// 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 along
26// with eCos; if not, write to the Free Software Foundation, Inc.,
27// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28//
29// As a special exception, if other files instantiate templates or use macros
30// or inline functions from this file, or you compile this file and link it
31// with other works to produce a work based on this file, this file does not
32// by itself cause the resulting work to be covered by the GNU General Public
33// License. However the source code for this file must still be made available
34// in accordance with section (3) of the GNU General Public License.
35//
36// This exception does not invalidate any other reasons why a work based on
37// this file might be covered by the GNU General Public License.
38// -------------------------------------------
39//####ECOSGPLCOPYRIGHTEND####
40//=============================================================================
41//#####DESCRIPTIONBEGIN####
42//
43// Author(s):    msalter@redhat.com
44// Contributors:
45// Date:         2007-01-05
46// Purpose:      Intel KIXRP435 specific support routines
47// Description:
48// Usage:        #include <cyg/hal/kixrp435.h>
49//
50//####DESCRIPTIONEND####
51//
52//===========================================================================*/
53
54#include <pkgconf/system.h>
55#include CYGHWR_MEMORY_LAYOUT_H
56#include <pkgconf/hal_arm_xscale_kixrp435.h>
57#include <cyg/hal/hal_ixp425.h>
58
59// These must match setup in the page table in hal_platform_extras.h
60#define SDRAM_PHYS_BASE                0x00000000
61#define SDRAM_BASE                     0x00000000
62#define SDRAM_UNCACHED_BASE            0x20000000
63#define SDRAM_DC_BASE                  0x30000000
64#define SDRAM_SIZE                     0x08000000  // 128MB, set this to the highest possible value as only page table relies on this value
65
66#define KIXRP435_FLASH_BASE            0x50000000
67#define KIXRP435_FLASH_SIZE            0x02000000
68#define KIXRP435_FLASH_DC_BASE         0xA0000000
69
70#define KIXRP435_UTOPIA_BASE           0x53f00000
71#define KIXRP435_UTOPIA_SIZE           0x00040000
72
73#define KIXRP435_LED_BASE              0x53f40000
74#define KIXRP435_LED_SIZE              0x00040000
75
76#define KIXRP435_NAND_BASE             0x53f80000
77#define KIXRP435_NAND_SIZE             0x00040000
78
79#define DCACHE_FLUSH_AREA              0xE0000000
80
81// CS0 (flash optimum timing)
82#define IXP425_EXP_CS0_INIT \
83 (EXP_ADDR_T(1) | EXP_SETUP_T(1) | EXP_STROBE_T(4) | EXP_HOLD_T(1) | \
84  EXP_RECOVERY_T(1) | EXP_SZ_16M | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN)
85
86// CS1 (flash optimum timing)
87#define IXP425_EXP_CS1_INIT \
88 (EXP_ADDR_T(1) | EXP_SETUP_T(1) | EXP_STROBE_T(4) | EXP_HOLD_T(1) | \
89  EXP_RECOVERY_T(1) | EXP_SZ_16M | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN)
90
91// CS2 (flash optimum timing)
92#define IXP425_EXP_CS2_INIT \
93 (EXP_ADDR_T(1) | EXP_SETUP_T(1) | EXP_STROBE_T(4) | EXP_HOLD_T(1) | \
94  EXP_RECOVERY_T(1) | EXP_SZ_16M | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN)
95
96// CS3 (flash optimum timing)
97#define IXP425_EXP_CS3_INIT \
98 (EXP_ADDR_T(1) | EXP_SETUP_T(1) | EXP_STROBE_T(4) | EXP_HOLD_T(1) | \
99  EXP_RECOVERY_T(1) | EXP_SZ_16M | EXP_WR_EN | EXP_BYTE_RD16 | EXP_CS_EN)
100
101#define KIXRP435_SDCR0_INIT         (0x72222312)
102#define KIXRP435_SDCR1_INIT         (0x687144a7)
103#define KIXRP435_SDRAM_REFRESH_CNT  (0x610)
104#define KIXRP435_SBR0_INIT          (0x00000004)
105#define KIXRP435_SBR1_INIT          (0x00000004)
106
107#define KIXRP435_SBR_INIT_64                            (0x80000002)
108#define KIXRP435_SBR_INIT_128                           (0x00000004)
109
110
111// ------------------------------------------------------------------------
112// GPIO lines
113
114// ------------------------------------------------------------------------
115// GPIO lines
116
117#define GPIO_EEPROM_SDA  7
118#define GPIO_EEPROM_SCL  6
119#define GPIO0_AVILA 0
120#define GPIO1_AVILA 1
121#define GPIO2_AVILA 2
122#define GPIO3_AVILA 3
123#define GPIO4_AVILA 4
124#define GPIO5_AVILA 5
125
126#define GPIO_DSL_INT_N     0
127#define GPIO_SLIC_INT_N    2
128#define GPIO_SLIC_RESET_N  3
129#define GPIO_SSP_CS0       6
130#define GPIO_SSP_CS1       7
131#define GPIO_FXO_RESET_N   12
132#define GPIO_IO_RESET_N    13
133
134// LED Control
135
136#ifdef __ASSEMBLER__
137.macro DISPLAY val, reg0, reg1
138#if 0
139        ldr    \reg0, =((\val & 0x81)|((\val >>1)&2)|((\val>>2)&4)| \
140                        ((\val >> 3)&8)|((\val<<1)&0x40)| \
141                        ((\val<<2)&0x20)|((\val<<3)&0x10))
142        eor    \reg0, \reg0, #0xff
143        ldr    \reg1, =KIXRP435_LED_BASE
144        strb   \reg0, [\reg1]
145#endif
146.endm
147#endif // __ASSEMBLER__
148
149// ------------------------------------------------------------------------
150
151#endif // CYGONCE_HAL_ARM_XSCALE_KIXRP435_KIXRP435_H
152// EOF kixrp435.h
Note: See TracBrowser for help on using the repository browser.