/[gxemul]/trunk/src/include/sandpoint.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/src/include/sandpoint.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49 - (show annotations)
Wed Oct 10 23:31:09 2007 UTC (16 years, 6 months ago) by dpavlin
File MIME type: text/plain
File size: 3800 byte(s)
forked off sandpoint machine with mpc40x device from pmppc to isolate changes
1 /* gxemul: $Id: sandpoint.h,v 1.2 2005/03/05 12:34:03 debug Exp $ */
2 /* $NetBSD: sandpoint.h,v 1.2 2002/07/05 18:45:20 matt Exp $ */
3
4 #ifndef SANDPOINT_H
5 #define SANDPOINT_H
6
7 /*
8 * Copyright (c) 2002 The NetBSD Foundation, Inc.
9 * All rights reserved.
10 *
11 * This code is derived from software contributed to The NetBSD Foundation
12 * by Lennart Augustsson (lennart@augustsson.net) at Sandburst Corp.
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 * 3. All advertising materials mentioning features or use of this software
23 * must display the following acknowledgement:
24 * This product includes software developed by the NetBSD
25 * Foundation, Inc. and its contributors.
26 * 4. Neither the name of The NetBSD Foundation nor the names of its
27 * contributors may be used to endorse or promote products derived
28 * from this software without specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
31 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
32 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
34 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 * POSSIBILITY OF SUCH DAMAGE.
41 */
42
43 /* SDRAM */
44 #define SANDPOINT_SDRAM_BASE 0x00000000
45
46 /* Flash */
47 #define SANDPOINT_FLASH_BASE 0x70000000
48
49 #define SANDPOINT_IO_START 0x7fe00000
50
51 /* CS8900A ethernet */
52 #define SANDPOINT_CS_IO_BASE 0x7fe00000
53 #define SANDPOINT_CS_IO 0x7fe00c00
54 #define SANDPOINT_CS_MEM 0x7fe04000
55
56 /* time-of-day clock */
57 #define SANDPOINT_RTC 0x7ff00000
58 #define SANDPOINT_RTC_SIZE 0x00002000
59
60 /* board config regs */
61 #define SANDPOINT_CONFIG0 0x7ff40000
62 #define SANDPOINT_CONFIG1 0x7ff40001
63 #define SANDPOINT_LEDS 0x7ff40002
64 #define SANDPOINT_RESET 0x7ff40003
65 #define SANDPOINT_RESET_SEQ_STEP1 0xac
66 #define SANDPOINT_RESET_SEQ_STEP2 0x1d
67 #define SANDPOINT_INTR 0x7ff40004
68
69 /* ROM */
70 #define SANDPOINT_ROM_BASE 0x7ff80000
71
72 void setleds(int leds);
73
74 /* Interrupts */
75 #define SANDPOINT_I_BPMC_INTA CPC_IB_EXT0 /* PCI INTA */
76 #define SANDPOINT_I_BPMC_INTB CPC_IB_EXT1 /* PCI INTB */
77 #define SANDPOINT_I_BPMC_INTC CPC_IB_EXT2 /* PCI INTC */
78 #define SANDPOINT_I_BPMC_INTD CPC_IB_EXT3 /* PCI INTD */
79 #define SANDPOINT_I_ETH_INT CPC_IB_EXT4 /* ethernet */
80 #define SANDPOINT_I_RTC_INT CPC_IB_EXT5 /* rtc */
81
82
83 /*
84 * The variables below are extracted from the config register located
85 * at SANDPOINT_CONFIG.
86 */
87 struct a_config {
88 int a_boot_device;
89 #define A_BOOT_ROM 0
90 #define A_BOOT_FLASH 1
91 int a_has_ecc;
92 uint a_mem_size; /* in bytes */
93 uint a_l2_cache;
94 #define A_CACHE_PARITY 0
95 #define A_CACHE_NO_PARITY 1
96 #define A_CACHE_NONE 3
97 uint a_bus_freq; /* in hz */
98 int a_is_monarch;
99 int a_has_eth;
100 int a_has_rtc;
101 uint a_flash_size; /* in bytes */
102 uint a_flash_width; /* in bits */
103 };
104
105 extern struct a_config a_config;
106
107 #endif /* SANDPOINT_H */

  ViewVC Help
Powered by ViewVC 1.1.26