Home
last modified time | relevance | path

Searched refs:bit_offset (Results 1 – 25 of 58) sorted by relevance

123

/Linux-v4.19/drivers/gpio/
Dgpio-xgene.c52 u32 bit_offset; in xgene_gpio_get() local
55 bit_offset = GPIO_BIT_OFFSET(offset); in xgene_gpio_get()
56 return !!(ioread32(chip->base + bank_offset) & BIT(bit_offset)); in xgene_gpio_get()
63 u32 setval, bit_offset; in __xgene_gpio_set() local
66 bit_offset = GPIO_BIT_OFFSET(offset) + XGENE_GPIOS_PER_BANK; in __xgene_gpio_set()
70 setval |= BIT(bit_offset); in __xgene_gpio_set()
72 setval &= ~BIT(bit_offset); in __xgene_gpio_set()
89 unsigned long bank_offset, bit_offset; in xgene_gpio_get_direction() local
92 bit_offset = GPIO_BIT_OFFSET(offset); in xgene_gpio_get_direction()
94 return !!(ioread32(chip->base + bank_offset) & BIT(bit_offset)); in xgene_gpio_get_direction()
[all …]
Dgpio-pcie-idio-24.c361 const unsigned long bit_offset = irqd_to_hwirq(data) - 24; in idio_24_irq_mask() local
363 const unsigned long bank_offset = bit_offset/8 * 8; in idio_24_irq_mask()
368 idio24gpio->irq_mask &= BIT(bit_offset); in idio_24_irq_mask()
391 const unsigned long bit_offset = irqd_to_hwirq(data) - 24; in idio_24_irq_unmask() local
392 const unsigned long bank_offset = bit_offset/8 * 8; in idio_24_irq_unmask()
398 idio24gpio->irq_mask |= BIT(bit_offset); in idio_24_irq_unmask()
/Linux-v4.19/arch/x86/kernel/acpi/
Dcppc_msr.c32 u64 mask = GENMASK_ULL(reg->bit_offset + reg->bit_width - 1, in cpc_read_ffh()
33 reg->bit_offset); in cpc_read_ffh()
36 *val >>= reg->bit_offset; in cpc_read_ffh()
48 u64 mask = GENMASK_ULL(reg->bit_offset + reg->bit_width - 1, in cpc_write_ffh()
49 reg->bit_offset); in cpc_write_ffh()
51 val <<= reg->bit_offset; in cpc_write_ffh()
/Linux-v4.19/tools/bpf/bpftool/
Dbtf_dumper.c23 __u8 bit_offset, const void *data);
76 static void btf_dumper_int_bits(__u32 int_type, __u8 bit_offset, in btf_dumper_int_bits() argument
87 total_bits_offset = bit_offset + BTF_INT_OFFSET(int_type); in btf_dumper_int_bits()
89 bit_offset = BITS_PER_BYTE_MASKED(total_bits_offset); in btf_dumper_int_bits()
90 bits_to_copy = bit_offset + nr_bits; in btf_dumper_int_bits()
96 left_shift_bits = bit_offset; in btf_dumper_int_bits()
112 static int btf_dumper_int(const struct btf_type *t, __u8 bit_offset, in btf_dumper_int() argument
122 if (bit_offset || BTF_INT_OFFSET(*int_type) || in btf_dumper_int()
124 btf_dumper_int_bits(*int_type, bit_offset, data, jw, in btf_dumper_int()
140 btf_dumper_int_bits(*int_type, bit_offset, data, jw, in btf_dumper_int()
[all …]
/Linux-v4.19/drivers/acpi/acpica/
Dhwregs.c69 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()
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()
230 if (bit_offset >= access_width) { in acpi_hw_read()
232 bit_offset -= access_width; in acpi_hw_read()
295 u8 bit_offset; in acpi_hw_write() local
312 bit_width = reg->bit_offset + reg->bit_width; in acpi_hw_write()
[all …]
Ddsopcode.c83 u32 bit_offset; in acpi_ds_init_buffer_field() local
127 bit_offset = offset; in acpi_ds_init_buffer_field()
144 bit_offset = offset; in acpi_ds_init_buffer_field()
153 bit_offset = 8 * offset; in acpi_ds_init_buffer_field()
162 bit_offset = 8 * offset; in acpi_ds_init_buffer_field()
171 bit_offset = 8 * offset; in acpi_ds_init_buffer_field()
180 bit_offset = 8 * offset; in acpi_ds_init_buffer_field()
196 if ((bit_offset + bit_count) > (8 * (u32)buffer_desc->buffer.length)) { in acpi_ds_init_buffer_field()
200 acpi_ut_get_node_name(result_desc), bit_offset, in acpi_ds_init_buffer_field()
213 bit_offset, bit_count); in acpi_ds_init_buffer_field()
/Linux-v4.19/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
Dbit.c30 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()
Dbase.c180 bios->bit_offset = nvbios_findstr(bios->data, bios->size, in nvkm_bios_new()
182 if (bios->bit_offset) in nvkm_bios_new()
/Linux-v4.19/drivers/nvmem/
Dcore.c52 int bit_offset; member
338 cell->bit_offset = info->bit_offset; in nvmem_cell_info_to_nvmem_cell()
342 cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset, in nvmem_cell_info_to_nvmem_cell()
886 cell->bit_offset = be32_to_cpup(addr++); in of_nvmem_cell_get()
891 cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset, in of_nvmem_cell_get()
1025 int i, bit_offset = cell->bit_offset; in nvmem_shift_read_buffer_in_place() local
1028 if (bit_offset) { in nvmem_shift_read_buffer_in_place()
1030 *b++ >>= bit_offset; in nvmem_shift_read_buffer_in_place()
1035 *p |= *b << (BITS_PER_BYTE - bit_offset); in nvmem_shift_read_buffer_in_place()
1038 *b++ >>= bit_offset; in nvmem_shift_read_buffer_in_place()
[all …]
/Linux-v4.19/drivers/gpu/drm/omapdrm/
Dtcm-sita.c95 unsigned long bit_offset = (offset > 0) ? offset / slot_bytes : 0; in l2r_t2b() local
96 unsigned long curr_bit = bit_offset; in l2r_t2b()
109 if (bit_offset > 0 && (*pos % slots_per_band != bit_offset)) { in l2r_t2b()
110 curr_bit = ALIGN(*pos, slots_per_band) + bit_offset; in l2r_t2b()
116 curr_bit = ALIGN(*pos, slot_stride) + bit_offset; in l2r_t2b()
147 if (bit_offset > 0) in l2r_t2b()
148 curr_bit = ALIGN(*pos, slots_per_band) + bit_offset; in l2r_t2b()
/Linux-v4.19/drivers/net/wireless/ralink/rt2x00/
Drt2x00reg.h159 u8 bit_offset; member
164 u16 bit_offset; member
169 u32 bit_offset; member
251 ((__field).bit_offset)) & \
259 ((__field).bit_offset); \
/Linux-v4.19/include/crypto/
Dsm3_base.h86 const int bit_offset = SM3_BLOCK_SIZE - sizeof(__be64); in sm3_base_do_finalize() local
88 __be64 *bits = (__be64 *)(sctx->buffer + bit_offset); in sm3_base_do_finalize()
92 if (partial > bit_offset) { in sm3_base_do_finalize()
99 memset(sctx->buffer + partial, 0x0, bit_offset - partial); in sm3_base_do_finalize()
Dsha1_base.h75 const int bit_offset = SHA1_BLOCK_SIZE - sizeof(__be64); in sha1_base_do_finalize() local
77 __be64 *bits = (__be64 *)(sctx->buffer + bit_offset); in sha1_base_do_finalize()
81 if (partial > bit_offset) { in sha1_base_do_finalize()
88 memset(sctx->buffer + partial, 0x0, bit_offset - partial); in sha1_base_do_finalize()
Dsha256_base.h96 const int bit_offset = SHA256_BLOCK_SIZE - sizeof(__be64); in sha256_base_do_finalize() local
98 __be64 *bits = (__be64 *)(sctx->buf + bit_offset); in sha256_base_do_finalize()
102 if (partial > bit_offset) { in sha256_base_do_finalize()
109 memset(sctx->buf + partial, 0x0, bit_offset - partial); in sha256_base_do_finalize()
Dsha512_base.h98 const int bit_offset = SHA512_BLOCK_SIZE - sizeof(__be64[2]); in sha512_base_do_finalize() local
100 __be64 *bits = (__be64 *)(sctx->buf + bit_offset); in sha512_base_do_finalize()
104 if (partial > bit_offset) { in sha512_base_do_finalize()
111 memset(sctx->buf + partial, 0x0, bit_offset - partial); in sha512_base_do_finalize()
/Linux-v4.19/drivers/acpi/apei/
Dapei-base.c72 *val >>= entry->register_region.bit_offset; in __apei_exec_read_register()
112 val <<= entry->register_region.bit_offset; in __apei_exec_write_register()
118 valr &= ~(entry->mask << entry->register_region.bit_offset); in __apei_exec_write_register()
582 u32 bit_width, bit_offset, access_size_code, space_id; in apei_check_gar() local
585 bit_offset = reg->bit_offset; in apei_check_gar()
592 *paddr, bit_width, bit_offset, access_size_code, in apei_check_gar()
600 *paddr, bit_width, bit_offset, access_size_code, in apei_check_gar()
607 if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 && in apei_check_gar()
610 else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 && in apei_check_gar()
614 if ((bit_width + bit_offset) > *access_bit_width) { in apei_check_gar()
[all …]
/Linux-v4.19/drivers/pinctrl/sprd/
Dpinctrl-sprd.h39 .bit_offset = (((a) >> BIT_OFFSET) & 0xff), \
56 unsigned long bit_offset; member
Dpinctrl-sprd.c116 unsigned long bit_offset; member
459 pin->bit_offset) & PINCTRL_BIT_MASK(pin->bit_width); in sprd_pinconf_get()
714 << pin->bit_offset); in sprd_pinconf_set()
716 << pin->bit_offset; in sprd_pinconf_set()
784 pin->bit_offset) & PINCTRL_BIT_MASK(pin->bit_width); in sprd_pinconf_get_config()
1001 pin->bit_offset = sprd_soc_pin_info[i].bit_offset; in sprd_pinctrl_add_pins()
1020 pin->bit_offset, pin->bit_width, pin->reg); in sprd_pinctrl_add_pins()
/Linux-v4.19/drivers/acpi/
Dacpi_lpit.c51 u64 mask = GENMASK_ULL(residency_info_ffh.gaddr.bit_offset + in lpit_read_residency_counter_us()
53 residency_info_ffh.gaddr.bit_offset); in lpit_read_residency_counter_us()
56 *counter >>= residency_info_ffh.gaddr.bit_offset; in lpit_read_residency_counter_us()
Dprocessor_throttling.c485 throttling->control_register.bit_offset) > 32) { in acpi_processor_get_throttling_control()
492 throttling->status_register.bit_offset) > 32) { in acpi_processor_get_throttling_control()
781 u32 bit_width, bit_offset; in acpi_read_throttling_status() local
791 bit_offset = throttling->status_register.bit_offset; in acpi_read_throttling_status()
795 (u32) (bit_width + bit_offset)); in acpi_read_throttling_status()
797 *value = (u64) ((ptc_value >> bit_offset) & ptc_mask); in acpi_read_throttling_status()
813 u32 bit_width, bit_offset; in acpi_write_throttling_state() local
823 bit_offset = throttling->control_register.bit_offset; in acpi_write_throttling_state()
829 (u32) (ptc_value << bit_offset), in acpi_write_throttling_state()
830 (u32) (bit_width + bit_offset)); in acpi_write_throttling_state()
/Linux-v4.19/drivers/watchdog/
Dwdat_wdt.c143 x >>= gas->bit_offset; in wdat_wdt_run_action()
153 x >>= gas->bit_offset; in wdat_wdt_run_action()
161 x <<= gas->bit_offset; in wdat_wdt_run_action()
166 y = y & ~(mask << gas->bit_offset); in wdat_wdt_run_action()
177 x <<= gas->bit_offset; in wdat_wdt_run_action()
182 y = y & ~(mask << gas->bit_offset); in wdat_wdt_run_action()
/Linux-v4.19/Documentation/devicetree/bindings/clock/
Dst,stm32-rcc.txt43 It is calculated as: index = register_offset / 4 * 32 + bit_offset.
44 Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31).
123 It is calculated as: index = register_offset / 4 * 32 + bit_offset.
124 Where bit_offset is the bit offset within the register.
Dst,stm32h7-rcc.txt61 It is calculated as: index = register_offset / 4 * 32 + bit_offset.
62 Where bit_offset is the bit offset within the register.
Dst,stm32mp1-rcc.txt49 It is calculated as: index = register_offset / 4 * 32 + bit_offset.
50 Where bit_offset is the bit offset within the register.
/Linux-v4.19/include/acpi/
Dprocessor.h56 u8 bit_offset; member
109 u8 bit_offset; member
150 u8 bit_offset; member

123