[PATCH dev-5.0 v2 1/5] media: platform: Aspeed: Remove use of reset line
Eddie James
eajames at linux.vnet.ibm.com
Tue Apr 2 02:11:06 AEDT 2019
On 3/29/19 6:54 PM, Jae Hyun Yoo wrote:
>> static void aspeed_video_off(struct aspeed_video *video)
>> {
>> - aspeed_video_reset(video);
>> + /* Disable interrupts */
>> + aspeed_video_write(video, VE_INTERRUPT_CTRL, 0);
>> /* Turn off the relevant clocks */
>> clk_disable_unprepare(video->vclk);
>> @@ -508,7 +497,13 @@ static void aspeed_video_on(struct aspeed_video
>> *video)
>> clk_prepare_enable(video->eclk);
>> clk_prepare_enable(video->vclk);
>> - aspeed_video_reset(video);
>> + /*
>> + * Delay (and don't sleep in case in interrupt context) to let the
>> + * clocks stabilize. Without this, mode detection sometimes fails.
>> + * Possibly the registers don't update too soon after clocks are
>> + * enabled.
>> + */
>> + udelay(100);
>> }
>
> aspeed_video_off() will be called from interrupt context too. Are you
> sure that this 100us delay is needed at here? If it's actually needed,
> would it be batter to use devm_request_threaded_irq() instead of
> devm_request_irq() in aspeed_video_init() function?
Well this isn't new to this patchset, it delayed 100us before in
aspeed_video_reset.
I am quite sure it's needed.
Since the ast2500 has only one logical processor, I'm not sure a
threaded irq would function any differently.
>
> Cheers,
> Jae
>
More information about the openbmc
mailing list