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