From patchwork Fri Apr 20 17:42:47 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: 10353399 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 BA3946023A for ; Fri, 20 Apr 2018 17:43:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB397284FC for ; Fri, 20 Apr 2018 17:43:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9FEB02876B; Fri, 20 Apr 2018 17:43:14 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 45C7A284FC for ; Fri, 20 Apr 2018 17:43:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753419AbeDTRnI (ORCPT ); Fri, 20 Apr 2018 13:43:08 -0400 Received: from osg.samsung.com ([64.30.133.232]:42773 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753494AbeDTRnB (ORCPT ); Fri, 20 Apr 2018 13:43:01 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 5911638CFE; Fri, 20 Apr 2018 10:43: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 8woUAmQEnrBd; Fri, 20 Apr 2018 10:43:00 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [179.179.47.30]) by osg.samsung.com (Postfix) with ESMTPSA id AAEC238CB8; Fri, 20 Apr 2018 10:42:57 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f9a3i-0003mP-Sh; Fri, 20 Apr 2018 13:42:54 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Arnd Bergmann , mjpeg-users@lists.sourceforge.net, linux-arch@vger.kernel.org Subject: [PATCH 1/7] asm-generic, media: allow COMPILE_TEST with virt_to_bus Date: Fri, 20 Apr 2018 13:42:47 -0400 Message-Id: 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 X-Virus-Scanned: ClamAV using ClamSMTP The virt_to_bus/bus_to_virt macros are arch-specific. Some archs don't support it. Yet, as it is interesting to allow doing compilation tests on non-ia32/ia64 archs, provide a fallback for such archs. While here, enable COMPILE_TEST for two media drivers that depends on it. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/sta2x11/Kconfig | 4 ++-- drivers/media/pci/zoran/Kconfig | 3 ++- include/asm-generic/io.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig index 7af3f1cbcea8..fb4b4c8ac430 100644 --- a/drivers/media/pci/sta2x11/Kconfig +++ b/drivers/media/pci/sta2x11/Kconfig @@ -1,10 +1,10 @@ config STA2X11_VIP tristate "STA2X11 VIP Video For Linux" - depends on STA2X11 || COMPILE_TEST + depends on (STA2X11 && VIRT_TO_BUS) || COMPILE_TEST depends on HAS_DMA select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT select VIDEOBUF2_DMA_CONTIG - depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS + depends on PCI && VIDEO_V4L2 depends on VIDEO_V4L2_SUBDEV_API depends on I2C help diff --git a/drivers/media/pci/zoran/Kconfig b/drivers/media/pci/zoran/Kconfig index 39ec35bd21a5..5d2678a9e310 100644 --- a/drivers/media/pci/zoran/Kconfig +++ b/drivers/media/pci/zoran/Kconfig @@ -1,6 +1,7 @@ config VIDEO_ZORAN tristate "Zoran ZR36057/36067 Video For Linux" - depends on PCI && I2C_ALGOBIT && VIDEO_V4L2 && VIRT_TO_BUS + depends on PCI && I2C_ALGOBIT && VIDEO_V4L2 + depends on VIRT_TO_BUS || COMPILE_TEST depends on !ALPHA help Say Y for support for MJPEG capture cards based on the Zoran diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h index 66d1d45fa2e1..f448129ad15c 100644 --- a/include/asm-generic/io.h +++ b/include/asm-generic/io.h @@ -1068,7 +1068,7 @@ static inline void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr) } #endif -#ifdef CONFIG_VIRT_TO_BUS +#if defined(CONFIG_VIRT_TO_BUS) || defined(CONFIG_COMPILE_TEST) #ifndef virt_to_bus static inline unsigned long virt_to_bus(void *address) {