Home | History | Annotate | Download | only in ic

Lines Matching defs:rom

79 /* pseudo attribute ops for sti ROM putchar function */
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;
227 * Get ROM header and code function pointers.
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);
458 * Region #0 is always the rom, and it should have been
470 BUS_SPACE_MAP_CACHEABLE : 0), &rom->regh[regno]) != 0) {
471 rom->regh[regno] = romh; /* XXX */
475 bus_space_vaddr(memt, rom->regh[regno]);
500 struct sti_rom *rom = scr->scr_rom;
501 bus_space_tag_t memt = rom->memt;
502 bus_space_handle_t romh = rom->romh;
503 struct sti_dd *dd = &rom->rom_dd;
591 STI_ENABLE_ROM(rom->rom_softc);
597 if (rom->rom_devtype == STI_DEVTYPE1) {
612 STI_DISABLE_ROM(rom->rom_softc);
729 rom->scment == NULL ? NULL : ngle_default_putcmap;
763 struct sti_rom *rom = sc->sc_rom;
764 struct sti_dd *dd = &rom->rom_dd;
835 struct sti_rom *rom = scr->scr_rom;
836 bus_space_tag_t memt = rom->memt;
837 bus_space_handle_t romh = rom->romh;
854 STI_ENABLE_ROM(rom->rom_softc);
859 if (rom->rom_devtype == STI_DEVTYPE1) {
875 STI_DISABLE_ROM(rom->rom_softc);
880 STI_ENABLE_ROM(rom->rom_softc);
886 if (rom->rom_devtype == STI_DEVTYPE1)
908 STI_DISABLE_ROM(rom->rom_softc);
956 struct sti_rom *rom = scr->scr_rom;
964 KASSERT(rom != NULL);
994 rom->rom_softc == NULL ? __func__ :
995 device_xname(rom->rom_softc->sc_dev), rom->init, a.flags.flags,
998 (*rom->init)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1008 struct sti_rom *rom = scr->scr_rom;
1017 (*rom->inqconf)(&a.flags, &a.in, out, &scr->scr_cfg);
1026 struct sti_rom *rom = scr->scr_rom;
1059 (*rom->blkmv)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1063 rom->rom_softc == NULL ? __func__ :
1064 device_xname(rom->rom_softc->sc_dev), a.out.errno);
1071 struct sti_rom *rom = scr->scr_rom;
1084 (*rom->scment)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1096 struct sti_rom *rom = scr->scr_rom;
1105 *(u_int *)data = rom->rom_dd.dd_grid[0];
1185 * the STI ROM in STI_TEXTMODE and changing cmap
1224 struct sti_rom *rom = scr->scr_rom;
1236 pa = bus_space_mmap(rom->memt, scr->fbaddr, offset, prot,
1366 struct sti_rom *rom = scr->scr_rom;
1393 (*rom->unpmv)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1419 (*rom->blkmv)(&a.flags, &a.in, &a.out, &scr->scr_cfg);
1493 sti_cnattach(struct sti_rom *rom, struct sti_screen *scr, bus_space_tag_t memt,
1515 if (sti_rom_setup(rom, memt, memt, romh, bases, codebase) != 0)
1517 scr->scr_rom = rom;
1553 struct sti_rom *rom = scr->scr_rom;
1554 bus_space_tag_t memt = rom->memt;
1555 bus_space_handle_t memh = rom->regh[2];
1574 struct sti_rom *rom = scr->scr_rom;
1575 bus_space_tag_t memt = rom->memt;
1576 bus_space_handle_t memh = rom->regh[2];
1594 struct sti_rom *rom = scr->scr_rom;
1595 bus_space_tag_t memt = rom->memt;
1596 bus_space_handle_t memh = rom->regh[2];
1609 struct sti_rom *rom = scr->scr_rom;
1610 bus_space_tag_t memt = rom->memt;
1611 bus_space_handle_t memh = rom->regh[0];
1620 struct sti_rom *rom = scr->scr_rom;
1621 bus_space_tag_t memt = rom->memt;
1622 bus_space_handle_t memh = rom->regh[0];
1650 struct sti_rom *rom = scr->scr_rom;
1651 bus_space_tag_t memt = rom->memt;
1652 bus_space_handle_t memh = rom->regh[2];
1663 struct sti_rom *rom = scr->scr_rom;
1664 bus_space_tag_t memt = rom->memt;
1665 bus_space_handle_t memh = rom->regh[2];
1688 struct sti_rom *rom = scr->scr_rom;
1689 bus_space_tag_t memt = rom->memt;
1690 bus_space_handle_t memh = rom->regh[2];
1732 struct sti_rom *rom = scr->scr_rom;
1733 bus_space_tag_t memt = rom->memt;
1734 bus_space_handle_t memh = rom->regh[2];
1775 struct sti_rom *rom = scr->scr_rom;
1776 bus_space_tag_t memt = rom->memt;
1777 bus_space_handle_t memh = rom->regh[0];
1784 if (rom->rom_dd.dd_grid[0] == STI_DD_LEGO) {