1 1.3 martin /* $NetBSD: pmppc.h,v 1.3 2008/04/28 20:23:17 martin 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 * 19 1.2 garbled * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20 1.2 garbled * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 1.2 garbled * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 1.2 garbled * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 1.2 garbled * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 1.2 garbled * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 1.2 garbled * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 1.2 garbled * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 1.2 garbled * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 1.2 garbled * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 1.2 garbled * POSSIBILITY OF SUCH DAMAGE. 30 1.2 garbled */ 31 1.2 garbled 32 1.2 garbled /* SDRAM */ 33 1.2 garbled #define PMPPC_SDRAM_BASE 0x00000000 34 1.2 garbled 35 1.2 garbled /* Flash */ 36 1.2 garbled #define PMPPC_FLASH_BASE 0x70000000 37 1.2 garbled 38 1.2 garbled #define PMPPC_IO_START 0x7fe00000 39 1.2 garbled 40 1.2 garbled /* CS8900A ethernet */ 41 1.2 garbled #define PMPPC_CS_IO_BASE 0x7fe00000 42 1.2 garbled #define PMPPC_CS_IO 0x7fe00c00 43 1.2 garbled #define PMPPC_CS_MEM 0x7fe04000 44 1.2 garbled 45 1.2 garbled /* time-of-day clock */ 46 1.2 garbled #define PMPPC_RTC 0x7ff00000 47 1.2 garbled #define PMPPC_RTC_SIZE 0x00002000 48 1.2 garbled 49 1.2 garbled /* board config regs */ 50 1.2 garbled #define PMPPC_CONFIG0 0x7ff40000 51 1.2 garbled #define PMPPC_CONFIG1 0x7ff40001 52 1.2 garbled #define PMPPC_LEDS 0x7ff40002 53 1.2 garbled #define PMPPC_RESET 0x7ff40003 54 1.2 garbled #define PMPPC_RESET_SEQ_STEP1 0xac 55 1.2 garbled #define PMPPC_RESET_SEQ_STEP2 0x1d 56 1.2 garbled #define PMPPC_INTR 0x7ff40004 57 1.2 garbled 58 1.2 garbled /* ROM */ 59 1.2 garbled #define PMPPC_ROM_BASE 0x7ff80000 60 1.2 garbled 61 1.2 garbled void setleds(int leds); 62 1.2 garbled 63 1.2 garbled /* Interrupts */ 64 1.2 garbled #define PMPPC_I_BPMC_INTA CPC_IB_EXT0 /* PCI INTA */ 65 1.2 garbled #define PMPPC_I_BPMC_INTB CPC_IB_EXT1 /* PCI INTB */ 66 1.2 garbled #define PMPPC_I_BPMC_INTC CPC_IB_EXT2 /* PCI INTC */ 67 1.2 garbled #define PMPPC_I_BPMC_INTD CPC_IB_EXT3 /* PCI INTD */ 68 1.2 garbled #define PMPPC_I_ETH_INT CPC_IB_EXT4 /* ethernet */ 69 1.2 garbled #define PMPPC_I_RTC_INT CPC_IB_EXT5 /* rtc */ 70 1.2 garbled 71 1.2 garbled 72 1.2 garbled /* 73 1.2 garbled * The variables below are extracted from the config register located 74 1.2 garbled * at PMPPC_CONFIG. 75 1.2 garbled */ 76 1.2 garbled struct a_config { 77 1.2 garbled int a_boot_device; 78 1.2 garbled #define A_BOOT_ROM 0 79 1.2 garbled #define A_BOOT_FLASH 1 80 1.2 garbled int a_has_ecc; 81 1.2 garbled uint a_mem_size; /* in bytes */ 82 1.2 garbled uint a_l2_cache; 83 1.2 garbled #define A_CACHE_PARITY 0 84 1.2 garbled #define A_CACHE_NO_PARITY 1 85 1.2 garbled #define A_CACHE_NONE 3 86 1.2 garbled uint a_bus_freq; /* in hz */ 87 1.2 garbled int a_is_monarch; 88 1.2 garbled int a_has_eth; 89 1.2 garbled int a_has_rtc; 90 1.2 garbled uint a_flash_size; /* in bytes */ 91 1.2 garbled uint a_flash_width; /* in bits */ 92 1.2 garbled }; 93 1.2 garbled 94 1.2 garbled extern struct a_config a_config; 95