Skip to content

Commit 85ebb8e

Browse files
committed
media: atomisp: move system_local consts into a C file
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: Mauro Carvalho Chehab <[email protected]>
1 parent 08b2bcc commit 85ebb8e

File tree

3 files changed

+205
-121
lines changed

3 files changed

+205
-121
lines changed

drivers/staging/media/atomisp/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ atomisp-objs += \
156156
pci/hive_isp_css_common/host/timed_ctrl.o \
157157
pci/hive_isp_css_common/host/vmem.o \
158158
pci/hive_isp_css_shared/host/tag.o \
159+
pci/system_local.o \
159160

160161
obj-byt = \
161162
pci/css_2400_system/hive/ia_css_isp_configs.o \
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Support for Intel Camera Imaging ISP subsystem.
4+
* Copyright (c) 2015, Intel Corporation.
5+
*
6+
* This program is free software; you can redistribute it and/or modify it
7+
* under the terms and conditions of the GNU General Public License,
8+
* version 2, as published by the Free Software Foundation.
9+
*
10+
* This program is distributed in the hope it will be useful, but WITHOUT
11+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13+
* more details.
14+
*/
15+
16+
#include "system_local.h"
17+
18+
/* ISP */
19+
const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
20+
0x0000000000020000ULL
21+
};
22+
23+
const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
24+
0x0000000000200000ULL
25+
};
26+
27+
const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
28+
0x0000000000100000ULL
29+
};
30+
31+
/* SP */
32+
const hrt_address SP_CTRL_BASE[N_SP_ID] = {
33+
0x0000000000010000ULL
34+
};
35+
36+
const hrt_address SP_DMEM_BASE[N_SP_ID] = {
37+
0x0000000000300000ULL
38+
};
39+
40+
/* MMU */
41+
/*
42+
* MMU0_ID: The data MMU
43+
* MMU1_ID: The icache MMU
44+
*/
45+
const hrt_address MMU_BASE[N_MMU_ID] = {
46+
0x0000000000070000ULL,
47+
0x00000000000A0000ULL
48+
};
49+
50+
/* DMA */
51+
const hrt_address DMA_BASE[N_DMA_ID] = {
52+
0x0000000000040000ULL
53+
};
54+
55+
const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
56+
0x00000000000CA000ULL
57+
};
58+
59+
/* IRQ */
60+
const hrt_address IRQ_BASE[N_IRQ_ID] = {
61+
0x0000000000000500ULL,
62+
0x0000000000030A00ULL,
63+
0x000000000008C000ULL,
64+
0x0000000000090200ULL
65+
};
66+
67+
/*
68+
0x0000000000000500ULL};
69+
*/
70+
71+
/* GDC */
72+
const hrt_address GDC_BASE[N_GDC_ID] = {
73+
0x0000000000050000ULL,
74+
0x0000000000060000ULL
75+
};
76+
77+
/* FIFO_MONITOR (not a subset of GP_DEVICE) */
78+
const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
79+
0x0000000000000000ULL
80+
};
81+
82+
/*
83+
const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
84+
0x0000000000000000ULL};
85+
86+
const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
87+
0x0000000000090000ULL};
88+
*/
89+
90+
/* GP_DEVICE (single base for all separate GP_REG instances) */
91+
const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
92+
0x0000000000000000ULL
93+
};
94+
95+
/*GP TIMER , all timer registers are inter-twined,
96+
* so, having multiple base addresses for
97+
* different timers does not help*/
98+
const hrt_address GP_TIMER_BASE =
99+
(hrt_address)0x0000000000000600ULL;
100+
101+
/* GPIO */
102+
const hrt_address GPIO_BASE[N_GPIO_ID] = {
103+
0x0000000000000400ULL
104+
};
105+
106+
/* TIMED_CTRL */
107+
const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
108+
0x0000000000000100ULL
109+
};
110+
111+
/* INPUT_FORMATTER */
112+
const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
113+
0x0000000000030000ULL,
114+
0x0000000000030200ULL,
115+
0x0000000000030400ULL,
116+
0x0000000000030600ULL
117+
}; /* memcpy() */
118+
119+
/* INPUT_SYSTEM */
120+
const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
121+
0x0000000000080000ULL
122+
};
123+
124+
/* 0x0000000000081000ULL, */ /* capture A */
125+
/* 0x0000000000082000ULL, */ /* capture B */
126+
/* 0x0000000000083000ULL, */ /* capture C */
127+
/* 0x0000000000084000ULL, */ /* Acquisition */
128+
/* 0x0000000000085000ULL, */ /* DMA */
129+
/* 0x0000000000089000ULL, */ /* ctrl */
130+
/* 0x000000000008A000ULL, */ /* GP regs */
131+
/* 0x000000000008B000ULL, */ /* FIFO */
132+
/* 0x000000000008C000ULL, */ /* IRQ */
133+
134+
/* RX, the MIPI lane control regs start at offset 0 */
135+
const hrt_address RX_BASE[N_RX_ID] = {
136+
0x0000000000080100ULL
137+
};
138+
139+
/* IBUF_CTRL, part of the Input System 2401 */
140+
const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
141+
0x00000000000C1800ULL, /* ibuf controller A */
142+
0x00000000000C3800ULL, /* ibuf controller B */
143+
0x00000000000C5800ULL /* ibuf controller C */
144+
};
145+
146+
/* ISYS IRQ Controllers, part of the Input System 2401 */
147+
const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
148+
0x00000000000C1400ULL, /* port a */
149+
0x00000000000C3400ULL, /* port b */
150+
0x00000000000C5400ULL /* port c */
151+
};
152+
153+
/* CSI FE, part of the Input System 2401 */
154+
const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
155+
0x00000000000C0400ULL, /* csi fe controller A */
156+
0x00000000000C2400ULL, /* csi fe controller B */
157+
0x00000000000C4400ULL /* csi fe controller C */
158+
};
159+
160+
/* CSI BE, part of the Input System 2401 */
161+
const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
162+
0x00000000000C0800ULL, /* csi be controller A */
163+
0x00000000000C2800ULL, /* csi be controller B */
164+
0x00000000000C4800ULL /* csi be controller C */
165+
};
166+
167+
/* PIXEL Generator, part of the Input System 2401 */
168+
const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
169+
0x00000000000C1000ULL, /* pixel gen controller A */
170+
0x00000000000C3000ULL, /* pixel gen controller B */
171+
0x00000000000C5000ULL /* pixel gen controller C */
172+
};
173+
174+
/* Stream2MMIO, part of the Input System 2401 */
175+
const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
176+
0x00000000000C0C00ULL, /* stream2mmio controller A */
177+
0x00000000000C2C00ULL, /* stream2mmio controller B */
178+
0x00000000000C4C00ULL /* stream2mmio controller C */
179+
};

