Lines Matching +full:16 +full:- +full:byte

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Hardware interface of the NX-GZIP compression accelerator
41 #define nx_get_time() (-1)
42 #define nx_get_freq() (-1)
50 * https://github.com/libnxz/power-gzip/blob/develop/doc/power_nx_gzip_um.pdf
65 * rembytecnt: remaining byte count
67 * spbc: source processed byte count
69 * tebc: target ending bit count; valid bits in the last byte
70 * tpbc: target processed byte count
77 } __aligned(16);
99 uint32_t ddebc; /* dde byte count */
101 } __aligned(16);
113 /* 16B CSB size. Written to 0 by DMA when it writes the CPB */
126 /* target processed byte count TPBC */
133 } __aligned(16);
150 } __aligned(16);
240 char in_dht_char[DHT_MAXSZ]; /* byte access */
290 union { /* byte[0:3] */
291 uint32_t gzip_fc; /* bits[24-31] */
293 uint32_t reserved1; /* byte[4:7] */
295 uint64_t csb_address; /* byte[8:15] */
310 struct nx_dde_t source_dde; /* byte[16:31] */
311 struct nx_dde_t target_dde; /* byte[32:47] */
312 volatile struct nx_ccb_t ccb; /* byte[48:63] */
314 /* byte[64:239] shift csb by 128 bytes out of the crb; csb was
318 union stamped_crb_t stamp; /* byte[64:79] */
335 #define size_mask(x) ((1U<<(x))-1)
368 #define send_wc_id_mask size_mask(16)
370 #define recv_wc_id_mask size_mask(16)
392 #define in_rembytecnt_mask size_mask(16)
399 #define out_subc_mask size_mask(16)
403 #define out_rembytecnt_mask size_mask(16)
428 #define getnn(ST, REG) ((be32toh(ST.REG) >> (31-REG##_offset)) \
430 #define getpnn(ST, REG) ((be32toh((ST)->REG) >> (31-REG##_offset)) \
433 #define getp32(ST, REG) (be32toh((ST)->REG))
435 #define getp64(ST, REG) (be64toh((ST)->REG))
438 << (31-REG##_offset)))
442 << (31-REG##_offset)))
448 #define clearp_dde(ST) do { (ST)->dde_count = (ST)->ddebc = 0; \
449 (ST)->ddead = 0; \
453 & REG##_mask) << (31-REG##_offset))))
454 #define putpnn(ST, REG, X) ((ST)->REG = htobe32(ungetp32(ST, REG) \
455 | (((X) & REG##_mask) << (31-REG##_offset))))
458 #define putp32(ST, REG, X) ((ST)->REG = htobe32(X))
460 #define putp64(ST, REG, X) ((ST)->REG = htobe64(X))
463 * Completion extension ce(0) ce(1) ce(2). Bits ce(3-7)
476 /* termination, output buffers may be modified, SPBC/TPBC invalid Fig.6-7 */
490 /* some CC=3 are partially completed, Table 6-8 */
494 /* Compression: when TPBC>SPBC then CC=64 Table 6-8; target didn't
498 /* Decompress SFBT combinations Tables 5-3, 6-4, 6-6 */
509 * select one of the two Byte Count Limits.
546 #define ERR_NX_PROTECT_WR 16
568 /* initial values for non-resume operations */
601 * assumes appending starts on a byte boundary; b is the final bit.
610 union { /* byte[0:3] */
611 uint32_t eft_fc; /* bits[29-31] */
613 uint32_t reserved1; /* byte[4:7] */
615 uint64_t csb_address; /* byte[8:15] */
630 struct nx_dde_t source_dde; /* byte[16:31] */
631 struct nx_dde_t target_dde; /* byte[32:47] */
632 struct nx_ccb_t ccb; /* byte[48:63] */
634 union nx_qw_t reserved64[3]; /* byte[64:96] */