Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-12 Thread Lars-Peter Clausen
On 11/12/2013 08:35 AM, Li Xiubo wrote: +static int fsl_sai_probe(struct platform_device *pdev) { [...] + + sai->dma_params_rx.addr = res->start + SAI_RDR; + sai->dma_params_rx.maxburst = 6; + index = of_property_match_string(np, "dma-names", "rx"); + ret = of_parse_phan

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-11 Thread Li Xiubo
> > > > +static int fsl_sai_probe(struct platform_device *pdev) { > > > [...] > > > > + > > > > + sai->dma_params_rx.addr = res->start + SAI_RDR; > > > > + sai->dma_params_rx.maxburst = 6; > > > > + index = of_property_match_string(np, "dma-names", "rx"); > > > > + ret = of_

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-11-11 Thread Vinod Koul
On Mon, Oct 28, 2013 at 05:58:42AM +, Xiubo Li-B47053 wrote: > Hi Dan, Vinod, > > > > > +static int fsl_sai_probe(struct platform_device *pdev) { > > [...] > > > + > > > + sai->dma_params_rx.addr = res->start + SAI_RDR; > > > + sai->dma_params_rx.maxburst = 6; > > > + index = of_property_matc

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-27 Thread Xiubo Li-B47053
Hi Dan, Vinod, > > +static int fsl_sai_probe(struct platform_device *pdev) { > [...] > > + > > + sai->dma_params_rx.addr = res->start + SAI_RDR; > > + sai->dma_params_rx.maxburst = 6; > > + index = of_property_match_string(np, "dma-names", "rx"); > > + ret = of_parse_phandle_with_args(np,

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-21 Thread Xiubo Li-B47053
> > +static int fsl_sai_probe(struct platform_device *pdev) { > [...] > > + > > + sai->dma_params_rx.addr = res->start + SAI_RDR; > > + sai->dma_params_rx.maxburst = 6; > > + index = of_property_match_string(np, "dma-names", "rx"); > > + ret = of_parse_phandle_with_args(np, "dmas", "#dma-c

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-21 Thread Xiubo Li-B47053
> > +static int fsl_sai_hw_params(struct snd_pcm_substream *substream, > > + struct snd_pcm_hw_params *params, > > + struct snd_soc_dai *cpu_dai) > > +{ > > + int ret; > > + > > + ret = fsl_sai_hw_params_tr(substream, params, cpu_dai, > > + FSL_FMT

RE: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-18 Thread Xiubo Li-B47053
> > > I understand that, but I'm trying to figure out why of_iomap() is > > > okay for hundreds of other drivers, but not this one. I've used it > > > dozens of times myself, without ever worrying about overlapping > regions. > > > The driver would work fine with just of_iomap(). But the resourc

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-17 Thread Lars-Peter Clausen
On 10/17/2013 11:01 AM, Xiubo Li wrote: [...] > +static int fsl_sai_hw_params(struct snd_pcm_substream *substream, > + struct snd_pcm_hw_params *params, > + struct snd_soc_dai *cpu_dai) > +{ > + int ret; > + > + ret = fsl_sai_hw_params_tr(substream, params, cpu_dai,

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-17 Thread Mark Brown
On Thu, Oct 17, 2013 at 03:51:54PM +0200, Lars-Peter Clausen wrote: > On 10/17/2013 03:37 PM, Timur Tabi wrote: > > I understand that, but I'm trying to figure out why of_iomap() is okay for > > hundreds of other drivers, but not this one. I've used it dozens of times > > myself, without ever wor

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-17 Thread Lars-Peter Clausen
On 10/17/2013 03:37 PM, Timur Tabi wrote: > Lars-Peter Clausen wrote: >>> >Maybe I've been out of the loop for too long, but why is that a particular >>> >problem with this driver? > >> It is usually something you'd want to check in general to make sure that you >> don't have multiple device that

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-17 Thread Timur Tabi
Lars-Peter Clausen wrote: >Maybe I've been out of the loop for too long, but why is that a particular >problem with this driver? It is usually something you'd want to check in general to make sure that you don't have multiple device that access the same iomem region at the same time. I under

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-17 Thread Lars-Peter Clausen
On 10/17/2013 03:22 PM, Timur Tabi wrote: > Lars-Peter Clausen wrote: >>+res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >>+sai->base = devm_ioremap_resource(&pdev->dev, res); >>> > >>> >Why not use of_iomap()? >> Because it won't check for conflicting resource regions. > >

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-17 Thread Timur Tabi
Lars-Peter Clausen wrote: >>+res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >>+sai->base = devm_ioremap_resource(&pdev->dev, res); > >Why not use of_iomap()? Because it won't check for conflicting resource regions. Maybe I've been out of the loop for too long, but why is that a

Re: [alsa-devel] [PATCHv1 1/8] ALSA: Add SAI SoC Digital Audio Interface driver.

2013-10-17 Thread Lars-Peter Clausen
On 10/17/2013 02:15 PM, Timur Tabi wrote: > Xiubo Li wrote: >> +res = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> +sai->base = devm_ioremap_resource(&pdev->dev, res); > > Why not use of_iomap()? Because it won't check for conflicting resource regions. - Lars _