1 /***********************license start*************** 2 * Author: Cavium Networks 3 * 4 * Contact: support@caviumnetworks.com 5 * This file is part of the OCTEON SDK 6 * 7 * Copyright (c) 2003-2010 Cavium Networks 8 * 9 * This file is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License, Version 2, as 11 * published by the Free Software Foundation. 12 * 13 * This file is distributed in the hope that it will be useful, but 14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 16 * NONINFRINGEMENT. See the GNU General Public License for more 17 * details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this file; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 22 * or visit http://www.gnu.org/licenses/. 23 * 24 * This file may also be available under a different license from Cavium. 25 * Contact Cavium Networks for more information 26 ***********************license end**************************************/ 27 28 #ifndef __CVMX_LED_DEFS_H__ 29 #define __CVMX_LED_DEFS_H__ 30 31 #define CVMX_LED_BLINK (CVMX_ADD_IO_SEG(0x0001180000001A48ull)) 32 #define CVMX_LED_CLK_PHASE (CVMX_ADD_IO_SEG(0x0001180000001A08ull)) 33 #define CVMX_LED_CYLON (CVMX_ADD_IO_SEG(0x0001180000001AF8ull)) 34 #define CVMX_LED_DBG (CVMX_ADD_IO_SEG(0x0001180000001A18ull)) 35 #define CVMX_LED_EN (CVMX_ADD_IO_SEG(0x0001180000001A00ull)) 36 #define CVMX_LED_POLARITY (CVMX_ADD_IO_SEG(0x0001180000001A50ull)) 37 #define CVMX_LED_PRT (CVMX_ADD_IO_SEG(0x0001180000001A10ull)) 38 #define CVMX_LED_PRT_FMT (CVMX_ADD_IO_SEG(0x0001180000001A30ull)) 39 #define CVMX_LED_PRT_STATUSX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A80ull) + ((offset) & 7) * 8) 40 #define CVMX_LED_UDD_CNTX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A20ull) + ((offset) & 1) * 8) 41 #define CVMX_LED_UDD_DATX(offset) (CVMX_ADD_IO_SEG(0x0001180000001A38ull) + ((offset) & 1) * 8) 42 #define CVMX_LED_UDD_DAT_CLRX(offset) (CVMX_ADD_IO_SEG(0x0001180000001AC8ull) + ((offset) & 1) * 16) 43 #define CVMX_LED_UDD_DAT_SETX(offset) (CVMX_ADD_IO_SEG(0x0001180000001AC0ull) + ((offset) & 1) * 16) 44 45 union cvmx_led_blink { 46 uint64_t u64; 47 struct cvmx_led_blink_s { 48 uint64_t reserved_8_63:56; 49 uint64_t rate:8; 50 } s; 51 struct cvmx_led_blink_s cn38xx; 52 struct cvmx_led_blink_s cn38xxp2; 53 struct cvmx_led_blink_s cn56xx; 54 struct cvmx_led_blink_s cn56xxp1; 55 struct cvmx_led_blink_s cn58xx; 56 struct cvmx_led_blink_s cn58xxp1; 57 }; 58 59 union cvmx_led_clk_phase { 60 uint64_t u64; 61 struct cvmx_led_clk_phase_s { 62 uint64_t reserved_7_63:57; 63 uint64_t phase:7; 64 } s; 65 struct cvmx_led_clk_phase_s cn38xx; 66 struct cvmx_led_clk_phase_s cn38xxp2; 67 struct cvmx_led_clk_phase_s cn56xx; 68 struct cvmx_led_clk_phase_s cn56xxp1; 69 struct cvmx_led_clk_phase_s cn58xx; 70 struct cvmx_led_clk_phase_s cn58xxp1; 71 }; 72 73 union cvmx_led_cylon { 74 uint64_t u64; 75 struct cvmx_led_cylon_s { 76 uint64_t reserved_16_63:48; 77 uint64_t rate:16; 78 } s; 79 struct cvmx_led_cylon_s cn38xx; 80 struct cvmx_led_cylon_s cn38xxp2; 81 struct cvmx_led_cylon_s cn56xx; 82 struct cvmx_led_cylon_s cn56xxp1; 83 struct cvmx_led_cylon_s cn58xx; 84 struct cvmx_led_cylon_s cn58xxp1; 85 }; 86 87 union cvmx_led_dbg { 88 uint64_t u64; 89 struct cvmx_led_dbg_s { 90 uint64_t reserved_1_63:63; 91 uint64_t dbg_en:1; 92 } s; 93 struct cvmx_led_dbg_s cn38xx; 94 struct cvmx_led_dbg_s cn38xxp2; 95 struct cvmx_led_dbg_s cn56xx; 96 struct cvmx_led_dbg_s cn56xxp1; 97 struct cvmx_led_dbg_s cn58xx; 98 struct cvmx_led_dbg_s cn58xxp1; 99 }; 100 101 union cvmx_led_en { 102 uint64_t u64; 103 struct cvmx_led_en_s { 104 uint64_t reserved_1_63:63; 105 uint64_t en:1; 106 } s; 107 struct cvmx_led_en_s cn38xx; 108 struct cvmx_led_en_s cn38xxp2; 109 struct cvmx_led_en_s cn56xx; 110 struct cvmx_led_en_s cn56xxp1; 111 struct cvmx_led_en_s cn58xx; 112 struct cvmx_led_en_s cn58xxp1; 113 }; 114 115 union cvmx_led_polarity { 116 uint64_t u64; 117 struct cvmx_led_polarity_s { 118 uint64_t reserved_1_63:63; 119 uint64_t polarity:1; 120 } s; 121 struct cvmx_led_polarity_s cn38xx; 122 struct cvmx_led_polarity_s cn38xxp2; 123 struct cvmx_led_polarity_s cn56xx; 124 struct cvmx_led_polarity_s cn56xxp1; 125 struct cvmx_led_polarity_s cn58xx; 126 struct cvmx_led_polarity_s cn58xxp1; 127 }; 128 129 union cvmx_led_prt { 130 uint64_t u64; 131 struct cvmx_led_prt_s { 132 uint64_t reserved_8_63:56; 133 uint64_t prt_en:8; 134 } s; 135 struct cvmx_led_prt_s cn38xx; 136 struct cvmx_led_prt_s cn38xxp2; 137 struct cvmx_led_prt_s cn56xx; 138 struct cvmx_led_prt_s cn56xxp1; 139 struct cvmx_led_prt_s cn58xx; 140 struct cvmx_led_prt_s cn58xxp1; 141 }; 142 143 union cvmx_led_prt_fmt { 144 uint64_t u64; 145 struct cvmx_led_prt_fmt_s { 146 uint64_t reserved_4_63:60; 147 uint64_t format:4; 148 } s; 149 struct cvmx_led_prt_fmt_s cn38xx; 150 struct cvmx_led_prt_fmt_s cn38xxp2; 151 struct cvmx_led_prt_fmt_s cn56xx; 152 struct cvmx_led_prt_fmt_s cn56xxp1; 153 struct cvmx_led_prt_fmt_s cn58xx; 154 struct cvmx_led_prt_fmt_s cn58xxp1; 155 }; 156 157 union cvmx_led_prt_statusx { 158 uint64_t u64; 159 struct cvmx_led_prt_statusx_s { 160 uint64_t reserved_6_63:58; 161 uint64_t status:6; 162 } s; 163 struct cvmx_led_prt_statusx_s cn38xx; 164 struct cvmx_led_prt_statusx_s cn38xxp2; 165 struct cvmx_led_prt_statusx_s cn56xx; 166 struct cvmx_led_prt_statusx_s cn56xxp1; 167 struct cvmx_led_prt_statusx_s cn58xx; 168 struct cvmx_led_prt_statusx_s cn58xxp1; 169 }; 170 171 union cvmx_led_udd_cntx { 172 uint64_t u64; 173 struct cvmx_led_udd_cntx_s { 174 uint64_t reserved_6_63:58; 175 uint64_t cnt:6; 176 } s; 177 struct cvmx_led_udd_cntx_s cn38xx; 178 struct cvmx_led_udd_cntx_s cn38xxp2; 179 struct cvmx_led_udd_cntx_s cn56xx; 180 struct cvmx_led_udd_cntx_s cn56xxp1; 181 struct cvmx_led_udd_cntx_s cn58xx; 182 struct cvmx_led_udd_cntx_s cn58xxp1; 183 }; 184 185 union cvmx_led_udd_datx { 186 uint64_t u64; 187 struct cvmx_led_udd_datx_s { 188 uint64_t reserved_32_63:32; 189 uint64_t dat:32; 190 } s; 191 struct cvmx_led_udd_datx_s cn38xx; 192 struct cvmx_led_udd_datx_s cn38xxp2; 193 struct cvmx_led_udd_datx_s cn56xx; 194 struct cvmx_led_udd_datx_s cn56xxp1; 195 struct cvmx_led_udd_datx_s cn58xx; 196 struct cvmx_led_udd_datx_s cn58xxp1; 197 }; 198 199 union cvmx_led_udd_dat_clrx { 200 uint64_t u64; 201 struct cvmx_led_udd_dat_clrx_s { 202 uint64_t reserved_32_63:32; 203 uint64_t clr:32; 204 } s; 205 struct cvmx_led_udd_dat_clrx_s cn38xx; 206 struct cvmx_led_udd_dat_clrx_s cn38xxp2; 207 struct cvmx_led_udd_dat_clrx_s cn56xx; 208 struct cvmx_led_udd_dat_clrx_s cn56xxp1; 209 struct cvmx_led_udd_dat_clrx_s cn58xx; 210 struct cvmx_led_udd_dat_clrx_s cn58xxp1; 211 }; 212 213 union cvmx_led_udd_dat_setx { 214 uint64_t u64; 215 struct cvmx_led_udd_dat_setx_s { 216 uint64_t reserved_32_63:32; 217 uint64_t set:32; 218 } s; 219 struct cvmx_led_udd_dat_setx_s cn38xx; 220 struct cvmx_led_udd_dat_setx_s cn38xxp2; 221 struct cvmx_led_udd_dat_setx_s cn56xx; 222 struct cvmx_led_udd_dat_setx_s cn56xxp1; 223 struct cvmx_led_udd_dat_setx_s cn58xx; 224 struct cvmx_led_udd_dat_setx_s cn58xxp1; 225 }; 226 227 #endif 228