[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130312160807.GW6209@beef>
Date: Tue, 12 Mar 2013 12:08:07 -0400
From: Matt Porter <mporter@...com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Linux DaVinci Kernel List
<davinci-linux-open-source@...ux.davincidsp.com>,
Russell King <linux@....linux.org.uk>,
Linux Documentation List <linux-doc@...r.kernel.org>,
Linux MMC List <linux-mmc@...r.kernel.org>,
Devicetree Discuss <devicetree-discuss@...ts.ozlabs.org>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Sekhar Nori <nsekhar@...com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Rob Herring <rob.herring@...xeda.com>,
Vinod Koul <vinod.koul@...el.com>,
Linux SPI Devel List
<spi-devel-general@...ts.sourceforge.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux OMAP List <linux-omap@...r.kernel.org>,
Linux ARM Kernel List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v9 3/9] ARM: edma: add AM33XX support to the private EDMA
API
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@...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@...ts.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists