From patchwork Thu Apr 5 20:29:32 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: 10325259 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 750EB6032A for ; Thu, 5 Apr 2018 20:30:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 67A5B29381 for ; Thu, 5 Apr 2018 20:30:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F2EA8293F9; Thu, 5 Apr 2018 20:30:09 +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 20AE0293D6 for ; Thu, 5 Apr 2018 20:30:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759AbeDEUaD (ORCPT ); Thu, 5 Apr 2018 16:30:03 -0400 Received: from osg.samsung.com ([64.30.133.232]:60951 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbeDEU37 (ORCPT ); Thu, 5 Apr 2018 16:29:59 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 91D4E30CC1; Thu, 5 Apr 2018 13:29:59 -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 iXwlEs7AxWTc; Thu, 5 Apr 2018 13:29:57 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [177.133.19.105]) by osg.samsung.com (Postfix) with ESMTPSA id E192B30C0C; Thu, 5 Apr 2018 13:29:49 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1f4BVz-0006KD-4I; Thu, 05 Apr 2018 16:29:47 -0400 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab , Hans Verkuil , Arnd Bergmann , Stanimir Varbanov , Benjamin Gaignard , Philipp Zabel , Ramesh Shanmugasundaram , Al Viro , Bhumika Goyal , Geliang Tang , Kees Cook Subject: [PATCH v2 05/19] media: fsl-viu: allow building it with COMPILE_TEST Date: Thu, 5 Apr 2018 16:29:32 -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 There aren't many things that would be needed to allow it to build with compile test. Add the needed bits. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/Kconfig | 2 +- drivers/media/platform/fsl-viu.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 03c9dfeb7781..e6eb1eb776e1 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -42,7 +42,7 @@ config VIDEO_SH_VOU config VIDEO_VIU tristate "Freescale VIU Video Driver" - depends on VIDEO_V4L2 && PPC_MPC512x + depends on VIDEO_V4L2 && (PPC_MPC512x || COMPILE_TEST) select VIDEOBUF_DMA_CONTIG default y ---help--- diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 9abe79779659..466053e00378 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -36,6 +36,14 @@ #define DRV_NAME "fsl_viu" #define VIU_VERSION "0.5.1" +/* Allow building this driver with COMPILE_TEST */ +#ifndef CONFIG_PPC_MPC512x +#define NO_IRQ 0 + +#define out_be32(v, a) writel(a, v) +#define in_be32(a) readl(a) +#endif + #define BUFFER_TIMEOUT msecs_to_jiffies(500) /* 0.5 seconds */ #define VIU_VID_MEM_LIMIT 4 /* Video memory limit, in Mb */