From patchwork Tue Apr 8 18:55:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 879041 Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp5636004wrs; Tue, 8 Apr 2025 11:56:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXHMw5x6vLhN1SfyqWpqqMd5m3DXmooVxtf3pT0rnw7ZWmR47id5mDTtF/A7lrAd7sj/JpvAg==@linaro.org X-Google-Smtp-Source: AGHT+IEwtGyLgl93AAaAqjLszUzrxclhxo3j5OflPXAJqnzSLeBDXWFummw7nGuoxnAZQZ5oAZr6 X-Received: by 2002:a05:620a:28c6:b0:7b6:d273:9b4f with SMTP id af79cd13be357-7c79cd35561mr35617985a.11.1744138599235; Tue, 08 Apr 2025 11:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1744138599; cv=none; d=google.com; s=arc-20240605; b=Lk6+HDzY+58G1dzQjgJfbeMZmSxGujUZp4REV5Q72/ZrjjubmpDMjhYKp3tlxA+MFW 6Y/0I8iRxmkd5rTM6lTNkzl6lYOyLdXj8mBMBsiijBdjBMqw+wr5NCeJ0z2kIxRUI0u9 qGwD6RqtO2F2dEMRDUNkCMHR8wQWymBT+BOYN21iWFdExqsCN4r2+mfp+O+I2/0tqsVI 1ObGf1bJL8TfTRZr5maV7k3cODGy+IB5RYVjsrU+CYB+kzFr002HADp9WgaW6GQP1GTh EFoaBt07HUnjlfQ4qNMq1Cj+puZVFgOs0osAHtovPr8qwKtW3yT1ieFkzcdo6IIngGEr cU8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rlcZi+8rtV1kSz292TgUOQ9wapPONbfOMzllPxUmecE=; fh=cDk7++D/I/3SRooQKl7OcV2lbWpwGY1J2zxySNGFTls=; b=Ngm0Mm1gie35r9oqutQY8hj6cfWFJyBesSDRsPsog/rJUecVIDG9BhHompX7cC4vDN HxwjaEJzkN3d90ENuv/3K4xURj+gceEmppYahk8/XR12Q/AuGq4mvfReipm4Pq/I15Ac i4cCTFIWVRrfqCROrn0+u+5UwIm17yFlyyAfUxKk9ByxJXhtvoX69lXw4B4JhoS7xsTc DieurJ8MvCTXPfk0eCsGPAl63QZlG6NE4d5XCNWYyeTe8NM6u2SSdvFhDEC02a6DWMaT 6P9XnhKY1tsx5Cy1iPfEJHO35m1wstky36suUKUDt9xvpBnDGveSEoqR5UkWQxLoPcB+ GrIA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kGK64M4w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c76eac3076si1091455485a.563.2025.04.08.11.56.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Apr 2025 11:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kGK64M4w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u2E7I-0004bc-S7; Tue, 08 Apr 2025 14:56:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u2E7H-0004bH-MR for qemu-devel@nongnu.org; Tue, 08 Apr 2025 14:56:11 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u2E7C-0004FY-PN for qemu-devel@nongnu.org; Tue, 08 Apr 2025 14:56:11 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43cfe574976so41267685e9.1 for ; Tue, 08 Apr 2025 11:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1744138564; x=1744743364; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rlcZi+8rtV1kSz292TgUOQ9wapPONbfOMzllPxUmecE=; b=kGK64M4wXfqtCi/ic0X0ieV2uPfX7j6Sb05H/LR9iDzNZDAqYKx8uOTgk17tukink0 fQU/sf0UGmY+2Z9dtGPm6UQUZtB2lHGaUIHAR+hchA+5/3WxZTaeM883MNFXX9e1MjzN XeOC5fF8QHRvBIouQVOi97/wBSLvi8MM3SlAf6e1QucB93wTXeWfLp4P4Y/e78WJs1M8 h6M2SUeEiYfqCwWTfGf1Np6zJ+9tQJjQV3LqNP4tEEn9DZ0unYo3moRA2qUppRc/y+XA ICZaKFibItoKw+AVfmRN+Khsc2QEl97NNXWidaqd8hSILlTYIo0Hg2DUHVt+9cqXe8c3 lRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744138564; x=1744743364; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rlcZi+8rtV1kSz292TgUOQ9wapPONbfOMzllPxUmecE=; b=PTPXTLnPHpGap1zxGnWSl0k1FBL51vYj2EBBbpfVLce6bOzI0IEK0R2OaooHIuXtEs nwQotyBV0qhxIEubTf9hXqBVub38clW6EeuvLLgeJ1vy8/a9I2x56QN6NzvKTCN6WOyA xH3CJXHSUK3Btgkh2+iYGp2rj11yvcguzw00hZ3s5pr1+1Bhrd3s8CRXRl6B2rVkoh3I OOBV8Vp6JheCb8kSJbrr+xrQU3zLZHbsRtufSMkWcVZvQbtger5e0FK7rHVcNpCF1ipJ PE8B3thQ9F1xtaQPBVhQfwsUcZfyeTL5jMduM1uj4pROIWTsU4e1g8ZuHQB2DLJ/DxG4 I1vA== X-Gm-Message-State: AOJu0YzSIcaU1Qz/f65Tdi+dWfEXgCNMYbMVB03no/+iJgCTg2YOKt+c Oa4HNUMyDj7yYKrDMiIwpVXRAFZ/TmVtu5dN8euTZlSQmw/ZSU5apnMmlJS5L9WO1fdkWRU/Fd+ w8gE= X-Gm-Gg: ASbGncs2jnsN+0SQLRox0Y3BqXDIViZYk72XCbrWKxfzGBsqBV8nDMtgdvDKtJXbA8D RRRC4OiTUAZ9IVMy+EUoRfo0OrEysUVai6gzi6Hlh4Un1Zaizv9BbOyiNju2UdRZ6AuLVq4Gx4/ x2Fp64OnQkVQ0ZhvDo+DvCaWUmPcJjiFLkXjXlQSZEyhuj1ze94Ol+CGb4Hi39OW5kejDaSiux9 +Z0euypXkegOTuC5ut+eJKKNCopN6SDKet5hhskJ8pO8qwOkSjkcYe8McKZ/oxLcRQcJ1I8aVll SuXIDk3Olz7xim/jc641CgB0db6SZCi7KGthD+dAbnV0rSvGOl3EsY8wNOtP9XTX3SzQsCm76hU m7y4epOwMMGGQqcriIsQ= X-Received: by 2002:a05:600c:c08:b0:43c:e6d1:efe7 with SMTP id 5b1f17b1804b1-43f1ed4b44cmr1946615e9.26.1744138564254; Tue, 08 Apr 2025 11:56:04 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c301b816csm15760639f8f.57.2025.04.08.11.56.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 08 Apr 2025 11:56:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Guenter Roeck , Bernhard Beschow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 5/8] hw/arm/imx8mp-evk: Remove unimplemented cpu-idle-states properties from devicetree Date: Tue, 8 Apr 2025 20:55:35 +0200 Message-ID: <20250408185538.85538-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250408185538.85538-1-philmd@linaro.org> References: <20250408185538.85538-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Guenter Roeck The cpu-idle-states property causes a hard boot hang. Rather than documenting the workaround, perform the removal from the devicetree automatically. Signed-off-by: Guenter Roeck Signed-off-by: Bernhard Beschow [Bernhard: split patch, update documentation, adapt commit message] Signed-off-by: Bernhard Beschow Message-ID: <20250405214900.7114-3-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- docs/system/arm/imx8mp-evk.rst | 12 ++---------- hw/arm/imx8mp-evk.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/docs/system/arm/imx8mp-evk.rst b/docs/system/arm/imx8mp-evk.rst index 00527b0cbed..b2f7d29ade5 100644 --- a/docs/system/arm/imx8mp-evk.rst +++ b/docs/system/arm/imx8mp-evk.rst @@ -35,7 +35,7 @@ Direct Linux Kernel Boot Probably the easiest way to get started with a whole Linux system on the machine is to generate an image with Buildroot. Version 2024.11.1 is tested at the time -of writing and involves three steps. First run the following commands in the +of writing and involves two steps. First run the following commands in the toplevel directory of the Buildroot source tree: .. code-block:: bash @@ -50,14 +50,6 @@ it and resize the SD card image to a power of two: $ qemu-img resize sdcard.img 256M -Finally, the device tree needs to be patched with the following commands which -will remove the ``cpu-idle-states`` properties from CPU nodes: - -.. code-block:: bash - - $ dtc imx8mp-evk.dtb | sed '/cpu-idle-states/d' > imx8mp-evk-patched.dts - $ dtc imx8mp-evk-patched.dts -o imx8mp-evk-patched.dtb - Now that everything is prepared the machine can be started as follows: .. code-block:: bash @@ -65,6 +57,6 @@ Now that everything is prepared the machine can be started as follows: $ qemu-system-aarch64 -M imx8mp-evk -smp 4 -m 3G \ -display none -serial null -serial stdio \ -kernel Image \ - -dtb imx8mp-evk-patched.dtb \ + -dtb imx8mp-evk.dtb \ -append "root=/dev/mmcblk2p2" \ -drive file=sdcard.img,if=sd,bus=2,format=raw,id=mmcblk2 diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c index f17d5db466d..3bbf2bfbea3 100644 --- a/hw/arm/imx8mp-evk.c +++ b/hw/arm/imx8mp-evk.c @@ -15,6 +15,19 @@ #include "system/qtest.h" #include "qemu/error-report.h" #include "qapi/error.h" +#include + +static void imx8mp_evk_modify_dtb(const struct arm_boot_info *info, void *fdt) +{ + int offset; + + /* Remove cpu-idle-states property from CPU nodes */ + offset = fdt_node_offset_by_compatible(fdt, -1, "arm,cortex-a53"); + while (offset >= 0) { + fdt_nop_property(fdt, offset, "cpu-idle-states"); + offset = fdt_node_offset_by_compatible(fdt, offset, "arm,cortex-a53"); + } +} static void imx8mp_evk_init(MachineState *machine) { @@ -32,6 +45,7 @@ static void imx8mp_evk_init(MachineState *machine) .board_id = -1, .ram_size = machine->ram_size, .psci_conduit = QEMU_PSCI_CONDUIT_SMC, + .modify_dtb = imx8mp_evk_modify_dtb, }; s = FSL_IMX8MP(object_new(TYPE_FSL_IMX8MP));