Lines Matching defs:rom

167 	struct sti_rom *rom;
170 rom = (struct sti_rom *)malloc(sizeof(*rom), M_DEVBUF,
172 rom->rom_softc = sc;
173 rc = sti_rom_setup(rom, iot, memt, romh, sc->bases, codebase);
175 free(rom, M_DEVBUF);
179 sc->sc_rom = rom;
212 sti_rom_setup(struct sti_rom *rom, bus_space_tag_t iot, bus_space_tag_t memt,
218 KASSERT(rom != NULL);
219 STI_ENABLE_ROM(rom->rom_softc);
221 rom->iot = iot;
222 rom->memt = memt;
223 rom->romh = romh;
224 rom->bases = bases;
230 dd = &rom->rom_dd;
231 rom->rom_devtype = bus_space_read_1(memt, romh, 3);
232 if (rom->rom_devtype == STI_DEVTYPE1) {
283 STI_DISABLE_ROM(rom->rom_softc);
313 if (rom->rom_devtype == STI_DEVTYPE1)
320 if (!(rom->rom_code = uvm_km_alloc(kernel_map, round_page(size), 0,
325 DPRINTF(("code=0x%lx[%x]\n", rom->rom_code, size));
331 STI_ENABLE_ROM(rom->rom_softc);
333 if (rom->rom_devtype == STI_DEVTYPE1) {
337 p = (uint8_t *)rom->rom_code;
345 dd->dd_pacode[STI_BEGIN], (uint32_t *)rom->rom_code,
349 STI_DISABLE_ROM(rom->rom_softc);
351 if ((error = uvm_map_protect(kernel_map, rom->rom_code,
352 rom->rom_code + round_page(size), UVM_PROT_RX, FALSE))) {
354 uvm_km_free(kernel_map, rom->rom_code, round_page(size),
365 (rom->rom_code + (dd->dd_pacode[(i)] - dd->dd_pacode[0]) / \
366 (rom->rom_devtype == STI_DEVTYPE1 ? 4 : 1)))
368 rom->init = (sti_init_t)O(STI_INIT_GRAPH);
369 rom->mgmt = (sti_mgmt_t)O(STI_STATE_MGMT);
370 rom->unpmv = (sti_unpmv_t)O(STI_FONT_UNPMV);
371 rom->blkmv = (sti_blkmv_t)O(STI_BLOCK_MOVE);
372 rom->test = (sti_test_t)O(STI_SELF_TEST);
373 rom->exhdl = (sti_exhdl_t)O(STI_EXCEP_HDLR);
374 rom->inqconf = (sti_inqconf_t)O(STI_INQ_CONF);
375 rom->scment = (sti_scment_t)O(STI_SCM_ENT);
376 rom->dmac = (sti_dmac_t)O(STI_DMA_CTRL);
377 rom->flowc = (sti_flowc_t)O(STI_FLOW_CTRL);
378 rom->utiming = (sti_utiming_t)O(STI_UTIMING);
379 rom->pmgr = (sti_pmgr_t)O(STI_PROC_MGR);
380 rom->util = (sti_util_t)O(STI_UTIL);
389 rom->scment = NULL;
401 struct sti_rom *rom = scr->scr_rom;
402 bus_space_tag_t memt = rom->memt;
403 bus_space_handle_t romh = rom->romh;
404 bus_addr_t *bases = rom->bases;
405 struct sti_dd *dd = &rom->rom_dd;
417 STI_ENABLE_ROM(rom->rom_softc);
419 if (rom->rom_devtype == STI_DEVTYPE1) {
428 STI_DISABLE_ROM(rom->rom_softc);
457 * Region #0 is always the rom, and it should have been
469 BUS_SPACE_MAP_CACHEABLE : 0), &rom->regh[regno]) != 0) {
470 rom->regh[regno] = romh; /* XXX */
474 bus_space_vaddr(memt, rom->regh[regno]);
499 struct sti_rom *rom = scr->scr_rom;
500 bus_space_tag_t memt = rom->memt;
501 bus_space_handle_t romh = rom->romh;
502 struct sti_dd *dd = &rom->rom_dd;
590 STI_ENABLE_ROM(rom->rom_softc);
596 if (rom->rom_devtype == STI_DEVTYPE1) {
611 STI_DISABLE_ROM(rom->rom_softc);
720 rom->scment == NULL ? NULL : ngle_default_putcmap;
754 struct sti_rom *rom = sc->sc_rom;
755 struct sti_dd *dd = &rom->rom_dd;
826 struct sti_rom *rom = scr->scr_rom;
827 bus_space_tag_t memt = rom->memt;
828 bus_space_handle_t romh = rom->romh;
845 STI_ENABLE_ROM(rom->rom_softc);
850 if (rom->rom_devtype == STI_DEVTYPE1) {
866 STI_DISABLE_ROM(rom->rom_softc);
870 STI_ENABLE_ROM(rom->rom_softc);
876 if (rom->rom_devtype == STI_DEVTYPE1)
898 STI_DISABLE_ROM(rom->rom_softc);
946 struct sti_rom *rom = scr->scr_rom;
954 KASSERT(rom != NULL);
984 device_xname(rom->rom_softc->sc_dev), rom->init, a.flags.flags,
987 (*rom->init)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
997 struct sti_rom *rom = scr->scr_rom;
1006 (*rom->inqconf)(&a.flags, &a.in, out, &scr->scr_cfg);
1015 struct sti_rom *rom = scr->scr_rom;
1048 (*rom->blkmv)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1052 device_xname(rom->rom_softc->sc_dev), a.out.errno);
1059 struct sti_rom *rom = scr->scr_rom;
1072 (*rom->scment)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1084 struct sti_rom *rom = scr->scr_rom;
1093 *(u_int *)data = rom->rom_dd.dd_grid[0];
1212 struct sti_rom *rom = scr->scr_rom;
1224 pa = bus_space_mmap(rom->memt, scr->fbaddr, offset, prot,
1354 struct sti_rom *rom = scr->scr_rom;
1381 (*rom->unpmv)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1407 (*rom->blkmv)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1481 sti_cnattach(struct sti_rom *rom, struct sti_screen *scr, bus_space_tag_t memt,
1503 if (sti_rom_setup(rom, memt, memt, romh, bases, codebase) != 0)
1505 scr->scr_rom = rom;
1541 struct sti_rom *rom = scr->scr_rom;
1542 bus_space_tag_t memt = rom->memt;
1543 bus_space_handle_t memh = rom->regh[2];
1562 struct sti_rom *rom = scr->scr_rom;
1563 bus_space_tag_t memt = rom->memt;
1564 bus_space_handle_t memh = rom->regh[2];
1582 struct sti_rom *rom = scr->scr_rom;
1583 bus_space_tag_t memt = rom->memt;
1584 bus_space_handle_t memh = rom->regh[2];
1597 struct sti_rom *rom = scr->scr_rom;
1598 bus_space_tag_t memt = rom->memt;
1599 bus_space_handle_t memh = rom->regh[0];
1608 struct sti_rom *rom = scr->scr_rom;
1609 bus_space_tag_t memt = rom->memt;
1610 bus_space_handle_t memh = rom->regh[0];
1638 struct sti_rom *rom = scr->scr_rom;
1639 bus_space_tag_t memt = rom->memt;
1640 bus_space_handle_t memh = rom->regh[2];
1651 struct sti_rom *rom = scr->scr_rom;
1652 bus_space_tag_t memt = rom->memt;
1653 bus_space_handle_t memh = rom->regh[2];
1676 struct sti_rom *rom = scr->scr_rom;
1677 bus_space_tag_t memt = rom->memt;
1678 bus_space_handle_t memh = rom->regh[2];
1720 struct sti_rom *rom = scr->scr_rom;
1721 bus_space_tag_t memt = rom->memt;
1722 bus_space_handle_t memh = rom->regh[2];
1763 struct sti_rom *rom = scr->scr_rom;
1764 bus_space_tag_t memt = rom->memt;
1765 bus_space_handle_t memh = rom->regh[0];
1772 if (rom->rom_dd.dd_grid[0] == STI_DD_LEGO) {