video: tegra: host: Add CSI-E/F settings for T210
Frank Chen [Thu, 8 Oct 2015 17:50:54 +0000 (10:50 -0700)]
Add missing CSI-E and CSI-F watchdog and status register
settings for t210

bug 1654140
bug 200140820

Change-Id: Id0fb1cd782d7ffeb60a06368d39484785ad34bad
Signed-off-by: Frank Chen <frankc@nvidia.com>
Reviewed-on: http://git-master/r/824955
Reviewed-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: David Schalig <dschalig@nvidia.com>
Reviewed-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>

drivers/video/tegra/host/vi/vi.h
drivers/video/tegra/host/vi/vi_irq.c

index 5cd9547..258b90f 100644 (file)
 #define VI_CSI_3_WD_CTRL                               0x48c
 #define VI_CSI_2_ERROR_INT_MASK_0                      0x388
 #define VI_CSI_3_ERROR_INT_MASK_0                      0x488
+#define VI_CSI_4_ERROR_STATUS                          0x584
+#define VI_CSI_5_ERROR_STATUS                          0x684
+#define VI_CSI_4_WD_CTRL                               0x58c
+#define VI_CSI_5_WD_CTRL                               0x68c
+#define VI_CSI_4_ERROR_INT_MASK_0                      0x588
+#define VI_CSI_5_ERROR_INT_MASK_0                      0x688
+
+
 
 #define CSI1_CSI_PIXEL_PARSER_A_INTERRUPT_MASK_0       0x1050
 #define CSI1_CSI_PIXEL_PARSER_A_STATUS_0               0x1054
@@ -61,7 +69,7 @@
 #define CSI2_CSI_PIXEL_PARSER_B_INTERRUPT_MASK_0       0x1884
 #define CSI2_CSI_PIXEL_PARSER_B_STATUS_0               0x1888
 
-#define NUM_VI_WATCHDOG                                                        4
+#define NUM_VI_WATCHDOG                                                        6
 #else
 #define NUM_VI_WATCHDOG                                                        2
 #endif
index 2b656f1..18dfba4 100644 (file)
@@ -31,6 +31,8 @@ static const int status_reg_table[] = {
 #ifdef TEGRA_21X_OR_HIGHER_CONFIG
        VI_CSI_2_ERROR_STATUS,
        VI_CSI_3_ERROR_STATUS,
+       VI_CSI_4_ERROR_STATUS,
+       VI_CSI_5_ERROR_STATUS,
        CSI1_CSI_PIXEL_PARSER_A_STATUS_0,
        CSI1_CSI_PIXEL_PARSER_B_STATUS_0,
        CSI2_CSI_PIXEL_PARSER_A_STATUS_0,
@@ -52,6 +54,10 @@ static const int mask_reg_table[] = {
        VI_CSI_3_WD_CTRL,
        VI_CSI_2_ERROR_INT_MASK_0,
        VI_CSI_3_ERROR_INT_MASK_0,
+       VI_CSI_4_WD_CTRL,
+       VI_CSI_5_WD_CTRL,
+       VI_CSI_4_ERROR_INT_MASK_0,
+       VI_CSI_5_ERROR_INT_MASK_0,
        CSI1_CSI_PIXEL_PARSER_A_INTERRUPT_MASK_0,
        CSI1_CSI_PIXEL_PARSER_B_INTERRUPT_MASK_0,
        CSI2_CSI_PIXEL_PARSER_A_INTERRUPT_MASK_0,
@@ -125,6 +131,14 @@ static irqreturn_t vi_checkwd(struct vi *tegra_vi, int stream)
                err_addr = VI_CSI_3_ERROR_STATUS;
                wd_addr = VI_CSI_3_WD_CTRL;
                break;
+       case 4:
+               err_addr = VI_CSI_4_ERROR_STATUS;
+               wd_addr = VI_CSI_4_WD_CTRL;
+               break;
+       case 5:
+               err_addr = VI_CSI_5_ERROR_STATUS;
+               wd_addr = VI_CSI_5_WD_CTRL;
+               break;
 #endif
        default:
                return IRQ_NONE;