/netbsd-src/sys/arch/hppa/dev/ |
H A D | gftfb.c | 107 #define ngle_bt458_write(memt, memh, r, v) \ 108 bus_space_write_stream_4(memt, memh, NGLE_REG_RAMDAC + ((r) << 2), (v) << 24) argument 183 bus_space_handle_t memh = rom->regh[2]; 184 return bus_space_read_stream_4(memt, memh, offset); 192 bus_space_handle_t memh = rom->regh[2]; in gftfb_match() 193 bus_space_write_stream_4(memt, memh, offset, val); in gftfb_match() 201 bus_space_handle_t memh = rom->regh[2]; in gftfb_match() 202 return bus_space_read_1(memt, memh, offset); 210 bus_space_handle_t memh = rom->regh[2]; in gftfb_attach() 211 bus_space_write_1(memt, memh, offse in gftfb_attach() 643 bus_space_handle_t memh = rom->regh[2]; gftfb_wait() local 658 bus_space_handle_t memh = rom->regh[2]; gftfb_setup_fb() local 673 bus_space_handle_t memh = rom->regh[2]; gftfb_setup() local 1026 bus_space_handle_t memh = rom->regh[2]; gftfb_putpalreg() local 1052 bus_space_handle_t memh = rom->regh[2]; gftfb_wait_fifo() local 1066 bus_space_handle_t memh = rom->regh[2]; gftfb_real_rectfill() local 1123 bus_space_handle_t memh = rom->regh[2]; gftfb_bitblt() local 1341 bus_space_handle_t memh = rom->regh[2]; gftfb_move_cursor() local 1363 bus_space_handle_t memh = rom->regh[2]; gftfb_do_cursor() local 1510 bus_space_handle_t memh = rom->regh[2]; gftfb_set_video() local [all...] |
/netbsd-src/sys/arch/alpha/tc/ |
H A D | tc_bus_mem.c | 289 tc_mem_unmap(void *v, bus_space_handle_t memh, bus_size_t memsize, int acct) in tc_mem_unmap() argument 296 tc_mem_subregion(void *v, bus_space_handle_t memh, bus_size_t offset, bus_size_t size, bus_space_ha… in tc_mem_subregion() argument 303 if ((memh & TC_SPACE_SPARSE) != 0) in tc_mem_subregion() 304 *nmemh = memh + (offset << 1); in tc_mem_subregion() 306 *nmemh = memh + offset; in tc_mem_subregion() 370 #define TC_SPARSE_PTR(memh, off) \ argument 371 ((void *)((memh) + ((off & ((bus_size_t)-1 << 2)) << 1))) 374 tc_mem_read_1(void *v, bus_space_handle_t memh, bus_size_t off) in tc_mem_read_1() argument 379 if ((memh & TC_SPACE_SPARSE) != 0) { in tc_mem_read_1() 382 p = TC_SPARSE_PTR(memh, off); in tc_mem_read_1() [all …]
|
/netbsd-src/sys/dev/ic/ |
H A D | pcdisplay_subr.c | 51 bus_space_handle_t memh; in pcdisplay_cursor_init() local 65 memh = scr->hdl->ph_memh; in pcdisplay_cursor_init() 69 scr->cursortmp = bus_space_read_2(memt, memh, off); in pcdisplay_cursor_init() 70 bus_space_write_2(memt, memh, off, scr->cursortmp ^ 0x7700); in pcdisplay_cursor_init() 95 bus_space_handle_t memh = scr->hdl->ph_memh; in pcdisplay_cursor() local 102 bus_space_write_2(memt, memh, scr->dispoffset + off * 2, in pcdisplay_cursor() 117 scr->cursortmp = bus_space_read_2(memt, memh, off); in pcdisplay_cursor() 118 bus_space_write_2(memt, memh, off, scr->cursortmp ^ 0x7700); in pcdisplay_cursor() 160 bus_space_handle_t memh = scr->hdl->ph_memh; in pcdisplay_putchar() local 170 bus_space_write_2(memt, memh, scr->dispoffset + off * 2, in pcdisplay_putchar() [all …]
|
H A D | sti.c | 1535 #define ngle_bt458_write(memt, memh, r, v) \ in ngle_artist_setupfb() 1536 bus_space_write_stream_4(memt, memh, NGLE_REG_RAMDAC + ((r) << 2), (v) << 24) in ngle_artist_setupfb() 1543 bus_space_handle_t memh = rom->regh[2]; in ngle_artist_setupfb() 1547 ngle_setup_hw(memt, memh); in ngle_elk_setupfb() 1548 ngle_setup_fb(memt, memh, scr->reg10_value); in ngle_elk_setupfb() 1552 ngle_setup_hw(memt, memh); in ngle_elk_setupfb() 1553 bus_space_write_stream_4(memt, memh, NGLE_REG_21, in ngle_elk_setupfb() 1554 bus_space_read_stream_4(memt, memh, NGLE_REG_21) | 0x0a000000); in ngle_elk_setupfb() 1555 bus_space_write_stream_4(memt, memh, NGLE_REG_27, in ngle_elk_setupfb() 1556 bus_space_read_stream_4(memt, memh, NGLE_REG_2 in ngle_elk_setupfb() 1522 ngle_bt458_write(memt,memh,r,v) global() argument 1530 bus_space_handle_t memh = rom->regh[2]; ngle_artist_setupfb() local 1551 bus_space_handle_t memh = rom->regh[2]; ngle_elk_setupfb() local 1571 bus_space_handle_t memh = rom->regh[2]; ngle_timber_setupfb() local 1586 bus_space_handle_t memh = rom->regh[2]; ngle_setup_bt458() local 1599 bus_space_handle_t memh = rom->regh[2]; ngle_setup_attr_planes() local 1624 bus_space_handle_t memh = rom->regh[2]; ngle_putcmap() local 1668 bus_space_handle_t memh = rom->regh[2]; ngle_hcrx_putcmap() local 1707 ngle_setup_hw(bus_space_tag_t memt,bus_space_handle_t memh) ngle_setup_hw() argument 1719 ngle_setup_fb(bus_space_tag_t memt,bus_space_handle_t memh,uint32_t reg10) ngle_setup_fb() argument [all...] |
H A D | vga_common.c | 49 bus_space_handle_t ioh_vga, ioh_6845, memh; in vga_common_probe() local 69 if (bus_space_map(memt, 0xa0000, 0x20000, 0, &memh)) in vga_common_probe() 75 vgadata = bus_space_read_2(memt, memh, dispoffset); in vga_common_probe() 76 bus_space_write_2(memt, memh, dispoffset, 0xa55a); in vga_common_probe() 77 if (bus_space_read_2(memt, memh, dispoffset) != 0xa55a) in vga_common_probe() 79 bus_space_write_2(memt, memh, dispoffset, vgadata); in vga_common_probe() 107 bus_space_unmap(memt, memh, 0x20000); in vga_common_probe()
|
H A D | we.c | 287 bus_space_handle_t memh = sc->sc_bufh; in we_test_mem() local 292 bus_space_set_region_2(memt, memh, 0, 0, memsize >> 1); in we_test_mem() 294 bus_space_set_region_1(memt, memh, 0, 0, memsize); in we_test_mem() 298 if (bus_space_read_2(memt, memh, i) != 0) in we_test_mem() 303 if (bus_space_read_1(memt, memh, i) != 0) in we_test_mem() 326 bus_space_handle_t memh = wsc->sc_dp8390.sc_bufh; in we_readmem() local 332 bus_space_read_region_stream_2(memt, memh, from, in we_readmem() 335 bus_space_read_region_1(memt, memh, from, in we_readmem() 344 bus_space_handle_t memh = wsc->sc_dp8390.sc_bufh; in we_write_mbuf() local 360 bus_space_write_region_1(memt, memh, in we_write_mbuf() [all …]
|
/netbsd-src/sys/arch/alpha/pci/ |
H A D | pci_swiz_bus_mem_chipdep.c | 498 __C(CHIP,_xlate_dense_handle_to_addr)(void *v, bus_space_handle_t memh, in __C() 502 memh = ALPHA_K0SEG_TO_PHYS(memh); in __C() 505 if (memh >= CHIP_D_MEM_W1_SYS_START(v) && in __C() 506 memh <= CHIP_D_MEM_W1_SYS_END(v)) { in __C() 508 (memh - CHIP_D_MEM_W1_SYS_START(v)); in __C() 558 __C(CHIP,_xlate_sparse_handle_to_addr)(void *v, bus_space_handle_t memh, in __C() 562 memh = ALPHA_K0SEG_TO_PHYS(memh << CHIP_ADDR_SHIFT) >> CHIP_ADDR_SHIFT; in __C() 565 if ((memh << CHIP_ADDR_SHIF in __C() [all...] |
H A D | pci_bwx_bus_mem_chipdep.c | 408 bus_space_handle_t memh, in __C() 418 printf("mem: freeing handle 0x%lx for 0x%lx\n", memh, memsize); in __C() 421 memaddr = memh - ALPHA_PHYS_TO_K0SEG(CHIP_MEM_SYS_START(v)); in __C() 433 bus_space_handle_t memh, in __C() 439 *nmemh = memh + offset; in __C() 539 bus_space_handle_t memh, in __C() 544 addr = memh + off; in __C() 552 bus_space_handle_t memh, in __C() 557 addr = memh + off; in __C() 570 bus_space_handle_t memh, in __C() [all …]
|
/netbsd-src/sys/arch/atari/vme/ |
H A D | if_le_vme.c | 204 bus_space_handle_t ioh, memh; in le_vme_match() local 242 &memh)) { in le_vme_match() 246 found = probe_addresses(&iot, &memt, &ioh, &memh); in le_vme_match() 248 bus_space_unmap(memt, memh, le_ap->mem_size); in le_vme_match() 266 bus_space_handle_t *ioh, bus_space_handle_t *memh) in probe_addresses() argument 274 if (!bus_space_peek_1(*memt, *memh, 0)) in probe_addresses() 280 bus_space_write_2(*memt, *memh, 0, 0xa5a5); in probe_addresses() 281 if (bus_space_read_2(*memt, *memh, 0) != 0xa5a5) in probe_addresses() 349 bus_space_handle_t ioh, memh; in le_vme_attach() local 360 if (bus_space_map(memt, va->va_maddr, va->va_msize, 0, &memh)) in le_vme_attach() [all …]
|
H A D | leo.c | 133 bus_space_handle_t memh; in leo_match() local 170 &memh)) { in leo_match() 175 found = leo_probe(&iot, &memt, &ioh, &memh, in leo_match() 178 bus_space_unmap(memt, memh, vat.va_msize); in leo_match() 188 …*iot, bus_space_tag_t *memt, bus_space_handle_t *ioh, bus_space_handle_t *memh, u_int iosize, u_in… in leo_probe() argument 207 bus_space_write_4(*memt, *memh, 0, 0xa5a5a5a5); in leo_probe() 208 if ((bus_space_read_4(*memt, *memh, 0) & 0xffffff) != 0xa5a5a5) in leo_probe() 210 bus_space_write_4(*memt, *memh, msize - 4, 0xa5a5a5a5); in leo_probe() 211 if ((bus_space_read_4(*memt, *memh, msize - 4) & 0xffffff) in leo_probe() 223 bus_space_handle_t memh; in leo_attach() local [all …]
|
H A D | et4000.c | 173 bus_space_handle_t memh; in et4k_probe_addresses() local 202 &memh)) { in et4k_probe_addresses() 207 found = et4k_detect(&iot, &memt, &ioh, &memh, vat.va_msize); in et4k_probe_addresses() 209 bus_space_unmap(memt, memh, vat.va_msize); in et4k_probe_addresses() 255 …ag_t *iot, bus_space_tag_t *memt, bus_space_handle_t *ioh, bus_space_handle_t *memh, u_int memsize) in et4k_detect() argument 263 if (!bus_space_peek_1(*memt, *memh, 0)) in et4k_detect() 315 bus_space_write_4(*memt, *memh, 0x0, TEST_PATTERN); in et4k_detect() 316 if (bus_space_read_4(*memt, *memh, 0x0) != TEST_PATTERN) in et4k_detect() 325 bus_space_write_4(*memt, *memh, memsize - 4, TEST_PATTERN); in et4k_detect() 326 if (bus_space_read_4(*memt, *memh, memsize - 4) != TEST_PATTERN) in et4k_detect() [all …]
|
H A D | if_we_vme.c | 134 bus_space_handle_t asich, asich1, memh; in we_vme_probe() local 253 0, &memh) != 0) { in we_vme_probe() 260 if (bus_space_peek_2(memt, memh, 0) == 0) in we_vme_probe() 297 bus_space_unmap(memt, memh, memsize); in we_vme_probe() 309 bus_space_handle_t nich, asich, asich1, memh; in we_vme_attach() local 345 if (bus_space_map(memt, va->va_maddr, va->va_msize, 0, &memh) != 0) { in we_vme_attach() 357 sc->sc_bufh = memh; in we_vme_attach() 399 bus_space_unmap(memt, memh, va->va_msize); in we_vme_attach()
|
/netbsd-src/sys/dev/isa/ |
H A D | pcdisplay.c | 138 bus_space_handle_t memh, ioh_6845; in pcdisplay_probe_col() local 141 if (bus_space_map(memt, 0xb8000, 0x8000, 0, &memh)) in pcdisplay_probe_col() 143 oldval = bus_space_read_2(memt, memh, 0); in pcdisplay_probe_col() 144 bus_space_write_2(memt, memh, 0, 0xa55a); in pcdisplay_probe_col() 145 val = bus_space_read_2(memt, memh, 0); in pcdisplay_probe_col() 146 bus_space_write_2(memt, memh, 0, oldval); in pcdisplay_probe_col() 147 bus_space_unmap(memt, memh, 0x8000); in pcdisplay_probe_col() 161 bus_space_handle_t memh, ioh_6845; in pcdisplay_probe_mono() local 164 if (bus_space_map(memt, 0xb0000, 0x8000, 0, &memh)) in pcdisplay_probe_mono() 166 oldval = bus_space_read_2(memt, memh, 0); in pcdisplay_probe_mono() [all …]
|
H A D | if_ec.c | 125 bus_space_handle_t nich, asich, memh; in ec_probe() local 190 if (bus_space_map(memt, ia->ia_iomem[0].ir_addr, memsize, 0, &memh)) in ec_probe() 239 bus_space_unmap(memt, memh, memsize); in ec_probe() 250 bus_space_handle_t nich, asich, memh; in ec_attach() local 282 if (bus_space_map(memt, ia->ia_iomem[0].ir_addr, memsize, 0, &memh)) { in ec_attach() 294 sc->sc_bufh = memh; in ec_attach() 516 bus_space_handle_t memh = sc->sc_bufh; in ec_test_mem() local 521 bus_space_set_region_2(memt, memh, 0, 0, memsize >> 1); in ec_test_mem() 523 bus_space_set_region_1(memt, memh, 0, 0, memsize); in ec_test_mem() 527 if (bus_space_read_2(memt, memh, i) != 0) in ec_test_mem() [all …]
|
H A D | if_ai.c | 304 bus_space_handle_t ioh, memh; in ai_attach() local 320 ia->ia_iomem[0].ir_size, 0, &memh) != 0) { in ai_attach() 351 sc->bh = memh; in ai_attach() 355 sc->sc_maddr = (void *)memh; in ai_attach() 383 bus_space_unmap(ia->ia_memt, memh, ia->ia_iomem[0].ir_size); in ai_attach() 411 bus_space_handle_t memh; in ai_find_mem_size() local 415 if (bus_space_map(memt, maddr, size, 0, &memh) == 0) { in ai_find_mem_size() 417 bus_space_unmap(memt, memh, size); in ai_find_mem_size() 432 bus_space_handle_t memh, bus_size_t size) in check_ie_present() argument 441 sc->bh = memh; in check_ie_present() [all …]
|
H A D | i82365_isa.c | 94 bus_space_handle_t ioh, memh; in pcic_isa_probe() local 120 msize, 0, &memh)) { in pcic_isa_probe() 165 bus_space_unmap(ia->ia_memt, memh, msize); in pcic_isa_probe() 193 bus_space_handle_t memh; in pcic_isa_attach() local 206 ia->ia_iomem[0].ir_size, 0, &memh)) { in pcic_isa_attach() 221 sc->memh = memh; in pcic_isa_attach()
|
H A D | ega.c | 235 bus_space_handle_t memh, ioh_6845; in ega_probe_col() local 238 if (bus_space_map(memt, 0xb8000, 0x8000, 0, &memh)) in ega_probe_col() 240 oldval = bus_space_read_2(memt, memh, 0); in ega_probe_col() 241 bus_space_write_2(memt, memh, 0, 0xa55a); in ega_probe_col() 242 val = bus_space_read_2(memt, memh, 0); in ega_probe_col() 243 bus_space_write_2(memt, memh, 0, oldval); in ega_probe_col() 244 bus_space_unmap(memt, memh, 0x8000); in ega_probe_col() 258 bus_space_handle_t memh, ioh_6845; in ega_probe_mono() local 261 if (bus_space_map(memt, 0xb0000, 0x8000, 0, &memh)) in ega_probe_mono() 263 oldval = bus_space_read_2(memt, memh, 0); in ega_probe_mono() [all …]
|
H A D | tcic2_isa.c | 146 bus_space_handle_t ioh, memh; in tcic_isa_probe() local 172 msize, 0, &memh)) { in tcic_isa_probe() 197 bus_space_unmap(ia->ia_memt, memh, msize); in tcic_isa_probe() 224 bus_space_handle_t memh; in tcic_isa_attach() local 237 ia->ia_iomem[0].ir_size, 0, &memh)) { in tcic_isa_attach() 253 sc->memh = memh; in tcic_isa_attach()
|
/netbsd-src/sys/arch/dreamcast/dev/g2/ |
H A D | if_mbe_g2.c | 116 bus_space_handle_t memh; in mbe_g2_match() local 133 if (bus_space_map(memt, 0x00600400, LANA_NPORTS, 0, &memh)) { in mbe_g2_match() 140 if (mbe_g2_detect(memt, memh, myea) == 0) { in mbe_g2_match() 148 bus_space_unmap(memt, memh, LANA_NPORTS); in mbe_g2_match() 193 bus_space_handle_t memh; in mbe_g2_attach() local 202 if (bus_space_map(memt, 0x00600400, LANA_NPORTS, 0, &memh)) { in mbe_g2_attach() 208 sc->sc_bsh = memh; in mbe_g2_attach() 211 if (mbe_g2_detect(memt, memh, myea) == 0) { in mbe_g2_attach()
|
/netbsd-src/sys/arch/powerpc/booke/dev/ |
H A D | pq3duart.c | 108 bus_space_handle_t memh; in com_pq3duart_match() local 110 if (com_is_console(memt, addr, &memh)) in com_pq3duart_match() 113 if (bus_space_map(memt, addr, size, 0, &memh)) in com_pq3duart_match() 116 com_init_regs(®s, memt, memh, addr); in com_pq3duart_match() 120 bus_space_unmap(memt, memh, size); in com_pq3duart_match() 203 bus_space_handle_t memh; in com_pq3duart_attach() local 205 if (!com_is_console(memt, addr, &memh)) { in com_pq3duart_attach() 206 int error = bus_space_map(memt, addr, size, 0, &memh); in com_pq3duart_attach() 213 com_init_regs(&sc->sc_regs, memt, memh, addr); in com_pq3duart_attach()
|
/netbsd-src/sys/arch/sparc64/sparc64/ |
H A D | ofw_machdep.c | 59 static u_int mmuh = -1, memh = -1; variable 89 if (OF_getprop(chosen, "memory", &memh, sizeof(memh)) == -1) { in get_memory_handle() 93 return memh; in get_memory_handle() 386 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_alloc_phys() 394 args.ihandle = HDL2CELL(memh); in prom_alloc_phys() 425 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_claim_phys() 433 args.ihandle = HDL2CELL(memh); in prom_claim_phys() 462 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_free_phys() 470 args.ihandle = HDL2CELL(memh); in prom_free_phys() 500 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in prom_get_msgbuf() [all …]
|
/netbsd-src/sys/dev/pcmcia/ |
H A D | mhzc.c | 475 struct pcmcia_mem_handle memh; in mhzc_em3336_enable() local 486 if (pcmcia_mem_alloc(sc->sc_pf, 0x1000, &memh) != 0) { in mhzc_em3336_enable() 492 &memh, &memoff, &memwin)) { in mhzc_em3336_enable() 494 pcmcia_mem_free(sc->sc_pf, &memh); in mhzc_em3336_enable() 509 reg = bus_space_read_1(memh.memt, memh.memh, 0x380); in mhzc_em3336_enable() 511 reg = bus_space_read_1(memh.memt, memh.memh, 0x380); in mhzc_em3336_enable() 520 pcmcia_mem_free(sc->sc_pf, &memh); in mhzc_em3336_enable()
|
/netbsd-src/sys/arch/i386/pci/ |
H A D | elan520.c | 191 dbctl = bus_space_read_1(memt, memh, MMCR_DBCTL); 195 bus_space_write_1(memt, memh, MMCR_DBCTL, dbctl); 207 elansc_perf_tune(device_t self, bus_space_tag_t memt, bus_space_handle_t memh) in elansc_perf_tune() argument 213 sysarbctl = bus_space_read_1(memt, memh, MMCR_SYSARBCTL); in elansc_perf_tune() 222 bus_space_write_1(memt, memh, MMCR_SYSARBCTL, sysarbctl); in elansc_perf_tune() 225 hbctl = bus_space_read_2(memt, memh, MMCR_HBCTL); in elansc_perf_tune() 255 bus_space_write_2(memt, memh, MMCR_HBCTL, hbctl); in elansc_perf_tune() 616 bus_space_tag_t memt, bus_space_handle_t memh) in elansc_print_all_par() argument 622 par = bus_space_read_4(memt, memh, MMCR_PAR(i)); in elansc_print_all_par() 628 elansc_alloc_par(bus_space_tag_t memt, bus_space_handle_t memh) in elansc_alloc_par() argument [all …]
|
/netbsd-src/sys/arch/sparc/stand/ofwboot/ |
H A D | Locore.c | 480 static u_int memh = -1; variable 491 || OF_getprop(chosen, "memory", &memh, sizeof(memh)) != sizeof(memh)) in OF_initialize() 714 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in OF_alloc_phys() 723 args.ihandle = HDL2CELL(memh); in OF_alloc_phys() 756 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in OF_claim_phys() 765 args.ihandle = HDL2CELL(memh); in OF_claim_phys() 795 if (memh == -1 && ((memh = get_memory_handle()) == -1)) { in OF_free_phys() 804 args.ihandle = HDL2CELL(memh); in OF_free_phys()
|
/netbsd-src/sys/arch/mips/ralink/ |
H A D | ralink_wdog.c | 155 bus_space_handle_t memh; in ra_wdog_attach() local 162 error = bus_space_map(ma->ma_memt, RA_TIMER_BASE, 0x100, 0, &memh); in ra_wdog_attach() 170 sc->sc_memh = memh; in ra_wdog_attach() 192 bus_space_write_4(sc->sc_memt, memh, RA_TIMER_0_CNTRL, 0); in ra_wdog_attach() 193 bus_space_write_4(sc->sc_memt, memh, RA_TIMER_1_CNTRL, 0); in ra_wdog_attach()
|