]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: staging: atomisp: remove unused set_pd_base()
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Mon, 26 Mar 2018 18:22:32 +0000 (14:22 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 4 Apr 2018 11:36:26 +0000 (07:36 -0400)
There's an implementation for set_pd_base at sh_mmu logic
with is said to be mandatory. However, the implementation
ends by calling a routine that does nothing.

So get rid of this entire nonsense.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h
drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c
drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h
drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c
drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c

index 3ef850cd25bdc09ef151f9f1a712325662bddaa3..398ee02229f8f6dfcb291ba78e734abcf9b59563 100644 (file)
@@ -182,8 +182,6 @@ void atomisp_css_mmu_invalidate_cache(void);
 
 void atomisp_css_mmu_invalidate_tlb(void);
 
-void atomisp_css_mmu_set_page_table_base_index(unsigned long base_index);
-
 int atomisp_css_start(struct atomisp_sub_device *asd,
                      enum atomisp_css_pipe_id pipe_id, bool in_reset);
 
index 7621b45371472bc70ef756ca2810e14795740b6e..bbed1ed02074f400a3097989c1b12b6c163de261 100644 (file)
@@ -1159,10 +1159,6 @@ void atomisp_css_mmu_invalidate_tlb(void)
        ia_css_mmu_invalidate_cache();
 }
 
-void atomisp_css_mmu_set_page_table_base_index(unsigned long base_index)
-{
-}
-
 /*
  * Check whether currently running MIPI buffer size fulfill
  * the requirement of the stream to be run
index 560014add0057ad8159765f14d94a9538a98710b..4b2d94a37ea1992c6958364c5f43fd53f49bcbba 100644 (file)
@@ -80,12 +80,10 @@ struct isp_mmu_client {
        unsigned int null_pte;
 
        /*
-        * set/get page directory base address (physical address).
+        * get page directory base address (physical address).
         *
         * must be provided.
         */
-       int (*set_pd_base) (struct isp_mmu *mmu,
-                       phys_addr_t pd_base);
        unsigned int (*get_pd_base) (struct isp_mmu *mmu, phys_addr_t pd_base);
        /*
         * callback to flush tlb.
index f21075c1e5032036f9d79d970672941dcbcad290..198f29f4a32465349a4c97a286bbac5258cb7265 100644 (file)
@@ -344,13 +344,6 @@ static int mmu_map(struct isp_mmu *mmu, unsigned int isp_virt,
                /*
                 * setup L1 page table physical addr to MMU
                 */
-               ret = mmu->driver->set_pd_base(mmu, l1_pt);
-               if (ret) {
-                       dev_err(atomisp_dev,
-                                "set page directory base address fail.\n");
-                       mutex_unlock(&mmu->pt_mutex);
-                       return ret;
-               }
                mmu->base_address = l1_pt;
                mmu->l1_pte = isp_pgaddr_to_pte_valid(mmu, l1_pt);
                memset(mmu->l2_pgt_refcount, 0, sizeof(int) * ISP_L1PT_PTES);
@@ -531,10 +524,8 @@ int isp_mmu_init(struct isp_mmu *mmu, struct isp_mmu_client *driver)
 
        mmu->driver = driver;
 
-       if (!driver->set_pd_base || !driver->tlb_flush_all) {
-               dev_err(atomisp_dev,
-                           "set_pd_base or tlb_flush_all operation "
-                            "not provided.\n");
+       if (!driver->tlb_flush_all) {
+               dev_err(atomisp_dev, "tlb_flush_all operation not provided.\n");
                return -EINVAL;
        }
 
index c59bcc9829667828734a2d599175180808d1c2f1..4cbf907bd07b5b26bcbe8956bdf6b0b8c425e616 100644 (file)
@@ -40,20 +40,6 @@ static phys_addr_t sh_pte_to_phys(struct isp_mmu *mmu,
        return (phys_addr_t)((pte & ~mask) << ISP_PAGE_OFFSET);
 }
 
-/*
- * set page directory base address (physical address).
- *
- * must be provided.
- */
-static int sh_set_pd_base(struct isp_mmu *mmu,
-                         phys_addr_t phys)
-{
-       unsigned int pte = sh_phys_to_pte(mmu, phys);
-       /*mmgr_set_base_address(HOST_ADDRESS(pte));*/
-       atomisp_css_mmu_set_page_table_base_index(HOST_ADDRESS(pte));
-       return 0;
-}
-
 static unsigned int sh_get_pd_base(struct isp_mmu *mmu,
                                   phys_addr_t phys)
 {
@@ -81,7 +67,6 @@ struct isp_mmu_client sh_mmu_mrfld = {
        .name = "Silicon Hive ISP3000 MMU",
        .pte_valid_mask = MERR_VALID_PTE_MASK,
        .null_pte = ~MERR_VALID_PTE_MASK,
-       .set_pd_base = sh_set_pd_base,
        .get_pd_base = sh_get_pd_base,
        .tlb_flush_all = sh_tlb_flush,
        .phys_to_pte = sh_phys_to_pte,