shdev 70 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_dc); shdev 71 drivers/dma/sh/shdmac.c const struct sh_dmae_channel *chan_pdata = shdev->pdata->channel + shdev 73 drivers/dma/sh/shdmac.c u32 val = shdev->pdata->chclr_bitwise ? 1 << chan_pdata->chclr_bit : 0; shdev 75 drivers/dma/sh/shdmac.c __raw_writel(val, shdev->chan_reg + chan_pdata->chclr_offset); shdev 88 drivers/dma/sh/shdmac.c static u16 dmaor_read(struct sh_dmae_device *shdev) shdev 90 drivers/dma/sh/shdmac.c void __iomem *addr = shdev->chan_reg + DMAOR; shdev 92 drivers/dma/sh/shdmac.c if (shdev->pdata->dmaor_is_32bit) shdev 98 drivers/dma/sh/shdmac.c static void dmaor_write(struct sh_dmae_device *shdev, u16 data) shdev 100 drivers/dma/sh/shdmac.c void __iomem *addr = shdev->chan_reg + DMAOR; shdev 102 drivers/dma/sh/shdmac.c if (shdev->pdata->dmaor_is_32bit) shdev 110 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_dc); shdev 112 drivers/dma/sh/shdmac.c __raw_writel(data, sh_dc->base + shdev->chcr_offset); shdev 117 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_dc); shdev 119 drivers/dma/sh/shdmac.c return __raw_readl(sh_dc->base + shdev->chcr_offset); shdev 127 drivers/dma/sh/shdmac.c static void sh_dmae_ctl_stop(struct sh_dmae_device *shdev) shdev 134 drivers/dma/sh/shdmac.c dmaor = dmaor_read(shdev); shdev 135 drivers/dma/sh/shdmac.c dmaor_write(shdev, dmaor & ~(DMAOR_NMIF | DMAOR_AE | DMAOR_DME)); shdev 140 drivers/dma/sh/shdmac.c static int sh_dmae_rst(struct sh_dmae_device *shdev) shdev 147 drivers/dma/sh/shdmac.c dmaor = dmaor_read(shdev) & ~(DMAOR_NMIF | DMAOR_AE | DMAOR_DME); shdev 149 drivers/dma/sh/shdmac.c if (shdev->pdata->chclr_present) { shdev 151 drivers/dma/sh/shdmac.c for (i = 0; i < shdev->pdata->channel_num; i++) { shdev 152 drivers/dma/sh/shdmac.c struct sh_dmae_chan *sh_chan = shdev->chan[i]; shdev 158 drivers/dma/sh/shdmac.c dmaor_write(shdev, dmaor | shdev->pdata->dmaor_init); shdev 160 drivers/dma/sh/shdmac.c dmaor = dmaor_read(shdev); shdev 165 drivers/dma/sh/shdmac.c dev_warn(shdev->shdma_dev.dma_dev.dev, "Can't initialize DMAOR.\n"); shdev 168 drivers/dma/sh/shdmac.c if (shdev->pdata->dmaor_init & ~dmaor) shdev 169 drivers/dma/sh/shdmac.c dev_warn(shdev->shdma_dev.dma_dev.dev, shdev 171 drivers/dma/sh/shdmac.c dmaor, shdev->pdata->dmaor_init); shdev 187 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_chan); shdev 188 drivers/dma/sh/shdmac.c const struct sh_dmae_pdata *pdata = shdev->pdata; shdev 200 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_chan); shdev 201 drivers/dma/sh/shdmac.c const struct sh_dmae_pdata *pdata = shdev->pdata; shdev 224 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_chan); shdev 227 drivers/dma/sh/shdmac.c if (shdev->pdata->needs_tend_set) shdev 230 drivers/dma/sh/shdmac.c chcr |= CHCR_DE | shdev->chcr_ie_bit; shdev 259 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_chan); shdev 260 drivers/dma/sh/shdmac.c const struct sh_dmae_pdata *pdata = shdev->pdata; shdev 262 drivers/dma/sh/shdmac.c void __iomem *addr = shdev->dmars; shdev 273 drivers/dma/sh/shdmac.c addr = shdev->chan_reg; shdev 328 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_chan); shdev 329 drivers/dma/sh/shdmac.c const struct sh_dmae_pdata *pdata = shdev->pdata; shdev 370 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = to_sh_dev(sh_chan); shdev 373 drivers/dma/sh/shdmac.c chcr &= ~(CHCR_DE | CHCR_TE | shdev->chcr_ie_bit); shdev 427 drivers/dma/sh/shdmac.c static bool sh_dmae_reset(struct sh_dmae_device *shdev) shdev 432 drivers/dma/sh/shdmac.c sh_dmae_ctl_stop(shdev); shdev 435 drivers/dma/sh/shdmac.c ret = shdma_reset(&shdev->shdma_dev); shdev 437 drivers/dma/sh/shdmac.c sh_dmae_rst(shdev); shdev 444 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = data; shdev 446 drivers/dma/sh/shdmac.c if (!(dmaor_read(shdev) & DMAOR_AE)) shdev 449 drivers/dma/sh/shdmac.c sh_dmae_reset(shdev); shdev 469 drivers/dma/sh/shdmac.c static bool sh_dmae_nmi_notify(struct sh_dmae_device *shdev) shdev 472 drivers/dma/sh/shdmac.c if ((dmaor_read(shdev) & DMAOR_NMIF) == 0) shdev 475 drivers/dma/sh/shdmac.c return sh_dmae_reset(shdev); shdev 481 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev; shdev 495 drivers/dma/sh/shdmac.c list_for_each_entry_rcu(shdev, &sh_dmae_devices, node) { shdev 501 drivers/dma/sh/shdmac.c triggered = sh_dmae_nmi_notify(shdev); shdev 517 drivers/dma/sh/shdmac.c static int sh_dmae_chan_probe(struct sh_dmae_device *shdev, int id, shdev 520 drivers/dma/sh/shdmac.c const struct sh_dmae_channel *chan_pdata = &shdev->pdata->channel[id]; shdev 521 drivers/dma/sh/shdmac.c struct shdma_dev *sdev = &shdev->shdma_dev; shdev 537 drivers/dma/sh/shdmac.c sh_chan->base = shdev->chan_reg + chan_pdata->offset; shdev 555 drivers/dma/sh/shdmac.c shdev->chan[id] = sh_chan; shdev 564 drivers/dma/sh/shdmac.c static void sh_dmae_chan_remove(struct sh_dmae_device *shdev) shdev 569 drivers/dma/sh/shdmac.c shdma_for_each_chan(schan, &shdev->shdma_dev, i) { shdev 579 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = dev_get_drvdata(dev); shdev 581 drivers/dma/sh/shdmac.c sh_dmae_ctl_stop(shdev); shdev 587 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = dev_get_drvdata(dev); shdev 589 drivers/dma/sh/shdmac.c return sh_dmae_rst(shdev); shdev 596 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = dev_get_drvdata(dev); shdev 598 drivers/dma/sh/shdmac.c sh_dmae_ctl_stop(shdev); shdev 604 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = dev_get_drvdata(dev); shdev 607 drivers/dma/sh/shdmac.c ret = sh_dmae_rst(shdev); shdev 611 drivers/dma/sh/shdmac.c for (i = 0; i < shdev->pdata->channel_num; i++) { shdev 612 drivers/dma/sh/shdmac.c struct sh_dmae_chan *sh_chan = shdev->chan[i]; shdev 679 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev; shdev 715 drivers/dma/sh/shdmac.c shdev = devm_kzalloc(&pdev->dev, sizeof(struct sh_dmae_device), shdev 717 drivers/dma/sh/shdmac.c if (!shdev) shdev 720 drivers/dma/sh/shdmac.c dma_dev = &shdev->shdma_dev.dma_dev; shdev 722 drivers/dma/sh/shdmac.c shdev->chan_reg = devm_ioremap_resource(&pdev->dev, chan); shdev 723 drivers/dma/sh/shdmac.c if (IS_ERR(shdev->chan_reg)) shdev 724 drivers/dma/sh/shdmac.c return PTR_ERR(shdev->chan_reg); shdev 726 drivers/dma/sh/shdmac.c shdev->dmars = devm_ioremap_resource(&pdev->dev, dmars); shdev 727 drivers/dma/sh/shdmac.c if (IS_ERR(shdev->dmars)) shdev 728 drivers/dma/sh/shdmac.c return PTR_ERR(shdev->dmars); shdev 744 drivers/dma/sh/shdmac.c shdev->shdma_dev.ops = &sh_dmae_shdma_ops; shdev 745 drivers/dma/sh/shdmac.c shdev->shdma_dev.desc_size = sizeof(struct sh_dmae_desc); shdev 746 drivers/dma/sh/shdmac.c err = shdma_init(&pdev->dev, &shdev->shdma_dev, shdev 752 drivers/dma/sh/shdmac.c shdev->pdata = pdata; shdev 755 drivers/dma/sh/shdmac.c shdev->chcr_offset = pdata->chcr_offset; shdev 757 drivers/dma/sh/shdmac.c shdev->chcr_offset = CHCR; shdev 760 drivers/dma/sh/shdmac.c shdev->chcr_ie_bit = pdata->chcr_ie_bit; shdev 762 drivers/dma/sh/shdmac.c shdev->chcr_ie_bit = CHCR_IE; shdev 764 drivers/dma/sh/shdmac.c platform_set_drvdata(pdev, shdev); shdev 772 drivers/dma/sh/shdmac.c list_add_tail_rcu(&shdev->node, &sh_dmae_devices); shdev 776 drivers/dma/sh/shdmac.c err = sh_dmae_rst(shdev); shdev 795 drivers/dma/sh/shdmac.c irqflags, "DMAC Address Error", shdev); shdev 847 drivers/dma/sh/shdmac.c err = sh_dmae_chan_probe(shdev, i, chan_irq[i], chan_flag[i]); shdev 859 drivers/dma/sh/shdmac.c err = dma_async_device_register(&shdev->shdma_dev.dma_dev); shdev 869 drivers/dma/sh/shdmac.c sh_dmae_chan_remove(shdev); shdev 874 drivers/dma/sh/shdmac.c list_del_rcu(&shdev->node); shdev 880 drivers/dma/sh/shdmac.c shdma_cleanup(&shdev->shdma_dev); shdev 889 drivers/dma/sh/shdmac.c struct sh_dmae_device *shdev = platform_get_drvdata(pdev); shdev 890 drivers/dma/sh/shdmac.c struct dma_device *dma_dev = &shdev->shdma_dev.dma_dev; shdev 895 drivers/dma/sh/shdmac.c list_del_rcu(&shdev->node); shdev 900 drivers/dma/sh/shdmac.c sh_dmae_chan_remove(shdev); shdev 901 drivers/dma/sh/shdmac.c shdma_cleanup(&shdev->shdma_dev);