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