Home
last modified time | relevance | path

Searched refs:ofs (Results 1 – 25 of 43) sorted by relevance

12

/rk3399_rockchip-uboot/cmd/
H A Donenand.c67 loff_t ofs = from; in onenand_block_read() local
79 ret = mtd_block_isbad(mtd, ofs); in onenand_block_read()
82 (u32)(ofs >> this->erase_shift), (u32)ofs); in onenand_block_read()
83 ofs += blocksize; in onenand_block_read()
93 ret = mtd_read_oob(mtd, ofs, &ops); in onenand_block_read()
95 printk("Read failed 0x%x, %d\n", (u32)ofs, ret); in onenand_block_read()
96 ofs += blocksize; in onenand_block_read()
99 ofs += blocksize; in onenand_block_read()
138 loff_t ofs; in onenand_block_write() local
155 ofs = to; in onenand_block_write()
[all …]
/rk3399_rockchip-uboot/arch/arm/cpu/arm926ejs/mxs/
H A Diomux.c32 u32 reg, ofs, bp, bm; in mxs_iomux_setup_pad() local
37 ofs = 0x100; in mxs_iomux_setup_pad()
38 ofs += PAD_BANK(pad) * 0x20 + PAD_PIN(pad) / 16 * 0x10; in mxs_iomux_setup_pad()
41 reg = readl(iomux_base + ofs); in mxs_iomux_setup_pad()
44 writel(reg, iomux_base + ofs); in mxs_iomux_setup_pad()
47 ofs = DRIVE_OFFSET; in mxs_iomux_setup_pad()
48 ofs += PAD_BANK(pad) * 0x40 + PAD_PIN(pad) / 8 * 0x10; in mxs_iomux_setup_pad()
53 reg = readl(iomux_base + ofs); in mxs_iomux_setup_pad()
56 writel(reg, iomux_base + ofs); in mxs_iomux_setup_pad()
61 mxs_reg = (struct mxs_register_32 *)(iomux_base + ofs); in mxs_iomux_setup_pad()
[all …]
/rk3399_rockchip-uboot/lib/
H A Dslre.c440 loop_greedy(const struct slre *r, int pc, const char *s, int len, int *ofs) in loop_greedy() argument
444 matched_offset = *ofs; in loop_greedy()
446 while (match(r, pc + 2, s, len, ofs, NULL)) { in loop_greedy()
447 saved_offset = *ofs; in loop_greedy()
448 if (match(r, pc + r->code[pc + 1], s, len, ofs, NULL)) in loop_greedy()
450 *ofs = saved_offset; in loop_greedy()
453 *ofs = matched_offset; in loop_greedy()
457 loop_non_greedy(const struct slre *r, int pc, const char *s, int len, int *ofs) in loop_non_greedy() argument
459 int saved_offset = *ofs; in loop_non_greedy()
461 while (match(r, pc + 2, s, len, ofs, NULL)) { in loop_non_greedy()
[all …]
/rk3399_rockchip-uboot/tools/
H A Dlpc32xximage.c124 static void print_hdr_byte(struct nand_page_0_boot_header *hdr, int ofs) in print_hdr_byte() argument
126 printf("header[%d] = %02x\n", ofs, hdr->data[ofs]); in print_hdr_byte()
133 int ofs; in lpc32xximage_print_header() local
135 for (ofs = 0; ofs <= 12; ofs++) in lpc32xximage_print_header()
136 print_hdr_byte(hdr, ofs); in lpc32xximage_print_header()
/rk3399_rockchip-uboot/include/
H A Dnand.h48 static inline int nand_read(struct mtd_info *info, loff_t ofs, size_t *len, in nand_read() argument
51 return mtd_read(info, ofs, *len, (size_t *)len, buf); in nand_read()
54 static inline int nand_write(struct mtd_info *info, loff_t ofs, size_t *len, in nand_write() argument
57 return mtd_write(info, ofs, *len, (size_t *)len, buf); in nand_write()
60 static inline int nand_block_isbad(struct mtd_info *info, loff_t ofs) in nand_block_isbad() argument
62 return mtd_block_isbad(info, ofs); in nand_block_isbad()
113 loff_t ofs);
114 int nand_verify(struct mtd_info *mtd, loff_t ofs, size_t len, u_char *buf);
H A Dspi_flash.h184 static inline int spi_flash_protect(struct spi_flash *flash, u32 ofs, u32 len, in spi_flash_protect() argument
191 return flash->flash_lock(flash, ofs, len); in spi_flash_protect()
193 return flash->flash_unlock(flash, ofs, len); in spi_flash_protect()
H A Dsym53c8xx.h386 #define SCR_REG_OFS(ofs) ((((ofs) & 0x7f) << 16ul)) /* + ((ofs) & 0x80)) */ argument
456 #define SCR_REG_OFS2(ofs) (((ofs) & 0xff) << 16ul) argument
/rk3399_rockchip-uboot/drivers/ata/
H A Dlibata.c44 unsigned int ofs, unsigned int len) in ata_id_string() argument
49 c = id[ofs] >> 8; in ata_id_string()
53 c = id[ofs] & 0xff; in ata_id_string()
57 ofs++; in ata_id_string()
63 unsigned int ofs, unsigned int len) in ata_id_c_string() argument
67 ata_id_string(id, s, ofs, len - 1); in ata_id_c_string()
/rk3399_rockchip-uboot/fs/jffs2/
H A Djffs2_1pass.c1386 int ret, __maybe_unused ofs; in jffs2_sum_scan_sumnode() local
1389 ofs = part->sector_size - sumsize; in jffs2_sum_scan_sumnode()
1392 offset, offset + ofs, sumsize); in jffs2_sum_scan_sumnode()
1549 uint32_t ofs, prevofs; in jffs2_1pass_build_lists() local
1623 ofs = 0; in jffs2_1pass_build_lists()
1626 while (ofs < EMPTY_SCAN_SIZE(part->sector_size) && in jffs2_1pass_build_lists()
1627 *(uint32_t *)(&buf[ofs]) == 0xFFFFFFFF) in jffs2_1pass_build_lists()
1628 ofs += 4; in jffs2_1pass_build_lists()
1630 if (ofs == EMPTY_SCAN_SIZE(part->sector_size)) in jffs2_1pass_build_lists()
1633 ofs += sector_ofs; in jffs2_1pass_build_lists()
[all …]
H A Djffs2_nand_1pass.c766 unsigned ofs, unsigned len) in jffs2_fill_scan_buf() argument
772 ret = nand_read(mtd, ofs, &olen, buf); in jffs2_fill_scan_buf()
774 printf("nand_read(0x%x bytes from 0x%x) returned %d\n", len, ofs, ret); in jffs2_fill_scan_buf()
778 printf("Read at 0x%x gave only 0x%x bytes\n", ofs, olen); in jffs2_fill_scan_buf()
790 unsigned nr_blocks, sectorsize, ofs, offset; in jffs2_1pass_build_lists() local
828 ofs = 0; in jffs2_1pass_build_lists()
830 while (ofs < EMPTY_SCAN_SIZE && *(uint32_t *)(&buf[ofs]) == 0xFFFFFFFF) in jffs2_1pass_build_lists()
831 ofs += 4; in jffs2_1pass_build_lists()
832 if (ofs == EMPTY_SCAN_SIZE) in jffs2_1pass_build_lists()
837 offset += ofs; in jffs2_1pass_build_lists()
[all …]
/rk3399_rockchip-uboot/drivers/mtd/spi/
H A Dspi_flash.c585 static int sst26_lock_ctl(struct spi_flash *flash, u32 ofs, size_t len, enum lock_ctl ctl) in sst26_lock_ctl() argument
593 if ((ofs & (SZ_64K - 1)) || (len & (SZ_64K - 1))) in sst26_lock_ctl()
596 if (ofs + len > flash->size) in sst26_lock_ctl()
614 rptr_64k = min_t(u32, ofs + len , flash->size - SST26_BOUND_REG_SIZE); in sst26_lock_ctl()
615 lptr_64k = max_t(u32, ofs, SST26_BOUND_REG_SIZE); in sst26_lock_ctl()
617 upper_64k = ((ofs + len) > (flash->size - SST26_BOUND_REG_SIZE)); in sst26_lock_ctl()
618 lower_64k = (ofs < SST26_BOUND_REG_SIZE); in sst26_lock_ctl()
683 static int sst26_unlock(struct spi_flash *flash, u32 ofs, size_t len) in sst26_unlock() argument
685 return sst26_lock_ctl(flash, ofs, len, SST26_CTL_UNLOCK); in sst26_unlock()
688 static int sst26_lock(struct spi_flash *flash, u32 ofs, size_t len) in sst26_lock() argument
[all …]
H A Dspi-nor-core.c629 static void stm_get_locked_range(struct spi_nor *nor, u8 sr, loff_t *ofs, in stm_get_locked_range() argument
639 *ofs = 0; in stm_get_locked_range()
645 *ofs = 0; in stm_get_locked_range()
647 *ofs = mtd->size - *len; in stm_get_locked_range()
655 static int stm_check_lock_status_sr(struct spi_nor *nor, loff_t ofs, u64 len, in stm_check_lock_status_sr() argument
668 return (ofs + len <= lock_offs + lock_len) && (ofs >= lock_offs); in stm_check_lock_status_sr()
671 return (ofs >= lock_offs + lock_len) || (ofs + len <= lock_offs); in stm_check_lock_status_sr()
674 static int stm_is_locked_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, in stm_is_locked_sr() argument
677 return stm_check_lock_status_sr(nor, ofs, len, sr, true); in stm_is_locked_sr()
680 static int stm_is_unlocked_sr(struct spi_nor *nor, loff_t ofs, uint64_t len, in stm_is_unlocked_sr() argument
[all …]
/rk3399_rockchip-uboot/drivers/rtc/
H A Dmc146818.c57 int ofs = 0; in mc146818_read8()
60 ofs = 2; in mc146818_read8()
63 out8(RTC_PORT_MC146818 + ofs, reg); in mc146818_read8()
65 return in8(RTC_PORT_MC146818 + ofs + 1); in mc146818_read8()
74 int ofs = 0; in mc146818_write8()
77 ofs = 2; in mc146818_write8()
80 out8(RTC_PORT_MC146818 + ofs, reg); in mc146818_write8()
81 out8(RTC_PORT_MC146818 + ofs + 1, val); in mc146818_write8()
/rk3399_rockchip-uboot/drivers/mtd/
H A Dmtdconcat.c504 static int concat_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in concat_lock() argument
513 if (ofs >= subdev->size) { in concat_lock()
515 ofs -= subdev->size; in concat_lock()
518 if (ofs + len > subdev->size) in concat_lock()
519 size = subdev->size - ofs; in concat_lock()
523 err = mtd_lock(subdev, ofs, size); in concat_lock()
532 ofs = 0; in concat_lock()
538 static int concat_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in concat_unlock() argument
547 if (ofs >= subdev->size) { in concat_unlock()
549 ofs -= subdev->size; in concat_unlock()
[all …]
H A Daltera_qspi.c59 static void altera_qspi_get_locked_range(struct mtd_info *mtd, loff_t *ofs,
65 loff_t ofs; in flash_print_info() local
70 altera_qspi_get_locked_range(mtd, &ofs, &len); in flash_print_info()
74 info->start[0] + ofs, len); in flash_print_info()
233 static void altera_qspi_get_locked_range(struct mtd_info *mtd, loff_t *ofs, in altera_qspi_get_locked_range() argument
245 *ofs = 0; in altera_qspi_get_locked_range()
252 *ofs = mtd->size - *len; in altera_qspi_get_locked_range()
256 static int altera_qspi_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in altera_qspi_lock() argument
268 sector_start = ofs / mtd->erasesize; in altera_qspi_lock()
269 sector_end = (ofs + len) / mtd->erasesize; in altera_qspi_lock()
[all …]
H A Dcfi_mtd.c108 static int cfi_mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in cfi_mtd_lock() argument
113 flash_protect(FLAG_PROTECT_SET, fi->start[0] + ofs, in cfi_mtd_lock()
114 fi->start[0] + ofs + len - 1, fi); in cfi_mtd_lock()
120 static int cfi_mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in cfi_mtd_unlock() argument
125 flash_protect(FLAG_PROTECT_CLEAR, fi->start[0] + ofs, in cfi_mtd_unlock()
126 fi->start[0] + ofs + len - 1, fi); in cfi_mtd_unlock()
H A Dmtdcore.c1573 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_lock() argument
1577 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_lock()
1581 return mtd->_lock(mtd, ofs, len); in mtd_lock()
1585 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_unlock() argument
1589 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_unlock()
1593 return mtd->_unlock(mtd, ofs, len); in mtd_unlock()
1597 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_is_locked() argument
1601 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_is_locked()
1605 return mtd->_is_locked(mtd, ofs, len); in mtd_is_locked()
1609 int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs) in mtd_block_isreserved() argument
[all …]
H A Dmtdpart.c468 static int part_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in part_lock() argument
470 return mtd->parent->_lock(mtd->parent, ofs + mtd->offset, len); in part_lock()
473 static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in part_unlock() argument
475 return mtd->parent->_unlock(mtd->parent, ofs + mtd->offset, len); in part_unlock()
478 static int part_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) in part_is_locked() argument
480 return mtd->parent->_is_locked(mtd->parent, ofs + mtd->offset, len); in part_is_locked()
500 static int part_block_isreserved(struct mtd_info *mtd, loff_t ofs) in part_block_isreserved() argument
502 ofs += mtd->offset; in part_block_isreserved()
503 return mtd->parent->_block_isreserved(mtd->parent, ofs); in part_block_isreserved()
506 static int part_block_isbad(struct mtd_info *mtd, loff_t ofs) in part_block_isbad() argument
[all …]
/rk3399_rockchip-uboot/arch/xtensa/include/asm/arch-de212/
H A Dtie-asm.h56 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
57 xchal_sa_start \continue, \ofs
110 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
111 xchal_sa_start \continue, \ofs
/rk3399_rockchip-uboot/arch/xtensa/include/asm/arch-dc232b/
H A Dtie-asm.h36 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
37 xchal_sa_start \continue, \ofs
77 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL
78 xchal_sa_start \continue, \ofs
/rk3399_rockchip-uboot/include/linux/mtd/
H A Dmtd.h275 int (*_lock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
276 int (*_unlock) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
277 int (*_is_locked) (struct mtd_info *mtd, loff_t ofs, uint64_t len);
278 int (*_block_isreserved) (struct mtd_info *mtd, loff_t ofs);
279 int (*_block_isbad) (struct mtd_info *mtd, loff_t ofs);
280 int (*_block_markbad) (struct mtd_info *mtd, loff_t ofs);
446 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
447 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
448 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len);
449 int mtd_block_isreserved(struct mtd_info *mtd, loff_t ofs);
[all …]
/rk3399_rockchip-uboot/fs/ext4/
H A Dext4_journal.c339 int ofs, flags; in recover_transaction() local
355 ofs = sizeof(struct journal_header_t); in recover_transaction()
358 tag = (struct ext3_journal_block_tag *)(p_jdb + ofs); in recover_transaction()
359 ofs += sizeof(struct ext3_journal_block_tag); in recover_transaction()
361 if (ofs > fs->blksz) in recover_transaction()
366 ofs += 16; in recover_transaction()
402 int ofs, flags; in ext4fs_check_journal_state() local
466 ofs = sizeof(struct journal_header_t); in ext4fs_check_journal_state()
469 (p_jdb + ofs); in ext4fs_check_journal_state()
470 ofs += sizeof(struct ext3_journal_block_tag); in ext4fs_check_journal_state()
[all …]
/rk3399_rockchip-uboot/arch/xtensa/include/asm/arch-dc233c/
H A Dtie-asm.h57 .macro xchal_ncp_store ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
58 xchal_sa_start \continue, \ofs
121 .macro xchal_ncp_load ptr at1 at2 at3 at4 continue=0 ofs=-1 select=XTHAL_SAS_ALL alloc=0
122 xchal_sa_start \continue, \ofs
/rk3399_rockchip-uboot/arch/arm/mach-tegra/
H A Dpsci.S32 .macro get_csr_reg cpu, ofs, tmp
35 moveq \ofs, #FLOW_CTRL_CPU_CSR
36 addne \ofs, \tmp, #FLOW_CTRL_CPU1_CSR - 8
/rk3399_rockchip-uboot/drivers/mtd/onenand/
H A Donenand_base.c264 loff_t ofs = 0; in flexonenand_addr() local
270 ofs = this->diesize[0]; in flexonenand_addr()
274 ofs += (loff_t) block << (this->erase_shift - 1); in flexonenand_addr()
276 ofs += (loff_t) (block - boundary - 1) in flexonenand_addr()
278 return ofs; in flexonenand_addr()
1711 static int onenand_block_isbad_nolock(struct mtd_info *mtd, loff_t ofs, int allowbbt) in onenand_block_isbad_nolock() argument
1717 return bbm->isbad_bbt(mtd, ofs, allowbbt); in onenand_block_isbad_nolock()
1870 int onenand_block_isbad(struct mtd_info *mtd, loff_t ofs) in onenand_block_isbad() argument
1875 if (ofs > mtd->size) in onenand_block_isbad()
1879 ret = onenand_block_isbad_nolock(mtd,ofs, 0); in onenand_block_isbad()
[all …]

12