pl08x             391 drivers/dma/amba-pl08x.c static void pl08x_write_lli(struct pl08x_driver_data *pl08x,
pl08x             394 drivers/dma/amba-pl08x.c 	if (pl08x->vd->pl080s)
pl08x             395 drivers/dma/amba-pl08x.c 		dev_vdbg(&pl08x->adev->dev,
pl08x             402 drivers/dma/amba-pl08x.c 		dev_vdbg(&pl08x->adev->dev,
pl08x             463 drivers/dma/amba-pl08x.c 		switch (pl08x->pd->memcpy_burst_size) {
pl08x             500 drivers/dma/amba-pl08x.c 		if (pl08x->pd->memcpy_prot_buff)
pl08x             502 drivers/dma/amba-pl08x.c 		if (pl08x->pd->memcpy_prot_cache)
pl08x             514 drivers/dma/amba-pl08x.c 	if (pl08x->vd->pl080s)
pl08x             529 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x             543 drivers/dma/amba-pl08x.c 	pl08x_write_lli(pl08x, phychan, &txd->llis_va[0], txd->ccfg);
pl08x             547 drivers/dma/amba-pl08x.c 	while (readl(pl08x->base + PL080_EN_CHAN) & BIT(phychan->id))
pl08x             634 drivers/dma/amba-pl08x.c static void pl08x_terminate_phy_chan(struct pl08x_driver_data *pl08x,
pl08x             656 drivers/dma/amba-pl08x.c 		       pl08x->base + PL080_ERR_CLEAR);
pl08x             657 drivers/dma/amba-pl08x.c 		writel(BIT(ch->id), pl08x->base + PL080_TC_CLEAR);
pl08x             667 drivers/dma/amba-pl08x.c 	writel(BIT(ch->id), pl08x->base + PL080_ERR_CLEAR);
pl08x             668 drivers/dma/amba-pl08x.c 	writel(BIT(ch->id), pl08x->base + PL080_TC_CLEAR);
pl08x             755 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x             785 drivers/dma/amba-pl08x.c 	llis_max_words = pl08x->lli_words * MAX_NUM_TSFR_LLIS;
pl08x             797 drivers/dma/amba-pl08x.c 	for (; llis_va < llis_va_limit; llis_va += pl08x->lli_words) {
pl08x             818 drivers/dma/amba-pl08x.c pl08x_get_phy_channel(struct pl08x_driver_data *pl08x,
pl08x             825 drivers/dma/amba-pl08x.c 	for (i = 0; i < pl08x->vd->channels; i++) {
pl08x             826 drivers/dma/amba-pl08x.c 		ch = &pl08x->phy_chans[i];
pl08x             839 drivers/dma/amba-pl08x.c 	if (i == pl08x->vd->channels) {
pl08x             848 drivers/dma/amba-pl08x.c static inline void pl08x_put_phy_channel(struct pl08x_driver_data *pl08x,
pl08x             861 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x             864 drivers/dma/amba-pl08x.c 	ch = pl08x_get_phy_channel(pl08x, plchan);
pl08x             866 drivers/dma/amba-pl08x.c 		dev_dbg(&pl08x->adev->dev, "no physical channel available for xfer on %s\n", plchan->name);
pl08x             872 drivers/dma/amba-pl08x.c 	dev_dbg(&pl08x->adev->dev, "allocated physical channel %d for xfer on %s\n",
pl08x             883 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x             885 drivers/dma/amba-pl08x.c 	dev_dbg(&pl08x->adev->dev, "reassigned physical channel %d for xfer on %s\n",
pl08x             905 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x             917 drivers/dma/amba-pl08x.c 	list_for_each_entry(p, &pl08x->memcpy.channels, vc.chan.device_node)
pl08x             924 drivers/dma/amba-pl08x.c 	if (!next && pl08x->has_slave) {
pl08x             925 drivers/dma/amba-pl08x.c 		list_for_each_entry(p, &pl08x->slave.channels, vc.chan.device_node)
pl08x             934 drivers/dma/amba-pl08x.c 	pl08x_terminate_phy_chan(pl08x, plchan->phychan);
pl08x             955 drivers/dma/amba-pl08x.c 		pl08x_put_phy_channel(pl08x, plchan->phychan);
pl08x             967 drivers/dma/amba-pl08x.c pl08x_get_bytes_for_lli(struct pl08x_driver_data *pl08x,
pl08x             973 drivers/dma/amba-pl08x.c 	if (pl08x->vd->ftdmac020) {
pl08x            1003 drivers/dma/amba-pl08x.c static inline u32 pl08x_lli_control_bits(struct pl08x_driver_data *pl08x,
pl08x            1015 drivers/dma/amba-pl08x.c 	if (pl08x->vd->ftdmac020) {
pl08x            1123 drivers/dma/amba-pl08x.c static void pl08x_choose_master_bus(struct pl08x_driver_data *pl08x,
pl08x            1136 drivers/dma/amba-pl08x.c 	if (pl08x->vd->ftdmac020) {
pl08x            1168 drivers/dma/amba-pl08x.c static void pl08x_fill_lli_for_desc(struct pl08x_driver_data *pl08x,
pl08x            1172 drivers/dma/amba-pl08x.c 	u32 offset = num_llis * pl08x->lli_words;
pl08x            1179 drivers/dma/amba-pl08x.c 	offset += pl08x->lli_words;
pl08x            1186 drivers/dma/amba-pl08x.c 	if (pl08x->vd->pl080s)
pl08x            1189 drivers/dma/amba-pl08x.c 	if (pl08x->vd->ftdmac020) {
pl08x            1205 drivers/dma/amba-pl08x.c static inline void prep_byte_width_lli(struct pl08x_driver_data *pl08x,
pl08x            1209 drivers/dma/amba-pl08x.c 	*cctl = pl08x_lli_control_bits(pl08x, *cctl, 1, 1, len);
pl08x            1210 drivers/dma/amba-pl08x.c 	pl08x_fill_lli_for_desc(pl08x, bd, num_llis, len, *cctl, len);
pl08x            1215 drivers/dma/amba-pl08x.c static void pl08x_dump_lli(struct pl08x_driver_data *pl08x,
pl08x            1220 drivers/dma/amba-pl08x.c 	if (pl08x->vd->pl080s) {
pl08x            1221 drivers/dma/amba-pl08x.c 		dev_vdbg(&pl08x->adev->dev,
pl08x            1225 drivers/dma/amba-pl08x.c 			dev_vdbg(&pl08x->adev->dev,
pl08x            1231 drivers/dma/amba-pl08x.c 			llis_va += pl08x->lli_words;
pl08x            1234 drivers/dma/amba-pl08x.c 		dev_vdbg(&pl08x->adev->dev,
pl08x            1238 drivers/dma/amba-pl08x.c 			dev_vdbg(&pl08x->adev->dev,
pl08x            1243 drivers/dma/amba-pl08x.c 			llis_va += pl08x->lli_words;
pl08x            1248 drivers/dma/amba-pl08x.c static inline void pl08x_dump_lli(struct pl08x_driver_data *pl08x,
pl08x            1257 drivers/dma/amba-pl08x.c static int pl08x_fill_llis_for_desc(struct pl08x_driver_data *pl08x,
pl08x            1268 drivers/dma/amba-pl08x.c 	txd->llis_va = dma_pool_alloc(pl08x->pool, GFP_NOWAIT, &txd->llis_bus);
pl08x            1270 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev, "%s no memory for llis\n", __func__);
pl08x            1275 drivers/dma/amba-pl08x.c 	bd.lli_bus = (pl08x->lli_buses & PL08X_AHB2) ? PL080_LLI_LM_AHB2 : 0;
pl08x            1279 drivers/dma/amba-pl08x.c 	bd.srcbus.maxwidth = pl08x_get_bytes_for_lli(pl08x, cctl, true);
pl08x            1282 drivers/dma/amba-pl08x.c 	bd.dstbus.maxwidth = pl08x_get_bytes_for_lli(pl08x, cctl, false);
pl08x            1294 drivers/dma/amba-pl08x.c 		pl08x_choose_master_bus(pl08x, &bd, &mbus, &sbus, cctl);
pl08x            1296 drivers/dma/amba-pl08x.c 		dev_vdbg(&pl08x->adev->dev,
pl08x            1305 drivers/dma/amba-pl08x.c 		dev_vdbg(&pl08x->adev->dev, "mbus=%s sbus=%s\n",
pl08x            1334 drivers/dma/amba-pl08x.c 			if (pl08x->vd->ftdmac020)
pl08x            1341 drivers/dma/amba-pl08x.c 				dev_err(&pl08x->adev->dev, "%s sg len can't be zero",
pl08x            1348 drivers/dma/amba-pl08x.c 				dev_err(&pl08x->adev->dev,
pl08x            1355 drivers/dma/amba-pl08x.c 			cctl = pl08x_lli_control_bits(pl08x, cctl,
pl08x            1358 drivers/dma/amba-pl08x.c 			pl08x_fill_lli_for_desc(pl08x, &bd, num_llis++,
pl08x            1378 drivers/dma/amba-pl08x.c 			dev_vdbg(&pl08x->adev->dev,
pl08x            1381 drivers/dma/amba-pl08x.c 			prep_byte_width_lli(pl08x, &bd, &cctl, early_bytes,
pl08x            1391 drivers/dma/amba-pl08x.c 				dev_dbg(&pl08x->adev->dev,
pl08x            1403 drivers/dma/amba-pl08x.c 						pl08x->vd->max_transfer_size;
pl08x            1404 drivers/dma/amba-pl08x.c 			dev_vdbg(&pl08x->adev->dev,
pl08x            1431 drivers/dma/amba-pl08x.c 				dev_vdbg(&pl08x->adev->dev,
pl08x            1436 drivers/dma/amba-pl08x.c 				cctl = pl08x_lli_control_bits(pl08x, cctl,
pl08x            1439 drivers/dma/amba-pl08x.c 				pl08x_fill_lli_for_desc(pl08x, &bd, num_llis++,
pl08x            1448 drivers/dma/amba-pl08x.c 				dev_vdbg(&pl08x->adev->dev,
pl08x            1451 drivers/dma/amba-pl08x.c 				prep_byte_width_lli(pl08x, &bd, &cctl,
pl08x            1457 drivers/dma/amba-pl08x.c 			dev_err(&pl08x->adev->dev,
pl08x            1464 drivers/dma/amba-pl08x.c 			dev_err(&pl08x->adev->dev,
pl08x            1472 drivers/dma/amba-pl08x.c 	last_lli = llis_va + (num_llis - 1) * pl08x->lli_words;
pl08x            1481 drivers/dma/amba-pl08x.c 		if (pl08x->vd->ftdmac020)
pl08x            1487 drivers/dma/amba-pl08x.c 	pl08x_dump_lli(pl08x, llis_va, num_llis);
pl08x            1492 drivers/dma/amba-pl08x.c static void pl08x_free_txd(struct pl08x_driver_data *pl08x,
pl08x            1498 drivers/dma/amba-pl08x.c 		dma_pool_free(pl08x->pool, txd->llis_va, txd->llis_bus);
pl08x            1520 drivers/dma/amba-pl08x.c static void pl08x_free_txd_list(struct pl08x_driver_data *pl08x,
pl08x            1761 drivers/dma/amba-pl08x.c static u32 pl08x_memcpy_cctl(struct pl08x_driver_data *pl08x)
pl08x            1766 drivers/dma/amba-pl08x.c 	switch (pl08x->pd->memcpy_burst_size) {
pl08x            1768 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            1805 drivers/dma/amba-pl08x.c 	switch (pl08x->pd->memcpy_bus_width) {
pl08x            1807 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            1825 drivers/dma/amba-pl08x.c 	if (pl08x->pd->memcpy_prot_buff)
pl08x            1827 drivers/dma/amba-pl08x.c 	if (pl08x->pd->memcpy_prot_cache)
pl08x            1836 drivers/dma/amba-pl08x.c 	if (pl08x->vd->dualmaster)
pl08x            1838 drivers/dma/amba-pl08x.c 					 pl08x->mem_buses,
pl08x            1839 drivers/dma/amba-pl08x.c 					 pl08x->mem_buses);
pl08x            1844 drivers/dma/amba-pl08x.c static u32 pl08x_ftdmac020_memcpy_cctl(struct pl08x_driver_data *pl08x)
pl08x            1849 drivers/dma/amba-pl08x.c 	switch (pl08x->pd->memcpy_bus_width) {
pl08x            1851 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            1878 drivers/dma/amba-pl08x.c 	if (pl08x->vd->dualmaster)
pl08x            1880 drivers/dma/amba-pl08x.c 					 pl08x->mem_buses,
pl08x            1881 drivers/dma/amba-pl08x.c 					 pl08x->mem_buses);
pl08x            1894 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x            1901 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            1908 drivers/dma/amba-pl08x.c 		pl08x_free_txd(pl08x, txd);
pl08x            1916 drivers/dma/amba-pl08x.c 	if (pl08x->vd->ftdmac020) {
pl08x            1919 drivers/dma/amba-pl08x.c 		txd->cctl = pl08x_ftdmac020_memcpy_cctl(pl08x);
pl08x            1924 drivers/dma/amba-pl08x.c 		txd->cctl = pl08x_memcpy_cctl(pl08x);
pl08x            1929 drivers/dma/amba-pl08x.c 		pl08x_free_txd(pl08x, txd);
pl08x            1942 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x            1951 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev, "%s no txd\n", __func__);
pl08x            1965 drivers/dma/amba-pl08x.c 		src_buses = pl08x->mem_buses;
pl08x            1973 drivers/dma/amba-pl08x.c 		dst_buses = pl08x->mem_buses;
pl08x            1975 drivers/dma/amba-pl08x.c 		pl08x_free_txd(pl08x, txd);
pl08x            1976 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            1983 drivers/dma/amba-pl08x.c 		pl08x_free_txd(pl08x, txd);
pl08x            1984 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            2004 drivers/dma/amba-pl08x.c 		pl08x_free_txd(pl08x, txd);
pl08x            2005 drivers/dma/amba-pl08x.c 		dev_dbg(&pl08x->adev->dev,
pl08x            2011 drivers/dma/amba-pl08x.c 	dev_dbg(&pl08x->adev->dev, "allocated DMA request signal %d for xfer on %s\n",
pl08x            2055 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x            2061 drivers/dma/amba-pl08x.c 	dev_dbg(&pl08x->adev->dev, "%s prepare transaction of %d bytes from %s\n",
pl08x            2074 drivers/dma/amba-pl08x.c 			pl08x_free_txd(pl08x, txd);
pl08x            2075 drivers/dma/amba-pl08x.c 			dev_err(&pl08x->adev->dev, "%s no mem for pl080 sg\n",
pl08x            2084 drivers/dma/amba-pl08x.c 		pl08x_free_txd(pl08x, txd);
pl08x            2097 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x            2102 drivers/dma/amba-pl08x.c 	dev_dbg(&pl08x->adev->dev,
pl08x            2119 drivers/dma/amba-pl08x.c 			pl08x_free_txd(pl08x, txd);
pl08x            2127 drivers/dma/amba-pl08x.c 		pl08x_free_txd(pl08x, txd);
pl08x            2138 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x            2148 drivers/dma/amba-pl08x.c 	if (config->device_fc && pl08x->vd->pl080s) {
pl08x            2149 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            2163 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = plchan->host;
pl08x            2187 drivers/dma/amba-pl08x.c 	pl08x_free_txd_list(pl08x, plchan);
pl08x            2279 drivers/dma/amba-pl08x.c static void pl08x_ensure_on(struct pl08x_driver_data *pl08x)
pl08x            2282 drivers/dma/amba-pl08x.c 	if (pl08x->vd->nomadik)
pl08x            2285 drivers/dma/amba-pl08x.c 	if (pl08x->vd->ftdmac020) {
pl08x            2286 drivers/dma/amba-pl08x.c 		writel(PL080_CONFIG_ENABLE, pl08x->base + FTDMAC020_CSR);
pl08x            2289 drivers/dma/amba-pl08x.c 	writel(PL080_CONFIG_ENABLE, pl08x->base + PL080_CONFIG);
pl08x            2294 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = dev;
pl08x            2298 drivers/dma/amba-pl08x.c 	err = readl(pl08x->base + PL080_ERR_STATUS);
pl08x            2300 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev, "%s error interrupt, register value 0x%08x\n",
pl08x            2302 drivers/dma/amba-pl08x.c 		writel(err, pl08x->base + PL080_ERR_CLEAR);
pl08x            2304 drivers/dma/amba-pl08x.c 	tc = readl(pl08x->base + PL080_TC_STATUS);
pl08x            2306 drivers/dma/amba-pl08x.c 		writel(tc, pl08x->base + PL080_TC_CLEAR);
pl08x            2311 drivers/dma/amba-pl08x.c 	for (i = 0; i < pl08x->vd->channels; i++) {
pl08x            2314 drivers/dma/amba-pl08x.c 			struct pl08x_phy_chan *phychan = &pl08x->phy_chans[i];
pl08x            2319 drivers/dma/amba-pl08x.c 				dev_err(&pl08x->adev->dev,
pl08x            2369 drivers/dma/amba-pl08x.c static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x,
pl08x            2387 drivers/dma/amba-pl08x.c 		chan->host = pl08x;
pl08x            2392 drivers/dma/amba-pl08x.c 			chan->cd = &pl08x->pd->slave_channels[i];
pl08x            2407 drivers/dma/amba-pl08x.c 			chan->cd->periph_buses = pl08x->pd->mem_buses;
pl08x            2415 drivers/dma/amba-pl08x.c 		dev_dbg(&pl08x->adev->dev,
pl08x            2422 drivers/dma/amba-pl08x.c 	dev_info(&pl08x->adev->dev, "initialized %d virtual %s channels\n",
pl08x            2459 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = s->private;
pl08x            2468 drivers/dma/amba-pl08x.c 	for (i = 0; i < pl08x->vd->channels; i++) {
pl08x            2471 drivers/dma/amba-pl08x.c 		ch = &pl08x->phy_chans[i];
pl08x            2487 drivers/dma/amba-pl08x.c 	list_for_each_entry(chan, &pl08x->memcpy.channels, vc.chan.device_node) {
pl08x            2492 drivers/dma/amba-pl08x.c 	if (pl08x->has_slave) {
pl08x            2496 drivers/dma/amba-pl08x.c 		list_for_each_entry(chan, &pl08x->slave.channels,
pl08x            2508 drivers/dma/amba-pl08x.c static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
pl08x            2511 drivers/dma/amba-pl08x.c 	debugfs_create_file(dev_name(&pl08x->adev->dev), S_IFREG | S_IRUGO,
pl08x            2512 drivers/dma/amba-pl08x.c 			    NULL, pl08x, &pl08x_debugfs_fops);
pl08x            2516 drivers/dma/amba-pl08x.c static inline void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
pl08x            2522 drivers/dma/amba-pl08x.c static struct dma_chan *pl08x_find_chan_id(struct pl08x_driver_data *pl08x,
pl08x            2528 drivers/dma/amba-pl08x.c 	if (!pl08x->has_slave)
pl08x            2531 drivers/dma/amba-pl08x.c 	list_for_each_entry(chan, &pl08x->slave.channels, vc.chan.device_node) {
pl08x            2542 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x = ofdma->of_dma_data;
pl08x            2546 drivers/dma/amba-pl08x.c 	if (!pl08x)
pl08x            2550 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            2555 drivers/dma/amba-pl08x.c 	dma_chan = pl08x_find_chan_id(pl08x, dma_spec->args[0]);
pl08x            2557 drivers/dma/amba-pl08x.c 		dev_err(&pl08x->adev->dev,
pl08x            2563 drivers/dma/amba-pl08x.c 	dev_dbg(&pl08x->adev->dev,
pl08x            2573 drivers/dma/amba-pl08x.c 			  struct pl08x_driver_data *pl08x,
pl08x            2668 drivers/dma/amba-pl08x.c 	if (pl08x->vd->signals) {
pl08x            2670 drivers/dma/amba-pl08x.c 				     pl08x->vd->signals,
pl08x            2677 drivers/dma/amba-pl08x.c 		for (i = 0; i < pl08x->vd->signals; i++) {
pl08x            2684 drivers/dma/amba-pl08x.c 		pd->num_slave_channels = pl08x->vd->signals;
pl08x            2687 drivers/dma/amba-pl08x.c 	pl08x->pd = pd;
pl08x            2690 drivers/dma/amba-pl08x.c 					  pl08x);
pl08x            2694 drivers/dma/amba-pl08x.c 				 struct pl08x_driver_data *pl08x,
pl08x            2703 drivers/dma/amba-pl08x.c 	struct pl08x_driver_data *pl08x;
pl08x            2720 drivers/dma/amba-pl08x.c 	pl08x = kzalloc(sizeof(*pl08x), GFP_KERNEL);
pl08x            2721 drivers/dma/amba-pl08x.c 	if (!pl08x) {
pl08x            2727 drivers/dma/amba-pl08x.c 	pl08x->adev = adev;
pl08x            2728 drivers/dma/amba-pl08x.c 	pl08x->vd = vd;
pl08x            2730 drivers/dma/amba-pl08x.c 	pl08x->base = ioremap(adev->res.start, resource_size(&adev->res));
pl08x            2731 drivers/dma/amba-pl08x.c 	if (!pl08x->base) {
pl08x            2739 drivers/dma/amba-pl08x.c 		val = readl(pl08x->base + FTDMAC020_REVISION);
pl08x            2740 drivers/dma/amba-pl08x.c 		dev_info(&pl08x->adev->dev, "FTDMAC020 %d.%d rel %d\n",
pl08x            2742 drivers/dma/amba-pl08x.c 		val = readl(pl08x->base + FTDMAC020_FEATURE);
pl08x            2743 drivers/dma/amba-pl08x.c 		dev_info(&pl08x->adev->dev, "FTDMAC020 %d channels, "
pl08x            2752 drivers/dma/amba-pl08x.c 			dev_warn(&pl08x->adev->dev,
pl08x            2759 drivers/dma/amba-pl08x.c 	dma_cap_set(DMA_MEMCPY, pl08x->memcpy.cap_mask);
pl08x            2760 drivers/dma/amba-pl08x.c 	pl08x->memcpy.dev = &adev->dev;
pl08x            2761 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_free_chan_resources = pl08x_free_chan_resources;
pl08x            2762 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_prep_dma_memcpy = pl08x_prep_dma_memcpy;
pl08x            2763 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_prep_dma_interrupt = pl08x_prep_dma_interrupt;
pl08x            2764 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_tx_status = pl08x_dma_tx_status;
pl08x            2765 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_issue_pending = pl08x_issue_pending;
pl08x            2766 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_config = pl08x_config;
pl08x            2767 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_pause = pl08x_pause;
pl08x            2768 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_resume = pl08x_resume;
pl08x            2769 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_terminate_all = pl08x_terminate_all;
pl08x            2770 drivers/dma/amba-pl08x.c 	pl08x->memcpy.device_synchronize = pl08x_synchronize;
pl08x            2771 drivers/dma/amba-pl08x.c 	pl08x->memcpy.src_addr_widths = PL80X_DMA_BUSWIDTHS;
pl08x            2772 drivers/dma/amba-pl08x.c 	pl08x->memcpy.dst_addr_widths = PL80X_DMA_BUSWIDTHS;
pl08x            2773 drivers/dma/amba-pl08x.c 	pl08x->memcpy.directions = BIT(DMA_MEM_TO_MEM);
pl08x            2774 drivers/dma/amba-pl08x.c 	pl08x->memcpy.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
pl08x            2776 drivers/dma/amba-pl08x.c 		pl08x->memcpy.copy_align = DMAENGINE_ALIGN_4_BYTES;
pl08x            2784 drivers/dma/amba-pl08x.c 		pl08x->has_slave = true;
pl08x            2785 drivers/dma/amba-pl08x.c 		dma_cap_set(DMA_SLAVE, pl08x->slave.cap_mask);
pl08x            2786 drivers/dma/amba-pl08x.c 		dma_cap_set(DMA_CYCLIC, pl08x->slave.cap_mask);
pl08x            2787 drivers/dma/amba-pl08x.c 		pl08x->slave.dev = &adev->dev;
pl08x            2788 drivers/dma/amba-pl08x.c 		pl08x->slave.device_free_chan_resources =
pl08x            2790 drivers/dma/amba-pl08x.c 		pl08x->slave.device_prep_dma_interrupt =
pl08x            2792 drivers/dma/amba-pl08x.c 		pl08x->slave.device_tx_status = pl08x_dma_tx_status;
pl08x            2793 drivers/dma/amba-pl08x.c 		pl08x->slave.device_issue_pending = pl08x_issue_pending;
pl08x            2794 drivers/dma/amba-pl08x.c 		pl08x->slave.device_prep_slave_sg = pl08x_prep_slave_sg;
pl08x            2795 drivers/dma/amba-pl08x.c 		pl08x->slave.device_prep_dma_cyclic = pl08x_prep_dma_cyclic;
pl08x            2796 drivers/dma/amba-pl08x.c 		pl08x->slave.device_config = pl08x_config;
pl08x            2797 drivers/dma/amba-pl08x.c 		pl08x->slave.device_pause = pl08x_pause;
pl08x            2798 drivers/dma/amba-pl08x.c 		pl08x->slave.device_resume = pl08x_resume;
pl08x            2799 drivers/dma/amba-pl08x.c 		pl08x->slave.device_terminate_all = pl08x_terminate_all;
pl08x            2800 drivers/dma/amba-pl08x.c 		pl08x->slave.device_synchronize = pl08x_synchronize;
pl08x            2801 drivers/dma/amba-pl08x.c 		pl08x->slave.src_addr_widths = PL80X_DMA_BUSWIDTHS;
pl08x            2802 drivers/dma/amba-pl08x.c 		pl08x->slave.dst_addr_widths = PL80X_DMA_BUSWIDTHS;
pl08x            2803 drivers/dma/amba-pl08x.c 		pl08x->slave.directions =
pl08x            2805 drivers/dma/amba-pl08x.c 		pl08x->slave.residue_granularity =
pl08x            2810 drivers/dma/amba-pl08x.c 	pl08x->pd = dev_get_platdata(&adev->dev);
pl08x            2811 drivers/dma/amba-pl08x.c 	if (!pl08x->pd) {
pl08x            2813 drivers/dma/amba-pl08x.c 			ret = pl08x_of_probe(adev, pl08x, np);
pl08x            2822 drivers/dma/amba-pl08x.c 		pl08x->slave.filter.map = pl08x->pd->slave_map;
pl08x            2823 drivers/dma/amba-pl08x.c 		pl08x->slave.filter.mapcnt = pl08x->pd->slave_map_len;
pl08x            2824 drivers/dma/amba-pl08x.c 		pl08x->slave.filter.fn = pl08x_filter_fn;
pl08x            2828 drivers/dma/amba-pl08x.c 	pl08x->lli_buses = PL08X_AHB1;
pl08x            2829 drivers/dma/amba-pl08x.c 	pl08x->mem_buses = PL08X_AHB1;
pl08x            2830 drivers/dma/amba-pl08x.c 	if (pl08x->vd->dualmaster) {
pl08x            2831 drivers/dma/amba-pl08x.c 		pl08x->lli_buses = pl08x->pd->lli_buses;
pl08x            2832 drivers/dma/amba-pl08x.c 		pl08x->mem_buses = pl08x->pd->mem_buses;
pl08x            2836 drivers/dma/amba-pl08x.c 		pl08x->lli_words = PL080S_LLI_WORDS;
pl08x            2838 drivers/dma/amba-pl08x.c 		pl08x->lli_words = PL080_LLI_WORDS;
pl08x            2839 drivers/dma/amba-pl08x.c 	tsfr_size = MAX_NUM_TSFR_LLIS * pl08x->lli_words * sizeof(u32);
pl08x            2842 drivers/dma/amba-pl08x.c 	pl08x->pool = dma_pool_create(DRIVER_NAME, &pl08x->adev->dev,
pl08x            2844 drivers/dma/amba-pl08x.c 	if (!pl08x->pool) {
pl08x            2850 drivers/dma/amba-pl08x.c 	pl08x_ensure_on(pl08x);
pl08x            2855 drivers/dma/amba-pl08x.c 		writel(0x0000FFFF, pl08x->base + PL080_ERR_CLEAR);
pl08x            2857 drivers/dma/amba-pl08x.c 		writel(0x000000FF, pl08x->base + PL080_ERR_CLEAR);
pl08x            2858 drivers/dma/amba-pl08x.c 	writel(0x000000FF, pl08x->base + PL080_TC_CLEAR);
pl08x            2861 drivers/dma/amba-pl08x.c 	ret = request_irq(adev->irq[0], pl08x_irq, 0, DRIVER_NAME, pl08x);
pl08x            2869 drivers/dma/amba-pl08x.c 	pl08x->phy_chans = kzalloc((vd->channels * sizeof(*pl08x->phy_chans)),
pl08x            2871 drivers/dma/amba-pl08x.c 	if (!pl08x->phy_chans) {
pl08x            2877 drivers/dma/amba-pl08x.c 		struct pl08x_phy_chan *ch = &pl08x->phy_chans[i];
pl08x            2880 drivers/dma/amba-pl08x.c 		ch->base = pl08x->base + PL080_Cx_BASE(i);
pl08x            2922 drivers/dma/amba-pl08x.c 	ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->memcpy,
pl08x            2923 drivers/dma/amba-pl08x.c 					      pl08x->vd->channels, false);
pl08x            2925 drivers/dma/amba-pl08x.c 		dev_warn(&pl08x->adev->dev,
pl08x            2932 drivers/dma/amba-pl08x.c 	if (pl08x->has_slave) {
pl08x            2933 drivers/dma/amba-pl08x.c 		ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave,
pl08x            2934 drivers/dma/amba-pl08x.c 					pl08x->pd->num_slave_channels, true);
pl08x            2936 drivers/dma/amba-pl08x.c 			dev_warn(&pl08x->adev->dev,
pl08x            2943 drivers/dma/amba-pl08x.c 	ret = dma_async_device_register(&pl08x->memcpy);
pl08x            2945 drivers/dma/amba-pl08x.c 		dev_warn(&pl08x->adev->dev,
pl08x            2951 drivers/dma/amba-pl08x.c 	if (pl08x->has_slave) {
pl08x            2952 drivers/dma/amba-pl08x.c 		ret = dma_async_device_register(&pl08x->slave);
pl08x            2954 drivers/dma/amba-pl08x.c 			dev_warn(&pl08x->adev->dev,
pl08x            2961 drivers/dma/amba-pl08x.c 	amba_set_drvdata(adev, pl08x);
pl08x            2962 drivers/dma/amba-pl08x.c 	init_pl08x_debugfs(pl08x);
pl08x            2963 drivers/dma/amba-pl08x.c 	dev_info(&pl08x->adev->dev, "DMA: PL%03x%s rev%u at 0x%08llx irq %d\n",
pl08x            2964 drivers/dma/amba-pl08x.c 		 amba_part(adev), pl08x->vd->pl080s ? "s" : "", amba_rev(adev),
pl08x            2970 drivers/dma/amba-pl08x.c 	dma_async_device_unregister(&pl08x->memcpy);
pl08x            2972 drivers/dma/amba-pl08x.c 	if (pl08x->has_slave)
pl08x            2973 drivers/dma/amba-pl08x.c 		pl08x_free_virtual_channels(&pl08x->slave);
pl08x            2975 drivers/dma/amba-pl08x.c 	pl08x_free_virtual_channels(&pl08x->memcpy);
pl08x            2977 drivers/dma/amba-pl08x.c 	kfree(pl08x->phy_chans);
pl08x            2979 drivers/dma/amba-pl08x.c 	free_irq(adev->irq[0], pl08x);
pl08x            2981 drivers/dma/amba-pl08x.c 	dma_pool_destroy(pl08x->pool);
pl08x            2984 drivers/dma/amba-pl08x.c 	iounmap(pl08x->base);
pl08x            2986 drivers/dma/amba-pl08x.c 	kfree(pl08x);