1. 19 Jul, 2020 10 commits
    • Colin Ian King's avatar
      media: atomisp: fix mask and shift operation on ISPSSPM0 · 23988c97
      Colin Ian King authored
      Currently the check on bits 25:24 on ISPSSPM0 is always 0 because
      the mask and shift operations are incorrect. Fix this by shifting
      by MRFLD_ISPSSPM0_ISPSSS_OFFSET (24 bits right) and then masking
      with RFLD_ISPSSPM0_ISPSSC_MASK (0x03) to get the appropriate 2 bits
      to check.
      
      Addresses-Coverity: ("Operands don't affect result")
      Fixes: 0f441fd7 ("media: atomisp: simplify the power down/up code")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      23988c97
    • Mauro Carvalho Chehab's avatar
      media: atomisp: move system_local consts into a C file · 85ebb8eb
      Mauro Carvalho Chehab authored
      Instead of declaring all those consts everywhere when the
      headers are included, just place them on a single place.
      
      This change shuts up lots of warnings when built with W=1:
      
      In file included from drivers/staging/media/atomisp/pci/ia_css_acc_types.h:23,
                       from drivers/staging/media/atomisp/pci/ia_css.h:26,
                       from drivers/staging/media/atomisp/pci/atomisp_compat_css20.h:24,
                       from drivers/staging/media/atomisp/pci/atomisp_compat.h:22,
                       from drivers/staging/media/atomisp/pci/atomisp_drvfs.c:23:
      ./drivers/staging/media/atomisp//pci/system_local.h:193:26: warning: ‘STREAM2MMIO_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        193 | static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:186:26: warning: ‘PIXELGEN_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        186 | static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:179:26: warning: ‘CSI_RX_BE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        179 | static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:172:26: warning: ‘CSI_RX_FE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        172 | static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:165:26: warning: ‘ISYS_IRQ_BASE’ defined but not used [-Wunused-const-variable=]
        165 | static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:158:26: warning: ‘IBUF_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        158 | static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:153:26: warning: ‘RX_BASE’ defined but not used [-Wunused-const-variable=]
        153 | static const hrt_address RX_BASE[N_RX_ID] = {
            |                          ^~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:138:26: warning: ‘INPUT_SYSTEM_BASE’ defined but not used [-Wunused-const-variable=]
        138 | static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:130:26: warning: ‘INPUT_FORMATTER_BASE’ defined but not used [-Wunused-const-variable=]
        130 | static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:125:26: warning: ‘TIMED_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        125 | static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:120:26: warning: ‘GPIO_BASE’ defined but not used [-Wunused-const-variable=]
        120 | static const hrt_address GPIO_BASE[N_GPIO_ID] = {
            |                          ^~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:116:26: warning: ‘GP_TIMER_BASE’ defined but not used [-Wunused-const-variable=]
        116 | static const hrt_address GP_TIMER_BASE =
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:109:26: warning: ‘GP_DEVICE_BASE’ defined but not used [-Wunused-const-variable=]
        109 | static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:96:26: warning: ‘FIFO_MONITOR_BASE’ defined but not used [-Wunused-const-variable=]
         96 | static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:90:26: warning: ‘GDC_BASE’ defined but not used [-Wunused-const-variable=]
         90 | static const hrt_address GDC_BASE[N_GDC_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:78:26: warning: ‘IRQ_BASE’ defined but not used [-Wunused-const-variable=]
         78 | static const hrt_address IRQ_BASE[N_IRQ_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:73:26: warning: ‘ISYS2401_DMA_BASE’ defined but not used [-Wunused-const-variable=]
         73 | static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:69:26: warning: ‘DMA_BASE’ defined but not used [-Wunused-const-variable=]
         69 | static const hrt_address DMA_BASE[N_DMA_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:63:26: warning: ‘MMU_BASE’ defined but not used [-Wunused-const-variable=]
         63 | static const hrt_address MMU_BASE[N_MMU_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:54:26: warning: ‘SP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         54 | static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:50:26: warning: ‘SP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         50 | static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:45:26: warning: ‘ISP_BAMEM_BASE’ defined but not used [-Wunused-const-variable=]
         45 | static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:41:26: warning: ‘ISP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         41 | static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:37:26: warning: ‘ISP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         37 | static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      In file included from drivers/staging/media/atomisp/pci/ia_css_acc_types.h:23,
                       from drivers/staging/media/atomisp/pci/ia_css.h:26,
                       from drivers/staging/media/atomisp/pci/atomisp_file.c:27:
      ./drivers/staging/media/atomisp//pci/system_local.h:193:26: warning: ‘STREAM2MMIO_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        193 | static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:186:26: warning: ‘PIXELGEN_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        186 | static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:179:26: warning: ‘CSI_RX_BE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        179 | static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:172:26: warning: ‘CSI_RX_FE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        172 | static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:165:26: warning: ‘ISYS_IRQ_BASE’ defined but not used [-Wunused-const-variable=]
        165 | static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:158:26: warning: ‘IBUF_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        158 | static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:153:26: warning: ‘RX_BASE’ defined but not used [-Wunused-const-variable=]
        153 | static const hrt_address RX_BASE[N_RX_ID] = {
            |                          ^~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:138:26: warning: ‘INPUT_SYSTEM_BASE’ defined but not used [-Wunused-const-variable=]
        138 | static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:130:26: warning: ‘INPUT_FORMATTER_BASE’ defined but not used [-Wunused-const-variable=]
        130 | static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:125:26: warning: ‘TIMED_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        125 | static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:120:26: warning: ‘GPIO_BASE’ defined but not used [-Wunused-const-variable=]
        120 | static const hrt_address GPIO_BASE[N_GPIO_ID] = {
            |                          ^~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:116:26: warning: ‘GP_TIMER_BASE’ defined but not used [-Wunused-const-variable=]
        116 | static const hrt_address GP_TIMER_BASE =
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:109:26: warning: ‘GP_DEVICE_BASE’ defined but not used [-Wunused-const-variable=]
        109 | static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:96:26: warning: ‘FIFO_MONITOR_BASE’ defined but not used [-Wunused-const-variable=]
         96 | static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:90:26: warning: ‘GDC_BASE’ defined but not used [-Wunused-const-variable=]
         90 | static const hrt_address GDC_BASE[N_GDC_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:78:26: warning: ‘IRQ_BASE’ defined but not used [-Wunused-const-variable=]
         78 | static const hrt_address IRQ_BASE[N_IRQ_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:73:26: warning: ‘ISYS2401_DMA_BASE’ defined but not used [-Wunused-const-variable=]
         73 | static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:69:26: warning: ‘DMA_BASE’ defined but not used [-Wunused-const-variable=]
         69 | static const hrt_address DMA_BASE[N_DMA_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:63:26: warning: ‘MMU_BASE’ defined but not used [-Wunused-const-variable=]
         63 | static const hrt_address MMU_BASE[N_MMU_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:54:26: warning: ‘SP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         54 | static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:50:26: warning: ‘SP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         50 | static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:45:26: warning: ‘ISP_BAMEM_BASE’ defined but not used [-Wunused-const-variable=]
         45 | static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:41:26: warning: ‘ISP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         41 | static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:37:26: warning: ‘ISP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         37 | static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      In file included from ./drivers/staging/media/atomisp//pci/ia_css_acc_types.h:23,
                       from ./drivers/staging/media/atomisp//pci/ia_css_pipe_public.h:29,
                       from drivers/staging/media/atomisp/pci/sh_css_legacy.h:23,
                       from drivers/staging/media/atomisp/pci/atomisp_internal.h:34,
                       from drivers/staging/media/atomisp/pci/atomisp_cmd.h:30,
                       from drivers/staging/media/atomisp/pci/atomisp_csi2.c:21:
      ./drivers/staging/media/atomisp//pci/system_local.h:193:26: warning: ‘STREAM2MMIO_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        193 | static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:186:26: warning: ‘PIXELGEN_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        186 | static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:179:26: warning: ‘CSI_RX_BE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        179 | static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:172:26: warning: ‘CSI_RX_FE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        172 | static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:165:26: warning: ‘ISYS_IRQ_BASE’ defined but not used [-Wunused-const-variable=]
        165 | static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:158:26: warning: ‘IBUF_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        158 | static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:153:26: warning: ‘RX_BASE’ defined but not used [-Wunused-const-variable=]
        153 | static const hrt_address RX_BASE[N_RX_ID] = {
            |                          ^~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:138:26: warning: ‘INPUT_SYSTEM_BASE’ defined but not used [-Wunused-const-variable=]
        138 | static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:130:26: warning: ‘INPUT_FORMATTER_BASE’ defined but not used [-Wunused-const-variable=]
        130 | static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:125:26: warning: ‘TIMED_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        125 | static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:120:26: warning: ‘GPIO_BASE’ defined but not used [-Wunused-const-variable=]
        120 | static const hrt_address GPIO_BASE[N_GPIO_ID] = {
            |                          ^~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:116:26: warning: ‘GP_TIMER_BASE’ defined but not used [-Wunused-const-variable=]
        116 | static const hrt_address GP_TIMER_BASE =
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:109:26: warning: ‘GP_DEVICE_BASE’ defined but not used [-Wunused-const-variable=]
        109 | static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:96:26: warning: ‘FIFO_MONITOR_BASE’ defined but not used [-Wunused-const-variable=]
         96 | static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:90:26: warning: ‘GDC_BASE’ defined but not used [-Wunused-const-variable=]
         90 | static const hrt_address GDC_BASE[N_GDC_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:78:26: warning: ‘IRQ_BASE’ defined but not used [-Wunused-const-variable=]
         78 | static const hrt_address IRQ_BASE[N_IRQ_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:73:26: warning: ‘ISYS2401_DMA_BASE’ defined but not used [-Wunused-const-variable=]
         73 | static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:69:26: warning: ‘DMA_BASE’ defined but not used [-Wunused-const-variable=]
         69 | static const hrt_address DMA_BASE[N_DMA_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:63:26: warning: ‘MMU_BASE’ defined but not used [-Wunused-const-variable=]
         63 | static const hrt_address MMU_BASE[N_MMU_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:54:26: warning: ‘SP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         54 | static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:50:26: warning: ‘SP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         50 | static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:45:26: warning: ‘ISP_BAMEM_BASE’ defined but not used [-Wunused-const-variable=]
         45 | static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:41:26: warning: ‘ISP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         41 | static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:37:26: warning: ‘ISP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         37 | static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      In file included from ./drivers/staging/media/atomisp//pci/ia_css_acc_types.h:23,
                       from ./drivers/staging/media/atomisp//pci/ia_css_pipe_public.h:29,
                       from drivers/staging/media/atomisp/pci/sh_css_legacy.h:23,
                       from drivers/staging/media/atomisp/pci/atomisp_internal.h:34,
                       from drivers/staging/media/atomisp/pci/atomisp_acc.h:23,
                       from drivers/staging/media/atomisp/pci/atomisp_acc.c:29:
      ./drivers/staging/media/atomisp//pci/system_local.h:193:26: warning: ‘STREAM2MMIO_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        193 | static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:186:26: warning: ‘PIXELGEN_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        186 | static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:179:26: warning: ‘CSI_RX_BE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        179 | static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:172:26: warning: ‘CSI_RX_FE_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        172 | static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:165:26: warning: ‘ISYS_IRQ_BASE’ defined but not used [-Wunused-const-variable=]
        165 | static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:158:26: warning: ‘IBUF_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        158 | static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:153:26: warning: ‘RX_BASE’ defined but not used [-Wunused-const-variable=]
        153 | static const hrt_address RX_BASE[N_RX_ID] = {
            |                          ^~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:138:26: warning: ‘INPUT_SYSTEM_BASE’ defined but not used [-Wunused-const-variable=]
        138 | static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:130:26: warning: ‘INPUT_FORMATTER_BASE’ defined but not used [-Wunused-const-variable=]
        130 | static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
            |                          ^~~~~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:125:26: warning: ‘TIMED_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
        125 | static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
            |                          ^~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:120:26: warning: ‘GPIO_BASE’ defined but not used [-Wunused-const-variable=]
        120 | static const hrt_address GPIO_BASE[N_GPIO_ID] = {
            |                          ^~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:116:26: warning: ‘GP_TIMER_BASE’ defined but not used [-Wunused-const-variable=]
        116 | static const hrt_address GP_TIMER_BASE =
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:109:26: warning: ‘GP_DEVICE_BASE’ defined but not used [-Wunused-const-variable=]
        109 | static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:96:26: warning: ‘FIFO_MONITOR_BASE’ defined but not used [-Wunused-const-variable=]
         96 | static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:90:26: warning: ‘GDC_BASE’ defined but not used [-Wunused-const-variable=]
         90 | static const hrt_address GDC_BASE[N_GDC_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:78:26: warning: ‘IRQ_BASE’ defined but not used [-Wunused-const-variable=]
         78 | static const hrt_address IRQ_BASE[N_IRQ_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:73:26: warning: ‘ISYS2401_DMA_BASE’ defined but not used [-Wunused-const-variable=]
         73 | static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
            |                          ^~~~~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:69:26: warning: ‘DMA_BASE’ defined but not used [-Wunused-const-variable=]
         69 | static const hrt_address DMA_BASE[N_DMA_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:63:26: warning: ‘MMU_BASE’ defined but not used [-Wunused-const-variable=]
         63 | static const hrt_address MMU_BASE[N_MMU_ID] = {
            |                          ^~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:54:26: warning: ‘SP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         54 | static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:50:26: warning: ‘SP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         50 | static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
            |                          ^~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:45:26: warning: ‘ISP_BAMEM_BASE’ defined but not used [-Wunused-const-variable=]
         45 | static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
            |                          ^~~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:41:26: warning: ‘ISP_DMEM_BASE’ defined but not used [-Wunused-const-variable=]
         41 | static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      ./drivers/staging/media/atomisp//pci/system_local.h:37:26: warning: ‘ISP_CTRL_BASE’ defined but not used [-Wunused-const-variable=]
         37 | static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
            |                          ^~~~~~~~~~~~~
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      85ebb8eb
    • Mauro Carvalho Chehab's avatar
      media: atomisp: get rid of version-specific system_local.h · 08b2bcc6
      Mauro Carvalho Chehab authored
      After removing the unused 32-bits data, the isp2401_system_local.h
      now contains everything that it is needed, either by isp2401 or
      by isp2400.
      
      So, remove code duplication.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      08b2bcc6
    • Mauro Carvalho Chehab's avatar
      media: atomisp: move global stuff into a common header · 4b28ded7
      Mauro Carvalho Chehab authored
      Right now, there are two versions of system_global.h headers.
      
      Both share a lot of common code. There are some ISP2401 specific
      types on one of the headers, but it doesn't conflict with the
      ISP2400 ones.
      
      Also, the common code is identical.
      
      So, remove code duplication by moving such code into a
      common header.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      4b28ded7
    • Mauro Carvalho Chehab's avatar
      media: atomisp: remove non-used 32-bits consts at system_local · a6154805
      Mauro Carvalho Chehab authored
      There is an abstraction at the code in order to support
      32 or 64 bits address/data length. However, for all
      Atom chipsets supported by this version, the size is fixed.
      
      So, cleanup the mess, removing the uused code and placing
      the data sizes on a single place.
      
      The end goal is to completely remove those local/global
      headers, replacing them by some ISP-version dependent struct,
      in order for the driver to decide what version it would need
      in runtime.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      a6154805
    • Mauro Carvalho Chehab's avatar
      media: atomisp: get rid of some unused static vars · ecf1b4ca
      Mauro Carvalho Chehab authored
      There are several static vars declared inside the
      system local headers. This causes lots of warnings when W=1.
      
      Remove the unused ones.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      ecf1b4ca
    • Dan Carpenter's avatar
      media: atomisp: Fix error code in ov5693_probe() · ac828456
      Dan Carpenter authored
      If gmin_camera_platform_data() returns NULL then we should return a
      negative error instead of success.
      
      Fixes: 90ebe55a ("media: staging: atomisp: Add driver prefix to Kconfig option and module names")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      ac828456
    • Nicolas Boichat's avatar
      media: atomisp: Replace trace_printk by pr_info · 3d81099c
      Nicolas Boichat authored
      trace_printk should not be used in production code, replace it
      call with pr_info.
      Signed-off-by: default avatarNicolas Boichat <drinkcat@chromium.org>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      3d81099c
    • Baidyanath Kundu's avatar
      media: atomisp: Fix __func__ style warnings · d8ebd811
      Baidyanath Kundu authored
      This patch fixes the checkpatch.pl warning:
      
      Prefer using '"%s...", __func__' to using '<function name>',
      this function's name, in a string
      Signed-off-by: default avatarBaidyanath Kundu <kundubaidya99@gmail.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      d8ebd811
    • Mauro Carvalho Chehab's avatar
      media: atomisp: fix help message for ISP2401 selection · 52c6f42f
      Mauro Carvalho Chehab authored
      I'm pretty sure I named this right, but it sounds that I ended
      doing something weird maybe while solving some conflict.
      
      So, fix the title of this config var.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      52c6f42f
  2. 18 Jul, 2020 26 commits
  3. 17 Jul, 2020 1 commit
  4. 11 Jun, 2020 3 commits