/openbmc/linux/drivers/gpio/ |
H A D | gpio-xgene.c | 41 u32 bit_offset; in xgene_gpio_get() local 44 bit_offset = GPIO_BIT_OFFSET(offset); in xgene_gpio_get() 45 return !!(ioread32(chip->base + bank_offset) & BIT(bit_offset)); in xgene_gpio_get() 52 u32 setval, bit_offset; in __xgene_gpio_set() local 55 bit_offset = GPIO_BIT_OFFSET(offset) + XGENE_GPIOS_PER_BANK; in __xgene_gpio_set() 59 setval |= BIT(bit_offset); in __xgene_gpio_set() 61 setval &= ~BIT(bit_offset); in __xgene_gpio_set() 78 unsigned long bank_offset, bit_offset; in xgene_gpio_get_direction() local 81 bit_offset = GPIO_BIT_OFFSET(offset); in xgene_gpio_get_direction() 83 if (ioread32(chip->base + bank_offset) & BIT(bit_offset)) in xgene_gpio_get_direction() [all …]
|
/openbmc/linux/drivers/soc/tegra/fuse/ |
H A D | fuse-tegra30.c | 140 .bit_offset = 0, 146 .bit_offset = 0, 152 .bit_offset = 0, 158 .bit_offset = 0, 164 .bit_offset = 0, 170 .bit_offset = 0, 176 .bit_offset = 0, 182 .bit_offset = 0, 188 .bit_offset = 0, 194 .bit_offset = 0, [all …]
|
/openbmc/u-boot/cmd/ |
H A D | otp.c | 268 int bit_offset; in get_dw_bit() local 273 bit_offset = offset; in get_dw_bit() 276 bit_offset = offset - 32; in get_dw_bit() 278 if ((rid[i] >> bit_offset) & 0x1) in get_dw_bit() 464 static int verify_bit(u32 otp_addr, int bit_offset, int value) in verify_bit() argument 479 if (((ret[0] >> bit_offset) & 1) == value) in verify_bit() 484 if (((ret[1] >> bit_offset) & 1) == value) in verify_bit() 553 static int _otp_prog_bit(u32 value, u32 prog_address, u32 bit_offset) in _otp_prog_bit() argument 559 prog_bit = ~(0x1 << bit_offset); in _otp_prog_bit() 566 prog_bit = 0x1 << bit_offset; in _otp_prog_bit() [all …]
|
/openbmc/linux/drivers/pinctrl/ |
H A D | pinctrl-bm1880.c | 1017 u32 *regval, u32 bit_offset) in bm1880_pinconf_drv_set() argument 1030 _regval &= ~(width << bit_offset); in bm1880_pinconf_drv_set() 1031 _regval |= (0 << bit_offset); in bm1880_pinconf_drv_set() 1034 _regval &= ~(width << bit_offset); in bm1880_pinconf_drv_set() 1035 _regval |= (1 << bit_offset); in bm1880_pinconf_drv_set() 1038 _regval &= ~(width << bit_offset); in bm1880_pinconf_drv_set() 1039 _regval |= (2 << bit_offset); in bm1880_pinconf_drv_set() 1042 _regval &= ~(width << bit_offset); in bm1880_pinconf_drv_set() 1043 _regval |= (3 << bit_offset); in bm1880_pinconf_drv_set() 1046 _regval &= ~(width << bit_offset); in bm1880_pinconf_drv_set() [all …]
|
/openbmc/u-boot/arch/x86/cpu/quark/ |
H A D | acpi.c | 66 fadt->reset_reg.bit_offset = 0; in acpi_create_fadt() 79 fadt->x_pm1a_evt_blk.bit_offset = 0; in acpi_create_fadt() 86 fadt->x_pm1b_evt_blk.bit_offset = 0; in acpi_create_fadt() 93 fadt->x_pm1a_cnt_blk.bit_offset = 0; in acpi_create_fadt() 100 fadt->x_pm1b_cnt_blk.bit_offset = 0; in acpi_create_fadt() 107 fadt->x_pm2_cnt_blk.bit_offset = 0; in acpi_create_fadt() 114 fadt->x_pm_tmr_blk.bit_offset = 0; in acpi_create_fadt() 121 fadt->x_gpe0_blk.bit_offset = 0; in acpi_create_fadt() 128 fadt->x_gpe1_blk.bit_offset = 0; in acpi_create_fadt()
|
/openbmc/linux/tools/bpf/bpftool/ |
H A D | btf_dumper.c | 25 __u8 bit_offset, const void *data); 136 __u8 bit_offset, const void *data) in btf_dumper_modifier() argument 144 return btf_dumper_do_type(d, actual_type_id, bit_offset, data); in btf_dumper_modifier() 351 static void btf_dumper_bitfield(__u32 nr_bits, __u8 bit_offset, in btf_dumper_bitfield() argument 360 bits_to_copy = bit_offset + nr_bits; in btf_dumper_bitfield() 365 left_shift_bits = bit_offset; in btf_dumper_bitfield() 378 static void btf_dumper_int_bits(__u32 int_type, __u8 bit_offset, in btf_dumper_int_bits() argument 388 total_bits_offset = bit_offset + BTF_INT_OFFSET(int_type); in btf_dumper_int_bits() 390 bit_offset = BITS_PER_BYTE_MASKED(total_bits_offset); in btf_dumper_int_bits() 391 btf_dumper_bitfield(nr_bits, bit_offset, data, jw, in btf_dumper_int_bits() [all …]
|
/openbmc/linux/drivers/pinctrl/sprd/ |
H A D | pinctrl-sprd.h | 14 #define BIT_OFFSET (8) macro 20 ((offset) & 0xFF) << BIT_OFFSET | \ 31 .bit_offset = (((a) >> BIT_OFFSET) & 0xff), \ 48 unsigned long bit_offset; member
|
/openbmc/linux/arch/x86/kernel/acpi/ |
H A D | cppc.c | 41 u64 mask = GENMASK_ULL(reg->bit_offset + reg->bit_width - 1, in cpc_read_ffh() 42 reg->bit_offset); in cpc_read_ffh() 45 *val >>= reg->bit_offset; in cpc_read_ffh() 57 u64 mask = GENMASK_ULL(reg->bit_offset + reg->bit_width - 1, in cpc_write_ffh() 58 reg->bit_offset); in cpc_write_ffh() 60 val <<= reg->bit_offset; in cpc_write_ffh()
|
/openbmc/u-boot/arch/x86/cpu/baytrail/ |
H A D | acpi.c | 71 fadt->reset_reg.bit_offset = 0; in acpi_create_fadt() 84 fadt->x_pm1a_evt_blk.bit_offset = 0; in acpi_create_fadt() 91 fadt->x_pm1b_evt_blk.bit_offset = 0; in acpi_create_fadt() 98 fadt->x_pm1a_cnt_blk.bit_offset = 0; in acpi_create_fadt() 105 fadt->x_pm1b_cnt_blk.bit_offset = 0; in acpi_create_fadt() 112 fadt->x_pm2_cnt_blk.bit_offset = 0; in acpi_create_fadt() 119 fadt->x_pm_tmr_blk.bit_offset = 0; in acpi_create_fadt() 126 fadt->x_gpe0_blk.bit_offset = 0; in acpi_create_fadt() 133 fadt->x_gpe1_blk.bit_offset = 0; in acpi_create_fadt()
|
/openbmc/linux/drivers/gpu/drm/omapdrm/ |
H A D | tcm-sita.c | 87 unsigned long bit_offset = (offset > 0) ? offset / slot_bytes : 0; in l2r_t2b() local 88 unsigned long curr_bit = bit_offset; in l2r_t2b() 101 if (bit_offset > 0 && (*pos % slots_per_band != bit_offset)) { in l2r_t2b() 102 curr_bit = ALIGN(*pos, slots_per_band) + bit_offset; in l2r_t2b() 108 curr_bit = ALIGN(*pos, slot_stride) + bit_offset; in l2r_t2b() 139 if (bit_offset > 0) in l2r_t2b() 140 curr_bit = ALIGN(*pos, slots_per_band) + bit_offset; in l2r_t2b()
|
/openbmc/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | bit.c | 30 if (likely(bios->bit_offset)) { in bit_entry() 31 u8 entries = nvbios_rd08(bios, bios->bit_offset + 10); in bit_entry() 32 u32 entry = bios->bit_offset + 12; in bit_entry() 42 entry += nvbios_rd08(bios, bios->bit_offset + 9); in bit_entry()
|
/openbmc/linux/drivers/acpi/acpica/ |
H A D | hwregs.c | 57 * 1. Detected if bit_offset is 0 and bit_width is 8/16/32/64; in acpi_hw_get_access_bit_width() 61 * 1. Detected if bit_offset is not 0 or bit_width is not 8/16/32/64; in acpi_hw_get_access_bit_width() 64 * 3. bit_offset/bit_width fields are used to describe the "region". in acpi_hw_get_access_bit_width() 69 if (!reg->bit_offset && reg->bit_width && in acpi_hw_get_access_bit_width() 77 ACPI_ROUND_UP_POWER_OF_TWO_8(reg->bit_offset + in acpi_hw_get_access_bit_width() 117 * pointer, Address, space_id, bit_width, and bit_offset. 167 ACPI_ROUND_UP(reg->bit_offset + reg->bit_width, access_width); in acpi_hw_validate_register() 200 u8 bit_offset; in acpi_hw_read() local 221 bit_width = reg->bit_offset + reg->bit_width; in acpi_hw_read() 222 bit_offset = reg->bit_offset; in acpi_hw_read() [all …]
|
/openbmc/openbmc/meta-aspeed/recipes-aspeed/python/socsec/ |
H A D | 0001-otptool-Define-value_start-in-rev_id-path.patch | 19 bit_offset = info['bit_offset'] 20 offset = dw_offset*32 + bit_offset
|
/openbmc/linux/include/crypto/ |
H A D | sha1_base.h | 76 const int bit_offset = SHA1_BLOCK_SIZE - sizeof(__be64); in sha1_base_do_finalize() local 78 __be64 *bits = (__be64 *)(sctx->buffer + bit_offset); in sha1_base_do_finalize() 82 if (partial > bit_offset) { in sha1_base_do_finalize() 89 memset(sctx->buffer + partial, 0x0, bit_offset - partial); in sha1_base_do_finalize()
|
H A D | sm3_base.h | 79 const int bit_offset = SM3_BLOCK_SIZE - sizeof(__be64); in sm3_base_do_finalize() local 81 __be64 *bits = (__be64 *)(sctx->buffer + bit_offset); in sm3_base_do_finalize() 85 if (partial > bit_offset) { in sm3_base_do_finalize() 92 memset(sctx->buffer + partial, 0x0, bit_offset - partial); in sm3_base_do_finalize()
|
H A D | sha256_base.h | 87 const int bit_offset = SHA256_BLOCK_SIZE - sizeof(__be64); in lib_sha256_base_do_finalize() local 88 __be64 *bits = (__be64 *)(sctx->buf + bit_offset); in lib_sha256_base_do_finalize() 92 if (partial > bit_offset) { in lib_sha256_base_do_finalize() 99 memset(sctx->buf + partial, 0x0, bit_offset - partial); in lib_sha256_base_do_finalize()
|
H A D | sha512_base.h | 99 const int bit_offset = SHA512_BLOCK_SIZE - sizeof(__be64[2]); in sha512_base_do_finalize() local 101 __be64 *bits = (__be64 *)(sctx->buf + bit_offset); in sha512_base_do_finalize() 105 if (partial > bit_offset) { in sha512_base_do_finalize() 112 memset(sctx->buf + partial, 0x0, bit_offset - partial); in sha512_base_do_finalize()
|
/openbmc/linux/drivers/acpi/apei/ |
H A D | apei-base.c | 64 *val >>= entry->register_region.bit_offset; in __apei_exec_read_register() 104 val <<= entry->register_region.bit_offset; in __apei_exec_write_register() 110 valr &= ~(entry->mask << entry->register_region.bit_offset); in __apei_exec_write_register() 571 u32 bit_width, bit_offset, access_size_code, space_id; in apei_check_gar() local 574 bit_offset = reg->bit_offset; in apei_check_gar() 581 *paddr, bit_width, bit_offset, access_size_code, in apei_check_gar() 589 *paddr, bit_width, bit_offset, access_size_code, in apei_check_gar() 596 if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 && in apei_check_gar() 599 else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 && in apei_check_gar() 603 if ((bit_width + bit_offset) > *access_bit_width) { in apei_check_gar() [all …]
|
/openbmc/u-boot/doc/device-tree-bindings/clock/ |
H A D | st,stm32-rcc.txt | 38 It is calculated as: index = register_offset / 4 * 32 + bit_offset. 39 Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31). 86 It is calculated as: index = register_offset / 4 * 32 + bit_offset. 87 Where bit_offset is the bit offset within the register.
|
/openbmc/linux/drivers/net/wireless/ralink/rt2x00/ |
H A D | rt2x00reg.h | 148 u8 bit_offset; member 153 u16 bit_offset; member 158 u32 bit_offset; member 240 ((__field).bit_offset)) & \ 248 ((__field).bit_offset); \
|
/openbmc/linux/sound/soc/codecs/ |
H A D | cs35l41-lib.c | 701 .bit_offset = 16, 708 .bit_offset = 16, 715 .bit_offset = 16, 722 .bit_offset = 16, 729 .bit_offset = 16, 816 int bit_offset, word_offset, ret, i; in cs35l41_otp_unpack() local 847 bit_offset = otp_map_match->bit_offset; in cs35l41_otp_unpack() 852 bit_offset, word_offset, bit_sum % 32, otp_map[i].size); in cs35l41_otp_unpack() 853 if (bit_offset + otp_map[i].size - 1 >= 32) { in cs35l41_otp_unpack() 855 GENMASK(31, bit_offset)) >> bit_offset; in cs35l41_otp_unpack() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/clock/ |
H A D | st,stm32-rcc.txt | 45 It is calculated as: index = register_offset / 4 * 32 + bit_offset. 46 Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31). 129 It is calculated as: index = register_offset / 4 * 32 + bit_offset. 130 Where bit_offset is the bit offset within the register.
|
/openbmc/linux/include/rdma/ |
H A D | iba.h | 115 * Extraction using a tabular description like table 106. bit_offset is from 118 #define IBA_FIELD_BLOC(field_struct, byte_offset, bit_offset, num_bits) \ argument 120 GENMASK(7 - (bit_offset), 7 - (bit_offset) - (num_bits - 1)), \
|
/openbmc/linux/tools/lib/bpf/ |
H A D | relo_core.c | 332 spec->bit_offset = access_idx * sz * 8; in bpf_core_parse_spec() 344 __u32 bit_offset; in bpf_core_parse_spec() local 349 bit_offset = btf_member_bit_offset(t, access_idx); in bpf_core_parse_spec() 350 spec->bit_offset += bit_offset; in bpf_core_parse_spec() 384 spec->bit_offset += access_idx * sz * 8; in bpf_core_parse_spec() 508 __u32 bit_offset; in bpf_core_match_member() local 510 bit_offset = btf_member_bit_offset(targ_type, i); in bpf_core_match_member() 517 spec->bit_offset += bit_offset; in bpf_core_match_member() 546 spec->bit_offset -= bit_offset; in bpf_core_match_member() 671 targ_spec->bit_offset += local_acc->idx * sz * 8; in bpf_core_spec_match() [all …]
|
/openbmc/linux/drivers/nvmem/ |
H A D | core.c | 32 int bit_offset; member 455 cell->bit_offset = info->bit_offset; in nvmem_cell_info_to_nvmem_cell_entry_nodup() 460 cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset, in nvmem_cell_info_to_nvmem_cell_entry_nodup() 700 info.bit_offset = be32_to_cpup(addr++); in nvmem_add_cells_from_dt() 1543 int i, extra, bit_offset = cell->bit_offset; in nvmem_shift_read_buffer_in_place() local 1546 if (bit_offset) { in nvmem_shift_read_buffer_in_place() 1548 *b++ >>= bit_offset; in nvmem_shift_read_buffer_in_place() 1553 *p |= *b << (BITS_PER_BYTE - bit_offset); in nvmem_shift_read_buffer_in_place() 1556 *b++ >>= bit_offset; in nvmem_shift_read_buffer_in_place() 1585 if (cell->bit_offset || cell->nbits) in __nvmem_cell_read() [all …]
|