Home
last modified time | relevance | path

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

1234

/drivers/mtd/devices/
Dgoldfish_nand.c88 loff_t ofs = instr->addr; in goldfish_nand_erase() local
92 if (ofs + len > mtd->size) in goldfish_nand_erase()
94 rem = do_div(ofs, mtd->writesize); in goldfish_nand_erase()
97 ofs *= (mtd->writesize + mtd->oobsize); in goldfish_nand_erase()
103 goldfish_invalidate_cache(mtd, ofs, len); in goldfish_nand_erase()
104 if(goldfish_nand_cmd(mtd, NAND_CMD_ERASE, ofs, len, NULL) != len) { in goldfish_nand_erase()
106 "%llx, erase_size %x\n", ofs, len, mtd->size, mtd->erasesize); in goldfish_nand_erase()
117 "%llx, erase_size %x\n", ofs, len, mtd->size, mtd->erasesize); in goldfish_nand_erase()
121 static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs, in goldfish_nand_read_oob() argument
126 if(ofs + ops->len > mtd->size) in goldfish_nand_read_oob()
[all …]
Ddoc2001plus.c39 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs,
41 static int doc_write_oob(struct mtd_info *mtd, loff_t ofs,
121 unsigned long ofs, unsigned char xtraflags1, in DoC_Address() argument
127 ofs >>= doc->interleave; in DoC_Address()
132 WriteDOC(ofs & 0xff, docptr, Mplus_FlashAddress); in DoC_Address()
136 WriteDOC((ofs >> 9) & 0xff, docptr, Mplus_FlashAddress); in DoC_Address()
137 WriteDOC((ofs >> 17) & 0xff, docptr, Mplus_FlashAddress); in DoC_Address()
141 WriteDOC(ofs & 0xff, docptr, Mplus_FlashAddress); in DoC_Address()
142 WriteDOC((ofs >> 9) & 0xff, docptr, Mplus_FlashAddress); in DoC_Address()
143 WriteDOC((ofs >> 17) & 0xff, docptr, Mplus_FlashAddress); in DoC_Address()
[all …]
Ddoc2000.c54 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs,
56 static int doc_write_oob(struct mtd_info *mtd, loff_t ofs,
58 static int doc_write_oob_nolock(struct mtd_info *mtd, loff_t ofs, size_t len,
162 static int DoC_Address(struct DiskOnChip *doc, int numbytes, unsigned long ofs, in DoC_Address() argument
190 WriteDOC(ofs & 0xff, docptr, CDSNSlowIO); in DoC_Address()
191 WriteDOC_(ofs & 0xff, docptr, doc->ioreg); in DoC_Address()
195 ofs = ofs >> 8; in DoC_Address()
197 ofs = ofs >> 9; in DoC_Address()
201 for (i = 0; i < doc->pageadrlen; i++, ofs = ofs >> 8) { in DoC_Address()
203 WriteDOC(ofs & 0xff, docptr, CDSNSlowIO); in DoC_Address()
[all …]
Ddoc2001.c35 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs,
37 static int doc_write_oob(struct mtd_info *mtd, loff_t ofs,
114 static inline void DoC_Address(void __iomem * docptr, int numbytes, unsigned long ofs, in DoC_Address() argument
126 WriteDOC(ofs & 0xff, docptr, Mil_CDSN_IO); in DoC_Address()
131 WriteDOC((ofs >> 9) & 0xff, docptr, Mil_CDSN_IO); in DoC_Address()
132 WriteDOC((ofs >> 17) & 0xff, docptr, Mil_CDSN_IO); in DoC_Address()
137 WriteDOC(ofs & 0xff, docptr, Mil_CDSN_IO); in DoC_Address()
138 WriteDOC((ofs >> 9) & 0xff, docptr, Mil_CDSN_IO); in DoC_Address()
139 WriteDOC((ofs >> 17) & 0xff, docptr, Mil_CDSN_IO); in DoC_Address()
605 static int doc_read_oob(struct mtd_info *mtd, loff_t ofs, in doc_read_oob() argument
[all …]
Ddocg3.c424 static void doc_setup_writeaddr_sector(struct docg3 *docg3, int sector, int ofs) in doc_setup_writeaddr_sector() argument
426 ofs = ofs >> 2; in doc_setup_writeaddr_sector()
428 doc_flash_address(docg3, ofs & 0xff); in doc_setup_writeaddr_sector()
448 int wear, int ofs) in doc_read_seek() argument
453 block0, block1, page, ofs, wear); in doc_read_seek()
455 if (!wear && (ofs < 2 * DOC_LAYOUT_PAGE_SIZE)) { in doc_read_seek()
497 int ofs) in doc_write_seek() argument
502 block0, block1, page, ofs); in doc_write_seek()
506 if (ofs < 2 * DOC_LAYOUT_PAGE_SIZE) { in doc_write_seek()
520 doc_setup_writeaddr_sector(docg3, sector, ofs); in doc_write_seek()
[all …]
/drivers/mtd/maps/
Dpci.c29 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
37 unsigned long (*translate)(struct map_pci_info *map, unsigned long ofs);
41 static map_word mtd_pci_read8(struct map_info *_map, unsigned long ofs) in mtd_pci_read8() argument
45 val.x[0]= readb(map->base + map->translate(map, ofs)); in mtd_pci_read8()
51 static map_word mtd_pci_read16(struct map_info *_map, unsigned long ofs)
55 val.x[0] = readw(map->base + map->translate(map, ofs));
60 static map_word mtd_pci_read32(struct map_info *_map, unsigned long ofs) in mtd_pci_read32() argument
64 val.x[0] = readl(map->base + map->translate(map, ofs)); in mtd_pci_read32()
75 static void mtd_pci_write8(struct map_info *_map, map_word val, unsigned long ofs) in mtd_pci_write8() argument
79 writeb(val.x[0], map->base + map->translate(map, ofs)); in mtd_pci_write8()
[all …]
Dgpio-addr-flash.c63 static void gf_set_gpios(struct async_state *state, unsigned long ofs) in gf_set_gpios() argument
67 ofs /= state->win_size; in gf_set_gpios()
69 value = ofs & (1 << i); in gf_set_gpios()
82 static map_word gf_read(struct map_info *map, unsigned long ofs) in gf_read() argument
88 gf_set_gpios(state, ofs); in gf_read()
90 word = readw(map->virt + (ofs % state->win_size)); in gf_read()
125 static void gf_write(struct map_info *map, map_word d1, unsigned long ofs) in gf_write() argument
130 gf_set_gpios(state, ofs); in gf_write()
133 writew(d, map->virt + (ofs % state->win_size)); in gf_write()
Dixp2000.c44 static inline unsigned long flash_bank_setup(struct map_info *map, unsigned long ofs) in flash_bank_setup() argument
49 return (set_bank ? set_bank(ofs) : ofs); in flash_bank_setup()
72 static map_word ixp2000_flash_read8(struct map_info *map, unsigned long ofs) in ixp2000_flash_read8() argument
76 val.x[0] = *((u8 *)(map->map_priv_1 + flash_bank_setup(map, ofs))); in ixp2000_flash_read8()
93 static void ixp2000_flash_write8(struct map_info *map, map_word d, unsigned long ofs) in ixp2000_flash_write8() argument
96 flash_bank_setup(map, ofs))) = d.x[0]; in ixp2000_flash_write8()
Dmap_funcs.c12 static map_word __xipram simple_map_read(struct map_info *map, unsigned long ofs) in simple_map_read() argument
14 return inline_map_read(map, ofs); in simple_map_read()
17 static void __xipram simple_map_write(struct map_info *map, const map_word datum, unsigned long ofs) in simple_map_write() argument
19 inline_map_write(map, datum, ofs); in simple_map_write()
Ddc21285.c54 static map_word dc21285_read8(struct map_info *map, unsigned long ofs) in dc21285_read8() argument
57 val.x[0] = *(uint8_t*)(map->virt + ofs); in dc21285_read8()
61 static map_word dc21285_read16(struct map_info *map, unsigned long ofs) in dc21285_read16() argument
64 val.x[0] = *(uint16_t*)(map->virt + ofs); in dc21285_read16()
68 static map_word dc21285_read32(struct map_info *map, unsigned long ofs) in dc21285_read32() argument
71 val.x[0] = *(uint32_t*)(map->virt + ofs); in dc21285_read32()
Dpcmciamtd.c108 static map_word pcmcia_read8_remap(struct map_info *map, unsigned long ofs) in pcmcia_read8_remap() argument
113 addr = remap_window(map, ofs); in pcmcia_read8_remap()
118 pr_debug("ofs = 0x%08lx (%p) data = 0x%02lx\n", ofs, addr, d.x[0]); in pcmcia_read8_remap()
123 static map_word pcmcia_read16_remap(struct map_info *map, unsigned long ofs) in pcmcia_read16_remap() argument
128 addr = remap_window(map, ofs); in pcmcia_read16_remap()
133 pr_debug("ofs = 0x%08lx (%p) data = 0x%04lx\n", ofs, addr, d.x[0]); in pcmcia_read16_remap()
217 static map_word pcmcia_read8(struct map_info *map, unsigned long ofs) in pcmcia_read8() argument
225 d.x[0] = readb(win_base + ofs); in pcmcia_read8()
227 ofs, win_base + ofs, d.x[0]); in pcmcia_read8()
232 static map_word pcmcia_read16(struct map_info *map, unsigned long ofs) in pcmcia_read16() argument
[all …]
/drivers/net/wireless/iwlwifi/
Diwl-io.h36 static inline void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val) in iwl_write8() argument
38 trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val); in iwl_write8()
39 iwl_trans_write8(trans, ofs, val); in iwl_write8()
42 static inline void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_write32() argument
44 trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val); in iwl_write32()
45 iwl_trans_write32(trans, ofs, val); in iwl_write32()
48 static inline u32 iwl_read32(struct iwl_trans *trans, u32 ofs) in iwl_read32() argument
50 u32 val = iwl_trans_read32(trans, ofs); in iwl_read32()
51 trace_iwlwifi_dev_ioread32(trans->dev, ofs, val); in iwl_read32()
Diwl-trans.h386 void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val);
387 void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val);
388 u32 (*read32)(struct iwl_trans *trans, u32 ofs);
600 static inline void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val) in iwl_trans_write8() argument
602 trans->ops->write8(trans, ofs, val); in iwl_trans_write8()
605 static inline void iwl_trans_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_trans_write32() argument
607 trans->ops->write32(trans, ofs, val); in iwl_trans_write32()
610 static inline u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs) in iwl_trans_read32() argument
612 return trans->ops->read32(trans, ofs); in iwl_trans_read32()
/drivers/net/arcnet/
Darc-rawmode.c94 int ofs; in rx() local
99 ofs = 512 - length; in rx()
101 ofs = 256 - length; in rx()
120 lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), in rx()
172 int ofs; in prepare_tx() local
187 hard->offset[1] = ofs = 512 - length; in prepare_tx()
190 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
192 hard->offset[0] = ofs = 256 - length; in prepare_tx()
195 length,ofs); in prepare_tx()
198 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()
Dcapmode.c48 int ofs; in rx() local
53 ofs = 512 - length; in rx()
55 ofs = 256 - length; in rx()
82 lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), in rx()
139 int ofs; in prepare_tx() local
161 hard->offset[1] = ofs = 512 - length; in prepare_tx()
164 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
166 hard->offset[0] = ofs = 256 - length; in prepare_tx()
169 length,ofs); in prepare_tx()
173 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft.cap.proto, in prepare_tx()
[all …]
Drfc1051.c131 int ofs; in rx() local
136 ofs = 512 - length; in rx()
138 ofs = 256 - length; in rx()
154 lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), in rx()
223 int ofs; in prepare_tx() local
238 hard->offset[1] = ofs = 512 - length; in prepare_tx()
241 hard->offset[1] = ofs = 512 - length - 3; in prepare_tx()
243 hard->offset[0] = ofs = 256 - length; in prepare_tx()
246 lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); in prepare_tx()
Drfc1201.c141 int saddr = pkt->hard.source, ofs; in rx() local
147 ofs = 512 - length; in rx()
149 ofs = 256 - length; in rx()
162 ofs += 4; in rx()
196 lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), in rx()
350 lp->hw.copy_from_card(dev, bufnum, ofs + RFC1201_HDR_SIZE, in rx()
445 int ofs; in load_pkt() local
451 hard->offset[1] = ofs = 512 - softlen; in load_pkt()
460 ofs = 512 - softlen; in load_pkt()
461 hard->offset[1] = ofs - RFC1201_HDR_SIZE; in load_pkt()
[all …]
/drivers/mtd/chips/
Dcfi_cmdset_0002.c74 static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
75 static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
1013 unsigned long ofs; in cfi_amdstd_read() local
1019 ofs = from - (chipnum << cfi->chipshift); in cfi_amdstd_read()
1027 if ((len + ofs -1) >> cfi->chipshift) in cfi_amdstd_read()
1028 thislen = (1<<cfi->chipshift) - ofs; in cfi_amdstd_read()
1032 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); in cfi_amdstd_read()
1040 ofs = 0; in cfi_amdstd_read()
1094 unsigned long ofs; in cfi_amdstd_secsi_read() local
1101 ofs=from & 7; in cfi_amdstd_secsi_read()
[all …]
Dcfi_util.c167 loff_t ofs, size_t len, void *thunk) in cfi_varsize_frob() argument
188 while (i < mtd->numeraseregions && ofs >= regions[i].offset) in cfi_varsize_frob()
198 if (ofs & (regions[i].erasesize-1)) in cfi_varsize_frob()
208 while (i<mtd->numeraseregions && (ofs + len) >= regions[i].offset) in cfi_varsize_frob()
216 if ((ofs + len) & (regions[i].erasesize-1)) in cfi_varsize_frob()
219 chipnum = ofs >> cfi->chipshift; in cfi_varsize_frob()
220 adr = ofs - (chipnum << cfi->chipshift); in cfi_varsize_frob()
233 ofs += size; in cfi_varsize_frob()
236 if (ofs == regions[i].offset + size * regions[i].numblocks) in cfi_varsize_frob()
Dcfi_cmdset_0001.c63 static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
64 static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
65 static int cfi_intelext_is_locked(struct mtd_info *mtd, loff_t ofs,
1321 unsigned long ofs, last_end = 0; in cfi_intelext_point() local
1332 ofs = from - (chipnum << cfi->chipshift); in cfi_intelext_point()
1334 *virt = map->virt + cfi->chips[chipnum].start + ofs; in cfi_intelext_point()
1336 *phys = map->phys + cfi->chips[chipnum].start + ofs; in cfi_intelext_point()
1350 if ((len + ofs -1) >> cfi->chipshift) in cfi_intelext_point()
1351 thislen = (1<<cfi->chipshift) - ofs; in cfi_intelext_point()
1355 ret = do_point_onechip(map, &cfi->chips[chipnum], ofs, thislen); in cfi_intelext_point()
[all …]
/drivers/mtd/lpddr/
Dlpddr_cmds.c39 static int lpddr_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
40 static int lpddr_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len);
529 unsigned long ofs, last_end = 0; in lpddr_point() local
537 ofs = adr - (chipnum << lpddr->chipshift); in lpddr_point()
538 *mtdbuf = (void *)map->virt + chip->start + ofs; in lpddr_point()
552 if ((len + ofs - 1) >> lpddr->chipshift) in lpddr_point()
553 thislen = (1<<lpddr->chipshift) - ofs; in lpddr_point()
568 ofs = 0; in lpddr_point()
581 unsigned long ofs; in lpddr_unpoint() local
584 ofs = adr - (chipnum << lpddr->chipshift); in lpddr_unpoint()
[all …]
/drivers/mtd/
Dmtdcore.c880 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_lock() argument
884 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_lock()
888 return mtd->_lock(mtd, ofs, len); in mtd_lock()
892 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_unlock() argument
896 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_unlock()
900 return mtd->_unlock(mtd, ofs, len); in mtd_unlock()
904 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_is_locked() argument
908 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_is_locked()
912 return mtd->_is_locked(mtd, ofs, len); in mtd_is_locked()
916 int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) in mtd_block_isbad() argument
[all …]
Dmtdconcat.c497 static int concat_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in concat_lock() argument
506 if (ofs >= subdev->size) { in concat_lock()
508 ofs -= subdev->size; in concat_lock()
511 if (ofs + len > subdev->size) in concat_lock()
512 size = subdev->size - ofs; in concat_lock()
516 err = mtd_lock(subdev, ofs, size); in concat_lock()
525 ofs = 0; in concat_lock()
531 static int concat_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in concat_unlock() argument
540 if (ofs >= subdev->size) { in concat_unlock()
542 ofs -= subdev->size; in concat_unlock()
[all …]
/drivers/media/video/s5p-mfc/
Ds5p_mfc_shm.h79 #define s5p_mfc_write_shm(ctx, x, ofs) \ argument
81 writel(x, (ctx->shm + ofs)); \
85 static inline u32 s5p_mfc_read_shm(struct s5p_mfc_ctx *ctx, unsigned int ofs) in s5p_mfc_read_shm() argument
88 return readl(ctx->shm + ofs); in s5p_mfc_read_shm()
/drivers/pcmcia/
Dcistpl.c477 u_int ofs; in follow_link() local
486 ofs = get_unaligned_le32(link + 1); in follow_link()
492 ofs = tuple->LinkOffset; in follow_link()
501 ret = read_cis_cache(s, SPACE(tuple->Flags), ofs, 5, link); in follow_link()
506 return ofs; in follow_link()
507 remove_cis_cache(s, SPACE(tuple->Flags), ofs, 5); in follow_link()
509 ofs = ofs >> 1; in follow_link()
511 ret = read_cis_cache(s, SPACE(tuple->Flags), ofs, 5, link); in follow_link()
516 return ofs; in follow_link()
517 remove_cis_cache(s, SPACE(tuple->Flags), ofs, 5); in follow_link()
[all …]

1234