From patchwork Mon Mar 26 21:10:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10308685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D0E62600CC for ; Mon, 26 Mar 2018 21:11:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9347298B7 for ; Mon, 26 Mar 2018 21:11:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD6AC298BC; Mon, 26 Mar 2018 21:11:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00EC8298B8 for ; Mon, 26 Mar 2018 21:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752088AbeCZVLD (ORCPT ); Mon, 26 Mar 2018 17:11:03 -0400 Received: from osg.samsung.com ([64.30.133.232]:54350 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752042AbeCZVLB (ORCPT ); Mon, 26 Mar 2018 17:11:01 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 524283330B; Mon, 26 Mar 2018 14:11:01 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k17N0VuGHFmX; Mon, 26 Mar 2018 14:11:00 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [179.95.60.72]) by osg.samsung.com (Postfix) with ESMTPSA id 4D67F3329C; Mon, 26 Mar 2018 14:10:55 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f0ZOG-00075A-M8; Mon, 26 Mar 2018 17:10:52 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Alan Cox , Sakari Ailus , Greg Kroah-Hartman , Andy Shevchenko , Georgiana Chelu , Amitoj Kaur Chawla , Hans de Goede , Andrew Morton , Arushi Singhal , devel@driverdev.osuosl.org Subject: [PATCH 08/18] media: staging: atomisp: remove unused set_pd_base() Date: Mon, 26 Mar 2018 17:10:41 -0400 Message-Id: <4a974da154f40008d58a98bf736fd3314dffdea7.1522098456.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> References: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> In-Reply-To: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> References: <8548f74ae86b66d041e7505549453fba9fb9e63d.1522098456.git.mchehab@s-opensource.com> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Mauro Carvalho Chehab --- .../staging/media/atomisp/pci/atomisp2/atomisp_compat.h | 2 -- .../media/atomisp/pci/atomisp2/atomisp_compat_css20.c | 4 ---- .../media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c | 13 ++----------- .../staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c | 15 --------------- 5 files changed, 3 insertions(+), 35 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h index 3ef850cd25bd..398ee02229f8 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat.h @@ -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); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c index 7621b4537147..bbed1ed02074 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c @@ -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 diff --git a/drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h b/drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h index 560014add005..4b2d94a37ea1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/include/mmu/isp_mmu.h @@ -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. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c b/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c index f21075c1e503..198f29f4a324 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/mmu/isp_mmu.c @@ -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; } diff --git a/drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c b/drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c index c59bcc982966..4cbf907bd07b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/mmu/sh_mmu_mrfld.c @@ -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,