1 /* $NetBSD: octeon_bootbusreg.h,v 1.3 2020/06/22 12:26:11 simonb Exp $ */ 2 3 /* 4 * Copyright (c) 2007 Internet Initiative Japan, Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29 /* 30 * Boot-Bus Registers 31 */ 32 33 #ifndef _OCTEON_BOOTBUSREG_H_ 34 #define _OCTEON_BOOTBUSREG_H_ 35 36 /* ---- register addresses */ 37 38 #define MIO_BOOT_REG_CFG0 0x0001180000000000ULL 39 #define MIO_BOOT_REG_CFG1 0x0001180000000008ULL 40 #define MIO_BOOT_REG_CFG2 0x0001180000000010ULL 41 #define MIO_BOOT_REG_CFG3 0x0001180000000018ULL 42 #define MIO_BOOT_REG_CFG4 0x0001180000000020ULL 43 #define MIO_BOOT_REG_CFG5 0x0001180000000028ULL 44 #define MIO_BOOT_REG_CFG6 0x0001180000000030ULL 45 #define MIO_BOOT_REG_CFG7 0x0001180000000038ULL 46 #define MIO_BOOT_REG_TIM0 0x0001180000000040ULL 47 #define MIO_BOOT_REG_TIM1 0x0001180000000048ULL 48 #define MIO_BOOT_REG_TIM2 0x0001180000000050ULL 49 #define MIO_BOOT_REG_TIM3 0x0001180000000058ULL 50 #define MIO_BOOT_REG_TIM4 0x0001180000000060ULL 51 #define MIO_BOOT_REG_TIM5 0x0001180000000068ULL 52 #define MIO_BOOT_REG_TIM6 0x0001180000000070ULL 53 #define MIO_BOOT_REG_TIM7 0x0001180000000078ULL 54 #define MIO_BOOT_LOC_CFG0 0x0001180000000080ULL 55 #define MIO_BOOT_LOC_CFG1 0x0001180000000088ULL 56 #define MIO_BOOT_LOC_ADR 0x0001180000000090ULL 57 #define MIO_BOOT_LOC_DAT 0x0001180000000098ULL 58 #define MIO_BOOT_ERR 0x00011800000000a0ULL 59 #define MIO_BOOT_INT 0x00011800000000a8ULL 60 #define MIO_BOOT_THR 0x00011800000000b0ULL 61 #define MIO_BOOT_BIST_STAT 0x00011800000000f8ULL 62 63 /* ---- register bits */ 64 65 #define MIO_BOOT_REG_CFGN_XXX_63_37 UINT64_C(0xffffffe000000000) 66 #define MIO_BOOT_REG_CFGN_SAM UINT64_C(0x0000001000000000) 67 #define MIO_BOOT_REG_CFGN_WE_EXT UINT64_C(0x0000000c00000000) 68 #define MIO_BOOT_REG_CFGN_OE_EXT UINT64_C(0x0000000300000000) 69 #define MIO_BOOT_REG_CFGN_EN UINT64_C(0x0000000080000000) 70 #define MIO_BOOT_REG_CFGN_OR UINT64_C(0x0000000040000000) 71 #define MIO_BOOT_REG_CFGN_ALE UINT64_C(0x0000000020000000) 72 #define MIO_BOOT_REG_CFGN_WIDTH UINT64_C(0x0000000010000000) 73 #define MIO_BOOT_REG_CFGN_SIZE UINT64_C(0x000000000fff0000) 74 #define MIO_BOOT_REG_CFGN_BASE UINT64_C(0x000000000000ffff) 75 76 #define MIO_BOOT_REG_TIMN_PAGEM UINT64_C(0x8000000000000000) 77 #define MIO_BOOT_REG_TIMN_WAITM UINT64_C(0x4000000000000000) 78 #define MIO_BOOT_REG_TIMN_PAGES UINT64_C(0x3000000000000000) 79 #define MIO_BOOT_REG_TIMN_ALE UINT64_C(0x0fc0000000000000) 80 #define MIO_BOOT_REG_TIMN_PAGE UINT64_C(0x003f000000000000) 81 #define MIO_BOOT_REG_TIMN_WAIT UINT64_C(0x0000fc0000000000) 82 #define MIO_BOOT_REG_TIMN_PAUSE UINT64_C(0x000003f000000000) 83 #define MIO_BOOT_REG_TIMN_WR_HLD UINT64_C(0x0000000fc0000000) 84 #define MIO_BOOT_REG_TIMN_RD_HLD UINT64_C(0x000000003f000000) 85 #define MIO_BOOT_REG_TIMN_WE UINT64_C(0x0000000000fc0000) 86 #define MIO_BOOT_REG_TIMN_OE UINT64_C(0x000000000003f000) 87 #define MIO_BOOT_REG_TIMN_CE UINT64_C(0x0000000000000fc0) 88 #define MIO_BOOT_REG_TIMN_ADR UINT64_C(0x000000000000003f) 89 90 #define MIO_BOOT_LOC_CFGN_XXX_63_32 UINT64_C(0xffffffff00000000) 91 #define MIO_BOOT_LOC_CFGN_EN UINT64_C(0x0000000080000000) 92 #define MIO_BOOT_LOC_CFGN_XXX_30_28 UINT64_C(0x0000000070000000) 93 #define MIO_BOOT_LOC_CFGN_BASE UINT64_C(0x000000000ffffff8) 94 #define MIO_BOOT_LOC_CFGN_XXX_2_0 UINT64_C(0x0000000000000007) 95 96 #define MIO_BOOT_LOC_ADR_XXX_63_8 UINT64_C(0xffffffffffffff00) 97 #define MIO_BOOT_LOC_ADR_ADR UINT64_C(0x00000000000000f8) 98 #define MIO_BOOT_LOC_ADR_XXX_2_0 UINT64_C(0x0000000000000007) 99 100 #define MIO_BOOT_ERR_XXX_63_2 UINT64_C(0xfffffffffffffffc) 101 #define MIO_BOOT_ERR_WAIT_ERR UINT64_C(0x0000000000000002) 102 #define MIO_BOOT_ERR_ADR_ERR UINT64_C(0x0000000000000001) 103 104 #define MIO_BOOT_INT_XXX_63_2 UINT64_C(0xfffffffffffffffc) 105 #define MIO_BOOT_INT_WAIT_INT UINT64_C(0x0000000000000002) 106 #define MIO_BOOT_INT_ADR_INT UINT64_C(0x0000000000000001) 107 108 #define MIO_BOOT_THR_XXX_63_14 UINT64_C(0xffffffffffffc000) 109 #define MIO_BOOT_THR_FIF_CNT UINT64_C(0x0000000000003f00) 110 #define MIO_BOOT_THR_XXX_7_6 UINT64_C(0x00000000000000c0) 111 #define MIO_BOOT_THR_FIF_THR UINT64_C(0x000000000000003f) 112 113 #define MIO_BOOT_BIST_STAT_XXX_63_4 UINT64_C(0xfffffffffffffff0) 114 #define MIO_BOOT_BIST_STAT_NCBO_1 UINT64_C(0x0000000000000008) 115 #define MIO_BOOT_BIST_STAT_NCBO_0 UINT64_C(0x0000000000000004) 116 #define MIO_BOOT_BIST_STAT_LOC UINT64_C(0x0000000000000002) 117 #define MIO_BOOT_BIST_STAT_NCBI UINT64_C(0x0000000000000001) 118 119 /* ---- bus_space */ 120 121 #define MIO_BOOT_REG_CFG0_OFFSET 0x0000 122 #define MIO_BOOT_REG_CFG1_OFFSET 0x0008 123 #define MIO_BOOT_REG_CFG2_OFFSET 0x0010 124 #define MIO_BOOT_REG_CFG3_OFFSET 0x0018 125 #define MIO_BOOT_REG_CFG4_OFFSET 0x0020 126 #define MIO_BOOT_REG_CFG5_OFFSET 0x0028 127 #define MIO_BOOT_REG_CFG6_OFFSET 0x0030 128 #define MIO_BOOT_REG_CFG7_OFFSET 0x0038 129 #define MIO_BOOT_REG_TIM0_OFFSET 0x0040 130 #define MIO_BOOT_REG_TIM1_OFFSET 0x0048 131 #define MIO_BOOT_REG_TIM2_OFFSET 0x0050 132 #define MIO_BOOT_REG_TIM3_OFFSET 0x0058 133 #define MIO_BOOT_REG_TIM4_OFFSET 0x0060 134 #define MIO_BOOT_REG_TIM5_OFFSET 0x0068 135 #define MIO_BOOT_REG_TIM6_OFFSET 0x0070 136 #define MIO_BOOT_REG_TIM7_OFFSET 0x0078 137 #define MIO_BOOT_LOC_CFG0_OFFSET 0x0080 138 #define MIO_BOOT_LOC_CFG1_OFFSET 0x0088 139 #define MIO_BOOT_LOC_ADR_OFFSET 0x0090 140 #define MIO_BOOT_LOC_DAT_OFFSET 0x0098 141 #define MIO_BOOT_ERR_OFFSET 0x00a0 142 #define MIO_BOOT_INT_OFFSET 0x00a8 143 #define MIO_BOOT_THR_OFFSET 0x00b0 144 #define MIO_BOOT_BIST_STAT_OFFSET 0x00f8 145 146 #endif /* _OCTEON_BOOTBUSREG_H_ */ 147