static void pcmcia_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len) { caddr_t win_base = (caddr_t)map->map_priv_2; if(DEV_REMOVED(map)) return; DEBUG(3, "to = %lu from = %p len = %u", to, from, len); memcpy_toio(win_base + to, from, len); }
static void pcmcia_write16(struct map_info *map, u16 d, unsigned long adr) { caddr_t win_base = (caddr_t)map->map_priv_2; if(DEV_REMOVED(map)) return; DEBUG(3, "adr = 0x%08lx (%p) data = 0x%04x", adr, win_base + adr, d); writew(d, win_base + adr); }
static void pcmcia_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len) { caddr_t win_base = (caddr_t)map->map_priv_2; if(DEV_REMOVED(map)) return; DEBUG(3, "to = %p from = %lu len = %u", to, from, len); memcpy_fromio(to, win_base + from, len); }
static map_word pcmcia_read16(struct map_info *map, unsigned long ofs) { caddr_t win_base = (caddr_t)map->map_priv_2; map_word d = {{0}}; if(DEV_REMOVED(map)) return d; d.x[0] = readw(win_base + ofs); DEBUG(3, "ofs = 0x%08lx (%p) data = 0x%04x", ofs, win_base + ofs, d.x[0]); return d; }
static u16 pcmcia_read16(struct map_info *map, unsigned long ofs) { caddr_t win_base = (caddr_t)map->map_priv_2; u16 d; if(DEV_REMOVED(map)) return 0; d = readw(win_base + ofs); DEBUG(3, "ofs = 0x%08lx (%p) data = 0x%04x", ofs, win_base + ofs, d); return d; }