From patchwork Thu Oct 25 15:29:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10656047 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D61014DE for ; Thu, 25 Oct 2018 15:32:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B7F92BD4C for ; Thu, 25 Oct 2018 15:32:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F3AA72BD66; Thu, 25 Oct 2018 15:32:34 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9758A2BD4C for ; Thu, 25 Oct 2018 15:32:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=A6M1yl+Vp913xlM2NDevmFI2qJkyIXqmWmqi3TEOUnA=; b=OH2QHIefAyg8RFQLQ2ZZ0b9TSK SwyK7KN9Mcmodm63NgbhVP/M3bcuJ+rm9oN/SwqafSV/Dothhc1Q8QDlAILT1pX28V/I/Udcwuhu3 2j15cil3K2a31v7LNOfgKt95MtZsHkkGvif7iIi6N4zP5g4fCYjN7iaFg5CQCY7VAOGc+6wAdM9ae i6rUl6GFS5xUzbwekJOMfNgqli9nHQMFoS9TpnsAAdr4a4IMwjTqNFI/ZPmrzCFTU7KT7j50K2RyZ TxgkbVDhmJa+0VHZxFth9AS6SsBHb16CYeon5WCBL0v4ZTyntRztvQVA/lIUenSBuRYy+0VvSSfet mGIvjO1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFhcS-0001HO-EZ; Thu, 25 Oct 2018 15:32:20 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gFhae-0000Lo-Qz; Thu, 25 Oct 2018 15:30:34 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MqbDs-1fkkUq1YTg-00mej6; Thu, 25 Oct 2018 17:30:08 +0200 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MqbDs-1fkkUq1YTg-00mej6; Thu, 25 Oct 2018 17:30:08 +0200 From: Stefan Wahren To: Eric Anholt , gregkh@linuxfoundation.org, Dave Stevenson Subject: [PATCH RFC 05/11] staging: vchiq_arm: Fix camera device registration Date: Thu, 25 Oct 2018 17:29:29 +0200 Message-Id: <1540481375-15952-6-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com> References: <1540481375-15952-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:eXM8wIsYDFj907gifn9aReZZheRe6ZU/R4ic5ERp58eKGEbsteD CkhJ7dYD52n5rIELRbXxApodKIuW1oGIzeLEC3U5q8NbWCP1PJf+CPWp4QVW6Br7u4qA3Zk mLsgbTWyrOgSNHATxnrWsx3ISIuyUCdLbGIryIvh3I0bynZzEgqZyqOEDaiayHIR2k+q1lZ ekCorg3x4NfoCyJWDXnPA== X-UI-Out-Filterresults: notjunk:1;V01:K0:nuW57etu7/M=:5pjngzlVFlHcgxH8YP46ev xO2skvY4uwEf63sAIyllM3DdPzHF+aZzx7vWnohTze4vl6tbNT+N20vr7VBaQ3XIrS+W/sObb im40VhcLuT9fZiA+CybPEtKEF3cf9RYCMqVtum9qGWedsZrV7XOomMh9y1sVyiW7GAoibmQ2j 738RpZMWOzHxWgoEtDFA8rrE/unI9XcaxSP/TLr10hJxn9yo1bv6U4d50/TX4Zdn7wIWzXILd rvxR/njfN30zn1GpGPKxwoM6K9Czc96ODN3iq/F2+hEGlPiSAjcLcAX8gbOfsawfSQ4w/oDMK lAgX9y4QxNIuFFL/xhWG75UWaBzRuq7/mFkEb+NoRkoOBWivAPgQNLy0D8o6hwKV6jePtgMoE XW1hbLLQUGMzAEGEeO77TbbH/5Ev4g+oC1elWdQoLUhokddUOSYvqaNXxuvfueRU5tn66Afmn QFe5tW5GVR5DrurJFqogLgN6XHG7zLO96U6JV8CWMIV7cvs0HsI+lRKfznQPnpunoDuHZg82R cVONtARucWAJp9k83s0LyQOO2vwor/ZB9utN4be03F7cXB+4aa5l9bqgSJ3woVw9bd66UMqO+ z7aXZDXWMB8kUV4cbfR8O/Ts3wX3QYBOyFmQVnXnreUQOGpSEzbOgVQ0FddZ//HS2BIEqNMzD k/tuAymzBQWPOpHfwv0RW5GvbiVHvPJkzaDM/cJf5BG11eK3f1Jvu//mDBom6YY78W7s= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181025_083029_212718_59E2DE9B X-CRM114-Status: GOOD ( 13.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , linux-arm-kernel@lists.infradead.org, tiwai@suse.de, mikebrady@eircom.net, pbrobinson@gmail.com, nsaenzjulienne@suse.de, linux-rpi-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since the camera driver isn't probed via DT, we need to properly setup DMA. Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index d7d7c2f0..778a252 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include "vchiq_core.h" @@ -3588,6 +3589,21 @@ static const struct of_device_id vchiq_of_match[] = { }; MODULE_DEVICE_TABLE(of, vchiq_of_match); +static struct platform_device * +vchiq_register_child(struct platform_device *pdev, const char *name) +{ + struct platform_device_info pdevinfo; + + memset(&pdevinfo, 0, sizeof(pdevinfo)); + + pdevinfo.parent = &pdev->dev; + pdevinfo.name = name; + pdevinfo.id = PLATFORM_DEVID_NONE; + pdevinfo.dma_mask = DMA_BIT_MASK(32); + + return platform_device_register_full(&pdevinfo); +} + static int vchiq_probe(struct platform_device *pdev) { struct device_node *fw_node; @@ -3653,9 +3669,7 @@ static int vchiq_probe(struct platform_device *pdev) VCHIQ_VERSION, VCHIQ_VERSION_MIN, MAJOR(vchiq_devid), MINOR(vchiq_devid)); - bcm2835_camera = platform_device_register_data(&pdev->dev, - "bcm2835-camera", -1, - NULL, 0); + bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); return 0;