![]() |
|
|||
0001 /***********************license start*************** 0002 * Author: Cavium Networks 0003 * 0004 * Contact: support@caviumnetworks.com 0005 * This file is part of the OCTEON SDK 0006 * 0007 * Copyright (c) 2003-2008 Cavium Networks 0008 * 0009 * This file is free software; you can redistribute it and/or modify 0010 * it under the terms of the GNU General Public License, Version 2, as 0011 * published by the Free Software Foundation. 0012 * 0013 * This file is distributed in the hope that it will be useful, but 0014 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 0015 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or 0016 * NONINFRINGEMENT. See the GNU General Public License for more 0017 * details. 0018 * 0019 * You should have received a copy of the GNU General Public License 0020 * along with this file; if not, write to the Free Software 0021 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 0022 * or visit http://www.gnu.org/licenses/. 0023 * 0024 * This file may also be available under a different license from Cavium. 0025 * Contact Cavium Networks for more information 0026 ***********************license end**************************************/ 0027 0028 /* 0029 * Interface to the hardware Fetch and Add Unit. 0030 */ 0031 0032 #ifndef __CVMX_FAU_H__ 0033 #define __CVMX_FAU_H__ 0034 0035 /* 0036 * Octeon Fetch and Add Unit (FAU) 0037 */ 0038 0039 #define CVMX_FAU_LOAD_IO_ADDRESS cvmx_build_io_address(0x1e, 0) 0040 #define CVMX_FAU_BITS_SCRADDR 63, 56 0041 #define CVMX_FAU_BITS_LEN 55, 48 0042 #define CVMX_FAU_BITS_INEVAL 35, 14 0043 #define CVMX_FAU_BITS_TAGWAIT 13, 13 0044 #define CVMX_FAU_BITS_NOADD 13, 13 0045 #define CVMX_FAU_BITS_SIZE 12, 11 0046 #define CVMX_FAU_BITS_REGISTER 10, 0 0047 0048 typedef enum { 0049 CVMX_FAU_OP_SIZE_8 = 0, 0050 CVMX_FAU_OP_SIZE_16 = 1, 0051 CVMX_FAU_OP_SIZE_32 = 2, 0052 CVMX_FAU_OP_SIZE_64 = 3 0053 } cvmx_fau_op_size_t; 0054 0055 /** 0056 * Tagwait return definition. If a timeout occurs, the error 0057 * bit will be set. Otherwise the value of the register before 0058 * the update will be returned. 0059 */ 0060 typedef struct { 0061 uint64_t error:1; 0062 int64_t value:63; 0063 } cvmx_fau_tagwait64_t; 0064 0065 /** 0066 * Tagwait return definition. If a timeout occurs, the error 0067 * bit will be set. Otherwise the value of the register before 0068 * the update will be returned. 0069 */ 0070 typedef struct { 0071 uint64_t error:1; 0072 int32_t value:31; 0073 } cvmx_fau_tagwait32_t; 0074 0075 /** 0076 * Tagwait return definition. If a timeout occurs, the error 0077 * bit will be set. Otherwise the value of the register before 0078 * the update will be returned. 0079 */ 0080 typedef struct { 0081 uint64_t error:1; 0082 int16_t value:15; 0083 } cvmx_fau_tagwait16_t; 0084 0085 /** 0086 * Tagwait return definition. If a timeout occurs, the error 0087 * bit will be set. Otherwise the value of the register before 0088 * the update will be returned. 0089 */ 0090 typedef struct { 0091 uint64_t error:1; 0092 int8_t value:7; 0093 } cvmx_fau_tagwait8_t; 0094 0095 /** 0096 * Asynchronous tagwait return definition. If a timeout occurs, 0097 * the error bit will be set. Otherwise the value of the 0098 * register before the update will be returned. 0099 */ 0100 typedef union { 0101 uint64_t u64; 0102 struct { 0103 uint64_t invalid:1; 0104 uint64_t data:63; /* unpredictable if invalid is set */ 0105 } s; 0106 } cvmx_fau_async_tagwait_result_t; 0107 0108 #ifdef __BIG_ENDIAN_BITFIELD 0109 #define SWIZZLE_8 0 0110 #define SWIZZLE_16 0 0111 #define SWIZZLE_32 0 0112 #else 0113 #define SWIZZLE_8 0x7 0114 #define SWIZZLE_16 0x6 0115 #define SWIZZLE_32 0x4 0116 #endif 0117 0118 /** 0119 * Builds a store I/O address for writing to the FAU 0120 * 0121 * @noadd: 0 = Store value is atomically added to the current value 0122 * 1 = Store value is atomically written over the current value 0123 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0124 * - Step by 2 for 16 bit access. 0125 * - Step by 4 for 32 bit access. 0126 * - Step by 8 for 64 bit access. 0127 * Returns Address to store for atomic update 0128 */ 0129 static inline uint64_t __cvmx_fau_store_address(uint64_t noadd, uint64_t reg) 0130 { 0131 return CVMX_ADD_IO_SEG(CVMX_FAU_LOAD_IO_ADDRESS) | 0132 cvmx_build_bits(CVMX_FAU_BITS_NOADD, noadd) | 0133 cvmx_build_bits(CVMX_FAU_BITS_REGISTER, reg); 0134 } 0135 0136 /** 0137 * Builds a I/O address for accessing the FAU 0138 * 0139 * @tagwait: Should the atomic add wait for the current tag switch 0140 * operation to complete. 0141 * - 0 = Don't wait 0142 * - 1 = Wait for tag switch to complete 0143 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0144 * - Step by 2 for 16 bit access. 0145 * - Step by 4 for 32 bit access. 0146 * - Step by 8 for 64 bit access. 0147 * @value: Signed value to add. 0148 * Note: When performing 32 and 64 bit access, only the low 0149 * 22 bits are available. 0150 * Returns Address to read from for atomic update 0151 */ 0152 static inline uint64_t __cvmx_fau_atomic_address(uint64_t tagwait, uint64_t reg, 0153 int64_t value) 0154 { 0155 return CVMX_ADD_IO_SEG(CVMX_FAU_LOAD_IO_ADDRESS) | 0156 cvmx_build_bits(CVMX_FAU_BITS_INEVAL, value) | 0157 cvmx_build_bits(CVMX_FAU_BITS_TAGWAIT, tagwait) | 0158 cvmx_build_bits(CVMX_FAU_BITS_REGISTER, reg); 0159 } 0160 0161 /** 0162 * Perform an atomic 64 bit add 0163 * 0164 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0165 * - Step by 8 for 64 bit access. 0166 * @value: Signed value to add. 0167 * Note: Only the low 22 bits are available. 0168 * Returns Value of the register before the update 0169 */ 0170 static inline int64_t cvmx_fau_fetch_and_add64(cvmx_fau_reg_64_t reg, 0171 int64_t value) 0172 { 0173 return cvmx_read64_int64(__cvmx_fau_atomic_address(0, reg, value)); 0174 } 0175 0176 /** 0177 * Perform an atomic 32 bit add 0178 * 0179 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0180 * - Step by 4 for 32 bit access. 0181 * @value: Signed value to add. 0182 * Note: Only the low 22 bits are available. 0183 * Returns Value of the register before the update 0184 */ 0185 static inline int32_t cvmx_fau_fetch_and_add32(cvmx_fau_reg_32_t reg, 0186 int32_t value) 0187 { 0188 reg ^= SWIZZLE_32; 0189 return cvmx_read64_int32(__cvmx_fau_atomic_address(0, reg, value)); 0190 } 0191 0192 /** 0193 * Perform an atomic 16 bit add 0194 * 0195 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0196 * - Step by 2 for 16 bit access. 0197 * @value: Signed value to add. 0198 * Returns Value of the register before the update 0199 */ 0200 static inline int16_t cvmx_fau_fetch_and_add16(cvmx_fau_reg_16_t reg, 0201 int16_t value) 0202 { 0203 reg ^= SWIZZLE_16; 0204 return cvmx_read64_int16(__cvmx_fau_atomic_address(0, reg, value)); 0205 } 0206 0207 /** 0208 * Perform an atomic 8 bit add 0209 * 0210 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0211 * @value: Signed value to add. 0212 * Returns Value of the register before the update 0213 */ 0214 static inline int8_t cvmx_fau_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) 0215 { 0216 reg ^= SWIZZLE_8; 0217 return cvmx_read64_int8(__cvmx_fau_atomic_address(0, reg, value)); 0218 } 0219 0220 /** 0221 * Perform an atomic 64 bit add after the current tag switch 0222 * completes 0223 * 0224 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0225 * - Step by 8 for 64 bit access. 0226 * @value: Signed value to add. 0227 * Note: Only the low 22 bits are available. 0228 * Returns If a timeout occurs, the error bit will be set. Otherwise 0229 * the value of the register before the update will be 0230 * returned 0231 */ 0232 static inline cvmx_fau_tagwait64_t 0233 cvmx_fau_tagwait_fetch_and_add64(cvmx_fau_reg_64_t reg, int64_t value) 0234 { 0235 union { 0236 uint64_t i64; 0237 cvmx_fau_tagwait64_t t; 0238 } result; 0239 result.i64 = 0240 cvmx_read64_int64(__cvmx_fau_atomic_address(1, reg, value)); 0241 return result.t; 0242 } 0243 0244 /** 0245 * Perform an atomic 32 bit add after the current tag switch 0246 * completes 0247 * 0248 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0249 * - Step by 4 for 32 bit access. 0250 * @value: Signed value to add. 0251 * Note: Only the low 22 bits are available. 0252 * Returns If a timeout occurs, the error bit will be set. Otherwise 0253 * the value of the register before the update will be 0254 * returned 0255 */ 0256 static inline cvmx_fau_tagwait32_t 0257 cvmx_fau_tagwait_fetch_and_add32(cvmx_fau_reg_32_t reg, int32_t value) 0258 { 0259 union { 0260 uint64_t i32; 0261 cvmx_fau_tagwait32_t t; 0262 } result; 0263 reg ^= SWIZZLE_32; 0264 result.i32 = 0265 cvmx_read64_int32(__cvmx_fau_atomic_address(1, reg, value)); 0266 return result.t; 0267 } 0268 0269 /** 0270 * Perform an atomic 16 bit add after the current tag switch 0271 * completes 0272 * 0273 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0274 * - Step by 2 for 16 bit access. 0275 * @value: Signed value to add. 0276 * Returns If a timeout occurs, the error bit will be set. Otherwise 0277 * the value of the register before the update will be 0278 * returned 0279 */ 0280 static inline cvmx_fau_tagwait16_t 0281 cvmx_fau_tagwait_fetch_and_add16(cvmx_fau_reg_16_t reg, int16_t value) 0282 { 0283 union { 0284 uint64_t i16; 0285 cvmx_fau_tagwait16_t t; 0286 } result; 0287 reg ^= SWIZZLE_16; 0288 result.i16 = 0289 cvmx_read64_int16(__cvmx_fau_atomic_address(1, reg, value)); 0290 return result.t; 0291 } 0292 0293 /** 0294 * Perform an atomic 8 bit add after the current tag switch 0295 * completes 0296 * 0297 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0298 * @value: Signed value to add. 0299 * Returns If a timeout occurs, the error bit will be set. Otherwise 0300 * the value of the register before the update will be 0301 * returned 0302 */ 0303 static inline cvmx_fau_tagwait8_t 0304 cvmx_fau_tagwait_fetch_and_add8(cvmx_fau_reg_8_t reg, int8_t value) 0305 { 0306 union { 0307 uint64_t i8; 0308 cvmx_fau_tagwait8_t t; 0309 } result; 0310 reg ^= SWIZZLE_8; 0311 result.i8 = cvmx_read64_int8(__cvmx_fau_atomic_address(1, reg, value)); 0312 return result.t; 0313 } 0314 0315 /** 0316 * Builds I/O data for async operations 0317 * 0318 * @scraddr: Scratch pad byte address to write to. Must be 8 byte aligned 0319 * @value: Signed value to add. 0320 * Note: When performing 32 and 64 bit access, only the low 0321 * 22 bits are available. 0322 * @tagwait: Should the atomic add wait for the current tag switch 0323 * operation to complete. 0324 * - 0 = Don't wait 0325 * - 1 = Wait for tag switch to complete 0326 * @size: The size of the operation: 0327 * - CVMX_FAU_OP_SIZE_8 (0) = 8 bits 0328 * - CVMX_FAU_OP_SIZE_16 (1) = 16 bits 0329 * - CVMX_FAU_OP_SIZE_32 (2) = 32 bits 0330 * - CVMX_FAU_OP_SIZE_64 (3) = 64 bits 0331 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0332 * - Step by 2 for 16 bit access. 0333 * - Step by 4 for 32 bit access. 0334 * - Step by 8 for 64 bit access. 0335 * Returns Data to write using cvmx_send_single 0336 */ 0337 static inline uint64_t __cvmx_fau_iobdma_data(uint64_t scraddr, int64_t value, 0338 uint64_t tagwait, 0339 cvmx_fau_op_size_t size, 0340 uint64_t reg) 0341 { 0342 return CVMX_FAU_LOAD_IO_ADDRESS | 0343 cvmx_build_bits(CVMX_FAU_BITS_SCRADDR, scraddr >> 3) | 0344 cvmx_build_bits(CVMX_FAU_BITS_LEN, 1) | 0345 cvmx_build_bits(CVMX_FAU_BITS_INEVAL, value) | 0346 cvmx_build_bits(CVMX_FAU_BITS_TAGWAIT, tagwait) | 0347 cvmx_build_bits(CVMX_FAU_BITS_SIZE, size) | 0348 cvmx_build_bits(CVMX_FAU_BITS_REGISTER, reg); 0349 } 0350 0351 /** 0352 * Perform an async atomic 64 bit add. The old value is 0353 * placed in the scratch memory at byte address scraddr. 0354 * 0355 * @scraddr: Scratch memory byte address to put response in. 0356 * Must be 8 byte aligned. 0357 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0358 * - Step by 8 for 64 bit access. 0359 * @value: Signed value to add. 0360 * Note: Only the low 22 bits are available. 0361 * Returns Placed in the scratch pad register 0362 */ 0363 static inline void cvmx_fau_async_fetch_and_add64(uint64_t scraddr, 0364 cvmx_fau_reg_64_t reg, 0365 int64_t value) 0366 { 0367 cvmx_send_single(__cvmx_fau_iobdma_data 0368 (scraddr, value, 0, CVMX_FAU_OP_SIZE_64, reg)); 0369 } 0370 0371 /** 0372 * Perform an async atomic 32 bit add. The old value is 0373 * placed in the scratch memory at byte address scraddr. 0374 * 0375 * @scraddr: Scratch memory byte address to put response in. 0376 * Must be 8 byte aligned. 0377 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0378 * - Step by 4 for 32 bit access. 0379 * @value: Signed value to add. 0380 * Note: Only the low 22 bits are available. 0381 * Returns Placed in the scratch pad register 0382 */ 0383 static inline void cvmx_fau_async_fetch_and_add32(uint64_t scraddr, 0384 cvmx_fau_reg_32_t reg, 0385 int32_t value) 0386 { 0387 cvmx_send_single(__cvmx_fau_iobdma_data 0388 (scraddr, value, 0, CVMX_FAU_OP_SIZE_32, reg)); 0389 } 0390 0391 /** 0392 * Perform an async atomic 16 bit add. The old value is 0393 * placed in the scratch memory at byte address scraddr. 0394 * 0395 * @scraddr: Scratch memory byte address to put response in. 0396 * Must be 8 byte aligned. 0397 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0398 * - Step by 2 for 16 bit access. 0399 * @value: Signed value to add. 0400 * Returns Placed in the scratch pad register 0401 */ 0402 static inline void cvmx_fau_async_fetch_and_add16(uint64_t scraddr, 0403 cvmx_fau_reg_16_t reg, 0404 int16_t value) 0405 { 0406 cvmx_send_single(__cvmx_fau_iobdma_data 0407 (scraddr, value, 0, CVMX_FAU_OP_SIZE_16, reg)); 0408 } 0409 0410 /** 0411 * Perform an async atomic 8 bit add. The old value is 0412 * placed in the scratch memory at byte address scraddr. 0413 * 0414 * @scraddr: Scratch memory byte address to put response in. 0415 * Must be 8 byte aligned. 0416 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0417 * @value: Signed value to add. 0418 * Returns Placed in the scratch pad register 0419 */ 0420 static inline void cvmx_fau_async_fetch_and_add8(uint64_t scraddr, 0421 cvmx_fau_reg_8_t reg, 0422 int8_t value) 0423 { 0424 cvmx_send_single(__cvmx_fau_iobdma_data 0425 (scraddr, value, 0, CVMX_FAU_OP_SIZE_8, reg)); 0426 } 0427 0428 /** 0429 * Perform an async atomic 64 bit add after the current tag 0430 * switch completes. 0431 * 0432 * @scraddr: Scratch memory byte address to put response in. Must be 0433 * 8 byte aligned. If a timeout occurs, the error bit (63) 0434 * will be set. Otherwise the value of the register before 0435 * the update will be returned 0436 * 0437 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0438 * - Step by 8 for 64 bit access. 0439 * @value: Signed value to add. 0440 * Note: Only the low 22 bits are available. 0441 * Returns Placed in the scratch pad register 0442 */ 0443 static inline void cvmx_fau_async_tagwait_fetch_and_add64(uint64_t scraddr, 0444 cvmx_fau_reg_64_t reg, 0445 int64_t value) 0446 { 0447 cvmx_send_single(__cvmx_fau_iobdma_data 0448 (scraddr, value, 1, CVMX_FAU_OP_SIZE_64, reg)); 0449 } 0450 0451 /** 0452 * Perform an async atomic 32 bit add after the current tag 0453 * switch completes. 0454 * 0455 * @scraddr: Scratch memory byte address to put response in. Must be 0456 * 8 byte aligned. If a timeout occurs, the error bit (63) 0457 * will be set. Otherwise the value of the register before 0458 * the update will be returned 0459 * 0460 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0461 * - Step by 4 for 32 bit access. 0462 * @value: Signed value to add. 0463 * Note: Only the low 22 bits are available. 0464 * Returns Placed in the scratch pad register 0465 */ 0466 static inline void cvmx_fau_async_tagwait_fetch_and_add32(uint64_t scraddr, 0467 cvmx_fau_reg_32_t reg, 0468 int32_t value) 0469 { 0470 cvmx_send_single(__cvmx_fau_iobdma_data 0471 (scraddr, value, 1, CVMX_FAU_OP_SIZE_32, reg)); 0472 } 0473 0474 /** 0475 * Perform an async atomic 16 bit add after the current tag 0476 * switch completes. 0477 * 0478 * @scraddr: Scratch memory byte address to put response in. Must be 0479 * 8 byte aligned. If a timeout occurs, the error bit (63) 0480 * will be set. Otherwise the value of the register before 0481 * the update will be returned 0482 * 0483 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0484 * - Step by 2 for 16 bit access. 0485 * @value: Signed value to add. 0486 * 0487 * Returns Placed in the scratch pad register 0488 */ 0489 static inline void cvmx_fau_async_tagwait_fetch_and_add16(uint64_t scraddr, 0490 cvmx_fau_reg_16_t reg, 0491 int16_t value) 0492 { 0493 cvmx_send_single(__cvmx_fau_iobdma_data 0494 (scraddr, value, 1, CVMX_FAU_OP_SIZE_16, reg)); 0495 } 0496 0497 /** 0498 * Perform an async atomic 8 bit add after the current tag 0499 * switch completes. 0500 * 0501 * @scraddr: Scratch memory byte address to put response in. Must be 0502 * 8 byte aligned. If a timeout occurs, the error bit (63) 0503 * will be set. Otherwise the value of the register before 0504 * the update will be returned 0505 * 0506 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0507 * @value: Signed value to add. 0508 * 0509 * Returns Placed in the scratch pad register 0510 */ 0511 static inline void cvmx_fau_async_tagwait_fetch_and_add8(uint64_t scraddr, 0512 cvmx_fau_reg_8_t reg, 0513 int8_t value) 0514 { 0515 cvmx_send_single(__cvmx_fau_iobdma_data 0516 (scraddr, value, 1, CVMX_FAU_OP_SIZE_8, reg)); 0517 } 0518 0519 /** 0520 * Perform an atomic 64 bit add 0521 * 0522 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0523 * - Step by 8 for 64 bit access. 0524 * @value: Signed value to add. 0525 */ 0526 static inline void cvmx_fau_atomic_add64(cvmx_fau_reg_64_t reg, int64_t value) 0527 { 0528 cvmx_write64_int64(__cvmx_fau_store_address(0, reg), value); 0529 } 0530 0531 /** 0532 * Perform an atomic 32 bit add 0533 * 0534 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0535 * - Step by 4 for 32 bit access. 0536 * @value: Signed value to add. 0537 */ 0538 static inline void cvmx_fau_atomic_add32(cvmx_fau_reg_32_t reg, int32_t value) 0539 { 0540 reg ^= SWIZZLE_32; 0541 cvmx_write64_int32(__cvmx_fau_store_address(0, reg), value); 0542 } 0543 0544 /** 0545 * Perform an atomic 16 bit add 0546 * 0547 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0548 * - Step by 2 for 16 bit access. 0549 * @value: Signed value to add. 0550 */ 0551 static inline void cvmx_fau_atomic_add16(cvmx_fau_reg_16_t reg, int16_t value) 0552 { 0553 reg ^= SWIZZLE_16; 0554 cvmx_write64_int16(__cvmx_fau_store_address(0, reg), value); 0555 } 0556 0557 /** 0558 * Perform an atomic 8 bit add 0559 * 0560 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0561 * @value: Signed value to add. 0562 */ 0563 static inline void cvmx_fau_atomic_add8(cvmx_fau_reg_8_t reg, int8_t value) 0564 { 0565 reg ^= SWIZZLE_8; 0566 cvmx_write64_int8(__cvmx_fau_store_address(0, reg), value); 0567 } 0568 0569 /** 0570 * Perform an atomic 64 bit write 0571 * 0572 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0573 * - Step by 8 for 64 bit access. 0574 * @value: Signed value to write. 0575 */ 0576 static inline void cvmx_fau_atomic_write64(cvmx_fau_reg_64_t reg, int64_t value) 0577 { 0578 cvmx_write64_int64(__cvmx_fau_store_address(1, reg), value); 0579 } 0580 0581 /** 0582 * Perform an atomic 32 bit write 0583 * 0584 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0585 * - Step by 4 for 32 bit access. 0586 * @value: Signed value to write. 0587 */ 0588 static inline void cvmx_fau_atomic_write32(cvmx_fau_reg_32_t reg, int32_t value) 0589 { 0590 reg ^= SWIZZLE_32; 0591 cvmx_write64_int32(__cvmx_fau_store_address(1, reg), value); 0592 } 0593 0594 /** 0595 * Perform an atomic 16 bit write 0596 * 0597 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0598 * - Step by 2 for 16 bit access. 0599 * @value: Signed value to write. 0600 */ 0601 static inline void cvmx_fau_atomic_write16(cvmx_fau_reg_16_t reg, int16_t value) 0602 { 0603 reg ^= SWIZZLE_16; 0604 cvmx_write64_int16(__cvmx_fau_store_address(1, reg), value); 0605 } 0606 0607 /** 0608 * Perform an atomic 8 bit write 0609 * 0610 * @reg: FAU atomic register to access. 0 <= reg < 2048. 0611 * @value: Signed value to write. 0612 */ 0613 static inline void cvmx_fau_atomic_write8(cvmx_fau_reg_8_t reg, int8_t value) 0614 { 0615 reg ^= SWIZZLE_8; 0616 cvmx_write64_int8(__cvmx_fau_store_address(1, reg), value); 0617 } 0618 0619 #endif /* __CVMX_FAU_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |