From: andy.shevchenko@gmail.com (Andy Shevchenko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 3/9] ARM: edma: add AM33XX support to the private EDMA API
Date: Thu, 7 Mar 2013 08:42:18 +0200 [thread overview]
Message-ID: <CAHp75Ve40sM-d9Gr3k6mgOOTkM_G+cYSPcftqqsuAi-MzEb9dg@mail.gmail.com> (raw)
In-Reply-To: <1362586540-10393-4-git-send-email-mporter@ti.com>
On Wed, Mar 6, 2013 at 6:15 PM, Matt Porter <mporter@ti.com> wrote:
> Adds support for parsing the TI EDMA DT data into the
> required EDMA private API platform data. Enables runtime
> PM support to initialize the EDMA hwmod. Adds AM33XX EDMA
> crossbar event mux support. Enables build on OMAP.
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> +static int edma_xbar_event_map(struct device *dev,
> + struct device_node *node,
> + struct edma_soc_info *pdata, int len)
> +{
> + int ret = 0;
> + int i;
> + struct resource res;
> + void *xbar;
> + const s16 (*xbar_chans)[2];
> + u32 shift, offset, mux;
> +
> + xbar_chans = devm_kzalloc(dev,
> + len/sizeof(s16) + 2*sizeof(s16),
> + GFP_KERNEL);
> + if (!xbar_chans)
> + return -ENOMEM;
> +
> + ret = of_address_to_resource(node, 1, &res);
> + if (ret)
> + return -EIO;
> +
> + xbar = devm_ioremap(dev, res.start, resource_size(&res));
> + if (!xbar)
> + return -ENOMEM;
> +
> + ret = edma_of_read_u32_to_s16_array(node,
> + "ti,edma-xbar-event-map",
> + (s16 *)xbar_chans,
> + len/sizeof(u32));
> + if (ret)
> + return -EIO;
> +
> + for (i = 0; xbar_chans[i][0] != -1; i++) {
> + shift = (xbar_chans[i][1] % 4) * 8;
Looks like shift = (xbar_chans[i][1] & 0x03) << 3;
> + offset = xbar_chans[i][1] >> 2;
> + offset <<= 2;
Is it offset = xbar_chans[i][1] & 0xfffc; ?
> + mux = readl((void *)((u32)xbar + offset));
> + mux &= ~(0xff << shift);
> + mux |= xbar_chans[i][0] << shift;
> + writel(mux, (void *)((u32)xbar + offset));
> + }
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2013-03-07 6:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 16:15 [PATCH v9 0/9] DMA Engine support for AM33XX Matt Porter
2013-03-06 16:15 ` [PATCH v9 1/9] ARM: davinci: move private EDMA API to arm/common Matt Porter
2013-06-05 8:54 ` Sekhar Nori
2013-06-07 6:17 ` Sekhar Nori
2013-06-07 11:15 ` Chris Ball
2013-03-06 16:15 ` [PATCH v9 2/9] ARM: edma: remove unused transfer controller handlers Matt Porter
2013-03-06 16:15 ` [PATCH v9 3/9] ARM: edma: add AM33XX support to the private EDMA API Matt Porter
2013-03-07 6:42 ` Andy Shevchenko [this message]
2013-03-12 16:08 ` Matt Porter
2013-03-12 6:45 ` Sekhar Nori
[not found] ` <76caa6ddf7a143b381f30aa8fdfef3cc@DLEE71.ent.ti.com>
2013-03-12 16:22 ` Matt Porter
2013-03-06 16:15 ` [PATCH v9 4/9] dmaengine: edma: enable build for AM33XX Matt Porter
2013-03-06 16:15 ` [PATCH v9 5/9] dmaengine: edma: Add TI EDMA device tree binding Matt Porter
2013-03-06 20:24 ` Peter Korsgaard
2013-03-12 6:53 ` Sekhar Nori
[not found] ` <90c29a73df9e495f907517c49dd45b88@DFLE72.ent.ti.com>
2013-03-06 20:31 ` Matt Porter
2013-03-12 16:09 ` Matt Porter
2013-03-12 16:16 ` Peter Korsgaard
[not found] ` <1ced8cac7b9b41f596f0385e1f4f1f40@DFLE72.ent.ti.com>
2013-03-12 16:23 ` Matt Porter
2013-03-06 16:15 ` [PATCH v9 6/9] ARM: dts: add AM33XX EDMA support Matt Porter
2013-03-06 16:15 ` [PATCH v9 7/9] spi: omap2-mcspi: convert to dma_request_slave_channel_compat() Matt Porter
2013-03-06 16:15 ` [PATCH v9 8/9] spi: omap2-mcspi: add generic DMA request support to the DT binding Matt Porter
2013-03-06 16:15 ` [PATCH v9 9/9] ARM: dts: add AM33XX SPI DMA support Matt Porter
2013-04-03 11:45 ` [PATCH v9 0/9] DMA Engine support for AM33XX Sekhar Nori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHp75Ve40sM-d9Gr3k6mgOOTkM_G+cYSPcftqqsuAi-MzEb9dg@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).