mxs_dma            39 drivers/dma/mxs-dma.c #define dma_is_apbh(mxs_dma)	((mxs_dma)->type == MXS_DMA_APBH)
mxs_dma            40 drivers/dma/mxs-dma.c #define apbh_is_old(mxs_dma)	((mxs_dma)->dev_id == IMX23_DMA)
mxs_dma           110 drivers/dma/mxs-dma.c 	struct mxs_dma_engine		*mxs_dma;
mxs_dma           206 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           219 drivers/dma/mxs-dma.c 	} else if (dma_is_apbh(mxs_dma) && apbh_is_old(mxs_dma)) {
mxs_dma           221 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CTRL0 + STMP_OFFSET_REG_SET);
mxs_dma           225 drivers/dma/mxs-dma.c 		void __iomem *reg_dbg1 = mxs_dma->base +
mxs_dma           226 drivers/dma/mxs-dma.c 				HW_APBX_CHn_DEBUG1(mxs_dma, chan_id);
mxs_dma           241 drivers/dma/mxs-dma.c 			dev_err(&mxs_chan->mxs_dma->pdev->dev,
mxs_dma           246 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CHANNEL_CTRL + STMP_OFFSET_REG_SET);
mxs_dma           255 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           260 drivers/dma/mxs-dma.c 		mxs_dma->base + HW_APBHX_CHn_NXTCMDAR(mxs_dma, chan_id));
mxs_dma           268 drivers/dma/mxs-dma.c 		writel(2, mxs_dma->base + HW_APBHX_CHn_SEMA(mxs_dma, chan_id));
mxs_dma           270 drivers/dma/mxs-dma.c 		writel(1, mxs_dma->base + HW_APBHX_CHn_SEMA(mxs_dma, chan_id));
mxs_dma           285 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           289 drivers/dma/mxs-dma.c 	if (dma_is_apbh(mxs_dma) && apbh_is_old(mxs_dma))
mxs_dma           291 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CTRL0 + STMP_OFFSET_REG_SET);
mxs_dma           294 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CHANNEL_CTRL + STMP_OFFSET_REG_SET);
mxs_dma           303 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           307 drivers/dma/mxs-dma.c 	if (dma_is_apbh(mxs_dma) && apbh_is_old(mxs_dma))
mxs_dma           309 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CTRL0 + STMP_OFFSET_REG_CLR);
mxs_dma           312 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CHANNEL_CTRL + STMP_OFFSET_REG_CLR);
mxs_dma           330 drivers/dma/mxs-dma.c static int mxs_dma_irq_to_chan(struct mxs_dma_engine *mxs_dma, int irq)
mxs_dma           334 drivers/dma/mxs-dma.c 	for (i = 0; i != mxs_dma->nr_channels; ++i)
mxs_dma           335 drivers/dma/mxs-dma.c 		if (mxs_dma->mxs_chans[i].chan_irq == irq)
mxs_dma           343 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = dev_id;
mxs_dma           347 drivers/dma/mxs-dma.c 	int chan = mxs_dma_irq_to_chan(mxs_dma, irq);
mxs_dma           353 drivers/dma/mxs-dma.c 	completed = readl(mxs_dma->base + HW_APBHX_CTRL1);
mxs_dma           358 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CTRL1 + STMP_OFFSET_REG_CLR);
mxs_dma           361 drivers/dma/mxs-dma.c 	err = readl(mxs_dma->base + HW_APBHX_CTRL2);
mxs_dma           373 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CTRL2 + STMP_OFFSET_REG_CLR);
mxs_dma           384 drivers/dma/mxs-dma.c 	mxs_chan = &mxs_dma->mxs_chans[chan];
mxs_dma           387 drivers/dma/mxs-dma.c 		dev_dbg(mxs_dma->dma_device.dev,
mxs_dma           396 drivers/dma/mxs-dma.c 				writel(1, mxs_dma->base +
mxs_dma           397 drivers/dma/mxs-dma.c 					HW_APBHX_CHn_SEMA(mxs_dma, chan));
mxs_dma           418 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           421 drivers/dma/mxs-dma.c 	mxs_chan->ccw = dma_alloc_coherent(mxs_dma->dma_device.dev,
mxs_dma           430 drivers/dma/mxs-dma.c 			  0, "mxs-dma", mxs_dma);
mxs_dma           434 drivers/dma/mxs-dma.c 	ret = clk_prepare_enable(mxs_dma->clk);
mxs_dma           449 drivers/dma/mxs-dma.c 	free_irq(mxs_chan->chan_irq, mxs_dma);
mxs_dma           451 drivers/dma/mxs-dma.c 	dma_free_coherent(mxs_dma->dma_device.dev, CCW_BLOCK_SIZE,
mxs_dma           460 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           464 drivers/dma/mxs-dma.c 	free_irq(mxs_chan->chan_irq, mxs_dma);
mxs_dma           466 drivers/dma/mxs-dma.c 	dma_free_coherent(mxs_dma->dma_device.dev, CCW_BLOCK_SIZE,
mxs_dma           469 drivers/dma/mxs-dma.c 	clk_disable_unprepare(mxs_dma->clk);
mxs_dma           500 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           511 drivers/dma/mxs-dma.c 		dev_err(mxs_dma->dma_device.dev,
mxs_dma           556 drivers/dma/mxs-dma.c 				dev_err(mxs_dma->dma_device.dev, "maximum bytes for sg entry exceeded: %d > %d\n",
mxs_dma           599 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           611 drivers/dma/mxs-dma.c 		dev_err(mxs_dma->dma_device.dev,
mxs_dma           618 drivers/dma/mxs-dma.c 		dev_err(mxs_dma->dma_device.dev,
mxs_dma           670 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           681 drivers/dma/mxs-dma.c 		bar = readl(mxs_dma->base +
mxs_dma           682 drivers/dma/mxs-dma.c 				HW_APBHX_CHn_BAR(mxs_dma, chan->chan_id));
mxs_dma           692 drivers/dma/mxs-dma.c static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
mxs_dma           696 drivers/dma/mxs-dma.c 	ret = clk_prepare_enable(mxs_dma->clk);
mxs_dma           700 drivers/dma/mxs-dma.c 	ret = stmp_reset_block(mxs_dma->base);
mxs_dma           705 drivers/dma/mxs-dma.c 	if (dma_is_apbh(mxs_dma)) {
mxs_dma           707 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CTRL0 + STMP_OFFSET_REG_SET);
mxs_dma           709 drivers/dma/mxs-dma.c 			mxs_dma->base + HW_APBHX_CTRL0 + STMP_OFFSET_REG_SET);
mxs_dma           714 drivers/dma/mxs-dma.c 		mxs_dma->base + HW_APBHX_CTRL1 + STMP_OFFSET_REG_SET);
mxs_dma           717 drivers/dma/mxs-dma.c 	clk_disable_unprepare(mxs_dma->clk);
mxs_dma           729 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma;
mxs_dma           735 drivers/dma/mxs-dma.c 	chan_irq = platform_get_irq(mxs_dma->pdev, param->chan_id);
mxs_dma           747 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma = ofdma->of_dma_data;
mxs_dma           748 drivers/dma/mxs-dma.c 	dma_cap_mask_t mask = mxs_dma->dma_device.cap_mask;
mxs_dma           756 drivers/dma/mxs-dma.c 	if (param.chan_id >= mxs_dma->nr_channels)
mxs_dma           769 drivers/dma/mxs-dma.c 	struct mxs_dma_engine *mxs_dma;
mxs_dma           773 drivers/dma/mxs-dma.c 	mxs_dma = devm_kzalloc(&pdev->dev, sizeof(*mxs_dma), GFP_KERNEL);
mxs_dma           774 drivers/dma/mxs-dma.c 	if (!mxs_dma)
mxs_dma           777 drivers/dma/mxs-dma.c 	ret = of_property_read_u32(np, "dma-channels", &mxs_dma->nr_channels);
mxs_dma           790 drivers/dma/mxs-dma.c 	mxs_dma->type = dma_type->type;
mxs_dma           791 drivers/dma/mxs-dma.c 	mxs_dma->dev_id = dma_type->id;
mxs_dma           794 drivers/dma/mxs-dma.c 	mxs_dma->base = devm_ioremap_resource(&pdev->dev, iores);
mxs_dma           795 drivers/dma/mxs-dma.c 	if (IS_ERR(mxs_dma->base))
mxs_dma           796 drivers/dma/mxs-dma.c 		return PTR_ERR(mxs_dma->base);
mxs_dma           798 drivers/dma/mxs-dma.c 	mxs_dma->clk = devm_clk_get(&pdev->dev, NULL);
mxs_dma           799 drivers/dma/mxs-dma.c 	if (IS_ERR(mxs_dma->clk))
mxs_dma           800 drivers/dma/mxs-dma.c 		return PTR_ERR(mxs_dma->clk);
mxs_dma           802 drivers/dma/mxs-dma.c 	dma_cap_set(DMA_SLAVE, mxs_dma->dma_device.cap_mask);
mxs_dma           803 drivers/dma/mxs-dma.c 	dma_cap_set(DMA_CYCLIC, mxs_dma->dma_device.cap_mask);
mxs_dma           805 drivers/dma/mxs-dma.c 	INIT_LIST_HEAD(&mxs_dma->dma_device.channels);
mxs_dma           809 drivers/dma/mxs-dma.c 		struct mxs_dma_chan *mxs_chan = &mxs_dma->mxs_chans[i];
mxs_dma           811 drivers/dma/mxs-dma.c 		mxs_chan->mxs_dma = mxs_dma;
mxs_dma           812 drivers/dma/mxs-dma.c 		mxs_chan->chan.device = &mxs_dma->dma_device;
mxs_dma           821 drivers/dma/mxs-dma.c 			&mxs_dma->dma_device.channels);
mxs_dma           824 drivers/dma/mxs-dma.c 	ret = mxs_dma_init(mxs_dma);
mxs_dma           828 drivers/dma/mxs-dma.c 	mxs_dma->pdev = pdev;
mxs_dma           829 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.dev = &pdev->dev;
mxs_dma           832 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.dev->dma_parms = &mxs_dma->dma_parms;
mxs_dma           833 drivers/dma/mxs-dma.c 	dma_set_max_seg_size(mxs_dma->dma_device.dev, MAX_XFER_BYTES);
mxs_dma           835 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_alloc_chan_resources = mxs_dma_alloc_chan_resources;
mxs_dma           836 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_free_chan_resources = mxs_dma_free_chan_resources;
mxs_dma           837 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_tx_status = mxs_dma_tx_status;
mxs_dma           838 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_prep_slave_sg = mxs_dma_prep_slave_sg;
mxs_dma           839 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_prep_dma_cyclic = mxs_dma_prep_dma_cyclic;
mxs_dma           840 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_pause = mxs_dma_pause_chan;
mxs_dma           841 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_resume = mxs_dma_resume_chan;
mxs_dma           842 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_terminate_all = mxs_dma_terminate_all;
mxs_dma           843 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
mxs_dma           844 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
mxs_dma           845 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
mxs_dma           846 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
mxs_dma           847 drivers/dma/mxs-dma.c 	mxs_dma->dma_device.device_issue_pending = mxs_dma_enable_chan;
mxs_dma           849 drivers/dma/mxs-dma.c 	ret = dmaenginem_async_device_register(&mxs_dma->dma_device);
mxs_dma           851 drivers/dma/mxs-dma.c 		dev_err(mxs_dma->dma_device.dev, "unable to register\n");
mxs_dma           855 drivers/dma/mxs-dma.c 	ret = of_dma_controller_register(np, mxs_dma_xlate, mxs_dma);
mxs_dma           857 drivers/dma/mxs-dma.c 		dev_err(mxs_dma->dma_device.dev,
mxs_dma           861 drivers/dma/mxs-dma.c 	dev_info(mxs_dma->dma_device.dev, "initialized\n");