drivers/staging/media/atomisp/pci/system_local.h

Lines changed: 25 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -34,166 +34,70 @@
3434
#define GP_FIFO_BASE ((hrt_address)0x0000000000090104) /* This is NOT a base address */
3535

3636
/* ISP */
37-
static const hrt_address ISP_CTRL_BASE[N_ISP_ID] = {
38-
0x0000000000020000ULL
39-
};
40-
41-
static const hrt_address ISP_DMEM_BASE[N_ISP_ID] = {
42-
0x0000000000200000ULL
43-
};
44-
45-
static const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID] = {
46-
0x0000000000100000ULL
47-
};
37+
extern const hrt_address ISP_CTRL_BASE[N_ISP_ID];
38+
extern const hrt_address ISP_DMEM_BASE[N_ISP_ID];
39+
extern const hrt_address ISP_BAMEM_BASE[N_BAMEM_ID];
4840

4941
/* SP */
50-
static const hrt_address SP_CTRL_BASE[N_SP_ID] = {
51-
0x0000000000010000ULL
52-
};
53-
54-
static const hrt_address SP_DMEM_BASE[N_SP_ID] = {
55-
0x0000000000300000ULL
56-
};
42+
extern const hrt_address SP_CTRL_BASE[N_SP_ID];
43+
extern const hrt_address SP_DMEM_BASE[N_SP_ID];
5744

