paddr_t lcdmmap(dev_t dev, off_t offset, int size) { struct imx51_ipuv3_softc *sc = device_lookup_private(&ipu_cd, minor(dev)); struct imx51_ipuv3_screen *scr = sc->active; return bus_dmamem_mmap(sc->dma_tag, scr->segs, scr->nsegs, offset, 0, BUS_DMA_WAITOK|BUS_DMA_COHERENT); }
static paddr_t awin_fb_mmap(void *v, void *vs, off_t off, int prot) { struct awin_fb_softc *sc = v; if (off < 0 || off >= sc->sc_dmasegs[0].ds_len) return -1; return bus_dmamem_mmap(sc->sc_dmat, sc->sc_dmasegs, sc->sc_ndmasegs, off, prot, BUS_DMA_PREFETCHABLE); }
static paddr_t tegra_genfb_mmap(void *v, void *vs, off_t off, int prot) { struct tegra_genfb_softc * const sc = v; if (off < 0 || off >= sc->sc_dmamap->dm_segs[0].ds_len) return -1; return bus_dmamem_mmap(sc->sc_dmat, sc->sc_dmamap->dm_segs, 1, off, prot, BUS_DMA_PREFETCHABLE); }
paddr_t s3c24x0_lcd_mmap(void *v, void *vs, off_t offset, int prot) { struct s3c24x0_lcd_softc *sc = v; struct s3c24x0_lcd_screen *screen = sc->active; /* ??? */ if (screen == NULL) return -1; return bus_dmamem_mmap(sc->dma_tag, screen->segs, screen->nsegs, offset, prot, BUS_DMA_WAITOK|BUS_DMA_COHERENT); return -1; }
static paddr_t yds_mappage(void *addr, void *mem, off_t off, int prot) { struct yds_softc *sc; struct yds_dma *p; if (off < 0) return -1; sc = addr; p = yds_find_dma(sc, mem); if (p == NULL) return -1; return bus_dmamem_mmap(sc->sc_dmatag, p->segs, p->nsegs, off, prot, BUS_DMA_WAITOK); }
static paddr_t auacer_mappage(void *v, void *mem, off_t off, int prot) { struct auacer_softc *sc; struct auacer_dma *p; if (off < 0) return -1; sc = v; for (p = sc->sc_dmas; p && KERNADDR(p) != mem; p = p->next) continue; if (p == NULL) return -1; return bus_dmamem_mmap(sc->dmat, p->segs, p->nsegs, off, prot, BUS_DMA_WAITOK); }
static paddr_t plb_tft_mmap(void *arg, void *scr, off_t offs, int prot) { struct vcons_data *vc = arg; struct plb_tft_softc *psc = vc->cookie; paddr_t pa = -1; #if 0 /* XXX hack */ if (offs < psc->psc_sc.sc_size) pa = bus_dmamem_mmap(psc->psc_dmat, &psc->psc_seg, 1, offs, prot, BUS_DMA_WAITOK | BUS_DMA_COHERENT); #endif if (offs < psc->psc_sc.sc_size) pa = (paddr_t)(intptr_t)psc->psc_sc.sc_image + offs; return (pa); }
paddr_t fms_mappage(void *addr, void *mem, off_t off, int prot) { struct fms_softc *sc = addr; struct fms_dma *p; if (off < 0) return -1; for (p = sc->sc_dmas; p && p->addr != mem; p = p->next) ; if (!p) return -1; return bus_dmamem_mmap(sc->sc_dmat, &p->seg, 1, off, prot, BUS_DMA_WAITOK); }
paddr_t pxa2x0_i2s_mappage(void *hdl, void *mem, off_t off, int prot) { struct pxa2x0_i2s_softc *sc = hdl; struct pxa2x0_i2s_dma *p; if (off < 0) return -1; for (p = sc->sc_dmas; p && p->addr != mem; p = p->next) continue; if (p == NULL) return -1; if (off > p->size) return -1; return bus_dmamem_mmap(sc->sc_dmat, p->segs, p->nsegs, off, prot, BUS_DMA_WAITOK); }
paddr_t pxa2x0_i2s_mappage(void *hdl, void *mem, off_t off, int prot) { struct pxa2x0_i2s_softc *sc = (struct pxa2x0_i2s_softc *)((struct device *)hdl + 1); struct pxa2x0_i2s_dma *p; if (off < 0) return -1; for (p = sc->sc_dmas; p && p->addr != mem; p = p->next) ; if (!p) return -1; if (off > p->size) return -1; return bus_dmamem_mmap(sc->sc_dmat, &p->seg, 1, off, prot, BUS_DMA_WAITOK); }
paddr_t vs_mappage(void *addr, void *mem, off_t off, int prot) { struct vs_softc *sc; struct vs_dma *p; if (off < 0) return -1; sc = addr; for (p = sc->sc_dmas; p != NULL && KVADDR(p) != mem; p = p->vd_next) continue; if (p == NULL) { printf("%s: mappage: bad addr %p\n", device_xname(sc->sc_dev), start); return -1; } return bus_dmamem_mmap(sc->sc_dmat, p->vd_segs, p->vd_nsegs, off, prot, BUS_DMA_WAITOK); }
paddr_t cs428x_mappage(void *addr, void *mem, off_t off, int prot) { struct cs428x_softc *sc; struct cs428x_dma *p; sc = addr; if (off < 0) return -1; for (p = sc->sc_dmas; p && BUFADDR(p) != mem; p = p->next) ; if (p == NULL) { DPRINTF(("cs428x_mappage: bad buffer address\n")); return -1; } return (bus_dmamem_mmap(sc->sc_dmatag, p->segs, p->nsegs, off, prot, BUS_DMA_WAITOK)); }