pl330 1179 drivers/dma/pl330.c static inline int _ldst_peripheral(struct pl330_dmac *pl330, pl330 1186 drivers/dma/pl330.c if (pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP) pl330 1193 drivers/dma/pl330.c if (!(pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP)) pl330 1206 drivers/dma/pl330.c static int _bursts(struct pl330_dmac *pl330, unsigned dry_run, u8 buf[], pl330 1216 drivers/dma/pl330.c off += _ldst_peripheral(pl330, dry_run, &buf[off], pxs, cyc, pl330 1237 drivers/dma/pl330.c static int _dregs(struct pl330_dmac *pl330, unsigned int dry_run, u8 buf[], pl330 1250 drivers/dma/pl330.c off += _ldst_peripheral(pl330, dry_run, &buf[off], pxs, pl330 1276 drivers/dma/pl330.c static inline int _loop(struct pl330_dmac *pl330, unsigned dry_run, u8 buf[], pl330 1284 drivers/dma/pl330.c return _bursts(pl330, dry_run, buf, pxs, 1); pl330 1302 drivers/dma/pl330.c szbrst = _bursts(pl330, 1, buf, pxs, 1); pl330 1334 drivers/dma/pl330.c off += _bursts(pl330, dry_run, &buf[off], pxs, cyc); pl330 1357 drivers/dma/pl330.c static inline int _setup_loops(struct pl330_dmac *pl330, pl330 1370 drivers/dma/pl330.c off += _loop(pl330, dry_run, &buf[off], &c, pxs); pl330 1373 drivers/dma/pl330.c off += _dregs(pl330, dry_run, &buf[off], pxs, num_dregs); pl330 1378 drivers/dma/pl330.c static inline int _setup_xfer(struct pl330_dmac *pl330, pl330 1391 drivers/dma/pl330.c off += _setup_loops(pl330, dry_run, &buf[off], pxs); pl330 1400 drivers/dma/pl330.c static int _setup_req(struct pl330_dmac *pl330, unsigned dry_run, pl330 1413 drivers/dma/pl330.c off += _setup_xfer(pl330, dry_run, &buf[off], pxs); pl330 1463 drivers/dma/pl330.c struct pl330_dmac *pl330 = thrd->dmac; pl330 1484 drivers/dma/pl330.c if (pl330->state == DYING pl330 1485 drivers/dma/pl330.c || pl330->dmac_tbd.reset_chan & (1 << thrd->id)) { pl330 1493 drivers/dma/pl330.c desc->peri >= pl330->pcfg.num_peri) { pl330 1500 drivers/dma/pl330.c spin_lock_irqsave(&pl330->lock, flags); pl330 1521 drivers/dma/pl330.c ret = _setup_req(pl330, 1, thrd, idx, &xs); pl330 1525 drivers/dma/pl330.c if (ret > pl330->mcbufsz / 2) { pl330 1526 drivers/dma/pl330.c dev_info(pl330->ddma.dev, "%s:%d Try increasing mcbufsz (%i/%i)\n", pl330 1527 drivers/dma/pl330.c __func__, __LINE__, ret, pl330->mcbufsz / 2); pl330 1535 drivers/dma/pl330.c _setup_req(pl330, 0, thrd, idx, &xs); pl330 1540 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 1570 drivers/dma/pl330.c struct pl330_dmac *pl330 = (struct pl330_dmac *) data; pl330 1574 drivers/dma/pl330.c spin_lock_irqsave(&pl330->lock, flags); pl330 1577 drivers/dma/pl330.c if (pl330->dmac_tbd.reset_dmac) { pl330 1578 drivers/dma/pl330.c pl330->state = DYING; pl330 1580 drivers/dma/pl330.c pl330->dmac_tbd.reset_mngr = true; pl330 1582 drivers/dma/pl330.c pl330->dmac_tbd.reset_dmac = false; pl330 1585 drivers/dma/pl330.c if (pl330->dmac_tbd.reset_mngr) { pl330 1586 drivers/dma/pl330.c _stop(pl330->manager); pl330 1588 drivers/dma/pl330.c pl330->dmac_tbd.reset_chan = (1 << pl330->pcfg.num_chan) - 1; pl330 1590 drivers/dma/pl330.c pl330->dmac_tbd.reset_mngr = false; pl330 1593 drivers/dma/pl330.c for (i = 0; i < pl330->pcfg.num_chan; i++) { pl330 1595 drivers/dma/pl330.c if (pl330->dmac_tbd.reset_chan & (1 << i)) { pl330 1596 drivers/dma/pl330.c struct pl330_thread *thrd = &pl330->channels[i]; pl330 1597 drivers/dma/pl330.c void __iomem *regs = pl330->base; pl330 1607 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 1610 drivers/dma/pl330.c spin_lock_irqsave(&pl330->lock, flags); pl330 1617 drivers/dma/pl330.c pl330->dmac_tbd.reset_chan &= ~(1 << i); pl330 1621 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 1627 drivers/dma/pl330.c static int pl330_update(struct pl330_dmac *pl330) pl330 1635 drivers/dma/pl330.c regs = pl330->base; pl330 1637 drivers/dma/pl330.c spin_lock_irqsave(&pl330->lock, flags); pl330 1641 drivers/dma/pl330.c pl330->dmac_tbd.reset_mngr = true; pl330 1643 drivers/dma/pl330.c pl330->dmac_tbd.reset_mngr = false; pl330 1645 drivers/dma/pl330.c val = readl(regs + FSC) & ((1 << pl330->pcfg.num_chan) - 1); pl330 1646 drivers/dma/pl330.c pl330->dmac_tbd.reset_chan |= val; pl330 1649 drivers/dma/pl330.c while (i < pl330->pcfg.num_chan) { pl330 1651 drivers/dma/pl330.c dev_info(pl330->ddma.dev, pl330 1655 drivers/dma/pl330.c _stop(&pl330->channels[i]); pl330 1663 drivers/dma/pl330.c if (pl330->pcfg.num_events < 32 pl330 1664 drivers/dma/pl330.c && val & ~((1 << pl330->pcfg.num_events) - 1)) { pl330 1665 drivers/dma/pl330.c pl330->dmac_tbd.reset_dmac = true; pl330 1666 drivers/dma/pl330.c dev_err(pl330->ddma.dev, "%s:%d Unexpected!\n", __func__, pl330 1672 drivers/dma/pl330.c for (ev = 0; ev < pl330->pcfg.num_events; ev++) { pl330 1684 drivers/dma/pl330.c id = pl330->events[ev]; pl330 1686 drivers/dma/pl330.c thrd = &pl330->channels[id]; pl330 1702 drivers/dma/pl330.c list_add_tail(&descdone->rqd, &pl330->req_done); pl330 1707 drivers/dma/pl330.c while (!list_empty(&pl330->req_done)) { pl330 1708 drivers/dma/pl330.c descdone = list_first_entry(&pl330->req_done, pl330 1711 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 1713 drivers/dma/pl330.c spin_lock_irqsave(&pl330->lock, flags); pl330 1717 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 1719 drivers/dma/pl330.c if (pl330->dmac_tbd.reset_dmac pl330 1720 drivers/dma/pl330.c || pl330->dmac_tbd.reset_mngr pl330 1721 drivers/dma/pl330.c || pl330->dmac_tbd.reset_chan) { pl330 1723 drivers/dma/pl330.c tasklet_schedule(&pl330->tasks); pl330 1732 drivers/dma/pl330.c struct pl330_dmac *pl330 = thrd->dmac; pl330 1735 drivers/dma/pl330.c for (ev = 0; ev < pl330->pcfg.num_events; ev++) pl330 1736 drivers/dma/pl330.c if (pl330->events[ev] == -1) { pl330 1737 drivers/dma/pl330.c pl330->events[ev] = thrd->id; pl330 1744 drivers/dma/pl330.c static bool _chan_ns(const struct pl330_dmac *pl330, int i) pl330 1746 drivers/dma/pl330.c return pl330->pcfg.irq_ns & (1 << i); pl330 1752 drivers/dma/pl330.c static struct pl330_thread *pl330_request_channel(struct pl330_dmac *pl330) pl330 1757 drivers/dma/pl330.c if (pl330->state == DYING) pl330 1760 drivers/dma/pl330.c chans = pl330->pcfg.num_chan; pl330 1763 drivers/dma/pl330.c thrd = &pl330->channels[i]; pl330 1765 drivers/dma/pl330.c _chan_ns(pl330, i))) { pl330 1785 drivers/dma/pl330.c struct pl330_dmac *pl330 = thrd->dmac; pl330 1788 drivers/dma/pl330.c if (ev >= 0 && ev < pl330->pcfg.num_events pl330 1789 drivers/dma/pl330.c && pl330->events[ev] == thrd->id) pl330 1790 drivers/dma/pl330.c pl330->events[ev] = -1; pl330 1810 drivers/dma/pl330.c static void read_dmac_config(struct pl330_dmac *pl330) pl330 1812 drivers/dma/pl330.c void __iomem *regs = pl330->base; pl330 1817 drivers/dma/pl330.c pl330->pcfg.data_bus_width = 8 * (1 << val); pl330 1821 drivers/dma/pl330.c pl330->pcfg.data_buf_dep = val + 1; pl330 1826 drivers/dma/pl330.c pl330->pcfg.num_chan = val; pl330 1832 drivers/dma/pl330.c pl330->pcfg.num_peri = val; pl330 1833 drivers/dma/pl330.c pl330->pcfg.peri_ns = readl(regs + CR4); pl330 1835 drivers/dma/pl330.c pl330->pcfg.num_peri = 0; pl330 1840 drivers/dma/pl330.c pl330->pcfg.mode |= DMAC_MODE_NS; pl330 1842 drivers/dma/pl330.c pl330->pcfg.mode &= ~DMAC_MODE_NS; pl330 1847 drivers/dma/pl330.c pl330->pcfg.num_events = val; pl330 1849 drivers/dma/pl330.c pl330->pcfg.irq_ns = readl(regs + CR3); pl330 1854 drivers/dma/pl330.c struct pl330_dmac *pl330 = thrd->dmac; pl330 1856 drivers/dma/pl330.c thrd->req[0].mc_cpu = pl330->mcode_cpu pl330 1857 drivers/dma/pl330.c + (thrd->id * pl330->mcbufsz); pl330 1858 drivers/dma/pl330.c thrd->req[0].mc_bus = pl330->mcode_bus pl330 1859 drivers/dma/pl330.c + (thrd->id * pl330->mcbufsz); pl330 1863 drivers/dma/pl330.c + pl330->mcbufsz / 2; pl330 1865 drivers/dma/pl330.c + pl330->mcbufsz / 2; pl330 1871 drivers/dma/pl330.c static int dmac_alloc_threads(struct pl330_dmac *pl330) pl330 1873 drivers/dma/pl330.c int chans = pl330->pcfg.num_chan; pl330 1878 drivers/dma/pl330.c pl330->channels = kcalloc(1 + chans, sizeof(*thrd), pl330 1880 drivers/dma/pl330.c if (!pl330->channels) pl330 1885 drivers/dma/pl330.c thrd = &pl330->channels[i]; pl330 1887 drivers/dma/pl330.c thrd->dmac = pl330; pl330 1893 drivers/dma/pl330.c thrd = &pl330->channels[chans]; pl330 1895 drivers/dma/pl330.c thrd->dmac = pl330; pl330 1897 drivers/dma/pl330.c pl330->manager = thrd; pl330 1902 drivers/dma/pl330.c static int dmac_alloc_resources(struct pl330_dmac *pl330) pl330 1904 drivers/dma/pl330.c int chans = pl330->pcfg.num_chan; pl330 1911 drivers/dma/pl330.c pl330->mcode_cpu = dma_alloc_attrs(pl330->ddma.dev, pl330 1912 drivers/dma/pl330.c chans * pl330->mcbufsz, pl330 1913 drivers/dma/pl330.c &pl330->mcode_bus, GFP_KERNEL, pl330 1915 drivers/dma/pl330.c if (!pl330->mcode_cpu) { pl330 1916 drivers/dma/pl330.c dev_err(pl330->ddma.dev, "%s:%d Can't allocate memory!\n", pl330 1921 drivers/dma/pl330.c ret = dmac_alloc_threads(pl330); pl330 1923 drivers/dma/pl330.c dev_err(pl330->ddma.dev, "%s:%d Can't to create channels for DMAC!\n", pl330 1925 drivers/dma/pl330.c dma_free_attrs(pl330->ddma.dev, pl330 1926 drivers/dma/pl330.c chans * pl330->mcbufsz, pl330 1927 drivers/dma/pl330.c pl330->mcode_cpu, pl330->mcode_bus, pl330 1935 drivers/dma/pl330.c static int pl330_add(struct pl330_dmac *pl330) pl330 1940 drivers/dma/pl330.c if ((pl330->pcfg.periph_id & 0xfffff) != PERIPH_ID_VAL) { pl330 1941 drivers/dma/pl330.c dev_err(pl330->ddma.dev, "PERIPH_ID 0x%x !\n", pl330 1942 drivers/dma/pl330.c pl330->pcfg.periph_id); pl330 1947 drivers/dma/pl330.c read_dmac_config(pl330); pl330 1949 drivers/dma/pl330.c if (pl330->pcfg.num_events == 0) { pl330 1950 drivers/dma/pl330.c dev_err(pl330->ddma.dev, "%s:%d Can't work without events!\n", pl330 1955 drivers/dma/pl330.c spin_lock_init(&pl330->lock); pl330 1957 drivers/dma/pl330.c INIT_LIST_HEAD(&pl330->req_done); pl330 1960 drivers/dma/pl330.c if (!pl330->mcbufsz) pl330 1961 drivers/dma/pl330.c pl330->mcbufsz = MCODE_BUFF_PER_REQ * 2; pl330 1964 drivers/dma/pl330.c for (i = 0; i < pl330->pcfg.num_events; i++) pl330 1965 drivers/dma/pl330.c pl330->events[i] = -1; pl330 1968 drivers/dma/pl330.c ret = dmac_alloc_resources(pl330); pl330 1970 drivers/dma/pl330.c dev_err(pl330->ddma.dev, "Unable to create channels for DMAC\n"); pl330 1974 drivers/dma/pl330.c tasklet_init(&pl330->tasks, pl330_dotask, (unsigned long) pl330); pl330 1976 drivers/dma/pl330.c pl330->state = INIT; pl330 1981 drivers/dma/pl330.c static int dmac_free_threads(struct pl330_dmac *pl330) pl330 1987 drivers/dma/pl330.c for (i = 0; i < pl330->pcfg.num_chan; i++) { pl330 1988 drivers/dma/pl330.c thrd = &pl330->channels[i]; pl330 1993 drivers/dma/pl330.c kfree(pl330->channels); pl330 1998 drivers/dma/pl330.c static void pl330_del(struct pl330_dmac *pl330) pl330 2000 drivers/dma/pl330.c pl330->state = UNINIT; pl330 2002 drivers/dma/pl330.c tasklet_kill(&pl330->tasks); pl330 2005 drivers/dma/pl330.c dmac_free_threads(pl330); pl330 2007 drivers/dma/pl330.c dma_free_attrs(pl330->ddma.dev, pl330 2008 drivers/dma/pl330.c pl330->pcfg.num_chan * pl330->mcbufsz, pl330->mcode_cpu, pl330 2009 drivers/dma/pl330.c pl330->mcode_bus, DMA_ATTR_PRIVILEGED); pl330 2134 drivers/dma/pl330.c struct pl330_dmac *pl330 = ofdma->of_dma_data; pl330 2137 drivers/dma/pl330.c if (!pl330) pl330 2144 drivers/dma/pl330.c if (chan_id >= pl330->num_peripherals) pl330 2147 drivers/dma/pl330.c return dma_get_slave_channel(&pl330->peripherals[chan_id].chan); pl330 2153 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2156 drivers/dma/pl330.c spin_lock_irqsave(&pl330->lock, flags); pl330 2161 drivers/dma/pl330.c pch->thread = pl330_request_channel(pl330); pl330 2163 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 2169 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 2275 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2278 drivers/dma/pl330.c pm_runtime_get_sync(pl330->ddma.dev); pl330 2281 drivers/dma/pl330.c spin_lock(&pl330->lock); pl330 2286 drivers/dma/pl330.c spin_unlock(&pl330->lock); pl330 2302 drivers/dma/pl330.c list_splice_tail_init(&pch->submitted_list, &pl330->desc_pool); pl330 2303 drivers/dma/pl330.c list_splice_tail_init(&pch->work_list, &pl330->desc_pool); pl330 2304 drivers/dma/pl330.c list_splice_tail_init(&pch->completed_list, &pl330->desc_pool); pl330 2306 drivers/dma/pl330.c pm_runtime_mark_last_busy(pl330->ddma.dev); pl330 2308 drivers/dma/pl330.c pm_runtime_put_autosuspend(pl330->ddma.dev); pl330 2309 drivers/dma/pl330.c pm_runtime_put_autosuspend(pl330->ddma.dev); pl330 2324 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2327 drivers/dma/pl330.c pm_runtime_get_sync(pl330->ddma.dev); pl330 2330 drivers/dma/pl330.c spin_lock(&pl330->lock); pl330 2332 drivers/dma/pl330.c spin_unlock(&pl330->lock); pl330 2335 drivers/dma/pl330.c pm_runtime_mark_last_busy(pl330->ddma.dev); pl330 2336 drivers/dma/pl330.c pm_runtime_put_autosuspend(pl330->ddma.dev); pl330 2344 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2350 drivers/dma/pl330.c spin_lock_irqsave(&pl330->lock, flags); pl330 2358 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->lock, flags); pl330 2368 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2372 drivers/dma/pl330.c pm_runtime_get_sync(pl330->ddma.dev); pl330 2382 drivers/dma/pl330.c pm_runtime_put_autosuspend(pl330->ddma.dev); pl330 2579 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2584 drivers/dma/pl330.c desc = pluck_desc(&pl330->desc_pool, &pl330->pool_lock); pl330 2650 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2653 drivers/dma/pl330.c burst_len = pl330->pcfg.data_bus_width / 8; pl330 2654 drivers/dma/pl330.c burst_len *= pl330->pcfg.data_buf_dep / pl330->pcfg.num_chan; pl330 2671 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2699 drivers/dma/pl330.c spin_lock_irqsave(&pl330->pool_lock, flags); pl330 2704 drivers/dma/pl330.c list_move_tail(&desc->node, &pl330->desc_pool); pl330 2707 drivers/dma/pl330.c list_move_tail(&first->node, &pl330->desc_pool); pl330 2709 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->pool_lock, flags); pl330 2760 drivers/dma/pl330.c struct pl330_dmac *pl330; pl330 2766 drivers/dma/pl330.c pl330 = pch->dmac; pl330 2777 drivers/dma/pl330.c burst = pl330->pcfg.data_bus_width / 8; pl330 2795 drivers/dma/pl330.c if (desc->rqcfg.brst_size * 8 < pl330->pcfg.data_bus_width) pl330 2806 drivers/dma/pl330.c static void __pl330_giveback_desc(struct pl330_dmac *pl330, pl330 2815 drivers/dma/pl330.c spin_lock_irqsave(&pl330->pool_lock, flags); pl330 2820 drivers/dma/pl330.c list_move_tail(&desc->node, &pl330->desc_pool); pl330 2823 drivers/dma/pl330.c list_move_tail(&first->node, &pl330->desc_pool); pl330 2825 drivers/dma/pl330.c spin_unlock_irqrestore(&pl330->pool_lock, flags); pl330 2852 drivers/dma/pl330.c struct pl330_dmac *pl330 = pch->dmac; pl330 2857 drivers/dma/pl330.c __pl330_giveback_desc(pl330, first); pl330 2908 drivers/dma/pl330.c struct pl330_dmac *pl330 = s->private; pl330 2911 drivers/dma/pl330.c chans = pl330->pcfg.num_chan; pl330 2912 drivers/dma/pl330.c pchs = pl330->num_peripherals; pl330 2918 drivers/dma/pl330.c struct pl330_thread *thrd = &pl330->channels[ch]; pl330 2922 drivers/dma/pl330.c struct dma_pl330_chan *pch = &pl330->peripherals[pr]; pl330 2942 drivers/dma/pl330.c static inline void init_pl330_debugfs(struct pl330_dmac *pl330) pl330 2944 drivers/dma/pl330.c debugfs_create_file(dev_name(pl330->ddma.dev), pl330 2945 drivers/dma/pl330.c S_IFREG | 0444, NULL, pl330, pl330 2949 drivers/dma/pl330.c static inline void init_pl330_debugfs(struct pl330_dmac *pl330) pl330 2998 drivers/dma/pl330.c struct pl330_dmac *pl330; pl330 3011 drivers/dma/pl330.c pl330 = devm_kzalloc(&adev->dev, sizeof(*pl330), GFP_KERNEL); pl330 3012 drivers/dma/pl330.c if (!pl330) pl330 3015 drivers/dma/pl330.c pd = &pl330->ddma; pl330 3018 drivers/dma/pl330.c pl330->mcbufsz = 0; pl330 3023 drivers/dma/pl330.c pl330->quirks |= of_quirks[i].id; pl330 3026 drivers/dma/pl330.c pl330->base = devm_ioremap_resource(&adev->dev, res); pl330 3027 drivers/dma/pl330.c if (IS_ERR(pl330->base)) pl330 3028 drivers/dma/pl330.c return PTR_ERR(pl330->base); pl330 3030 drivers/dma/pl330.c amba_set_drvdata(adev, pl330); pl330 3032 drivers/dma/pl330.c pl330->rstc = devm_reset_control_get_optional(&adev->dev, "dma"); pl330 3033 drivers/dma/pl330.c if (IS_ERR(pl330->rstc)) { pl330 3034 drivers/dma/pl330.c if (PTR_ERR(pl330->rstc) != -EPROBE_DEFER) pl330 3036 drivers/dma/pl330.c return PTR_ERR(pl330->rstc); pl330 3038 drivers/dma/pl330.c ret = reset_control_deassert(pl330->rstc); pl330 3045 drivers/dma/pl330.c pl330->rstc_ocp = devm_reset_control_get_optional(&adev->dev, "dma-ocp"); pl330 3046 drivers/dma/pl330.c if (IS_ERR(pl330->rstc_ocp)) { pl330 3047 drivers/dma/pl330.c if (PTR_ERR(pl330->rstc_ocp) != -EPROBE_DEFER) pl330 3049 drivers/dma/pl330.c return PTR_ERR(pl330->rstc_ocp); pl330 3051 drivers/dma/pl330.c ret = reset_control_deassert(pl330->rstc_ocp); pl330 3063 drivers/dma/pl330.c dev_name(&adev->dev), pl330); pl330 3071 drivers/dma/pl330.c pcfg = &pl330->pcfg; pl330 3074 drivers/dma/pl330.c ret = pl330_add(pl330); pl330 3078 drivers/dma/pl330.c INIT_LIST_HEAD(&pl330->desc_pool); pl330 3079 drivers/dma/pl330.c spin_lock_init(&pl330->pool_lock); pl330 3082 drivers/dma/pl330.c if (!add_desc(&pl330->desc_pool, &pl330->pool_lock, pl330 3091 drivers/dma/pl330.c pl330->num_peripherals = num_chan; pl330 3093 drivers/dma/pl330.c pl330->peripherals = kcalloc(num_chan, sizeof(*pch), GFP_KERNEL); pl330 3094 drivers/dma/pl330.c if (!pl330->peripherals) { pl330 3100 drivers/dma/pl330.c pch = &pl330->peripherals[i]; pl330 3109 drivers/dma/pl330.c pch->dmac = pl330; pl330 3137 drivers/dma/pl330.c pd->max_burst = ((pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP) ? pl330 3148 drivers/dma/pl330.c of_dma_pl330_xlate, pl330); pl330 3155 drivers/dma/pl330.c adev->dev.dma_parms = &pl330->dma_parms; pl330 3166 drivers/dma/pl330.c init_pl330_debugfs(pl330); pl330 3183 drivers/dma/pl330.c list_for_each_entry_safe(pch, _p, &pl330->ddma.channels, pl330 3196 drivers/dma/pl330.c pl330_del(pl330); pl330 3198 drivers/dma/pl330.c if (pl330->rstc_ocp) pl330 3199 drivers/dma/pl330.c reset_control_assert(pl330->rstc_ocp); pl330 3201 drivers/dma/pl330.c if (pl330->rstc) pl330 3202 drivers/dma/pl330.c reset_control_assert(pl330->rstc); pl330 3208 drivers/dma/pl330.c struct pl330_dmac *pl330 = amba_get_drvdata(adev); pl330 3212 drivers/dma/pl330.c pm_runtime_get_noresume(pl330->ddma.dev); pl330 3220 drivers/dma/pl330.c devm_free_irq(&adev->dev, irq, pl330); pl330 3223 drivers/dma/pl330.c dma_async_device_unregister(&pl330->ddma); pl330 3226 drivers/dma/pl330.c list_for_each_entry_safe(pch, _p, &pl330->ddma.channels, pl330 3239 drivers/dma/pl330.c pl330_del(pl330); pl330 3241 drivers/dma/pl330.c if (pl330->rstc_ocp) pl330 3242 drivers/dma/pl330.c reset_control_assert(pl330->rstc_ocp); pl330 3244 drivers/dma/pl330.c if (pl330->rstc) pl330 3245 drivers/dma/pl330.c reset_control_assert(pl330->rstc);