/drivers/net/wireless/iwlwifi/ |
D | iwl-io.c | 95 static inline u32 __iwl_read_prph(struct iwl_trans *trans, u32 ofs) in __iwl_read_prph() argument 97 u32 val = iwl_trans_read_prph(trans, ofs); in __iwl_read_prph() 98 trace_iwlwifi_dev_ioread_prph32(trans->dev, ofs, val); in __iwl_read_prph() 102 static inline void __iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val) in __iwl_write_prph() argument 104 trace_iwlwifi_dev_iowrite_prph32(trans->dev, ofs, val); in __iwl_write_prph() 105 iwl_trans_write_prph(trans, ofs, val); in __iwl_write_prph() 108 u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs) in iwl_read_prph() argument 114 val = __iwl_read_prph(trans, ofs); in iwl_read_prph() 121 void iwl_write_prph(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_write_prph() argument 126 __iwl_write_prph(trans, ofs, val); in iwl_write_prph() [all …]
|
D | iwl-io.h | 35 static inline void iwl_write8(struct iwl_trans *trans, u32 ofs, u8 val) in iwl_write8() argument 37 trace_iwlwifi_dev_iowrite8(trans->dev, ofs, val); in iwl_write8() 38 iwl_trans_write8(trans, ofs, val); in iwl_write8() 41 static inline void iwl_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_write32() argument 43 trace_iwlwifi_dev_iowrite32(trans->dev, ofs, val); in iwl_write32() 44 iwl_trans_write32(trans, ofs, val); in iwl_write32() 47 static inline u32 iwl_read32(struct iwl_trans *trans, u32 ofs) in iwl_read32() argument 49 u32 val = iwl_trans_read32(trans, ofs); in iwl_read32() 50 trace_iwlwifi_dev_ioread32(trans->dev, ofs, val); in iwl_read32() 73 u32 iwl_read_prph(struct iwl_trans *trans, u32 ofs); [all …]
|
D | iwl-trans.h | 450 void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val); 451 void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val); 452 u32 (*read32)(struct iwl_trans *trans, u32 ofs); 453 u32 (*read_prph)(struct iwl_trans *trans, u32 ofs); 454 void (*write_prph)(struct iwl_trans *trans, u32 ofs, u32 val); 714 static inline void iwl_trans_write8(struct iwl_trans *trans, u32 ofs, u8 val) in iwl_trans_write8() argument 716 trans->ops->write8(trans, ofs, val); in iwl_trans_write8() 719 static inline void iwl_trans_write32(struct iwl_trans *trans, u32 ofs, u32 val) in iwl_trans_write32() argument 721 trans->ops->write32(trans, ofs, val); in iwl_trans_write32() 724 static inline u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs) in iwl_trans_read32() argument [all …]
|
/drivers/staging/goldfish/ |
D | goldfish_nand.c | 103 loff_t ofs = instr->addr; in goldfish_nand_erase() local 107 if (ofs + len > mtd->size) in goldfish_nand_erase() 109 rem = do_div(ofs, mtd->writesize); in goldfish_nand_erase() 112 ofs *= (mtd->writesize + mtd->oobsize); in goldfish_nand_erase() 118 if (goldfish_nand_cmd(mtd, NAND_CMD_ERASE, ofs, len, NULL) != len) { in goldfish_nand_erase() 120 ofs, len, mtd->size, mtd->erasesize); in goldfish_nand_erase() 131 ofs, len, mtd->size, mtd->erasesize); in goldfish_nand_erase() 135 static int goldfish_nand_read_oob(struct mtd_info *mtd, loff_t ofs, in goldfish_nand_read_oob() argument 140 if (ofs + ops->len > mtd->size) in goldfish_nand_read_oob() 147 rem = do_div(ofs, mtd->writesize); in goldfish_nand_read_oob() [all …]
|
/drivers/mtd/maps/ |
D | pci.c | 29 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() 49 static map_word mtd_pci_read32(struct map_info *_map, unsigned long ofs) in mtd_pci_read32() argument 53 val.x[0] = readl(map->base + map->translate(map, ofs)); in mtd_pci_read32() 63 static void mtd_pci_write8(struct map_info *_map, map_word val, unsigned long ofs) in mtd_pci_write8() argument 66 writeb(val.x[0], map->base + map->translate(map, ofs)); in mtd_pci_write8() 69 static void mtd_pci_write32(struct map_info *_map, map_word val, unsigned long ofs) in mtd_pci_write32() argument 72 writel(val.x[0], map->base + map->translate(map, ofs)); in mtd_pci_write32() [all …]
|
D | gpio-addr-flash.c | 64 static void gf_set_gpios(struct async_state *state, unsigned long ofs) in gf_set_gpios() argument 68 ofs /= state->win_size; in gf_set_gpios() 70 value = ofs & (1 << i); in gf_set_gpios() 83 static map_word gf_read(struct map_info *map, unsigned long ofs) in gf_read() argument 89 gf_set_gpios(state, ofs); in gf_read() 91 word = readw(map->virt + (ofs % state->win_size)); in gf_read() 126 static void gf_write(struct map_info *map, map_word d1, unsigned long ofs) in gf_write() argument 131 gf_set_gpios(state, ofs); in gf_write() 134 writew(d, map->virt + (ofs % state->win_size)); in gf_write()
|
D | map_funcs.c | 12 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()
|
D | dc21285.c | 54 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()
|
D | pcmciamtd.c | 108 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 …]
|
D | sbc_gxx.c | 103 static inline void sbc_gxx_page(struct map_info *map, unsigned long ofs) in sbc_gxx_page() argument 105 unsigned long page = ofs >> WINDOW_SHIFT; in sbc_gxx_page() 114 static map_word sbc_gxx_read8(struct map_info *map, unsigned long ofs) in sbc_gxx_read8() argument 118 sbc_gxx_page(map, ofs); in sbc_gxx_read8() 119 ret.x[0] = readb(iomapadr + (ofs & WINDOW_MASK)); in sbc_gxx_read8()
|
/drivers/net/arcnet/ |
D | arc-rawmode.c | 94 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()
|
D | capmode.c | 48 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 …]
|
D | rfc1051.c | 131 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()
|
D | rfc1201.c | 141 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/ |
D | cfi_cmdset_0002.c | 76 static int cfi_atmel_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); 77 static int cfi_atmel_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); 79 static int cfi_ppb_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len); 80 static int cfi_ppb_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len); 81 static int cfi_ppb_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len); 1112 unsigned long ofs; in cfi_amdstd_read() local 1118 ofs = from - (chipnum << cfi->chipshift); in cfi_amdstd_read() 1126 if ((len + ofs -1) >> cfi->chipshift) in cfi_amdstd_read() 1127 thislen = (1<<cfi->chipshift) - ofs; in cfi_amdstd_read() 1131 ret = do_read_onechip(map, &cfi->chips[chipnum], ofs, thislen, buf); in cfi_amdstd_read() [all …]
|
D | cfi_util.c | 167 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()
|
D | cfi_cmdset_0001.c | 63 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 …]
|
D | fwh_lock.h | 79 static int fwh_lock_varsize(struct mtd_info *mtd, loff_t ofs, uint64_t len) in fwh_lock_varsize() argument 83 ret = cfi_varsize_frob(mtd, fwh_xxlock_oneblock, ofs, len, in fwh_lock_varsize() 90 static int fwh_unlock_varsize(struct mtd_info *mtd, loff_t ofs, uint64_t len) in fwh_unlock_varsize() argument 94 ret = cfi_varsize_frob(mtd, fwh_xxlock_oneblock, ofs, len, in fwh_unlock_varsize()
|
/drivers/mtd/lpddr/ |
D | lpddr_cmds.c | 39 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/staging/comedi/drivers/ |
D | amplc_dio200_common.c | 118 unsigned int ofs; /* Counter base offset */ member 128 unsigned int ofs; /* DIO base offset */ member 133 unsigned int ofs; member 230 data[1] = dio200_read8(dev, subpriv->ofs) & subpriv->valid_isns; in dio200_subdev_intr_insn_bits() 251 dio200_write8(dev, subpriv->ofs, 0); in dio200_stop_intr() 283 dio200_write8(dev, subpriv->ofs, isn_bits); in dio200_start_intr() 387 while ((intstat = (dio200_read8(dev, subpriv->ofs) & in dio200_handle_read_intr() 391 dio200_write8(dev, subpriv->ofs, cur_enabled); in dio200_handle_read_intr() 410 dio200_write8(dev, subpriv->ofs, cur_enabled); in dio200_handle_read_intr() 568 subpriv->ofs = offset; in dio200_subdev_intr_init() [all …]
|
/drivers/mtd/ |
D | mtdconcat.c | 497 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 …]
|
D | mtdcore.c | 949 int mtd_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_lock() argument 953 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_lock() 957 return mtd->_lock(mtd, ofs, len); in mtd_lock() 961 int mtd_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_unlock() argument 965 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_unlock() 969 return mtd->_unlock(mtd, ofs, len); in mtd_unlock() 973 int mtd_is_locked(struct mtd_info *mtd, loff_t ofs, uint64_t len) in mtd_is_locked() argument 977 if (ofs < 0 || ofs > mtd->size || len > mtd->size - ofs) in mtd_is_locked() 981 return mtd->_is_locked(mtd, ofs, len); in mtd_is_locked() 985 int mtd_block_isbad(struct mtd_info *mtd, loff_t ofs) in mtd_block_isbad() argument [all …]
|
/drivers/mtd/devices/ |
D | docg3.c | 424 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/staging/fwserial/ |
D | dma_fifo.c | 154 int ofs, l; in dma_fifo_in() local 166 ofs = fifo->in % fifo->capacity; in dma_fifo_in() 167 l = min(n, fifo->capacity - ofs); in dma_fifo_in() 168 memcpy(fifo->data + ofs, src, l); in dma_fifo_in() 197 unsigned len, n, ofs, l, limit; in dma_fifo_out_pend() local 215 ofs = fifo->out % fifo->capacity; in dma_fifo_out_pend() 216 l = fifo->capacity - ofs; in dma_fifo_out_pend() 221 } else if (ofs + n > fifo->guard) { in dma_fifo_out_pend() 233 pended->data = fifo->data + ofs; in dma_fifo_out_pend()
|
/drivers/pcmcia/ |
D | cistpl.c | 477 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 …]
|