From patchwork Thu Apr 19 11:15:48 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: 133758 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp508320ljf; Thu, 19 Apr 2018 04:16:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/8ft4RgxmGQeyd/2uWKTKpo7MS1scryaZqk+FjpMZiRDSwyTbfDqKehhnoVXv1bqjMVRIw X-Received: by 10.98.34.145 with SMTP id p17mr5545193pfj.236.1524136580529; Thu, 19 Apr 2018 04:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524136580; cv=none; d=google.com; s=arc-20160816; b=D00q4jMNoWYV7E2jM2bDjjaYe3L/hlqHiKm03HK6Zml3FGGUiGeoR4zNEcU+KVVojN KbCLY6aAGGweeYVR/jzLEA0IcMZZjjZ7wNsWTmWyiYBHJWRTPMLlixE+nRQANjiU9ehQ Am2KikJG6stGNgYlm8Bw3bM7KB934L5HbL4wRB3AXGUlNtVVSPlbqDFp1SazmDBOABL+ h1uEvJ3hEhTcH6Hw+F6/E47t44/UlBYYXJeEtRxDVmcB4oraxao+Qfx6Z19F/Wja61gL y+LY0bDJqfv7HMJ1KHOgjAYG1KIh3B4rFQP+HI4BJ1yMY3HwvhvKaNtV+7QNhx9iL3qq ZMRg== 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=ADRl8vGZonX3bbIU/IyE6OwSRJvuXTbBhA0XS7ixVU4=; b=beXHOwH5HD4KBzNHyNMZcMTHdNX3PAt5COuIZyDIJW3cK7XeGnn/BVCBsLNMBd6HU3 0+TA3dvMfQQt4KbyfjW3m45XOWzMQy+W3SYGXtYPtMJheGoxl86YJW9yPtxQslpiJB5A +ld5l56QxRx1+kp2X0QDLg2tMiWbsYMmX35trVCLgaTpuRuTrqLVbKIGDtvuHM26Xtfx DzG+DXDcFarSe67BQ3HbrLDq26bAOxyhqhr19SD4GHDtcwO+DkKRPYJPFTRB0YP4DxIh WewEvpIok1LHl4q1CyxJSC/J6iNDO5pvQ//7aUGS/+4z3IArW8IoEWFvSzVblyMVddY+ aRjw== 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 t15si3070055pfa.170.2018.04.19.04.16.20; Thu, 19 Apr 2018 04:16:20 -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 S1752496AbeDSLQT (ORCPT + 5 others); Thu, 19 Apr 2018 07:16:19 -0400 Received: from osg.samsung.com ([64.30.133.232]:51953 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752456AbeDSLQS (ORCPT ); Thu, 19 Apr 2018 07:16:18 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 6C51132366; Thu, 19 Apr 2018 04:16:18 -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 oNLz586pWENH; Thu, 19 Apr 2018 04:16:11 -0700 (PDT) Received: from smtp.s-opensource.com (177.41.102.122.dynamic.adsl.gvt.net.br [177.41.102.122]) by osg.samsung.com (Postfix) with ESMTPSA id C748532327; Thu, 19 Apr 2018 04:16:02 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f97Xk-00045W-Mz; Thu, 19 Apr 2018 07:16:00 -0400 From: Mauro Carvalho Chehab Cc: Arnd Bergmann , Linux Media Mailing List , Mauro Carvalho Chehab , Laurent Pinchart , Hans Verkuil , Stanimir Varbanov , Sakari Ailus , Philipp Zabel , Ramesh Shanmugasundaram , Jacob Chen , Mauro Carvalho Chehab Subject: [PATCH RESEND 3/6] media: omap3isp: Allow it to build with COMPILE_TEST Date: Thu, 19 Apr 2018 07:15:48 -0400 Message-Id: <4a5990042cb951771498bdbb79e9e6ca4114942d.1524136402.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 Acked-by: Sakari Ailus 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 Acked-by: Hans Verkuil diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 1ee915b794c0..e3229f7baed1 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 } /*