Lines Matching defs:rom
66 /* stuff we need in order to use the STI ROM */
181 struct sti_rom *rom = sc->sc_base.sc_rom;
182 bus_space_tag_t memt = rom->memt;
183 bus_space_handle_t memh = rom->regh[2];
190 struct sti_rom *rom = sc->sc_base.sc_rom;
191 bus_space_tag_t memt = rom->memt;
192 bus_space_handle_t memh = rom->regh[2];
199 struct sti_rom *rom = sc->sc_base.sc_rom;
200 bus_space_tag_t memt = rom->memt;
201 bus_space_handle_t memh = rom->regh[2];
208 struct sti_rom *rom = sc->sc_base.sc_rom;
209 bus_space_tag_t memt = rom->memt;
210 bus_space_handle_t memh = rom->regh[2];
219 struct sti_rom *rom;
246 rom = (struct sti_rom *)kmem_zalloc(sizeof(*rom), KM_SLEEP);
247 rom->rom_softc = &sc->sc_base;
248 ret = sti_rom_setup(rom, paa->pa_iot, paa->pa_memt, sc->sc_romh,
251 kmem_free(rom, sizeof(*rom));
255 sc->sc_base.sc_rom = rom;
338 * Grovel the STI ROM image.
361 * Map the complete ROM for now.
365 DPRINTF(("%s: mapping rom @ %lx for %lx\n", __func__,
371 aprint_error_dev(sc->sc_dev, "can't map PCI ROM (%d)\n", rc);
377 * Iterate over the ROM images, pick the best candidate.
384 * Check for a valid ROM header.
392 "invalid PCI ROM header signature (%08x)\n",
400 * Check ROM type.
404 if (tmp != 0x00000001) { /* 1 == STI ROM */
408 "invalid PCI ROM type (%08x)\n", tmp);
420 DPRINTF(("ROM offset %08x size %08x type %08x",
426 * Check for a valid ROM data structure.
427 * We do not need it except to know what architecture the ROM
474 aprint_error_dev(sc->sc_dev, "found no ROM with "
496 * Find out where the STI ROM itself lies, and its size.
511 DPRINTF(("remapping rom @ %lx for %lx\n",
517 aprint_error_dev(sc->sc_dev, "can't map STI ROM (%d)\n",
578 * Enable PCI ROM.
604 * Disable PCI ROM.
656 struct sti_rom *rom = sc->sc_base.sc_rom;
657 bus_space_tag_t memt = rom->memt;
658 bus_space_handle_t memh = rom->regh[2];
880 struct sti_rom *rom = sc->sc_base.sc_rom;
888 pa = bus_space_mmap(rom->memt, sc->sc_scr.fbaddr, offset,
892 pa = bus_space_mmap(rom->memt, rom->regh[2],