[PATCH dev-5.0 v2 1/5] media: platform: Aspeed: Remove use of reset line
Jae Hyun Yoo
jae.hyun.yoo at linux.intel.com
Sat Mar 30 10:54:40 AEDT 2019
> 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?
Cheers,
Jae
More information about the openbmc
mailing list