5845
/* MMU */
59-
/*
60-
* MMU0_ID: The data MMU
61-
* MMU1_ID: The icache MMU
62-
*/
63-
static const hrt_address MMU_BASE[N_MMU_ID] = {
64-
0x0000000000070000ULL,
65-
0x00000000000A0000ULL
66-
};
6746

68-
/* DMA */
69-
static const hrt_address DMA_BASE[N_DMA_ID] = {
70-
0x0000000000040000ULL
71-
};
47+
extern const hrt_address MMU_BASE[N_MMU_ID];
7248

73-
static const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID] = {
74-
0x00000000000CA000ULL
75-
};
49+
/* DMA */
50+
extern const hrt_address DMA_BASE[N_DMA_ID];
51+
extern const hrt_address ISYS2401_DMA_BASE[N_ISYS2401_DMA_ID];
7652

7753
/* IRQ */
78-
static const hrt_address IRQ_BASE[N_IRQ_ID] = {
79-
0x0000000000000500ULL,
80-
0x0000000000030A00ULL,
81-
0x000000000008C000ULL,
82-
0x0000000000090200ULL
83-
};
84-
85-
/*
86-
0x0000000000000500ULL};
87-
*/
54+
extern const hrt_address IRQ_BASE[N_IRQ_ID];
8855

8956
/* GDC */
90-
static const hrt_address GDC_BASE[N_GDC_ID] = {
91-
0x0000000000050000ULL,
92-
0x0000000000060000ULL
93-
};
57+
extern const hrt_address GDC_BASE[N_GDC_ID];
9458

9559
/* FIFO_MONITOR (not a subset of GP_DEVICE) */
96-
static const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID] = {
97-
0x0000000000000000ULL
98-
};
99-
100-
/*
101-
static const hrt_address GP_REGS_BASE[N_GP_REGS_ID] = {
102-
0x0000000000000000ULL};
103-
104-
static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
105-
0x0000000000090000ULL};
106-
*/
60+
extern const hrt_address FIFO_MONITOR_BASE[N_FIFO_MONITOR_ID];
10761

10862
/* GP_DEVICE (single base for all separate GP_REG instances) */
109-
static const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID] = {
110-
0x0000000000000000ULL
111-
};
63+
extern const hrt_address GP_DEVICE_BASE[N_GP_DEVICE_ID];
11264

11365
/*GP TIMER , all timer registers are inter-twined,
11466
* so, having multiple base addresses for
11567
* different timers does not help*/
116-
static const hrt_address GP_TIMER_BASE =
117-
(hrt_address)0x0000000000000600ULL;
68+
extern const hrt_address GP_TIMER_BASE;
11869

11970
/* GPIO */
120-
static const hrt_address GPIO_BASE[N_GPIO_ID] = {
121-
0x0000000000000400ULL
122-
};
71+
extern const hrt_address GPIO_BASE[N_GPIO_ID];
12372

12473
/* TIMED_CTRL */
125-
static const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID] = {
126-
0x0000000000000100ULL
127-
};
74+
extern const hrt_address TIMED_CTRL_BASE[N_TIMED_CTRL_ID];
12875

12976
/* INPUT_FORMATTER */
130-
static const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID] = {
131-
0x0000000000030000ULL,
132-
0x0000000000030200ULL,
133-
0x0000000000030400ULL,
134-
0x0000000000030600ULL
135-
}; /* memcpy() */
77+
extern const hrt_address INPUT_FORMATTER_BASE[N_INPUT_FORMATTER_ID];
13678

13779
/* INPUT_SYSTEM */
138-
static const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID] = {
139-
0x0000000000080000ULL
140-
};
141-
142-
/* 0x0000000000081000ULL, */ /* capture A */
143-
/* 0x0000000000082000ULL, */ /* capture B */
144-
/* 0x0000000000083000ULL, */ /* capture C */
145-
/* 0x0000000000084000ULL, */ /* Acquisition */
146-
/* 0x0000000000085000ULL, */ /* DMA */
147-
/* 0x0000000000089000ULL, */ /* ctrl */
148-
/* 0x000000000008A000ULL, */ /* GP regs */
149-
/* 0x000000000008B000ULL, */ /* FIFO */
150-
/* 0x000000000008C000ULL, */ /* IRQ */
80+
extern const hrt_address INPUT_SYSTEM_BASE[N_INPUT_SYSTEM_ID];
15181

15282
/* RX, the MIPI lane control regs start at offset 0 */
153-
static const hrt_address RX_BASE[N_RX_ID] = {
154-
0x0000000000080100ULL
155-
};
83+
extern const hrt_address RX_BASE[N_RX_ID];
15684

15785
/* IBUF_CTRL, part of the Input System 2401 */
158-
static const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID] = {
159-
0x00000000000C1800ULL, /* ibuf controller A */
160-
0x00000000000C3800ULL, /* ibuf controller B */
161-
0x00000000000C5800ULL /* ibuf controller C */
162-
};
86+
extern const hrt_address IBUF_CTRL_BASE[N_IBUF_CTRL_ID];
16387

16488
/* ISYS IRQ Controllers, part of the Input System 2401 */
165-
static const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID] = {
166-
0x00000000000C1400ULL, /* port a */
167-
0x00000000000C3400ULL, /* port b */
168-
0x00000000000C5400ULL /* port c */
169-
};
89+
extern const hrt_address ISYS_IRQ_BASE[N_ISYS_IRQ_ID];
17090

17191
/* CSI FE, part of the Input System 2401 */
172-
static const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID] = {
173-
0x00000000000C0400ULL, /* csi fe controller A */
174-
0x00000000000C2400ULL, /* csi fe controller B */
175-
0x00000000000C4400ULL /* csi fe controller C */
176-
};
92+
extern const hrt_address CSI_RX_FE_CTRL_BASE[N_CSI_RX_FRONTEND_ID];
17793

17894
/* CSI BE, part of the Input System 2401 */
179-
static const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID] = {
180-
0x00000000000C0800ULL, /* csi be controller A */
181-
0x00000000000C2800ULL, /* csi be controller B */
182-
0x00000000000C4800ULL /* csi be controller C */
183-
};
95+
extern const hrt_address CSI_RX_BE_CTRL_BASE[N_CSI_RX_BACKEND_ID];
18496

18597
/* PIXEL Generator, part of the Input System 2401 */
186-
static const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID] = {
187-
0x00000000000C1000ULL, /* pixel gen controller A */
188-
0x00000000000C3000ULL, /* pixel gen controller B */
189-
0x00000000000C5000ULL /* pixel gen controller C */
190-
};
98+
extern const hrt_address PIXELGEN_CTRL_BASE[N_PIXELGEN_ID];
19199

192100
/* Stream2MMIO, part of the Input System 2401 */
193-
static const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID] = {
194-
0x00000000000C0C00ULL, /* stream2mmio controller A */
195-
0x00000000000C2C00ULL, /* stream2mmio controller B */
196-
0x00000000000C4C00ULL /* stream2mmio controller C */
197-
};
101+
extern const hrt_address STREAM2MMIO_CTRL_BASE[N_STREAM2MMIO_ID];
198102

199103
#endif /* __SYSTEM_LOCAL_H_INCLUDED__ */

0 commit comments

Comments
 (0)