pmppc.h revision 1.2 1 /* $NetBSD: pmppc.h,v 1.2 2007/10/17 19:54:17 garbled Exp $ */
2
3 /*
4 * Copyright (c) 2002 The NetBSD Foundation, Inc.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart (at) augustsson.net) at Sandburst Corp.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the NetBSD
21 * Foundation, Inc. and its contributors.
22 * 4. Neither the name of The NetBSD Foundation nor the names of its
23 * contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 * POSSIBILITY OF SUCH DAMAGE.
37 */
38
39 /* SDRAM */
40 #define PMPPC_SDRAM_BASE 0x00000000
41
42 /* Flash */
43 #define PMPPC_FLASH_BASE 0x70000000
44
45 #define PMPPC_IO_START 0x7fe00000
46
47 /* CS8900A ethernet */
48 #define PMPPC_CS_IO_BASE 0x7fe00000
49 #define PMPPC_CS_IO 0x7fe00c00
50 #define PMPPC_CS_MEM 0x7fe04000
51
52 /* time-of-day clock */
53 #define PMPPC_RTC 0x7ff00000
54 #define PMPPC_RTC_SIZE 0x00002000
55
56 /* board config regs */
57 #define PMPPC_CONFIG0 0x7ff40000
58 #define PMPPC_CONFIG1 0x7ff40001
59 #define PMPPC_LEDS 0x7ff40002
60 #define PMPPC_RESET 0x7ff40003
61 #define PMPPC_RESET_SEQ_STEP1 0xac
62 #define PMPPC_RESET_SEQ_STEP2 0x1d
63 #define PMPPC_INTR 0x7ff40004
64
65 /* ROM */
66 #define PMPPC_ROM_BASE 0x7ff80000
67
68 void setleds(int leds);
69
70 /* Interrupts */
71 #define PMPPC_I_BPMC_INTA CPC_IB_EXT0 /* PCI INTA */
72 #define PMPPC_I_BPMC_INTB CPC_IB_EXT1 /* PCI INTB */
73 #define PMPPC_I_BPMC_INTC CPC_IB_EXT2 /* PCI INTC */
74 #define PMPPC_I_BPMC_INTD CPC_IB_EXT3 /* PCI INTD */
75 #define PMPPC_I_ETH_INT CPC_IB_EXT4 /* ethernet */
76 #define PMPPC_I_RTC_INT CPC_IB_EXT5 /* rtc */
77
78
79 /*
80 * The variables below are extracted from the config register located
81 * at PMPPC_CONFIG.
82 */
83 struct a_config {
84 int a_boot_device;
85 #define A_BOOT_ROM 0
86 #define A_BOOT_FLASH 1
87 int a_has_ecc;
88 uint a_mem_size; /* in bytes */
89 uint a_l2_cache;
90 #define A_CACHE_PARITY 0
91 #define A_CACHE_NO_PARITY 1
92 #define A_CACHE_NONE 3
93 uint a_bus_freq; /* in hz */
94 int a_is_monarch;
95 int a_has_eth;
96 int a_has_rtc;
97 uint a_flash_size; /* in bytes */
98 uint a_flash_width; /* in bits */
99 };
100
101 extern struct a_config a_config;
102