/trusted-firmware-a/lib/libfdt/ |
A D | fdt_ro.c | 122 offset = fdt_next_node(fdt, offset, NULL); in fdt_find_max_phandle() 234 offset = fdt_next_node(fdt, offset, &depth)) in fdt_subnode_offset_namelen() 340 int offset; in fdt_first_property_offset() local 554 (offset >= 0) && (offset <= nodeoffset); in fdt_get_path() 555 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_get_path() 586 if ((offset == -FDT_ERR_NOTFOUND) || (offset >= 0)) in fdt_get_path() 606 (offset >= 0) && (offset <= nodeoffset); in fdt_supernode_atdepth_offset() 607 offset = fdt_next_node(fdt, offset, &depth)) { in fdt_supernode_atdepth_offset() 671 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_prop_value() 698 offset = fdt_next_node(fdt, offset, NULL)) { in fdt_node_offset_by_phandle() [all …]
|
A D | fdt.c | 140 if (offset < 0) in fdt_offset_ptr() 192 offset += 4; in fdt_next_tag() 214 && ((offset < 0) || (offset % FDT_TAGSIZE))) in fdt_check_node_offset_() 217 if (fdt_next_tag(fdt, offset, &offset) != FDT_BEGIN_NODE) in fdt_check_node_offset_() 220 return offset; in fdt_check_node_offset_() 226 && ((offset < 0) || (offset % FDT_TAGSIZE))) in fdt_check_prop_offset_() 229 if (fdt_next_tag(fdt, offset, &offset) != FDT_PROP) in fdt_check_prop_offset_() 232 return offset; in fdt_check_prop_offset_() 272 return offset; in fdt_next_node() 279 offset = fdt_next_node(fdt, offset, &depth); in fdt_first_subnode() [all …]
|
A D | fdt_sw.c | 102 if ((offset + len < offset) || (offset + len > spaceleft)) in fdt_grab_space_() 191 int offset; in fdt_add_reservemap_entry() local 195 offset = fdt_off_dt_struct(fdt); in fdt_add_reservemap_entry() 255 unsigned int struct_top, offset; in fdt_add_string_() local 257 offset = strtabsize + len; in fdt_add_string_() 262 memcpy(strtab - offset, s, len); in fdt_add_string_() 264 return -offset; in fdt_add_string_() 343 int offset, nextoffset; in fdt_finish() local 360 offset = 0; in fdt_finish() 364 fdt_offset_ptr_w_(fdt, offset); in fdt_finish() [all …]
|
A D | libfdt_internal.h | 21 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 D | fdt_wip.c | 73 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_()
|
/trusted-firmware-a/drivers/marvell/ |
A D | ddr_phy_access.c | 26 int snps_fw_write(uintptr_t offset, uint16_t data) in snps_fw_write() argument 30 if (offset < DDR_PHY_END_ADDRESS) { in snps_fw_write() 31 mmio_write_16(DDR_PHY_BASE_ADDR + (2 * offset), data); in snps_fw_write() 34 debug_printf("%s: illegal offset value: 0x%x\n", __func__, offset); in snps_fw_write() 38 int snps_fw_read(uintptr_t offset, uint16_t *read) in snps_fw_read() argument 42 if (offset < DDR_PHY_END_ADDRESS) { in snps_fw_read() 43 *read = mmio_read_16(DDR_PHY_BASE_ADDR + (2 * offset)); in snps_fw_read() 50 int mvebu_ddr_phy_write(uintptr_t offset, uint16_t data) in mvebu_ddr_phy_write() argument 52 return snps_fw_write(offset, data); in mvebu_ddr_phy_write() 55 int mvebu_ddr_phy_read(uintptr_t offset, uint16_t *read) in mvebu_ddr_phy_read() argument [all …]
|
/trusted-firmware-a/plat/renesas/common/ |
A D | plat_storage.c | 28 .offset = FLASH0_BASE, 33 .offset = BL2_IMAGE_ID, 37 .offset = BL31_IMAGE_ID, 41 .offset = BL32_IMAGE_ID, 45 .offset = BL33_IMAGE_ID, 49 .offset = BL332_IMAGE_ID, 53 .offset = BL333_IMAGE_ID, 57 .offset = BL334_IMAGE_ID, 61 .offset = BL335_IMAGE_ID, 65 .offset = BL336_IMAGE_ID, [all …]
|
/trusted-firmware-a/drivers/arm/pl061/ |
A D | pl061_gpio.c | 51 unsigned int data, offset; in pl061_get_direction() local 56 offset = gpio % GPIOS_PER_PL061; in pl061_get_direction() 58 if (data & BIT(offset)) in pl061_get_direction() 66 unsigned int data, offset; in pl061_set_direction() local 71 offset = gpio % GPIOS_PER_PL061; in pl061_set_direction() 92 unsigned int offset; in pl061_get_value() local 97 offset = gpio % GPIOS_PER_PL061; in pl061_get_value() 98 if (mmio_read_8(base_addr + BIT(offset + 2))) in pl061_get_value() 111 int offset; in pl061_set_value() local 116 offset = gpio % GPIOS_PER_PL061; in pl061_set_value() [all …]
|
/trusted-firmware-a/drivers/st/ddr/ |
A D | stm32mp1_ram.c | 87 uint64_t offset; in ddr_test_addr_bus() local 91 for (offset = sizeof(uint32_t); (offset & addressmask) != 0U; in ddr_test_addr_bus() 92 offset <<= 1) { in ddr_test_addr_bus() 101 for (offset = sizeof(uint32_t); (offset & addressmask) != 0U; in ddr_test_addr_bus() 102 offset <<= 1) { in ddr_test_addr_bus() 121 for (offset = sizeof(uint32_t); (offset & addressmask) != 0U; in ddr_test_addr_bus() 122 offset <<= 1) { in ddr_test_addr_bus() 125 (offset != testoffset)) { in ddr_test_addr_bus() 158 offset <<= 1; in ddr_check_size() 161 INFO("Memory size = 0x%x (%d MB)\n", offset, offset / (1024U * 1024U)); in ddr_check_size() [all …]
|
/trusted-firmware-a/plat/hisilicon/hikey/ |
A D | hisi_ipc.c | 101 unsigned int offset; in hisi_ipc_cpu_on_off() local 110 val |= (0x01 << offset); in hisi_ipc_cpu_on_off() 133 unsigned int offset; in hisi_ipc_cluster_on_off() local 136 offset = cluster * 4; in hisi_ipc_cluster_on_off() 138 offset = cluster * 4 + 1; in hisi_ipc_cluster_on_off() 142 val |= (0x01 << offset); in hisi_ipc_cluster_on_off() 164 unsigned int offset; in hisi_ipc_cpu_suspend() local 170 val |= (0x01 << offset); in hisi_ipc_cpu_suspend() 180 unsigned int offset; in hisi_ipc_cluster_suspend() local 182 offset = cluster * 4 + 1; in hisi_ipc_cluster_suspend() [all …]
|
/trusted-firmware-a/plat/mediatek/mt8183/drivers/gpio/ |
A D | mtgpio.c | 182 const int32_t offset = 0x0c0; in gpio_get_pupd_iocfg() local 186 return IOCFG_1_BASE + offset; in gpio_get_pupd_iocfg() 188 return IOCFG_2_BASE + offset; in gpio_get_pupd_iocfg() 190 return IOCFG_5_BASE + offset; in gpio_get_pupd_iocfg() 192 return IOCFG_7_BASE + offset; in gpio_get_pupd_iocfg() 232 1U << PULL_offset[pin].offset); in mt_set_gpio_pull_enable_chip() 246 1U << PULL_offset[pin].offset); in mt_set_gpio_pull_enable_chip() 305 1U << PULL_offset[pin].offset); in mt_set_gpio_pull_select_chip() 312 1U << PULL_offset[pin].offset); in mt_set_gpio_pull_select_chip() 315 if (PULL_offset[pin].offset == -1) in mt_set_gpio_pull_select_chip() [all …]
|
/trusted-firmware-a/drivers/mtd/nand/ |
A D | core.c | 24 int nand_read(unsigned int offset, uintptr_t buffer, size_t length, in nand_read() argument 27 unsigned int block = offset / nand_dev.block_size; in nand_read() 28 unsigned int end_block = (offset + length - 1U) / nand_dev.block_size; in nand_read() 30 (offset % nand_dev.block_size) / nand_dev.page_size; in nand_read() 32 unsigned int start_offset = offset % nand_dev.page_size; in nand_read() 39 block, end_block, page_start, nb_pages, length, offset); in nand_read() 115 int nand_seek_bb(uintptr_t base, unsigned int offset, size_t *extra_offset) in nand_seek_bb() argument 125 if (offset != 0U) { in nand_seek_bb() 126 offset_block = (base + offset - 1U) / nand_dev.block_size; in nand_seek_bb()
|
/trusted-firmware-a/drivers/st/reset/ |
A D | stm32mp1_reset.c | 31 uint32_t offset = id2reg_offset(id); in stm32mp_reset_assert() local 35 mmio_write_32(rcc_base + offset, bitmsk); in stm32mp_reset_assert() 40 while ((mmio_read_32(rcc_base + offset) & bitmsk) == 0U) { in stm32mp_reset_assert() 52 uint32_t offset = id2reg_offset(id) + RCC_RSTCLRR_OFFSET; in stm32mp_reset_deassert() local 56 mmio_write_32(rcc_base + offset, bitmsk); in stm32mp_reset_deassert() 61 while ((mmio_read_32(rcc_base + offset) & bitmsk) != 0U) { in stm32mp_reset_deassert()
|
/trusted-firmware-a/plat/brcm/board/common/ |
A D | bcm_elog.c | 51 uint32_t offset, len; in elog_putchar() local 53 offset = mmio_read_32(elog->base + BCM_ELOG_OFF_OFFSET); in elog_putchar() 55 mmio_write_8(elog->base + offset, c); in elog_putchar() 56 offset++; in elog_putchar() 59 if (offset >= elog->max_size) in elog_putchar() 60 offset = BCM_ELOG_HEADER_LEN; in elog_putchar() 66 mmio_write_32(elog->base + BCM_ELOG_OFF_OFFSET, offset); in elog_putchar() 148 uint32_t offset, len; in bcm_elog_copy_log() local 161 offset = mmio_read_32(elog->base + BCM_ELOG_OFF_OFFSET); in bcm_elog_copy_log() 162 if (offset >= max_size) { in bcm_elog_copy_log() [all …]
|
/trusted-firmware-a/plat/intel/soc/common/drivers/qspi/ |
A D | cadence_qspi.c | 673 offset += write_size; in cad_qspi_write_bank() 689 if ((offset >= qspi_device_size) || in cad_qspi_read() 690 (offset + size - 1 >= qspi_device_size) || in cad_qspi_read() 710 CAD_QSPI_BANK_ADDR(offset) + 1; in cad_qspi_read() 745 status = cad_qspi_erase_subsector(offset); in cad_qspi_erase() 749 offset += erase_size; in cad_qspi_erase() 764 if ((offset >= qspi_device_size) || in cad_qspi_write() 765 (offset + size - 1 >= qspi_device_size) || in cad_qspi_write() 777 CAD_QSPI_BANK_ADDR(offset) + 1; in cad_qspi_write() 778 bank_addr = offset & CAD_QSPI_BANK_ADDR_MSK; in cad_qspi_write() [all …]
|
/trusted-firmware-a/drivers/renesas/common/io/ |
A D | io_rcar.c | 36 const uint32_t offset; member 48 uintptr_t offset; member 177 *offset += 0x800000; in file_to_offset() 194 *offset = 0U; in file_to_offset() 308 uintptr_t offset; in load_bl33x() local 385 ssize_t offset; in rcar_dev_init() local 495 if (current_file.offset != 0U) { in rcar_file_open() 500 rc = file_to_offset(spec->offset, &offset, &cert, &noload, &partition); in rcar_file_open() 507 current_file.offset = 1; in rcar_file_open() 529 current_file.offset = offset; in rcar_file_open() [all …]
|
/trusted-firmware-a/drivers/brcm/emmc/ |
A D | emmc_pboot_hal_memory_drv.c | 357 if (offset > 0) { in sdio_read() 361 if (remSize < (blockSize - offset)) { in sdio_read() 366 remSize -= (blockSize - offset); in sdio_read() 367 rdCount += (blockSize - offset); in sdio_read() 368 manual_copy_size = blockSize - offset; in sdio_read() 474 offset = in sdio_write() 489 if (offset > 0) { in sdio_write() 514 offset)) { in sdio_write() 521 offset); in sdio_write() 524 offset); in sdio_write() [all …]
|
/trusted-firmware-a/drivers/marvell/comphy/ |
A D | phy-comphy-3700.c | 229 mmio_write_32(addr + COMPHY_LANE2_INDIR_ADDR_OFFSET, offset); in comphy_set_indirect() 232 offset + USB3PHY_LANE2_REG_BASE_OFFSET); in comphy_set_indirect() 291 uint32_t offset, data = 0, ref_clk; in mvebu_a3700_comphy_sata_power_on() local 375 uintptr_t offset; in mvebu_a3700_comphy_sgmii_power_on() local 408 reg_set(offset, data, mask); in mvebu_a3700_comphy_sgmii_power_on() 413 reg_set(offset, data, mask); in mvebu_a3700_comphy_sgmii_power_on() 434 reg_set(offset, data, mask); in mvebu_a3700_comphy_sgmii_power_on() 594 uintptr_t offset; in mvebu_a3700_comphy_sgmii_power_off() local 602 reg_set(offset, data, mask); in mvebu_a3700_comphy_sgmii_power_off() 959 uint32_t offset; in mvebu_a3700_comphy_sata_power_off() local [all …]
|
/trusted-firmware-a/include/drivers/io/ |
A D | io_mtd.h | 35 int (*read)(unsigned int offset, uintptr_t buffer, size_t length, 46 int (*write)(unsigned int offset, uintptr_t buffer, size_t length); 56 int (*seek)(uintptr_t base, unsigned int offset, size_t *extra_offset); 62 size_t offset; member
|
/trusted-firmware-a/drivers/nxp/sec_mon/ |
A D | snvs.c | 137 void snvs_write_lp_gpr_bit(uint32_t offset, uint32_t bit_pos, bool flag_val) in snvs_write_lp_gpr_bit() argument 140 snvs_write32(g_nxp_snvs_addr + offset, in snvs_write_lp_gpr_bit() 141 (snvs_read32(g_nxp_snvs_addr + offset)) in snvs_write_lp_gpr_bit() 144 snvs_write32(g_nxp_snvs_addr + offset, in snvs_write_lp_gpr_bit() 145 (snvs_read32(g_nxp_snvs_addr + offset)) in snvs_write_lp_gpr_bit() 150 uint32_t snvs_read_lp_gpr_bit(uint32_t offset, uint32_t bit_pos) in snvs_read_lp_gpr_bit() argument 152 return (snvs_read32(g_nxp_snvs_addr + offset) & (1 << bit_pos)); in snvs_read_lp_gpr_bit()
|
/trusted-firmware-a/lib/debugfs/ |
A D | devfip.c | 23 long offset[NR_FILES]; member 140 if (fip->offset[i] == -1) { in fipgen() 204 if ((c->qid >= NR_FILES) || (fip->offset[c->qid] < 0)) { in fipread() 213 if (c->offset >= size) { in fipread() 221 if (n > (size - c->offset)) { in fipread() 222 n = size - c->offset; in fipread() 225 off = fip->offset[c->qid] + c->offset; in fipread() 232 c->offset += n; in fipread() 260 fip->offset[n] = -1; in fipmount() 299 fip->offset[n] = entry.offset_address; in fipmount()
|
/trusted-firmware-a/drivers/brcm/ |
A D | spi_flash.c | 155 int spi_flash_read(struct spi_flash *flash, uint32_t offset, in spi_flash_read() argument 170 read_addr = offset; in spi_flash_read() 180 offset += read_len; in spi_flash_read() 190 int spi_flash_write(struct spi_flash *flash, uint32_t offset, in spi_flash_write() argument 209 write_addr = offset; in spi_flash_write() 210 byte_addr = offset % page_size; in spi_flash_write() 226 offset += chunk_len; in spi_flash_write() 234 int spi_flash_erase(struct spi_flash *flash, uint32_t offset, uint32_t len) in spi_flash_erase() argument 242 if (offset % erase_size || len % erase_size) { in spi_flash_erase() 255 erase_addr = offset; in spi_flash_erase() [all …]
|
/trusted-firmware-a/plat/nxp/common/nv_storage/ |
A D | plat_nv_storage.c | 44 uint8_t offset = 0U; in read_nv_app_data() local 48 nv_app_data_array[offset] = snvs_read_app_data_bit(offset); in read_nv_app_data() 49 offset++; in read_nv_app_data() 51 } while (offset < APP_DATA_MAX_OFFSET); in read_nv_app_data()
|
/trusted-firmware-a/plat/brcm/board/stingray/src/ |
A D | paxc.c | 71 uint32_t idx, offset = 0; in paxc_reg_dump() local 74 for (idx = 0; idx < NR_PAXC_REGS; idx++, offset += 4) in paxc_reg_dump() 75 VERBOSE("offset: 0x%x val: 0x%x\n", offset, in paxc_reg_dump() 76 mmio_read_32(PAXC_BASE + offset)); in paxc_reg_dump() 89 uint32_t idx, offset = 0; in mhb_reg_dump() local 92 for (idx = 0; idx < NR_MHB_REGS; idx++, offset += 4) in mhb_reg_dump() 93 VERBOSE("offset: 0x%x val: 0x%x\n", offset, in mhb_reg_dump() 94 mmio_read_32(MHB_BASE + offset)); in mhb_reg_dump()
|
/trusted-firmware-a/drivers/io/ |
A D | io_block.c | 139 assert(((region->offset % cur->dev_spec->block_size) == 0) && in block_open() 142 cur->base = region->offset; in block_open() 158 assert((offset >= 0) && ((unsigned long long)offset < cur->size)); in block_seek() 162 cur->file_pos = (unsigned long long)offset; in block_seek() 165 cur->file_pos += (unsigned long long)offset; in block_seek() 317 request = ops->read(lba, buf->offset, request); in block_read() 338 (void *)(buf->offset + skip), in block_read() 446 request = ops->read(lba, buf->offset, request); in block_write() 467 memcpy((void *)(buf->offset + skip), in block_write() 471 request = ops->write(lba, buf->offset, request); in block_write() [all …]
|