Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 97) sorted by relevance

1234

/lk-master/external/lib/fdt/
A Dfdt_ro.c120 offset = fdt_next_node(fdt, offset, NULL); in fdt_find_max_phandle()
232 offset = fdt_next_node(fdt, offset, &depth)) in fdt_subnode_offset_namelen()
338 int offset; in fdt_first_property_offset() local
552 (offset >= 0) && (offset <= nodeoffset); in fdt_get_path()
553 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_get_path()
584 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0)) in fdt_get_path()
604 (offset >= 0) && (offset <= nodeoffset); in fdt_supernode_atdepth_offset()
605 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_supernode_atdepth_offset()
669 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_prop_value()
696 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_phandle()
[all …]
A Dfdt.c146 if (((offset + len) < offset) in fdt_offset_ptr()
188 offset += 4; in fdt_next_tag()
211 if ((offset < 0) || (offset % FDT_TAGSIZE) in fdt_check_node_offset_()
215 return offset; in fdt_check_node_offset_()
220 if ((offset < 0) || (offset % FDT_TAGSIZE) in fdt_check_prop_offset_()
221 || (fdt_next_tag(fdt, offset, &offset) != FDT_PROP)) in fdt_check_prop_offset_()
224 return offset; in fdt_check_prop_offset_()
264 return offset; in fdt_next_node()
271 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode()
275 return offset; in fdt_first_subnode()
[all …]
A Dfdt_sw.c102 if ((offset + len < offset) || (offset + len > spaceleft)) in fdt_grab_space_()
188 int offset; in fdt_add_reservemap_entry() local
192 offset = fdt_off_dt_struct(fdt); in fdt_add_reservemap_entry()
252 int struct_top, offset; in fdt_add_string_() local
254 offset = -strtabsize - len; in fdt_add_string_()
259 memcpy(strtab + offset, s, len); in fdt_add_string_()
261 return offset; in fdt_add_string_()
340 int offset, nextoffset; in fdt_finish() local
357 offset = 0; in fdt_finish()
361 fdt_offset_ptr_w_(fdt, offset); in fdt_finish()
[all …]
A Dlibfdt_internal.h21 int fdt_check_node_offset_(const void *fdt, int offset);
22 int fdt_check_prop_offset_(const void *fdt, int offset);
26 static inline const void *fdt_offset_ptr_(const void *fdt, int offset) in fdt_offset_ptr_() argument
28 return (const char *)fdt + fdt_off_dt_struct(fdt) + offset; in fdt_offset_ptr_()
31 static inline void *fdt_offset_ptr_w_(void *fdt, int offset) in fdt_offset_ptr_w_() argument
33 return (void *)(uintptr_t)fdt_offset_ptr_(fdt, offset); in fdt_offset_ptr_w_()
A Dfdt_wip.c73 int fdt_node_end_offset_(void *fdt, int offset) in fdt_node_end_offset_() argument
77 while ((offset >= 0) && (depth >= 0)) in fdt_node_end_offset_()
78 offset = fdt_next_node(fdt, offset, &depth); in fdt_node_end_offset_()
80 return offset; in fdt_node_end_offset_()
A Dfdt_check.c17 int offset, nextoffset = 0; in fdt_check_full() local
36 offset = nextoffset; in fdt_check_full()
37 tag = fdt_next_tag(fdt, offset, &nextoffset); in fdt_check_full()
64 prop = fdt_getprop_by_offset(fdt, offset, &propname, in fdt_check_full()
/lk-master/platform/stm32f7xx/
A Dflash.c94 memcpy(buf, (uint8_t *)FLASHAXI_BASE + offset, len); in stm32_flash_bdev_read()
131 if (offset < 0) { in offset_to_sector()
133 } else if (offset < ERASE_RANGE0_END) { in offset_to_sector()
134 *sector = (offset - ERASE_RANGE0_START) / _32K; in offset_to_sector()
137 } else if (offset < ERASE_RANGE1_END) { in offset_to_sector()
138 *sector = (offset - ERASE_RANGE1_START) / _128K + 4; in offset_to_sector()
141 } else if (offset < ERASE_RANGE2_END) { in offset_to_sector()
142 *sector = (offset - ERASE_RANGE2_START) / _256K + 5; in offset_to_sector()
157 LTRACEF("dev %p, offset 0x%llx, len 0x%zx\n", bdev, offset, len); in stm32_flash_bdev_erase()
201 off_t erased_bytes = next_offset - offset; in stm32_flash_bdev_erase()
[all …]
/lk-master/lib/fs/fat32/
A Dfile.c54 bio_read(fat->dev, &next_cluster, offset, 4); in fat32_next_cluster_in_chain()
75 if (dir[offset + i] == 0x20) { in fat32_dir_get_filename()
82 if (dir[offset + i] == 0x20) { in fat32_dir_get_filename()
90 result[j++] = dir[offset + i]; in fat32_dir_get_filename()
95 result[j++] = dir[offset + 8 + i]; in fat32_dir_get_filename()
147 uint32_t offset = 0; in fat32_open_file() local
150 while (dir[offset] != 0x00 && offset < fat->bytes_per_cluster) { in fat32_open_file()
152 offset += DIR_ENTRY_LENGTH; in fat32_open_file()
159 offset += DIR_ENTRY_LENGTH; in fat32_open_file()
184 offset += DIR_ENTRY_LENGTH; in fat32_open_file()
[all …]
/lk-master/platform/stm32f4xx/
A Dflash.c49 static ssize_t stmflash_bdev_erase(struct bdev *, off_t offset, size_t len);
79 LTRACEF("dev %p, buf %p, offset 0x%llx, len 0x%zx\n", bdev, buf, offset, len); in stmflash_bdev_read()
80 len = bio_trim_range(bdev, offset, len); in stmflash_bdev_read()
84 startAddress += offset; in stmflash_bdev_read()
96 LTRACEF("dev %p, buf %p, offset 0x%llx, len 0x%zx\n",bdev, buf, offset, len); in stmflash_bdev_write()
97 len = bio_trim_range(bdev, offset, len); in stmflash_bdev_write()
101 start_address = sg_flash.start+offset; in stmflash_bdev_write()
126 LTRACEF("dev %p, offset 0x%llx, len 0x%zx\n",bdev, offset, len); in stmflash_bdev_erase()
127 len = bio_trim_range(bdev, offset, len); in stmflash_bdev_erase()
132 if (sectors[n] == sg_flash.start+offset) { in stmflash_bdev_erase()
[all …]
/lk-master/lib/fdtwalk/
A Dfdtwalk.c24 static void read_address_size_cells(const void *fdt, int offset, int depth, in read_address_size_cells() argument
26 LTRACEF_LEVEL(3, "fdt %p, offset %d depth %d\n", fdt, offset, depth); in read_address_size_cells()
31 const void *prop_ptr = fdt_getprop(fdt, offset, "#address-cells", &len); in read_address_size_cells()
37 prop_ptr = fdt_getprop(fdt, offset, "#size-cells", &len); in read_address_size_cells()
54 int offset = 0; in fdt_walk() local
60 read_address_size_cells(fdt, offset, 0, address_cells, size_cells); in fdt_walk()
63 offset = fdt_next_node(fdt, offset, &depth); in fdt_walk()
64 if (offset < 0 || depth < 0) { in fdt_walk()
84 const char *name = fdt_get_name(fdt, offset, NULL); in fdt_walk()
94 const uint8_t *prop_ptr = fdt_getprop(fdt, offset, "reg", &lenp); in fdt_walk()
[all …]
/lk-master/platform/bcm28xx/
A Dgpio.c24 unsigned offset = (nr % PINS_PER_REG) * BITS_PER_PIN; in gpio_config() local
25 unsigned shifted_mask = mask << offset; in gpio_config()
27 *reg = (*reg & ~shifted_mask) | (flags << offset); in gpio_config()
32 unsigned offset = nr % BITS_PER_REG; in gpio_set() local
33 *GPIOREG(on ? GPIO_GPSET0 : GPIO_GPCLR0, nr) = 1 << offset; in gpio_set()
37 unsigned offset = nr % BITS_PER_REG; in gpio_get() local
38 return (*GPIOREG(GPIO_GPLEV0, nr) & (1 << offset)) >> offset; in gpio_get()
/lk-master/lib/ptable/
A Dptable.c55 if (entry->offset > entry->offset + entry->length) in validate_entry()
209 if (it_mentry->entry.offset > mentry->entry.offset) { in ptable_push_entry()
252 if ((entry->offset + entry->length) <= entry->offset) { in ptable_publish()
486 if (offset < 0) { in ptable_allocate()
491 *plength, offset, offset + length); in ptable_allocate()
495 return offset; in ptable_allocate()
512 if (offset & block_mask) in ptable_allocate_at()
541 if (bio_does_overlap(offset, *plength, entry->offset, entry->length)) in ptable_allocate_at()
625 if (entry.offset != offset) { in ptable_scan()
627 offset, entry.offset); in ptable_scan()
[all …]
/lk-master/dev/bus/pci/
A Ddebug.cpp99 uint32_t offset; in pci_config() local
133 offset = atoui(argv[5].str); in pci_config()
138 ret = pci_read_config_byte(&loc, offset, &value); in pci_config()
141 … printf("byte at device %02x:%02x config offset %04x: %02x\n", loc.bus, loc.dev_fn, offset, value); in pci_config()
147 ret = pci_read_config_half(&loc, offset, &value); in pci_config()
150 … printf("half at device %02x:%02x config offset %04x: %04x\n", loc.bus, loc.dev_fn, offset, value); in pci_config()
156 ret = pci_read_config_word(&loc, offset, &value); in pci_config()
170 offset = atoui(argv[5].str); in pci_config()
175 ret = pci_write_config_byte(&loc, offset, value); in pci_config()
184 ret = pci_write_config_half(&loc, offset, value); in pci_config()
[all …]
A Dtype1.cpp30 static uint16_t type1_read_byte(uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset) { in type1_read_byte() argument
33 (func << 8) | (offset & 0xfc) | ((uint32_t)0x80000000)); in type1_read_byte()
39 uint8_t tmp = ((inpd(0xCFC) >> ((offset & 3) * 8)) & 0xffff); in type1_read_byte()
43 static uint16_t type1_read_half(uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset) { in type1_read_half() argument
46 (func << 8) | (offset & 0xfc) | ((uint32_t)0x80000000)); in type1_read_half()
53 uint16_t tmp = ((inpd(0xCFC) >> ((offset & 2) * 8)) & 0xffff); in type1_read_half()
57 static uint32_t type1_read_word(uint8_t bus, uint8_t slot, uint8_t func, uint8_t offset) { in type1_read_word() argument
60 (func << 8) | (offset & 0xfc) | ((uint32_t)0x80000000)); in type1_read_word()
/lk-master/lib/bio/
A Dsubdev.c28 bnum_t offset; member
31 static ssize_t subdev_read(struct bdev *_dev, void *buf, off_t offset, size_t len) { in subdev_read() argument
34 return bio_read(subdev->parent, buf, offset + subdev->offset * subdev->dev.block_size, len); in subdev_read()
40 return bio_read_block(subdev->parent, buf, block + subdev->offset, count); in subdev_read_block()
43 static ssize_t subdev_write(struct bdev *_dev, const void *buf, off_t offset, size_t len) { in subdev_write() argument
46 return bio_write(subdev->parent, buf, offset + subdev->offset * subdev->dev.block_size, len); in subdev_write()
52 return bio_write_block(subdev->parent, buf, block + subdev->offset, count); in subdev_write_block()
55 static ssize_t subdev_erase(struct bdev *_dev, off_t offset, size_t len) { in subdev_erase() argument
58 return bio_erase(subdev->parent, offset + subdev->offset * subdev->dev.block_size, len); in subdev_erase()
157 sub->offset = startblock; in bio_publish_subdevice()
A Dbio.c41 block = offset / dev->block_size; in bio_default_read()
45 if ((offset % dev->block_size) != 0) { in bio_default_read()
137 block = offset / dev->block_size; in bio_default_write()
141 if ((offset % dev->block_size) != 0) { in bio_default_write()
255 off_t pos = offset; in bio_default_erase()
308 if (offset < 0) in bio_trim_range()
310 if (offset >= dev->total_size) in bio_trim_range()
315 len = dev->total_size - offset; in bio_trim_range()
365 len = bio_trim_range(dev, offset, len); in bio_read()
393 len = bio_trim_range(dev, offset, len); in bio_write()
[all …]
A Ddebug.c68 off_t offset = argv[4].u; // XXX use long in cmd_bio() local
89 off_t offset = argv[4].u; // XXX use long in cmd_bio() local
112 off_t offset = argv[3].u; // XXX use long in cmd_bio() local
134 hexdump8_ex(buf, err_len, offset); in cmd_bio()
142 offset += amt; in cmd_bio()
151 off_t offset = argv[3].u; // XXX use long in cmd_bio() local
214 off_t offset = 0; in cmd_bio() local
216 offset = argv[3].u; in cmd_bio()
225 unsigned long offset = argv[3].u; in cmd_bio() local
243 unsigned long pos = offset; in cmd_bio()
[all …]
A Dmem.c24 static ssize_t mem_bdev_read(bdev_t *bdev, void *buf, off_t offset, size_t len) { in mem_bdev_read() argument
27 LTRACEF("bdev %s, buf %p, offset %lld, len %zu\n", bdev->name, buf, offset, len); in mem_bdev_read()
29 memcpy(buf, (uint8_t *)mem->ptr + offset, len); in mem_bdev_read()
44 static ssize_t mem_bdev_write(bdev_t *bdev, const void *buf, off_t offset, size_t len) { in mem_bdev_write() argument
47 LTRACEF("bdev %s, buf %p, offset %lld, len %zu\n", bdev->name, buf, offset, len); in mem_bdev_write()
49 memcpy((uint8_t *)mem->ptr + offset, buf, len); in mem_bdev_write()
/lk-master/external/platform/lpc15xx/lpcopen/lpc_chip_15xx/inc/usbd/
A Dusbd_mscuser.h99 void (*MSC_Write)( uint32_t offset, uint8_t** src, uint32_t length, uint32_t high_offset);
120 void (*MSC_Read)( uint32_t offset, uint8_t** dst, uint32_t length, uint32_t high_offset);
136 ErrorCode_t (*MSC_Verify)( uint32_t offset, uint8_t buf[], uint32_t length, uint32_t high_offset);
154 …void (*MSC_GetWriteBuf)( uint32_t offset, uint8_t** buff_adr, uint32_t length, uint32_t high_offse…
253 void (*MSC_Write)( uint32_t offset, uint8_t** src, uint32_t length, uint32_t high_offset);
254 void (*MSC_Read)( uint32_t offset, uint8_t** dst, uint32_t length, uint32_t high_offset);
255 ErrorCode_t (*MSC_Verify)( uint32_t offset, uint8_t src[], uint32_t length, uint32_t high_offset);
257 …void (*MSC_GetWriteBuf)( uint32_t offset, uint8_t** buff_adr, uint32_t length, uint32_t high_offse…
/lk-master/tools/
A Dbin2h.py18 offset = 0 variable
21 if offset != 0 and offset % 16 == 0:
24 offset = offset + 1 variable
/lk-master/external/platform/pico/rp2_common/hardware_pio/
A Dpio.c88 assert(offset < PIO_INSTRUCTION_COUNT); in _pio_can_add_program_at_offset()
89 assert(offset + program->length <= PIO_INSTRUCTION_COUNT); in _pio_can_add_program_at_offset()
93 return !(used_mask & (program_mask << offset)); in _pio_can_add_program_at_offset()
98 bool rc = _pio_can_add_program_at_offset(pio, program, offset); in pio_can_add_program_at_offset()
104 if (!_pio_can_add_program_at_offset(pio, program, offset)) { in _pio_add_program_at_offset()
109 …pio->instr_mem[offset + i] = pio_instr_bits_jmp != _pio_major_instr_bits(instr) ? instr : instr + in _pio_add_program_at_offset()
118 int offset = _pio_find_offset_for_program(pio, program); in pio_add_program() local
119 if (offset < 0) { in pio_add_program()
122 _pio_add_program_at_offset(pio, program, offset); in pio_add_program()
124 return offset; in pio_add_program()
[all …]
/lk-master/external/lib/lwip/core/
A Dpbuf.c210 u16_t offset; in pbuf_alloc() local
226 offset = PBUF_LINK_HLEN; in pbuf_alloc()
229 offset = 0; in pbuf_alloc()
370 u16_t offset; in pbuf_alloced_custom() local
385 offset = PBUF_LINK_HLEN; in pbuf_alloced_custom()
388 offset = 0; in pbuf_alloced_custom()
936 if ((offset != 0) && (offset >= p->len)) { in pbuf_copy_partial()
938 offset -= p->len; in pbuf_copy_partial()
949 offset = 0; in pbuf_copy_partial()
1079 u16_t copy_from = offset; in pbuf_get_at()
[all …]
/lk-master/lib/bootargs/
A Dbootargs.c52 uint64_t offset; member
100 …add_bootimage_pointer(void *buf, size_t buf_len, const char *device, uint64_t offset, size_t len) { in bootargs_add_bootimage_pointer() argument
111 bi->offset = offset; in bootargs_add_bootimage_pointer()
196 status_t bootargs_get_bootimage_pointer(uint64_t *offset, size_t *len, const char **device) { in bootargs_get_bootimage_pointer() argument
214 if (offset) in bootargs_get_bootimage_pointer()
215 *offset = bi->offset; in bootargs_get_bootimage_pointer()
/lk-master/external/platform/cc13xx/cc13xxware/driverlib/
A Daux_adc.c255 int8_t offset; in AUXADCGetAdjustmentOffset() local
258offset = HWREG(FCFG1_BASE + FCFG1_O_SOC_ADC_OFFSET_INT) >> FCFG1_SOC_ADC_OFFSET_INT_SOC_ADC_ABS_OF… in AUXADCGetAdjustmentOffset()
261offset = HWREG(FCFG1_BASE + FCFG1_O_SOC_ADC_OFFSET_INT) >> FCFG1_SOC_ADC_OFFSET_INT_SOC_ADC_REL_OF… in AUXADCGetAdjustmentOffset()
263 return offset; in AUXADCGetAdjustmentOffset()
299 AUXADCAdjustValueForGainAndOffset(int32_t adcValue, int32_t gain, int32_t offset) in AUXADCAdjustValueForGainAndOffset() argument
302 adcValue = (((adcValue + offset) * gain) + 16384) / 32768; in AUXADCAdjustValueForGainAndOffset()
320 AUXADCUnadjustValueForGainAndOffset(int32_t adcValue, int32_t gain, int32_t offset) in AUXADCUnadjustValueForGainAndOffset() argument
323 adcValue = (((adcValue * 32768) + (gain / 2)) / gain) - offset; in AUXADCUnadjustValueForGainAndOffset()
/lk-master/dev/include/dev/class/
A Dblock.h20 ssize_t (*write)(struct device *dev, off_t offset, const void *buf, size_t count);
21 ssize_t (*read)(struct device *dev, off_t offset, void *buf, size_t count);
30 ssize_t class_block_write(struct device *dev, off_t offset, const void *buf, size_t count);
31 ssize_t class_block_read(struct device *dev, off_t offset, void *buf, size_t count);

Completed in 47 milliseconds

1234