* Consider moving the init of pl330 to earlier?
@ 2014-10-09 21:35 Ray Jui
2014-10-16 6:59 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Ray Jui @ 2014-10-09 21:35 UTC (permalink / raw)
To: Dan Williams, Vinod Koul; +Cc: Scott Branden, Ray Jui, linux-kernel
Hi,
How do you guys like the idea of moving the driver initialization of the
pl330 DMA driver to earlier? For example, to arch_initcall_sync or
subsys_initcall? Currently the pl330 driver is registered through
module_amba_driver call, which translates to device_initcall in the end.
This is a bit late considering in many systems, DMA controller is one of
the core components that may have many slave devices depending on. Most
slave drivers are typically done at device_initcall. When done at the
same level, DMA may not be ready while the slave devices are being
initialized. In addition, under the drivers/dma directory, we currently
have various other DMA drivers also done at subsys_initcall.
One issue that I'm seeing with the Broadcom Cygnus SoC is that, when we
try to use DMA with SPI (PL022), the request for DMA channel would fail
because the spi-pl022 driver we use is initialized at subsys_initcall.
At the time the PL330 driver is not yet initialized. The reason why
spi-pl022 is done at subsys_initcall is that some regulators communicate
through the SPI bus so people decided to move it to earlier (commit
25c8e03b by Linus Walleij), which seems to be a valid reason to me.
Thanks,
Ray
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Consider moving the init of pl330 to earlier?
2014-10-09 21:35 Consider moving the init of pl330 to earlier? Ray Jui
@ 2014-10-16 6:59 ` Vinod Koul
2014-10-16 16:00 ` Ray Jui
0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2014-10-16 6:59 UTC (permalink / raw)
To: Ray Jui; +Cc: Dan Williams, Scott Branden, linux-kernel
On Thu, Oct 09, 2014 at 02:35:11PM -0700, Ray Jui wrote:
> Hi,
>
> How do you guys like the idea of moving the driver initialization of
> the pl330 DMA driver to earlier? For example, to arch_initcall_sync
> or subsys_initcall? Currently the pl330 driver is registered through
> module_amba_driver call, which translates to device_initcall in the
> end. This is a bit late considering in many systems, DMA controller
> is one of the core components that may have many slave devices
> depending on. Most slave drivers are typically done at
> device_initcall. When done at the same level, DMA may not be ready
> while the slave devices are being initialized. In addition, under
> the drivers/dma directory, we currently have various other DMA
> drivers also done at subsys_initcall.
>
> One issue that I'm seeing with the Broadcom Cygnus SoC is that, when
> we try to use DMA with SPI (PL022), the request for DMA channel
> would fail because the spi-pl022 driver we use is initialized at
> subsys_initcall. At the time the PL330 driver is not yet
> initialized. The reason why spi-pl022 is done at subsys_initcall is
> that some regulators communicate through the SPI bus so people
> decided to move it to earlier (commit 25c8e03b by Linus Walleij),
> which seems to be a valid reason to me.
As a subsytem we encourage folks to use early init calls and then have
clients use late_init so that dependency is solved.
So feel free to send the patch
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Consider moving the init of pl330 to earlier?
2014-10-16 6:59 ` Vinod Koul
@ 2014-10-16 16:00 ` Ray Jui
0 siblings, 0 replies; 3+ messages in thread
From: Ray Jui @ 2014-10-16 16:00 UTC (permalink / raw)
To: Vinod Koul; +Cc: Dan Williams, Scott Branden, linux-kernel
On 10/15/2014 11:59 PM, Vinod Koul wrote:
> On Thu, Oct 09, 2014 at 02:35:11PM -0700, Ray Jui wrote:
>> Hi,
>>
>> How do you guys like the idea of moving the driver initialization of
>> the pl330 DMA driver to earlier? For example, to arch_initcall_sync
>> or subsys_initcall? Currently the pl330 driver is registered through
>> module_amba_driver call, which translates to device_initcall in the
>> end. This is a bit late considering in many systems, DMA controller
>> is one of the core components that may have many slave devices
>> depending on. Most slave drivers are typically done at
>> device_initcall. When done at the same level, DMA may not be ready
>> while the slave devices are being initialized. In addition, under
>> the drivers/dma directory, we currently have various other DMA
>> drivers also done at subsys_initcall.
>>
>> One issue that I'm seeing with the Broadcom Cygnus SoC is that, when
>> we try to use DMA with SPI (PL022), the request for DMA channel
>> would fail because the spi-pl022 driver we use is initialized at
>> subsys_initcall. At the time the PL330 driver is not yet
>> initialized. The reason why spi-pl022 is done at subsys_initcall is
>> that some regulators communicate through the SPI bus so people
>> decided to move it to earlier (commit 25c8e03b by Linus Walleij),
>> which seems to be a valid reason to me.
> As a subsytem we encourage folks to use early init calls and then have
> clients use late_init so that dependency is solved.
>
> So feel free to send the patch
>
Will do. Thanks!
Ray
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-16 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-09 21:35 Consider moving the init of pl330 to earlier? Ray Jui
2014-10-16 6:59 ` Vinod Koul
2014-10-16 16:00 ` Ray Jui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox