[media] omap3isp: Replace mmio_base_phys array with the histogram block base
authorSakari Ailus <sakari.ailus@iki.fi>
Wed, 25 Mar 2015 22:57:33 +0000 (19:57 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 2 Apr 2015 19:42:52 +0000 (16:42 -0300)
Only the histogram sub-block driver uses the physical address. Do not store
it for other sub-blocks.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/omap3isp/isp.c
drivers/media/platform/omap3isp/isp.h
drivers/media/platform/omap3isp/isphist.c

index c0453187dfcbbfd4caf2a11fcc9a32d6c948c934..68d7edfc6553dad76d27ed56770fe28529eb804d 100644 (file)
@@ -2247,7 +2247,8 @@ static int isp_map_mem_resource(struct platform_device *pdev,
        if (IS_ERR(isp->mmio_base[res]))
                return PTR_ERR(isp->mmio_base[res]);
 
-       isp->mmio_base_phys[res] = mem->start;
+       if (res == OMAP3_ISP_IOMEM_HIST)
+               isp->mmio_hist_base_phys = mem->start;
 
        return 0;
 }
index b932a6f22b52507cbda685c088b70904cffcc311..9535524a21f6afa066e6ec439e4ad05ab1f1c8fb 100644 (file)
@@ -138,8 +138,8 @@ struct isp_xclk {
  * @irq_num: Currently used IRQ number.
  * @mmio_base: Array with kernel base addresses for ioremapped ISP register
  *             regions.
- * @mmio_base_phys: Array with physical L4 bus addresses for ISP register
- *                  regions.
+ * @mmio_hist_base_phys: Physical L4 bus address for ISP hist block register
+ *                      region.
  * @mapping: IOMMU mapping
  * @stat_lock: Spinlock for handling statistics
  * @isp_mutex: Mutex for serializing requests to ISP.
@@ -175,7 +175,7 @@ struct isp_device {
        unsigned int irq_num;
 
        void __iomem *mmio_base[OMAP3_ISP_IOMEM_LAST];
-       unsigned long mmio_base_phys[OMAP3_ISP_IOMEM_LAST];
+       unsigned long mmio_hist_base_phys;
 
        struct dma_iommu_mapping *mapping;
 
index 738b946ddb37ad511c87101974dac0fb141c1f5f..7138b043a4aa8eec4c373a8eb4ddbdd093ad5433 100644 (file)
@@ -193,8 +193,7 @@ static int hist_buf_dma(struct ispstat *hist)
        omap3isp_flush(hist->isp);
 
        memset(&cfg, 0, sizeof(cfg));
-       cfg.src_addr = hist->isp->mmio_base_phys[OMAP3_ISP_IOMEM_HIST]
-                    + ISPHIST_DATA;
+       cfg.src_addr = hist->isp->mmio_hist_base_phys + ISPHIST_DATA;
        cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
        cfg.src_maxburst = hist->buf_size / 4;