From patchwork Sun Oct 17 07:48:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Herrenschmidt X-Patchwork-Id: 12564089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62417C433EF for ; Sun, 17 Oct 2021 07:53:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBFF661050 for ; Sun, 17 Oct 2021 07:53:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CBFF661050 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:58378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mc0yk-00020V-Uq for qemu-devel@archiver.kernel.org; Sun, 17 Oct 2021 03:53:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60512) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mc0wQ-0007rl-Bw; Sun, 17 Oct 2021 03:50:46 -0400 Received: from gate.crashing.org ([63.228.1.57]:35542) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mc0wN-00037R-Ia; Sun, 17 Oct 2021 03:50:45 -0400 Received: from ip6-localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 19H7mafh021692; Sun, 17 Oct 2021 02:48:37 -0500 Message-ID: <436e3f7b8f6d989a01ad0d8b9b226cbcbe0208c0.camel@kernel.crashing.org> Subject: [PATCH 2/2] hw/misc/bcm2835_property: Add dummy Get/Set GPIO virt buf messages From: Benjamin Herrenschmidt To: qemu-devel@nongnu.org Date: Sun, 17 Oct 2021 18:48:36 +1100 User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Received-SPF: pass client-ip=63.228.1.57; envelope-from=benh@kernel.crashing.org; helo=gate.crashing.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-arm@nongnu.org, Alex =?iso-8859-1?q?Benn=E9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Without these the RaspiOS kernel tries to ioremap some bogus address and dumps a backtrace in the console at boot. These work around it. The virt-gpio driver still fails to initialize but much more cleanly Signed-off-by: Benjamin Herrenschmidt --- hw/misc/bcm2835_property.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c index b958fa6a5c..62037c0630 100644 --- a/hw/misc/bcm2835_property.c +++ b/hw/misc/bcm2835_property.c @@ -274,6 +274,13 @@ static void bcm2835_property_mbox_push(BCM2835PropertyState *s, uint32_t value) resplen = 4; break; + case 0x00048020: /* Set GPIO virt buf */ + /* fall through */ + case 0x00040010: /* Get GPIO virt buf */ + stl_le_phys(&s->dma_as, value + 12, 0); + resplen = 4; + break; + case 0x00060001: /* Get DMA channels */ /* channels 2-5 */ stl_le_phys(&s->dma_as, value + 12, 0x003C);