From patchwork Tue Apr 17 10:20:13 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: 133532 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp4542009ljb; Tue, 17 Apr 2018 03:20:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+IsZQwLZraIlYWZPc9E/BKPpg34Pw9CAYLFGq2tpQlmsbs+WwSECH1qagzK+0zA5h4dQa/ X-Received: by 10.99.165.79 with SMTP id r15mr1344287pgu.236.1523960429584; Tue, 17 Apr 2018 03:20:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523960429; cv=none; d=google.com; s=arc-20160816; b=fc2DDsL1zmGdLlYlCHvnSXDfnIzCQYratYEiQc/Obvgtg4KnL7kp5Nu0tgs1tEPddg 4icZOY/Z1dljVxJz2P+8Lr6wzjwaIay9qzzMwCmM66ElGJZa+4iW7F+JcyMTbODBxbMg DrlDHPQkY/miYmwuf/oNUm1YV9Rf46HRkf6vHZt6Gk8kfAvv2eMPMfUz48eKaO5AO6+y PFW7tClhvT0EoN28WcbHap94a5vuPLZ5x/qSn83j5dRciRvcawoGIWUvLI3qXRs8Iepj 7R/52g5niSa1iZzfjOJkpm0DBcvrkj/DgTg6D4QfehElrHrAt/gfqvj5NItF4ufUCeEc 902Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:from :arc-authentication-results; bh=6fbxvsg7+J+6MsyAaoQu8XlUoAfyF1Hrlb2TEdiY/u8=; b=qTjzrbohRDVq/T2mz1twUAbZMVtvcmhk002n8jSPo2pdIYNNrjwejc/SOTiWw0q4i0 /w9P4ozweGmZosK6IFLfozheJKDNv1j5JNnj5xFA0Y5jkeAguqOi4OPfOpx5wEzK2npV 2wBwPtU76w/QZk2XSovqewehPArhCt3ynC1cZHdmbZAPq1TqUDiZsPpWCRLzEoPhkBDO R5xWD4evZQogYMnHhvigl/7QkVKm/T0WH+7zPlRiWeA+ft5HHBCMi0jALQOgQARUXmRa HUjEfrll9sBGCoXeaXsMp+wrjdPhPk6r+dBIR9+AKqZu/cYeighE/ccl6ZSSfUD6GF/X gl0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186si12602690pfb.284.2018.04.17.03.20.29; Tue, 17 Apr 2018 03:20:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752560AbeDQKUY (ORCPT + 5 others); Tue, 17 Apr 2018 06:20:24 -0400 Received: from osg.samsung.com ([64.30.133.232]:56809 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751230AbeDQKUW (ORCPT ); Tue, 17 Apr 2018 06:20:22 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 2905629816; Tue, 17 Apr 2018 03:20:22 -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 el-wpruG0YEb; Tue, 17 Apr 2018 03:20:21 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [201.86.164.1]) by osg.samsung.com (Postfix) with ESMTPSA id D0A01297E3; Tue, 17 Apr 2018 03:20:18 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f8Nii-0008qh-3P; Tue, 17 Apr 2018 06:20:16 -0400 From: Mauro Carvalho Chehab Cc: Arnd Bergmann , Linux Media Mailing List , Mauro Carvalho Chehab , Laurent Pinchart , Hans Verkuil , Stanimir Varbanov , Philipp Zabel , Ramesh Shanmugasundaram , Jacob Chen , Mauro Carvalho Chehab Subject: [PATCH 3/5] media: omap3isp: allow it to build with COMPILE_TEST Date: Tue, 17 Apr 2018 06:20:13 -0400 Message-Id: <2c20d94e468837a035a30c84723442769a306083.1523960171.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: 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 From: Arnd Bergmann There aren't much things required for it to build with COMPILE_TEST. It just needs to not compile the code that depends on arm-specific iommu implementation. Signed-off-by: Arnd Bergmann Co-developed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/Kconfig | 6 ++---- drivers/media/platform/omap3isp/isp.c | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) -- 2.14.3 diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 1ee915b794c0..2757b621091c 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -63,12 +63,10 @@ config VIDEO_MUX config VIDEO_OMAP3 tristate "OMAP 3 Camera support" depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API - depends on ARCH_OMAP3 || COMPILE_TEST - depends on ARM + depends on ((ARCH_OMAP3 && OMAP_IOMMU) || COMPILE_TEST) depends on COMMON_CLK depends on HAS_DMA && OF - depends on OMAP_IOMMU - select ARM_DMA_USE_IOMMU + select ARM_DMA_USE_IOMMU if OMAP_IOMMU select VIDEOBUF2_DMA_CONTIG select MFD_SYSCON select V4L2_FWNODE diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index 16c50099cccd..b8c8761a76b6 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -61,7 +61,9 @@ #include #include +#ifdef CONFIG_ARM_DMA_USE_IOMMU #include +#endif #include #include @@ -1938,12 +1940,15 @@ static int isp_initialize_modules(struct isp_device *isp) static void isp_detach_iommu(struct isp_device *isp) { +#ifdef CONFIG_ARM_DMA_USE_IOMMU arm_iommu_release_mapping(isp->mapping); isp->mapping = NULL; +#endif } static int isp_attach_iommu(struct isp_device *isp) { +#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping; int ret; @@ -1972,6 +1977,9 @@ static int isp_attach_iommu(struct isp_device *isp) error: isp_detach_iommu(isp); return ret; +#else + return -ENODEV; +#endif } /*