Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1696844
| From | Pierre Yves MORDRET <pierre-yves.mordret@st.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver |
| Date | 2017-07-26 09:40 +0200 |
| Message-ID | <u7p5f-5Ol-9@gated-at.bofh.it> (permalink) |
| References | <u0e4V-4gf-7@gated-at.bofh.it> <u0e4V-4gf-5@gated-at.bofh.it> <u5WoG-6X1-23@gated-at.bofh.it> <u6M3T-5Cy-1@gated-at.bofh.it> <u7n3r-4zl-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/26/2017 07:29 AM, Vinod Koul wrote:
> On Mon, Jul 24, 2017 at 01:55:10PM +0000, Pierre Yves MORDRET wrote:
>
>>>> +
>>>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>> + if (!res)
>>>> + return -ENODEV;
>>>> +
>>>> + iomem = devm_ioremap_resource(&pdev->dev, res);
>>>> + if (!iomem)
>>>> + return -ENOMEM;
>>>> +
>>>> + spin_lock_init(&stm32_dmamux->lock);
>>>> +
>>>> + stm32_dmamux->clk = devm_clk_get(&pdev->dev, NULL);
>>>> + if (IS_ERR(stm32_dmamux->clk)) {
>>>> + dev_info(&pdev->dev, "Missing controller clock\n");
>>>
>>> Can you check for EPROBE_DEFER and print only for if that is not the error
>>> otherwise we end up sapmming with defered probe issues
>>>
>>
>> This is what you meant ?
>> if (IS_ERR(stm32_dmamux->clk) != EPROBE_DEFER) {
>> dev_info(&pdev->dev, "Missing controller clock\n");
>> return PTR_ERR(stm32_dmamux->clk);
>> }
>>
>> OR
>>
>> if (IS_ERR(stm32_dmamux->clk)) {
>> if (IS_ERR(stm32_dmamux->clk) != EPROBE_DEFER)
>> dev_info(&pdev->dev, "Missing controller clock\n");
>> return PTR_ERR(stm32_dmamux->clk);
>> }
>
> This one please
>
ok
>>
>>>> +
>>>> +#ifndef __DMA_STM32_DMAMUX_H
>>>> +#define __DMA_STM32_DMAMUX_H
>>>> +
>>>> +#if defined(CONFIG_STM32_DMAMUX)
>>>> +int stm32_dmamux_set_config(struct device *dev, void *route_data, u32 chan_id);
>>>
>>> Why do we need a custom API in this case?
>>>
>>
>> This API is called by DMA when a slave is requested by client. DMA can work
>> without DMAMUX this API has been put in place to configure DMAMUX whether client
>> is requesting a DMAMUX Channel instead of a DMA one.
>
> You mean the dmaengine driver right?
>
Yes. The API is mainly called by "device_config" through out STM32 DMA Driver
when a router is in place for client.
Please refer to Patch 4/5 on this set.
Thanks
Py
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Vinod Koul <vinod.koul@intel.com> - 2017-07-22 08:50 +0200
Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Pierre Yves MORDRET <pierre-yves.mordret@st.com> - 2017-07-24 16:00 +0200
Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Vinod Koul <vinod.koul@intel.com> - 2017-07-26 07:30 +0200
Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Pierre Yves MORDRET <pierre-yves.mordret@st.com> - 2017-07-26 09:40 +0200
Re: [PATCH v3 2/5] dmaengine: Add STM32 DMAMUX driver Vinod Koul <vinod.koul@intel.com> - 2017-07-31 14:30 +0200
csiph-web