linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Porter <mporter@ti.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linux DaVinci Kernel List
	<davinci-linux-open-source@linux.davincidsp.com>,
	Russell King <linux@arm.linux.org.uk>,
	Linux Documentation List <linux-doc@vger.kernel.org>,
	Linux MMC List <linux-mmc@vger.kernel.org>,
	Devicetree Discuss <devicetree-discuss@lists.ozlabs.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Sekhar Nori <nsekhar@ti.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rob Herring <rob.herring@calxeda.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Linux SPI Devel List <spi-devel-general@lists.sourceforge.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux OMAP List <linux-omap@vger.kernel.org>,
	Linux ARM Kernel List <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v9 3/9] ARM: edma: add AM33XX support to the private EDMA API
Date: Tue, 12 Mar 2013 12:08:07 -0400	[thread overview]
Message-ID: <20130312160807.GW6209@beef> (raw)
In-Reply-To: <CAHp75Ve40sM-d9Gr3k6mgOOTkM_G+cYSPcftqqsuAi-MzEb9dg@mail.gmail.com>

On Thu, Mar 07, 2013 at 08:42:18AM +0200, Andy Shevchenko wrote:
> 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;

Yes, will update.

> > +               offset = xbar_chans[i][1] >> 2;
> > +               offset <<= 2;
> 
> Is it offset = xbar_chans[i][1] & 0xfffc; ?

Yes, will update

> > +               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
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

  reply	other threads:[~2013-03-12 16:08 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
     [not found] ` <1362586540-10393-1-git-send-email-mporter-l0cyMroinI0@public.gmane.org>
2013-03-06 16:15   ` [PATCH v9 1/9] ARM: davinci: move private EDMA API to arm/common Matt Porter
     [not found]     ` <1362586540-10393-2-git-send-email-mporter-l0cyMroinI0@public.gmane.org>
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
2013-03-12 16:08       ` Matt Porter [this message]
     [not found]     ` <1362586540-10393-4-git-send-email-mporter-l0cyMroinI0@public.gmane.org>
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
     [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]     ` <1362586540-10393-6-git-send-email-mporter-l0cyMroinI0@public.gmane.org>
2013-03-12  6:53       ` Sekhar Nori
     [not found]     ` <1ced8cac7b9b41f596f0385e1f4f1f40@DFLE72.ent.ti.com>
     [not found]       ` <1ced8cac7b9b41f596f0385e1f4f1f40-S6owGmh5AOyIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
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=20130312160807.GW6209@beef \
    --to=mporter@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=nsekhar@ti.com \
    --cc=rob.herring@calxeda.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=vinod.koul@intel.com \
    /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).