From patchwork Sat Mar 14 17:27:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 11438371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7110D913 for ; Sat, 14 Mar 2020 17:33:09 +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 06A9A2072A for ; Sat, 14 Mar 2020 17:33:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AoySPURP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06A9A2072A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:46830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDAeq-00083w-1s for patchwork-qemu-devel@patchwork.kernel.org; Sat, 14 Mar 2020 13:33:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43102) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDAZj-00082t-84 for qemu-devel@nongnu.org; Sat, 14 Mar 2020 13:27:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDAZi-00065i-5T for qemu-devel@nongnu.org; Sat, 14 Mar 2020 13:27:51 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:46700) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jDAZh-00061R-VS; Sat, 14 Mar 2020 13:27:50 -0400 Received: by mail-pf1-x444.google.com with SMTP id c19so7217362pfo.13; Sat, 14 Mar 2020 10:27:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=2n/COS3qYgLsHbDGJU6WOfdiW+A/GtOTi3uv6vUIC3g=; b=AoySPURPuyVp2LwWXvkOn2cxOBeeTh6zfa6lXZOsVNCagJDUg7XRbSGlxYfPNr28Fj edKcVq40zFd1SRhRy5J5/X67SEPROC9LWyPKmQd5a352cILk31JgAyTOwKZzPIic9/WA v3GB+ScypneSOBGBdwI0ZxarqsjOZoIu4AMc0fT3JGV0KYkcdjbtMh4TrzAjzIAqCTsp GMtgZ6WoELZap5xp/saBu89aA0PfMkL5EhkZ9wWgtztiVWEu1+MoZgfka/ATHQDUlQ8y XJcN9Pk/ICFwnwSvk4/FTsRzHac+eKVeXMK49fma7viqguBORKjJrorfu+5dHc0WKdZ2 0e1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=2n/COS3qYgLsHbDGJU6WOfdiW+A/GtOTi3uv6vUIC3g=; b=U48AjTZSCRvuYAUeG861bbeb6UTuyVBcOe7mtd2GloZd5gD7NdWQZ4MAPEzbE0QTry vm3+MbEa01qLIBIzsXhFqiDn6jXLhspcn1ChQzMIhM02BUyJwR2vYCwHXGHc42qER++r Rdf8hF7sa2XhZu5yrARsjPH/U1CQERqKLi/xFh0l3/F6SFZ0Ux8lUnFRrqV4+BMl0GxJ hORnP3+U40mjPzwRue56pCNPjpsTEqEGcLpzq2Nva3SA/FtcN2O/WQ1Ozgxxbv/Qdson d2ic1g18UQzx6R+EOCtXLSPvfnti4612UdXHl/VJqgqMoXKb9Bk8b13uYAC0iyx/b3Kx cw6Q== X-Gm-Message-State: ANhLgQ09MYwUjeMtpnERlgQ/BoWw69MbeTyuEd4agXIuqkCCkDYNCDSf BBnHS1fd7GEOu7/rmzmiidI= X-Google-Smtp-Source: ADFU+vsyrtRKvB7VzSW3PqpUQXMEXMCTxtz7wWpN5HWmYnmtcIWYwm/b9Jitx3ey8yeBbP1kTL+XGQ== X-Received: by 2002:a62:447:: with SMTP id 68mr19788701pfe.174.1584206869187; Sat, 14 Mar 2020 10:27:49 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id k8sm25559727pfk.1.2020.03.14.10.27.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 14 Mar 2020 10:27:48 -0700 (PDT) From: Guenter Roeck To: Peter Maydell Subject: [PATCH 7/8] hw/arm/fsl-imx7: Instantiate various unimplemented devices Date: Sat, 14 Mar 2020 10:27:35 -0700 Message-Id: <20200314172736.24528-8-linux@roeck-us.net> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200314172736.24528-1-linux@roeck-us.net> References: <20200314172736.24528-1-linux@roeck-us.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 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: Andrey Smirnov , qemu-devel@nongnu.org, Jean-Christophe Dubois , qemu-arm@nongnu.org, Peter Chubb , Guenter Roeck Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Instantiating PWM, CAN, CAAM, and OCOTP devices is necessary to avoid crashes when booting mainline Linux. Signed-off-by: Guenter Roeck --- hw/arm/fsl-imx7.c | 24 ++++++++++++++++++++++++ include/hw/arm/fsl-imx7.h | 16 ++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/hw/arm/fsl-imx7.c b/hw/arm/fsl-imx7.c index 119b281a50..29382776b2 100644 --- a/hw/arm/fsl-imx7.c +++ b/hw/arm/fsl-imx7.c @@ -459,6 +459,30 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp) */ create_unimplemented_device("sdma", FSL_IMX7_SDMA_ADDR, FSL_IMX7_SDMA_SIZE); + /* + * CAAM + */ + create_unimplemented_device("caam", FSL_IMX7_CAAM_ADDR, FSL_IMX7_CAAM_SIZE); + + /* + * PWM + */ + create_unimplemented_device("pwm1", FSL_IMX7_PWM1_ADDR, FSL_IMX7_PWMn_SIZE); + create_unimplemented_device("pwm2", FSL_IMX7_PWM2_ADDR, FSL_IMX7_PWMn_SIZE); + create_unimplemented_device("pwm3", FSL_IMX7_PWM3_ADDR, FSL_IMX7_PWMn_SIZE); + create_unimplemented_device("pwm4", FSL_IMX7_PWM4_ADDR, FSL_IMX7_PWMn_SIZE); + + /* + * CAN + */ + create_unimplemented_device("can1", FSL_IMX7_CAN1_ADDR, FSL_IMX7_CANn_SIZE); + create_unimplemented_device("can2", FSL_IMX7_CAN2_ADDR, FSL_IMX7_CANn_SIZE); + + /* + * OCOTP + */ + create_unimplemented_device("octop", FSL_IMX7_OCOTP_ADDR, + FSL_IMX7_OCOTP_SIZE); object_property_set_bool(OBJECT(&s->gpr), true, "realized", &error_abort); diff --git a/include/hw/arm/fsl-imx7.h b/include/hw/arm/fsl-imx7.h index 3a0041c4c2..47826da2b7 100644 --- a/include/hw/arm/fsl-imx7.h +++ b/include/hw/arm/fsl-imx7.h @@ -113,6 +113,9 @@ enum FslIMX7MemoryMap { FSL_IMX7_IOMUXC_GPR_ADDR = 0x30340000, FSL_IMX7_IOMUXCn_SIZE = 0x1000, + FSL_IMX7_OCOTP_ADDR = 0x30350000, + FSL_IMX7_OCOTP_SIZE = 0x10000, + FSL_IMX7_ANALOG_ADDR = 0x30360000, FSL_IMX7_SNVS_ADDR = 0x30370000, FSL_IMX7_CCM_ADDR = 0x30380000, @@ -124,11 +127,24 @@ enum FslIMX7MemoryMap { FSL_IMX7_ADC2_ADDR = 0x30620000, FSL_IMX7_ADCn_SIZE = 0x1000, + FSL_IMX7_PWM1_ADDR = 0x30660000, + FSL_IMX7_PWM2_ADDR = 0x30670000, + FSL_IMX7_PWM3_ADDR = 0x30680000, + FSL_IMX7_PWM4_ADDR = 0x30690000, + FSL_IMX7_PWMn_SIZE = 0x10000, + FSL_IMX7_PCIE_PHY_ADDR = 0x306D0000, FSL_IMX7_PCIE_PHY_SIZE = 0x10000, FSL_IMX7_GPC_ADDR = 0x303A0000, + FSL_IMX7_CAAM_ADDR = 0x30900000, + FSL_IMX7_CAAM_SIZE = 0x40000, + + FSL_IMX7_CAN1_ADDR = 0x30A00000, + FSL_IMX7_CAN2_ADDR = 0x30A10000, + FSL_IMX7_CANn_SIZE = 0x10000, + FSL_IMX7_I2C1_ADDR = 0x30A20000, FSL_IMX7_I2C2_ADDR = 0x30A30000, FSL_IMX7_I2C3_ADDR = 0x30A40000,