diff options
author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-04-22 15:06:58 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-20 13:32:16 +0300 |
commit | a19b190e32dfcdd909555df3c009e0bc66f8353d (patch) | |
tree | 3d502f2cfcd6f1071617ff843b0220d67d7436c7 | |
parent | 9ace178dee15432712fc70a5f84cb00695fc70b9 (diff) | |
download | linux-a19b190e32dfcdd909555df3c009e0bc66f8353d.tar.xz |
media: atomisp: atomisp_v4l2.c: set wdt timers according with ISP version
Add a runtime check to use the proper wdt timer init at runtime,
depending on the chipset revision.
For now, we can't get rid of the remaining version checks, as
the rest of the code is not prepared yet to detect the ISP
version on runtime.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c index 55bb513b933a..ef7a83c5f459 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c @@ -1148,14 +1148,17 @@ static int init_atomisp_wdts(struct atomisp_device *isp) for (i = 0; i < isp->num_of_streams; i++) { struct atomisp_sub_device *asd = &isp->asd[i]; -#ifndef ISP2401 - timer_setup(&asd->wdt, atomisp_wdt, 0); -#else - timer_setup(&asd->video_out_capture.wdt, atomisp_wdt, 0); - timer_setup(&asd->video_out_preview.wdt, atomisp_wdt, 0); - timer_setup(&asd->video_out_vf.wdt, atomisp_wdt, 0); - timer_setup(&asd->video_out_video_capture.wdt, atomisp_wdt, 0); -#endif + if (!atomisp_hw_is_isp2401) + timer_setup(&asd->wdt, atomisp_wdt, 0); + else { + timer_setup(&asd->video_out_capture.wdt, + atomisp_wdt, 0); + timer_setup(&asd->video_out_preview.wdt, + atomisp_wdt, 0); + timer_setup(&asd->video_out_vf.wdt, atomisp_wdt, 0); + timer_setup(&asd->video_out_video_capture.wdt, + atomisp_wdt, 0); + } } return 0; alloc_fail: |