From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289096; cv=none; d=zohomail.com; s=zohoarc; b=c/sbU8qQF4b6osIQ2ertB5gRuJrZPFpXZlg/HP9OK0VGo9XBecl1r57SesNdqU8Eb/F8YeIB31P/qKPhVNDjTylJZDBSlnmNKndb9kRvHVhNeFXyQBTaNVlDyxKd460Iz1M9aDADU2ywFGfp0lmsSkCk7JUChquP0foo+mF6stE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289096; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gzWlxwGPzoms0Ug6rgP3MPwoGWfsZNay/8PJUHAGy4o=; b=UVXn5u1YMe0DVPubmwP0WXMNY4vi9q0nsrFqpa7hPReGtscuQT10Te7nF9C7LW8s3q1hteG+f8Fakv7x1zDMe+0wHSXKjgXUgjq7ZmOhsJKaGntvPj/7EKbpaW9BU/YjM2QrU/4hRpq0Jqr/44Stb2YogzohFEc94CR7muy+xe0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289096344601.0265198722772; Tue, 2 Feb 2021 10:04:56 -0800 (PST) Received: from localhost ([::1]:58610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l702n-0006JB-U4 for importer@patchew.org; Tue, 02 Feb 2021 13:04:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ztw-0005O8-RX for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:44 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:54467) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztc-0002Ee-EB for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:43 -0500 Received: by mail-wm1-x335.google.com with SMTP id w4so2004190wmi.4 for ; Tue, 02 Feb 2021 09:55:22 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gzWlxwGPzoms0Ug6rgP3MPwoGWfsZNay/8PJUHAGy4o=; b=cixYe0bHwHdpbppCYtukVdUNyDeAs//yejnhN2GSY9CRms7GHzayOh9GoTFcSNZ/+K 3ZXTDA1vrArMpDat7gQOHwrgE4p+7TBG5uaRjpOmWE142xqZt/iZHnv5H/sO8bHraLSS n37M5fqQrV5fQwmhtc541HofSqeb1Io9UKgAMM0MvY+Iljat9ddGNUIrcfBO7agffsrK c62FoDc3N4EEScTd4kSlIFqFz+SyeYk+w4mgPYW8oCBryu1BTSzJDRY0VAN3tzRKYx6F C4kWblr4ltkQV2+ekrkZgn110ivXqeyF9Gg76DoLqY7vpg0eg39K4K6bM6/4ErbNoI2g bdFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gzWlxwGPzoms0Ug6rgP3MPwoGWfsZNay/8PJUHAGy4o=; b=SDSZYJ1Hv4kwhrEZlBvRn+PIF8NuKSFsxysiXvHnfaI3MRGJ3fBjVKkFDUordCKbyE /sOrr7buMT57NU3ohtp/v4H3aOkqo5izyzW+DHJZqfWOSSwCZC32TzSTHpYQvVRWDMCT fINs5REXZw0bjGSyAJYbCLcgfOZhD9igN3UxJ7wXOWSuHC93ba/qOCGw34jwQYsZBBPR zTM9bnU2+TyDuGezToImq2uVAUmYhgutFrUJvBBVGYju56DTqHOIGM4Gs54FFU++9wqN LZDhTQoxi/tSmPR88LoIJrOfJ7ws1oIlWAWpm2gM6iTY/9j0XIsvBAo1eunLJ+qSpXp/ 8gjg== X-Gm-Message-State: AOAM533K1vNR25sqzwuiyRYkiBOHYXgDYC9IAu7aqNdqmQoK41fdIbmt d2nrsWi7ysa+rNqrIlt3wAKavb6ErhC6bw== X-Google-Smtp-Source: ABdhPJxCjGyJQAv5lRTgFv941XhRi6XuHbgLHqsccG2LL9sYFDIlM7iNsvTscRJEklndlDgGroeDzQ== X-Received: by 2002:a1c:4ca:: with SMTP id 193mr4693839wme.178.1612288521096; Tue, 02 Feb 2021 09:55:21 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/21] hw/intc/arm_gic: Allow to use QTest without crashing Date: Tue, 2 Feb 2021 17:54:57 +0000 Message-Id: <20210202175517.28729-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 Alexander reported an issue in gic_get_current_cpu() using the fuzzer. Yet another "deref current_cpu with QTest" bug, reproducible doing: $ echo readb 0xf03ff000 | qemu-system-arm -M npcm750-evb,accel=3Dqtest -q= test stdio [I 1611849440.651452] OPENED [R +0.242498] readb 0xf03ff000 hw/intc/arm_gic.c:63:29: runtime error: member access within null pointer= of type 'CPUState' (aka 'struct CPUState') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior hw/intc/arm_gic.c= :63:29 in AddressSanitizer:DEADLYSIGNAL =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D3719691=3D=3DERROR: AddressSanitizer: SEGV on unknown address 0x000= 0000082a0 (pc 0x5618790ac882 bp 0x7ffca946f4f0 sp 0x7ffca946f4a0 T0) =3D=3D3719691=3D=3DThe signal is caused by a READ memory access. #0 0x5618790ac882 in gic_get_current_cpu hw/intc/arm_gic.c:63:29 #1 0x5618790a8901 in gic_dist_readb hw/intc/arm_gic.c:955:11 #2 0x5618790a7489 in gic_dist_read hw/intc/arm_gic.c:1158:17 #3 0x56187adc573b in memory_region_read_with_attrs_accessor softmmu/m= emory.c:464:9 #4 0x56187ad7903a in access_with_adjusted_size softmmu/memory.c:552:18 #5 0x56187ad766d6 in memory_region_dispatch_read1 softmmu/memory.c:14= 26:16 #6 0x56187ad758a8 in memory_region_dispatch_read softmmu/memory.c:144= 9:9 #7 0x56187b09e84c in flatview_read_continue softmmu/physmem.c:2822:23 #8 0x56187b0a0115 in flatview_read softmmu/physmem.c:2862:12 #9 0x56187b09fc9e in address_space_read_full softmmu/physmem.c:2875:18 #10 0x56187aa88633 in address_space_read include/exec/memory.h:2489:18 #11 0x56187aa88633 in qtest_process_command softmmu/qtest.c:558:13 #12 0x56187aa81881 in qtest_process_inbuf softmmu/qtest.c:797:9 #13 0x56187aa80e02 in qtest_read softmmu/qtest.c:809:5 current_cpu is NULL because QTest accelerator does not use CPU. Fix by skipping the check and returning the first CPU index when QTest accelerator is used, similarly to commit c781a2cc423 ("hw/i386/vmport: Allow QTest use without crashing"). Reported-by: Alexander Bulekov Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Darren Kenny Reviewed-by: Alexander Bulekov Message-id: 20210128161417.3726358-1-philmd@redhat.com Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index af41e2fb448..c33b1c8c4bc 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -28,6 +28,7 @@ #include "qemu/module.h" #include "trace.h" #include "sysemu/kvm.h" +#include "sysemu/qtest.h" =20 /* #define DEBUG_GIC */ =20 @@ -57,7 +58,7 @@ static const uint8_t gic_id_gicv2[] =3D { =20 static inline int gic_get_current_cpu(GICState *s) { - if (s->num_cpu > 1) { + if (!qtest_enabled() && s->num_cpu > 1) { return current_cpu->cpu_index; } return 0; --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289388; cv=none; d=zohomail.com; s=zohoarc; b=oIYx3FqAp1h6Wpygr/zFT4FdLmu/o3f/aVu7EC9GBGXd72nuBy43aCWWVY8e3x1t5QSe5/xJH20zkJhYHc+vhIFVjIiDQmBKE32nsFKnDZy1jNWbGFF57TFTaFDfcAX3lMgIqQfQEswuOYQ80bo1+HqM/lNSoLRLiF4/9KYyouY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289388; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qJW4Rh2q+aOMI66Q4KJNJOGwXK6nRxykiRTqLJ1IjHU=; b=gbNHw07UYISrciQTHn1/+wFHDo3qGfvcY7rRL/lyV00u7cS9Ugp/SiI/fgKL3QJZLdTWK8T6EX/h3KuNUrxZhYDddhernTEzlweN+zn7t6uTMgc9G9GzzfOWpctUyDgBBeyfQWj04nMC2zoVB6rzicBBC0ytwUPmijPwY86AbkA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289388811431.77545130020576; Tue, 2 Feb 2021 10:09:48 -0800 (PST) Received: from localhost ([::1]:41706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l707X-0003RE-Mp for importer@patchew.org; Tue, 02 Feb 2021 13:09:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ztw-0005OI-TN for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:44 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]:45845) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztc-0002Ej-Io for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:44 -0500 Received: by mail-wr1-x435.google.com with SMTP id m13so21434596wro.12 for ; Tue, 02 Feb 2021 09:55:23 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qJW4Rh2q+aOMI66Q4KJNJOGwXK6nRxykiRTqLJ1IjHU=; b=pDx+H2/U4a9YnkYvzMVREYJEU4rKX6s7SA1YEscfzkBdNZluUanuEsHt6S48YzMIMl YdN/2emV0O+s0/DDwxkClwlflB7R5mTYKa2y4I2X3mGdajVhPvuZvgW363uh6CtrnR6s XFnUowsWd5wMQaK+6Jlegny2KUqyC35HZ77ze4F8oRgd4EQz6siD7+Rht/OEqB7uFn7f 40sE3taUyByqoPP9iIsrN04lfDs5CgsmeKmWeRnBegzx1b0e2Ug/Ze68ezDm2tQy1x6c qGq28fUk+WEgDu8VywjokDVKk033PRiObgMMfVuZQY1WCgEie2yzQdkdO+OTdxlhgffL k7pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qJW4Rh2q+aOMI66Q4KJNJOGwXK6nRxykiRTqLJ1IjHU=; b=IE/7KCnXnLOWtQOlcQ8JdDAUOYkoDjXV7ISAtyH+tFYU9AITyt+4gNnFl7IdUAc80N VF9pIAsozRsq4iL8UIUpnqJqLotEUNd2DaH9bFZlt8Eo0Q++8x2vEeTxSAo4t0ID2fVb D/Mj5GY1lBaYQuEhpL51yIgViQ+ZDnvv0tV3nM1blztVNJ/Z6wPnoQG/Mxvx/BhoMQa+ pXk+FxtTB5u4yrLuCasCX8zo/Hlsb77Alcl30NPrg5/NyWkMi+PQaMlZ+397zlWakhsj wXWNq4Nyk37pFe9Zvi6rHMtFdyyR+iLPgTOn+5AN5DYbTA86/rnQlipZgcv5AKPkF1Mn wn4g== X-Gm-Message-State: AOAM5303FIYLMx7ePOFDPzXpq9Kc+hei8hYCvJVXKIgNrm2J1TdcrV/6 j3VRhVkhgLSS6jVEAn+RuCmBfOzXGJ4yrQ== X-Google-Smtp-Source: ABdhPJyCS/MHBvvXfahQAwrT5foNJRf06uv8x4MkwYKQrW3obH4HMYkcRXhqT4Fdxn6kTggnvlZJFw== X-Received: by 2002:a5d:4dd0:: with SMTP id f16mr24861933wru.304.1612288521868; Tue, 02 Feb 2021 09:55:21 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/21] hw/char/exynos4210_uart: Fix buffer size reporting with FIFO disabled Date: Tue, 2 Feb 2021 17:54:58 +0000 Message-Id: <20210202175517.28729-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Iris Johnson Currently the Exynos 4210 UART code always reports available FIFO space when the backend checks for buffer space. When the FIFO is disabled this is behavior causes the backend chardev code to replace the data before the guest can read it. This patch changes adds the logic to report the capacity properly when the FIFO is not being used. Buglink: https://bugs.launchpad.net/qemu/+bug/1913344 Signed-off-by: Iris Johnson Message-id: 20210128033655.1029577-1-iris@modwiz.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/char/exynos4210_uart.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index 6361df2ad3c..9b21d201b34 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -553,7 +553,11 @@ static int exynos4210_uart_can_receive(void *opaque) { Exynos4210UartState *s =3D (Exynos4210UartState *)opaque; =20 - return fifo_empty_elements_number(&s->rx); + if (s->reg[I_(UFCON)] & UFCON_FIFO_ENABLE) { + return fifo_empty_elements_number(&s->rx); + } else { + return !(s->reg[I_(UTRSTAT)] & UTRSTAT_Rx_BUFFER_DATA_READY); + } } =20 static void exynos4210_uart_receive(void *opaque, const uint8_t *buf, int = size) --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289051; cv=none; d=zohomail.com; s=zohoarc; b=C6tnrIpRgeyB0bK50J5VLAFzSy6XQqc+QQvHY1DADWjNxNGaZcJDcHjCYxAXzwPPBiXZu0xGIfcEKT2Tzw6AqpgAyr/22CejjByg4+jHPfplI+Mpi6cUsQsS2Squy2O+1+TwMxrK2hQeU7jotLqalp+r9fl1yL2CCpfxpy+1hVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289051; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PYXcmESVfoHGpmKd9uk67sd4tJIXB63SS0T0aA9+ufE=; b=iDDMVBU//LgWH2QMhmOYwuXHYEPdzovuuSS28Y9jNKoMSz7q1vbqH6Mqr6xbOGtvaPlAwzwHcIz1g9B47r3xsV77JItdqt9ug5yJNvLxi15qsokVFaRQYU2Kk1FEy412HW1nacFRE8wiHXMyp/5qvXoZl9M6nA1Z6GlQOkybUEc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289051814613.2655940807075; Tue, 2 Feb 2021 10:04:11 -0800 (PST) Received: from localhost ([::1]:56330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7025-0005Hr-L4 for importer@patchew.org; Tue, 02 Feb 2021 13:04:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ztq-0005Mj-6c for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:38 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:34865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztc-0002Ev-DM for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:36 -0500 Received: by mail-wr1-x429.google.com with SMTP id l12so21439273wry.2 for ; Tue, 02 Feb 2021 09:55:23 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=PYXcmESVfoHGpmKd9uk67sd4tJIXB63SS0T0aA9+ufE=; b=af05IcL22bqjW1FlDCb5i6J2yVgnhiFzSCwFx97Ij9ottmSyTa7e0nyx/q14HW5MfU WJqyadfdlCvfGiudmv2FNYurC5AjnrXM380hgFgylOr41kfJdylC8RrJtzehbezCkfQX RIQu2/2OzmhdcLIIY2NBMn6V/+1eqN061E1JQQ/YcT0ToQ89bLvS8dBZQgelpbhyvCxX /PVpdrI0wAvby4EZzBXLaSPEtyus8gRtKcyjjIPidaT/viAplqqrrcosnV/Hd6uAzTTF 6PnjqaNldrWuR61dMSL/3muPSHX4W/wDOcmod5+nMW/XZJqwC2VEsuui8ne8VfP1lbon r5fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PYXcmESVfoHGpmKd9uk67sd4tJIXB63SS0T0aA9+ufE=; b=Q65/XOpOXIurMFimp5+xiFXaPi13LcCecu82NqTxmgJ14DPk1VmTF6LOJCzunEvvTo 0bxSiyllmhqFUhb48JbeJAd0w6VhKbPmwNb5nibrB3QcnEn66D496U/Zj1LOAB/Tk2wJ icOKrMG9cDMtwA4rsV9Og7pMbAZYXcrIuwuI+5BiLFI4xxRB66PHJF5uMu15tG+RgtuN FzkR9cITkpwVHoWuyWQ5RzEZH+jayoY4CgEYuVj4xiVMwm1Ny5aBXZcOCywc4AyCetAX waAlf5sCd9xpXZGMp9I878iiGcO9UTT9opQNoMS8Ph0nXEfnvKw875zJDgi6HkRCmpfx KLhg== X-Gm-Message-State: AOAM532JQR4AS+QLoJnLKaYRVomyWPUR4c0/+aAY4caSvg08r9p5B7Dc zYYJYbJHCBa2k0ah3zaFlb4OU/a+6gjNTQ== X-Google-Smtp-Source: ABdhPJybarTjnxPh+95jtdr1PwrouEXY3UjgfNJTADooBQxdvLj0lfycM5aqlGHSv3sKzdn0Jj243Q== X-Received: by 2002:a05:6000:1245:: with SMTP id j5mr12916554wrx.333.1612288522840; Tue, 02 Feb 2021 09:55:22 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/21] hw/char/exynos4210_uart: Fix missing call to report ready for input Date: Tue, 2 Feb 2021 17:54:59 +0000 Message-Id: <20210202175517.28729-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Iris Johnson When the frontend device has no space for a read the fd is removed from polling to allow time for the guest to read and clear the buffer. Without the call to qemu_chr_fe_accept_input(), the poll will not be broken out of when the guest has cleared the buffer causing significant IO delays that get worse with smaller buffers. Buglink: https://bugs.launchpad.net/qemu/+bug/1913341 Signed-off-by: Iris Johnson Message-id: 20210130184016.1787097-1-iris@modwiz.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/char/exynos4210_uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index 9b21d201b34..80d401a3795 100644 --- a/hw/char/exynos4210_uart.c +++ b/hw/char/exynos4210_uart.c @@ -519,6 +519,7 @@ static uint64_t exynos4210_uart_read(void *opaque, hwad= dr offset, s->reg[I_(UTRSTAT)] &=3D ~UTRSTAT_Rx_BUFFER_DATA_READY; res =3D s->reg[I_(URXH)]; } + qemu_chr_fe_accept_input(&s->chr); exynos4210_uart_update_dmabusy(s); trace_exynos_uart_read(s->channel, offset, exynos4210_uart_regname(offset), res); --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289626; cv=none; d=zohomail.com; s=zohoarc; b=mBSE0juxoGKfjM+3hud2SRF5Pn6rVwa7oY+Z8L2yu0+zdmiO50uweGE3BTpk9CNSV2zNF/+RYtkpAtI6TzpZfM4eUBuRo6VFA1kFXjjBWyLCIHLI1Bo6J8URCY/I37ddAFTr+tQGKiXdmVxI8oLiTa9VHa3MvqOA7Ir2olwagYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289626; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HOai2hjmb+bjOdqLwZmme/jaMMIUJwVTY3N//HvBLNo=; b=KOcZCsfal4wn3FYMUt7Okpy4M65VFCMJhBjhQecEv30Fq87N/14BASz1FgS+5PH0aRgK/cFV4LJX7lJXUl8lppiymC3SBF/UWJme33cgmuIF+aDsbZ/1j2qpPFS/b7wdLJRGlpO0WPFwS+s4+VZOw8nDg1PQL7E2xWBhRXGaeC0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289626662902.3208340271177; Tue, 2 Feb 2021 10:13:46 -0800 (PST) Received: from localhost ([::1]:50432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70BN-0007XS-CK for importer@patchew.org; Tue, 02 Feb 2021 13:13:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ztx-0005PJ-6p for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:45 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34875) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztk-0002GU-PY for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:44 -0500 Received: by mail-wr1-x433.google.com with SMTP id l12so21439576wry.2 for ; Tue, 02 Feb 2021 09:55:29 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=HOai2hjmb+bjOdqLwZmme/jaMMIUJwVTY3N//HvBLNo=; b=ACE9PI16XvuR4oj7cJdy7TmAft0AqDDOjm/s0IqpVTj+2DGGS3NMMHaFmI1qiIGYB9 Dtubvl/YPTxVO0rlmLtIc16Y26dLQYbpVBHPp69dEhbkqc7GQX/UTOQv62aLgt9xN6qp sIaObxF2Nu0SvhyKxzC1uiU8vwza1QpuCiEIwgrYLVRuWecDINrRbK6EcGH04qoSLjh1 dn/VQSDZHR4FdJkkN1ahUQCV/ypTXH5f8M6OFlip03PyidIRltXvU3qh8jQAeKdTpQbl R5cbAkedinpKLCdvM3RJ7gjmNuo8ao9K+Z776Cq8K9LcUgusIhJmZFSL4vZNPDZouEcF WNug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HOai2hjmb+bjOdqLwZmme/jaMMIUJwVTY3N//HvBLNo=; b=s/IcKkJxKy0hZFu13jNWjX3FMmjc/yCjv9m4qHjL7oABs9koxILOf5mwBUuARIvWed wD83mbpiQzCy05iJiOPUxIa7yuG4hHFODT76vJB21rphnhR6tQNaVXd6xAZSAcyFMo6m hAh3kdAS+13GMTDDYzMpauM5VHCDQ2njEK3HSny+RkZynLgEyq7fElFkU1Cop9iin9fn jBpeMQNZcZO4Ist+6aBgKxDNidcH2Y+bhgKidyt4CCrtMgjHsJKe9x01R47+gkEvDAlB MXWmeVC6tTOiHrheXUudS4efj3blZ8Rcwa23RLt2XgsaSjAtdOW5pt1eaQ24cHWZGf9F klsA== X-Gm-Message-State: AOAM532g0lM1WdhuQwdkIB/u7nuNZPV+4m6L3DKUM5UpyLHQ4XOdpF6j 1tB+GhKtC4xru7njkUr6dQRKrNva0uV16Q== X-Google-Smtp-Source: ABdhPJwSdzObFCB01MZ/6cedfHFSHDVrJ4G4jkIBtvlAIvwYev3ynbx0EzCwcu4lTH+QJmIOn+/WJQ== X-Received: by 2002:adf:e7c1:: with SMTP id e1mr25031265wrn.23.1612288523828; Tue, 02 Feb 2021 09:55:23 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/21] hw/arm/smmuv3: Fix addr_mask for range-based invalidation Date: Tue, 2 Feb 2021 17:55:00 +0000 Message-Id: <20210202175517.28729-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Zenghui Yu When handling guest range-based IOTLB invalidation, we should decode the TG field into the corresponding translation granule size so that we can pass the correct invalidation range to backend. Set @granule to (tg * 2 + 10) to properly emulate the architecture. Fixes: d52915616c05 ("hw/arm/smmuv3: Get prepared for range invalidation") Signed-off-by: Zenghui Yu Acked-by: Eric Auger Message-id: 20210130043220.1345-1-yuzenghui@huawei.com Signed-off-by: Peter Maydell --- hw/arm/smmuv3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index bbca0e9f209..98b99d4fe8e 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -801,7 +801,7 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr, { SMMUDevice *sdev =3D container_of(mr, SMMUDevice, iommu); IOMMUTLBEvent event; - uint8_t granule =3D tg; + uint8_t granule; =20 if (!tg) { SMMUEventInfo event =3D {.inval_ste_allowed =3D true}; @@ -821,6 +821,8 @@ static void smmuv3_notify_iova(IOMMUMemoryRegion *mr, return; } granule =3D tt->granule_sz; + } else { + granule =3D tg * 2 + 10; } =20 event.type =3D IOMMU_NOTIFIER_UNMAP; --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289230; cv=none; d=zohomail.com; s=zohoarc; b=bYIbes4BK0BJCyoi33pM2SzpfEdts781KddwsViczt8jXLBvvoh0KNbuoArNHesJ8JabyYBhSe3XTuzynUD5QJQjGJ91iQ5PBiK7JPB0K202Cx5tY7CGCeoxO0A4XqQhWt7s1IdbUyDdBrV9r7Y6Tedc8j4eyCKYsEFbcYFDXFQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289230; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8r7FNnpkrncdt3Og1knfFavndfs/SPtYUNjSL/xsxQA=; b=YnUFfFHkog0qt5QbQlFiKKBhCG1BAE2d/iV2wv9ccP+paFM2tyPKJG376kFvdIirYUTGcFSP+3Eqmp+HN43RPPSzZNrf2k+zW8x0ADE1feKA5MXB6OJEoAnl4brLu5FAfI3ayPgIA2CauNufSGyQ0wCYbpUuWnzcQyxtBM7Eooo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289230432515.5281146877904; Tue, 2 Feb 2021 10:07:10 -0800 (PST) Received: from localhost ([::1]:33314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l704y-00086U-V0 for importer@patchew.org; Tue, 02 Feb 2021 13:07:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zts-0005Nf-5S for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:44 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:32997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6zti-0002Fa-UC for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:38 -0500 Received: by mail-wr1-x433.google.com with SMTP id 7so21454214wrz.0 for ; Tue, 02 Feb 2021 09:55:25 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=8r7FNnpkrncdt3Og1knfFavndfs/SPtYUNjSL/xsxQA=; b=z2hjqgCngx5vHvGpr0UODXdgSXXGPRap9MXKWZ1ObsvVKHob1JPM0uyY21j+YMBNpj j5AVliWAn3otqWGH1InSC0hvsUf+Ez2/taVhMkaslxzD5vNJZlJsVvWMx+yJ2AHli7Fp cQA+Y/fc12tIXegYs+zgmXCBqMAfxufzPCxIZe8d1DhEKEj+N+bANNLfaBzLPO6odfsP oYGRZEZzELoEcJeQ4oP+/fGOSth2L0WSoSeHFOBo0tEntVdMP4L3oFFCeB234W5BYtj0 /dq4NvySmr0hBveDbhoPM9uAfhlfldOtOGRJ7yeEzFjvYLFCv4H7L0wqlPzt86dEZMI7 J0YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8r7FNnpkrncdt3Og1knfFavndfs/SPtYUNjSL/xsxQA=; b=j4gr+b4iP7o4Bfr5rYpRxEVjF7k7VSGMllYbj7bdSzz6FXyTODPAR63cBlSIfTWz7M hz9s9NRoZKs3rRbfeKHnaATeIEpOOvq1Ll1GYZEi6FaWq2GeNNQZ4rw3PtEvPK6OlNjx o3NMUV9kEagGk4XoTcSj1jey3BedErwJp0EhUsPjGe8w00q3ltWj/7zRMaGWufMMPgLx /hbyiX9MLStaEn5bPhvEtWkrQOrUYjMr0YbEVoosuhq+5drk2uWn1wRrumw0eFSEwR6l Xs57Nv4H1ZlixqagWbGGaLj9a1hJyhZotzlzpwAOflZfEgx1a8d6Xd/iEFDvfRy8+FqV mW3g== X-Gm-Message-State: AOAM533OrPzCi4Y1uab9/PphGrMGFaFVJtLKyvpGyOlDBb/A0NLuZ9t4 BcX8JHCktgmVuiG97ZswvjfAGKSsKIzU3A== X-Google-Smtp-Source: ABdhPJy/s+NJdeUREBWgi0chBe+bPbQrvLa83i8YXs+5i42t2gger7O0x6Xy01GnZkOiAcDrS+Yvjg== X-Received: by 2002:a5d:6947:: with SMTP id r7mr24716975wrw.150.1612288524660; Tue, 02 Feb 2021 09:55:24 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/21] hw/ssi: imx_spi: Use a macro for number of chip selects supported Date: Tue, 2 Feb 2021 17:55:01 +0000 Message-Id: <20210202175517.28729-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Bin Meng Avoid using a magic number (4) everywhere for the number of chip selects supported. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Juan Quintela Message-id: 20210129132323.30946-2-bmeng.cn@gmail.com Signed-off-by: Peter Maydell --- include/hw/ssi/imx_spi.h | 5 ++++- hw/ssi/imx_spi.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/hw/ssi/imx_spi.h b/include/hw/ssi/imx_spi.h index b82b17f3643..eeaf49bbac3 100644 --- a/include/hw/ssi/imx_spi.h +++ b/include/hw/ssi/imx_spi.h @@ -77,6 +77,9 @@ =20 #define EXTRACT(value, name) extract32(value, name##_SHIFT, name##_LENGTH) =20 +/* number of chip selects supported */ +#define ECSPI_NUM_CS 4 + #define TYPE_IMX_SPI "imx.spi" OBJECT_DECLARE_SIMPLE_TYPE(IMXSPIState, IMX_SPI) =20 @@ -89,7 +92,7 @@ struct IMXSPIState { =20 qemu_irq irq; =20 - qemu_irq cs_lines[4]; + qemu_irq cs_lines[ECSPI_NUM_CS]; =20 SSIBus *bus; =20 diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index d8885ae454e..e605049a213 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -361,7 +361,7 @@ static void imx_spi_write(void *opaque, hwaddr offset, = uint64_t value, =20 /* We are in master mode */ =20 - for (i =3D 0; i < 4; i++) { + for (i =3D 0; i < ECSPI_NUM_CS; i++) { qemu_set_irq(s->cs_lines[i], i =3D=3D imx_spi_selected_channel(s) ? 0 : 1); } @@ -424,7 +424,7 @@ static void imx_spi_realize(DeviceState *dev, Error **e= rrp) sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->irq); =20 - for (i =3D 0; i < 4; ++i) { + for (i =3D 0; i < ECSPI_NUM_CS; ++i) { sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->cs_lines[i]); } =20 --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612290200; cv=none; d=zohomail.com; s=zohoarc; b=A15PJU2s1aFZj7adtTUqS+0rVN/KngjgsMPybv2jKx99b3mcPMIGUVya6uMx1frwOC7El5QqihoyUL8Xj2P5D3vs9KGNz/8NoqmSYunxewz9zY6ngCkMdWhoifbq4G6iOPd4lF2tcZ0X61hZLBWkahhaNSd6ZKvOAHNlQA3oHOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612290200; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9T4oatLmGN70Mw8GfGi8sZ3ncLhfpm7moP99hzX+qUc=; b=hCFWqwUXaIhCwWhoZN5qudp2GMvcYSw3Y4YOB4hnFFcSt8jkLTQ2MXug8pPxRVbLX99ym6GO5GrMY6f5kjzkyPNX/0uq+f3pgz7eqkyOCQ4IkP//TF+NmEVWYShnjSRFedmo0+tMy0yiD/WgbjUia8byWuHz96SbUUoYmrt3mkg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612290200037995.4329933458243; Tue, 2 Feb 2021 10:23:20 -0800 (PST) Received: from localhost ([::1]:51118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70Kd-0003p3-06 for importer@patchew.org; Tue, 02 Feb 2021 13:23:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu1-0005Zm-A2 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:49 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:39105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6zto-0002GB-Ok for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:48 -0500 Received: by mail-wm1-x334.google.com with SMTP id u14so3063224wmq.4 for ; Tue, 02 Feb 2021 09:55:26 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=9T4oatLmGN70Mw8GfGi8sZ3ncLhfpm7moP99hzX+qUc=; b=ImRt2TFba5sp7eOZ3yqaUupLKEdl2DHNn+88BrnExCP9A7UfYcdfVRbXaXN+AXc0Oa PCZC/D/OQgDASHeogMBq5TkX2ImMiz5Y9Y2oKssYKUrN+XuiJe3fZAp/Hvhzef32whYy cw3CprXrpLEuQg0mhnL/+s8oT3GdNZk5Q+unYYxqtvfJbvplkT/Dde5eRGboWpq9qJWl sX6OFMaQ/ygtdWZFoevxOr9gza19ChttHe6wn62CkGCjK3ahRXqAZrzB0F7ZRC0eKR7r bGnoG6UiZyjMgfxgf93aTOEZGhlYnNJY3RjEjgEuJLVYMboF+hhFI2Y8CzN9Zp2N4VCc 9NsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9T4oatLmGN70Mw8GfGi8sZ3ncLhfpm7moP99hzX+qUc=; b=eE9FIGc+YELAtLv3i0EFczw4bMgif5cUMBfWGG3S5sH/KaZ6rtqrRtI+flVrP0Ow+K iv7lcLkykaL0Cwfu8FGmaVl+5cD3a2glGi9hA72e+yiM6wJmC+k7VXt8XkOk7jaEx6zF 7PwH3XiyfvHkv6qEbMR8Y2jZeH28Uf/X8m5xtIon/BW90sR//pLDJC5GqKRc5sJVXeqi 4b3ADuIdMSWp2lDfS4a/58rYvHKmpNos6qRl9ni1FNBYKunP/X5AXejVBxf9CmLQScjb nwURdNSUvDylmWE7OsICjJ7f3rNryYMXPKyPVA8Sxp0/rYjYT0TPpXjJLFgL6FOhLJLZ qFEA== X-Gm-Message-State: AOAM532anEUvimAW/Yo5Jh3huebwXuKoW3bpsrR6AOO1mrxd3GmdQDzu wkWXw90eYa0LJhhCOIURzo+q53dirJVcdw== X-Google-Smtp-Source: ABdhPJzO7nmhYkRK2uf8a8qKu0Shi30k/MuQVsssP2SVEgWAN6h7Qxe+34OV2Ezq9xoLzsi170aJEQ== X-Received: by 2002:a05:600c:2204:: with SMTP id z4mr4665734wml.138.1612288525769; Tue, 02 Feb 2021 09:55:25 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/21] hw/ssi: imx_spi: Remove imx_spi_update_irq() in imx_spi_reset() Date: Tue, 2 Feb 2021 17:55:02 +0000 Message-Id: <20210202175517.28729-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Bin Meng Usually the approach is that the device on the other end of the line is going to reset its state anyway, so there's no need to actively signal an irq line change during the reset hook. Move imx_spi_update_irq() out of imx_spi_reset(), to a new function imx_spi_soft_reset() that is called when the controller is disabled. Signed-off-by: Bin Meng Reviewed-by: Peter Maydell Message-id: 20210129132323.30946-3-bmeng.cn@gmail.com Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index e605049a213..4d488b159af 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -241,11 +241,16 @@ static void imx_spi_reset(DeviceState *dev) imx_spi_rxfifo_reset(s); imx_spi_txfifo_reset(s); =20 - imx_spi_update_irq(s); - s->burst_length =3D 0; } =20 +static void imx_spi_soft_reset(IMXSPIState *s) +{ + imx_spi_reset(DEVICE(s)); + + imx_spi_update_irq(s); +} + static uint64_t imx_spi_read(void *opaque, hwaddr offset, unsigned size) { uint32_t value =3D 0; @@ -351,8 +356,9 @@ static void imx_spi_write(void *opaque, hwaddr offset, = uint64_t value, s->regs[ECSPI_CONREG] =3D value; =20 if (!imx_spi_is_enabled(s)) { - /* device is disabled, so this is a reset */ - imx_spi_reset(DEVICE(s)); + /* device is disabled, so this is a soft reset */ + imx_spi_soft_reset(s); + return; } =20 --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289341; cv=none; d=zohomail.com; s=zohoarc; b=DiQI9z4DtqqVEf1wrG9VF2GXbZnNPF5rIvicQXxiySEbnnkB2NEyHS5osis6dlCftHaRA+wGNelDnIRf6YnGuIAaBp8VuMWFyd/TYnK+EDgOdYanEMIybpo3FPGf2Xo9mOz5WekTye5b8yIDUBnuCo63lY+watnn2Vqlp5Rzv+k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289341; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZXS77U8T3S18yOyZJYkPwlC+sECSds1fbjAom9Al5KI=; b=W1jmEnzjXj7esF0WRbzzeoHY4xL/B16oupRFznrvaEj37F+B1jFDqqjeGtNoxk2xxpobf/+hSmz4UH40XsN7xIuFF3C/r/41+wczNHdLHE2jpiw9YTmXfsnZGS/kDB4CIKyJCqbSZpPu2ZHgwHbZaGU1Dv/CJ+t7HvLuAQJYyC0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289341577106.92250218503523; Tue, 2 Feb 2021 10:09:01 -0800 (PST) Received: from localhost ([::1]:38812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l706m-0002CQ-FD for importer@patchew.org; Tue, 02 Feb 2021 13:09:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zty-0005T2-KT for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:46 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:32998) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztn-0002GK-1r for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:46 -0500 Received: by mail-wr1-x434.google.com with SMTP id 7so21454316wrz.0 for ; Tue, 02 Feb 2021 09:55:27 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZXS77U8T3S18yOyZJYkPwlC+sECSds1fbjAom9Al5KI=; b=pQ/knD9bG7Im/j0VmGXXmDf3cjDJCDDAyhPY+da91Y/OA5XXDMaIliS7GQ2sGxWObe /CLz0s8IWtQ5SBu4ZZFBJPjsU9pFue7jjA9kj8rFTvFoel7ePqlrPyINL7LCWL6rWziW e25oeGNtQsArqrF11k5PgVm6pp7Sm3veg8DE1Mt4PzUNCJnmgmNSiwQM1y+Y0ilOluZi 50Orta+ABB01Aa/SjjaghgXbNY1/iCObP/WStBdG9Y/e3BHl14K7v/WPNGPmOt9KF+ls iUZjBG8PGkTPYaU+ufCHl9GYR9t0xRlroob1YDmOevJYrVZTiRUivrNbOWEjmTUMC0d9 EywA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZXS77U8T3S18yOyZJYkPwlC+sECSds1fbjAom9Al5KI=; b=U76t0pJZ1XUBmNflt6lbfb2uSFY5ZOPxSYmy6Hw9i4GFRUcle5R2x//hNAQLl+WfVn 828iMG6UwwblMSNBIIDDBBIGDRKCtIzTFS08K1sc5soL+W6xbRf2e+5ZQr0TxLN49fQh VuIKPqBQRGyEG+jkDG5qIuKOIdVkbVy+zSL5EDf07NfSXoa1YTnNKj1OWTpeke6dkqys NMMYq7HHRI22Wexqnjg16trCKNk9o3VxmFX8EFNh+uIjGA5pqqdtAxZ0xk5ICPhKtYXn CwBUp51jd1TagDs0eTjOYEJAkGkLA5NzCB4JWMBe5Qd3VvH6+NCFH+gSTKSeESNmFSft 1q8g== X-Gm-Message-State: AOAM532lBelCjP6Ba8hEc2/lGiD/ElCVIJpNRq12KpW6qQTW4LEToz31 gGZ1bq5KGWWvoe+lUne8pCfaAO3Qtl40sA== X-Google-Smtp-Source: ABdhPJwNpQSzcxs8vcGjaN524LqPQpBaVDkDo+aa3rwop9ZI8sc+1/Q/Va6JpKdI0xAnGaZKK61P4g== X-Received: by 2002:adf:e511:: with SMTP id j17mr24972977wrm.17.1612288526857; Tue, 02 Feb 2021 09:55:26 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/21] hw/ssi: imx_spi: Remove pointless variable initialization Date: Tue, 2 Feb 2021 17:55:03 +0000 Message-Id: <20210202175517.28729-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 'burst_length' is cleared in imx_spi_reset(), which is called after imx_spi_realize(). Remove the initialization to simplify. Reviewed-by: Juan Quintela Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bin Meng Signed-off-by: Bin Meng Message-id: 20210129132323.30946-4-bmeng.cn@gmail.com Message-Id: <20210115153049.3353008-3-f4bug@amsat.org> Reviewed-by: Bin Meng Signed-off-by: Bin Meng Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index 4d488b159af..8fb3c9b6d1b 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -434,8 +434,6 @@ static void imx_spi_realize(DeviceState *dev, Error **e= rrp) sysbus_init_irq(SYS_BUS_DEVICE(dev), &s->cs_lines[i]); } =20 - s->burst_length =3D 0; - fifo32_create(&s->tx_fifo, ECSPI_FIFO_SIZE); fifo32_create(&s->rx_fifo, ECSPI_FIFO_SIZE); } --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289338; cv=none; d=zohomail.com; s=zohoarc; b=OLmbf+lbRdAltKYx+qJ/l7s/S5bEOU40B+QC+mqtk37br1dSau6v3vluAufmir0JZ7zUFOVV29Rpb9u75rVkKEpH0JVCaP3m5aXo3Ip9L8Un3ok2tQKoYlHEla7QZauir1vGCQtodlQSC+ST4lNWKoAhK6xhwNG5RbmuCofIq8o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289338; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=27Rh1jJu3IIjx0wRzmqZIBv/kPP940w8NfRpD/N/7g8=; b=kEKrVouN2x8NCwUNVXmjDFSsSoufFk+HKFRiponVbuj4pLF2OW2hbXn2/yTTSsW94F2WRRGbs/q628sZZXCYThWS9S638dhbOBCadoMce6uBk+EWctElmris5xWrogxF2bRRvkNIQyJKF8GlaLwY5Nwb0+NgJ6abXKG0OaMNLv4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289338087928.7193458483732; Tue, 2 Feb 2021 10:08:58 -0800 (PST) Received: from localhost ([::1]:38702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l706i-00028r-Sg for importer@patchew.org; Tue, 02 Feb 2021 13:08:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zty-0005SZ-Eq for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:46 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:43386) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztk-0002GO-Ub for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:46 -0500 Received: by mail-wr1-x42e.google.com with SMTP id z6so21371052wrq.10 for ; Tue, 02 Feb 2021 09:55:28 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=27Rh1jJu3IIjx0wRzmqZIBv/kPP940w8NfRpD/N/7g8=; b=PgGUeMS2ZoNbpF5CSKdE/Bk6miR+qDCaGIfNYI3UZq5PSdQciu6NQniR2+xkItRgra 2pJwnupch/8PldOiwTL9zDldUjU+qcWFkBvI3wLksXYH7ebSfESpFcMWCErFXaX6PECv 7Wvi/hjdKaeNJtjzu6y/OVvDuIUcJ69LpGXGBtegpTjM2iJyBV1qi9tHpZNzPwI2+/md dhksumrqq1atU/nu6Stb4KWkuHcfYLoETdFO1RT/9stiGqANOU2NOieEHPhiAI+r1jsL RinXAhso7E/gHyaX1n5moezT9L3OD/x8Da0zVbbj273uoUQwtKw8JlFAcuFJdChowdx0 TNtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=27Rh1jJu3IIjx0wRzmqZIBv/kPP940w8NfRpD/N/7g8=; b=XC5W4dpVdtIHsnTcw3yPvrmU1ec3T3QyNZcjZu1IqGvCLLlNfJjx4Rkfwhjscy+0Gi REQcrDhpd1cvjy8EJglA0rAZF0307sDn8kOTMbq4FRg5x3Bbhy3VrtBDJZxUa1HJgJ26 4a67uqkcc4pgTkPNpDFOvK88OcgCGfCche6v2f6Vgp+2cVnzXbYKYaZnS9UUBtxhrYES a/wqZ+c4ZQBiZznAL4Vv2R7D0z9U2AdENBH+SNRUksK8N4lWKBVdavgUMK75Pt9ljlI8 Dqv3VCuqfNQFKzcdctrkWM6WW6+8tVrSUQ0Uxt0bzHfHUd88ssRAB+e+HvBZCOtolybb Pxmw== X-Gm-Message-State: AOAM531GzPt5ZhDAZV6LWi3hq9hUb5b73IsdGx7XtnrXo49AT8fynZbV L9kpr1rxGxUpmGZSxApf/PCGGzQDyX7JNg== X-Google-Smtp-Source: ABdhPJy4raWghb0Lfl/9VnRhkx0HLTY6H4MLT2GJmZnzn0Y6ww36amFcNfrEmnqkevpm8CIBuXgXlw== X-Received: by 2002:a5d:4b47:: with SMTP id w7mr25173344wrs.194.1612288527775; Tue, 02 Feb 2021 09:55:27 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/21] hw/ssi: imx_spi: Rework imx_spi_reset() to keep CONREG register value Date: Tue, 2 Feb 2021 17:55:04 +0000 Message-Id: <20210202175517.28729-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 When the block is disabled, all registers are reset with the exception of the ECSPI_CONREG. It is initialized to zero when the instance is created. Ref: i.MX 6DQ Applications Processor Reference Manual (IMX6DQRM), chapter 21.7.3: Control Register (ECSPIx_CONREG) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20210129132323.30946-5-bmeng.cn@gmail.com [bmeng: add a 'common_reset' function that does most of reset operation] Signed-off-by: Bin Meng Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index 8fb3c9b6d1b..e85be6ae607 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -228,15 +228,23 @@ static void imx_spi_flush_txfifo(IMXSPIState *s) fifo32_num_used(&s->tx_fifo), fifo32_num_used(&s->rx_fifo)); } =20 -static void imx_spi_reset(DeviceState *dev) +static void imx_spi_common_reset(IMXSPIState *s) { - IMXSPIState *s =3D IMX_SPI(dev); + int i; =20 - DPRINTF("\n"); - - memset(s->regs, 0, sizeof(s->regs)); - - s->regs[ECSPI_STATREG] =3D 0x00000003; + for (i =3D 0; i < ARRAY_SIZE(s->regs); i++) { + switch (i) { + case ECSPI_CONREG: + /* CONREG is not updated on soft reset */ + break; + case ECSPI_STATREG: + s->regs[i] =3D 0x00000003; + break; + default: + s->regs[i] =3D 0; + break; + } + } =20 imx_spi_rxfifo_reset(s); imx_spi_txfifo_reset(s); @@ -246,11 +254,19 @@ static void imx_spi_reset(DeviceState *dev) =20 static void imx_spi_soft_reset(IMXSPIState *s) { - imx_spi_reset(DEVICE(s)); + imx_spi_common_reset(s); =20 imx_spi_update_irq(s); } =20 +static void imx_spi_reset(DeviceState *dev) +{ + IMXSPIState *s =3D IMX_SPI(dev); + + imx_spi_common_reset(s); + s->regs[ECSPI_CONREG] =3D 0; +} + static uint64_t imx_spi_read(void *opaque, hwaddr offset, unsigned size) { uint32_t value =3D 0; --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289473; cv=none; d=zohomail.com; s=zohoarc; b=f7JcPHT7Kb1BGRy6dJMo8QqjuensusXobtohqE53rGCQP4xdLBwexFC2imyJMCvTYL9mHYcYtNwSwGsxoVYs3mRk2SLvCzaT6os0gF2pH/IpdhCDGRBjvgNHFOg33ZUYG07wC+29v5enxD7aUs1ohqTZw87RBPYve1JEUcayp0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289473; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2V568PL2qXyaAlMgVECYYwMlR3/oUNu8WmElQPIxI9E=; b=RRATRrPGn2/16PATkjZz7SL3w7ALt8y3U7cSsB5M48GnPR1Ujc4GysLMQatl1nWBG9qoA6h/6G1RWgh5D0+qLgqJBEJSYmTUZBz/IxzYifkcPqPOO8GjFree/BuaP+FD2NoB2FsmOKU4l3LDgHjxc6QbIjXpxmwrZlHFE3/HC1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161228947312321.085737357155494; Tue, 2 Feb 2021 10:11:13 -0800 (PST) Received: from localhost ([::1]:45114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l708u-0004y3-1Q for importer@patchew.org; Tue, 02 Feb 2021 13:11:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45480) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zty-0005RQ-3T for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:46 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:54465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztk-0002GS-Ud for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:45 -0500 Received: by mail-wm1-x332.google.com with SMTP id w4so2004492wmi.4 for ; Tue, 02 Feb 2021 09:55:29 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=2V568PL2qXyaAlMgVECYYwMlR3/oUNu8WmElQPIxI9E=; b=E7i9GxJn/Ywjvkreu+2pWIG50oQcWCmyOX+myGU6rVymTpFbqSIWg1uaHO/dG7FnWB aqlqV8YNN9r2cMrG0iIhuGNATa4TKtNqxSLxNKz36QArW8GlxFPvvGMRUDHF9/AUdgRX 7nfvDi0dGmi+At5FvSfmrENm3vy9SVgEXZMioJrnt9HcLE24Kg2NqCzde6DMOXKzIow9 sfWAqs1y31TjMqw5sunf3IfDebVVRNwtlvfKLGjZHbOy31h0RDWjjBeh8GuNzUH/mlVG m6Ua8mFD/DCzlBg7HUIfMsq2Q1o25STo+uPRM12GsMJrBw3SU8gK28hqw9L0m6qCS1gy LmCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2V568PL2qXyaAlMgVECYYwMlR3/oUNu8WmElQPIxI9E=; b=Yn6MTbiVWoA+ZN9heYMeZWw2LfDaJVpKXhn81tJMkzX9CH6tddGqOvpyLAF2pZ2O/i +IP4Msb1OPzZVZ4X+XB7Bqn0KaB4BUsZZnNsakhmQU7/5zg7EUamgkiMQ7Ln1UlpMYXZ HC4oeQFwKYlWDt7szUpQ8ILEFtVnGyXg2JYo0LWvqOz94V4IJZE8bEJu903hX5dIqXCm eJwCzl6GVg+F5/WYIlM2/9Y03H8D2SwFo/sqwhZTpDB83ua+2o9IcLnV8AzCow0dh6gy lNVuW+wVIXKNcdgTia19ggV30XXNC4Aasjxnv6XistShkTcUM/W7ePHPyrBvSlhhnHsy gQGw== X-Gm-Message-State: AOAM533UdG4ExozG9ejCFSCBJNazdFtYOWWg9merN/cF2zH1iuMszzXU AnD1wkrco121i/vi5j1J6tVT65Odz0uTDA== X-Google-Smtp-Source: ABdhPJwzj1YTDPrzvD/Gf34vLiUFmtmLuCpJ7OB7C9tTzZTGnMb+zFK3+btSUsD9+q9xpnHQjV7eOw== X-Received: by 2002:a05:600c:4e91:: with SMTP id f17mr4616900wmq.142.1612288528630; Tue, 02 Feb 2021 09:55:28 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/21] hw/ssi: imx_spi: Rework imx_spi_read() to handle block disabled Date: Tue, 2 Feb 2021 17:55:05 +0000 Message-Id: <20210202175517.28729-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 When the block is disabled, it stay it is 'internal reset logic' (internal clocks are gated off). Reading any register returns its reset value. Only update this value if the device is enabled. Ref: i.MX 6DQ Applications Processor Reference Manual (IMX6DQRM), chapter 21.7.3: Control Register (ECSPIx_CONREG) Reviewed-by: Juan Quintela Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bin Meng Signed-off-by: Bin Meng Message-id: 20210129132323.30946-6-bmeng.cn@gmail.com Message-Id: <20210115153049.3353008-5-f4bug@amsat.org> Reviewed-by: Bin Meng Signed-off-by: Bin Meng Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 60 +++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index e85be6ae607..21e2c9dea3e 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -279,42 +279,40 @@ static uint64_t imx_spi_read(void *opaque, hwaddr off= set, unsigned size) return 0; } =20 - switch (index) { - case ECSPI_RXDATA: - if (!imx_spi_is_enabled(s)) { - value =3D 0; - } else if (fifo32_is_empty(&s->rx_fifo)) { - /* value is undefined */ - value =3D 0xdeadbeef; - } else { - /* read from the RX FIFO */ - value =3D fifo32_pop(&s->rx_fifo); + value =3D s->regs[index]; + + if (imx_spi_is_enabled(s)) { + switch (index) { + case ECSPI_RXDATA: + if (fifo32_is_empty(&s->rx_fifo)) { + /* value is undefined */ + value =3D 0xdeadbeef; + } else { + /* read from the RX FIFO */ + value =3D fifo32_pop(&s->rx_fifo); + } + break; + case ECSPI_TXDATA: + qemu_log_mask(LOG_GUEST_ERROR, + "[%s]%s: Trying to read from TX FIFO\n", + TYPE_IMX_SPI, __func__); + + /* Reading from TXDATA gives 0 */ + break; + case ECSPI_MSGDATA: + qemu_log_mask(LOG_GUEST_ERROR, + "[%s]%s: Trying to read from MSG FIFO\n", + TYPE_IMX_SPI, __func__); + /* Reading from MSGDATA gives 0 */ + break; + default: + break; } =20 - break; - case ECSPI_TXDATA: - qemu_log_mask(LOG_GUEST_ERROR, "[%s]%s: Trying to read from TX FIF= O\n", - TYPE_IMX_SPI, __func__); - - /* Reading from TXDATA gives 0 */ - - break; - case ECSPI_MSGDATA: - qemu_log_mask(LOG_GUEST_ERROR, "[%s]%s: Trying to read from MSG FI= FO\n", - TYPE_IMX_SPI, __func__); - - /* Reading from MSGDATA gives 0 */ - - break; - default: - value =3D s->regs[index]; - break; + imx_spi_update_irq(s); } - DPRINTF("reg[%s] =3D> 0x%" PRIx32 "\n", imx_spi_reg_name(index), value= ); =20 - imx_spi_update_irq(s); - return (uint64_t)value; } =20 --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289994; cv=none; d=zohomail.com; s=zohoarc; b=D5v0M+aNNbdv+gu4aR5//4SiP/iDiXHk1Eit3K7q/EWcfqeUXWEvk+FSzlKS5171XkQ7ghKQtl5ec5GtUiE7p1rSCFQcqu4uq9DNo8UjlkAtkq+J2MQ5sx1JEAREAvZjWwILTBcZne0AcW8Q18MfmWsP+C+Xb6Gb+8X/kfJEJ+o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289994; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AVvdEWVj2Xg9ArX8nfMN+uOJ7a4G57lHSczBDznXp9I=; b=FAq0hd2jxNlIDmoJYWWbSyHdpA0iJI6oT2pddEEburLH7v9YgFJh27Uqx3JGAZO9l9ibT2Gj2YgA0ib1rqXAyE+eUT2j4v2ifrqJbP9Hxzmu9lOy9n3/Z2/WXYJDbIxUMxYAggnlkFCoRjkt50gCquJDW5X6kOWgJsPxdSkpAAg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289994045375.01580949715355; Tue, 2 Feb 2021 10:19:54 -0800 (PST) Received: from localhost ([::1]:39722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70HI-0007Mh-RO for importer@patchew.org; Tue, 02 Feb 2021 13:19:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu2-0005dp-SX for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:50 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztw-0002Ga-Bk for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:50 -0500 Received: by mail-wr1-x42a.google.com with SMTP id v15so21461742wrx.4 for ; Tue, 02 Feb 2021 09:55:30 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=AVvdEWVj2Xg9ArX8nfMN+uOJ7a4G57lHSczBDznXp9I=; b=kmZux+o65R7W3jp/WuoC/i8kCIhEGMQ+MZYcEq+e99KZew7w0JyBqfYTXg7eQQRZai 0UDKgkElckWTqxz8dAwcuQia9yeQhIGmPr+ICRl6O7PDCWTpD/aiLpiys8L+iwUdb8+A Y1kIVois7XuBQT6tYdZpja8tVd9LI+Q3dzyN5OP/DS5Gj+IrhmxdbO6mV06totfmwnxz l2yvIXKXMuJ/KaXa5w406Krpvk14qaZPraTb6C2VgPx3tgSRR1+HF+eRJ/vY9y/oafVl pbF576s5nDiKzNM7VAV3yzcSjfokkiGKX1beQVf/4GlGj9DmhXjtM9iLfILK2YI0VcHE vxLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AVvdEWVj2Xg9ArX8nfMN+uOJ7a4G57lHSczBDznXp9I=; b=tm81VzRMu8lZHUQwGW7aq+GbCbSXyADhJMbflJ0wU2zK46dd7FB/RzhetgSqqKUiwe IqL+sylXjWCIg3riSYk3exOKmxjiLuKlZCa8TBJkpA99X0IkZ1Ko4nuhz+dR5Xz3YmBD jjpHKVWA1iQ5qZJ7YIOfyN1YKk+Mgr/oDlhNTb56mBAHY3U+Qxv+0XBy2HW6qA9iqdiV UiZgEIrmomPwnovodRp1PFuAbT6jsGML99ITHXPb7fIe7Y8NqGL6WhLgtPXIP3TNBT28 neRmwhdE1ncTWMs+cG0zA6T83FYl5r3UT0wcaLAT02sINwBIEXyaeud7YvHX58jmAwW+ Fk8Q== X-Gm-Message-State: AOAM531lweiVR4neKOfG3j6Eypd27fwcRhUEIEpUVU2bPE4igflOVzPj F9TtV2M248JFuYAGiu7W3TAhP5jBXhvM+A== X-Google-Smtp-Source: ABdhPJwZUZ1UDVSAMpa37bq052l4HvOvkUKTUx13DR7eeFAi2CgF6frgUuHX6AqVMcXeDW9l3J7etQ== X-Received: by 2002:a5d:4203:: with SMTP id n3mr24956118wrq.49.1612288529457; Tue, 02 Feb 2021 09:55:29 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/21] hw/ssi: imx_spi: Rework imx_spi_write() to handle block disabled Date: Tue, 2 Feb 2021 17:55:06 +0000 Message-Id: <20210202175517.28729-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 When the block is disabled, only the ECSPI_CONREG register can be modified. Setting the EN bit enabled the device, clearing it "disables the block and resets the internal logic with the exception of the ECSPI_CONREG" register. Ignore all other registers write except ECSPI_CONREG when the block is disabled. Ref: i.MX 6DQ Applications Processor Reference Manual (IMX6DQRM), chapter 21.7.3: Control Register (ECSPIx_CONREG) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Bin Meng Reviewed-by: Peter Maydell Message-id: 20210129132323.30946-7-bmeng.cn@gmail.com Message-Id: <20210115153049.3353008-6-f4bug@amsat.org> Signed-off-by: Bin Meng Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index 21e2c9dea3e..4cfbb73e35e 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -332,6 +332,14 @@ static void imx_spi_write(void *opaque, hwaddr offset,= uint64_t value, DPRINTF("reg[%s] <=3D 0x%" PRIx32 "\n", imx_spi_reg_name(index), (uint32_t)value); =20 + if (!imx_spi_is_enabled(s)) { + /* Block is disabled */ + if (index !=3D ECSPI_CONREG) { + /* Ignore access */ + return; + } + } + change_mask =3D s->regs[index] ^ value; =20 switch (index) { @@ -340,10 +348,7 @@ static void imx_spi_write(void *opaque, hwaddr offset,= uint64_t value, TYPE_IMX_SPI, __func__); break; case ECSPI_TXDATA: - if (!imx_spi_is_enabled(s)) { - /* Ignore writes if device is disabled */ - break; - } else if (fifo32_is_full(&s->tx_fifo)) { + if (fifo32_is_full(&s->tx_fifo)) { /* Ignore writes if queue is full */ break; } --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289791; cv=none; d=zohomail.com; s=zohoarc; b=bGUicl58YXmyq5Mt/Z5chJenrMDhIU+ZaNJ7uH/gcqGfPRVCHJ/kYR2WC93+14PXzEp18UnghZ5RXqXw66Jzu6/KM4TFSQgFI7xIEiVYWY2FHIIddu33rMCE3hP2SbQ6GI4LmsxKwcfgRQyJod9KEOXr65kWjQgXk2MHWwylteY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289791; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gdtHlIrMwoP0z47d98DhPSjo1F4nkYLQdfh3htMSjrQ=; b=E/yESGsHoL0jNEXz94IFTZ+t5k8kvRoAyJgDwKFoCSOarw51Pmeg4d9LmWZpUIV+F5r9Hid3wL0ZafuR0aF19FOUb46zr5qI7aPGe1UKr+QqsE7DNKOr2mNvU5qxdOPFK6J97ujih5vBtU5z4OgqeqOAeCrn7YvPyffKv5DTM6Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289791072473.8131849968844; Tue, 2 Feb 2021 10:16:31 -0800 (PST) Received: from localhost ([::1]:59034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70E1-0002mO-Vp for importer@patchew.org; Tue, 02 Feb 2021 13:16:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ztx-0005QZ-Nj for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:45 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:54457) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztk-0002Ge-Uk for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:45 -0500 Received: by mail-wm1-x329.google.com with SMTP id w4so2004566wmi.4 for ; Tue, 02 Feb 2021 09:55:31 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gdtHlIrMwoP0z47d98DhPSjo1F4nkYLQdfh3htMSjrQ=; b=vOqC/9B8jUykf+sWEebCVJ9gTxI7mAUTbmVJwuvSKsGN7/NT28JEgSBRxhbmz3XOua IfGqaoN+G/IOTdvKNGXOo7AM133kgFaI/YfOKlEszVHM9uqL1jbiwUSIJCAyaffu3GRp LhU5k6EcJUVvwoxDd71RquE+b5YBXWKRWAS22YFOWYyb9AdZtjX600Qt4Be972jKo94a Pk3dwZVNZTMTz5yZHJre4jtHNyE6YcgKtziG2qaiZBVqKzyUtGnsGwn1Zh2v8oXmyaCp HlTasuvkA2/vfDkejFB0Z+69EuDFKVLWpIjXAgRQ8aKbHUy1aZWJUEIAMZyXRPUw+Prg wzJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gdtHlIrMwoP0z47d98DhPSjo1F4nkYLQdfh3htMSjrQ=; b=BbHDAu4fYpGdobigVlZqz0BJj9YW7tkaNTiaMHZj0UKD6c8mdVFdQUb3JA70wi9Wd0 5f/nrQUvo6Bydh6ZkMnqszFk4aKilcQXTAuNoioa/s2XhGBfxgo469inYPkgqNW4fMEs im1vJmUR557qCQU9EsoXzN+3uV77wcJlSApsONKlovONpacvxlpCWqHcaznSuhbJju6c LC8OKBWTERSVLzcikY6SKpzAQGUaOjOY/XEc3Yn7zTSEKxls5rxIiNIwSjpRu3gjwCG9 vgoDcv25zOIIQIGfWXTXDbizJxKK0tQsZK/2wDjwfVPqlJT12lX3lthmUZwJZBO75mw9 Qf6w== X-Gm-Message-State: AOAM531XXnh0AMUZMiLkfI6H9bmKOwPyjNGR4h7fg2zO8StGG5mFr+Yx pZ6iQF7tAbnpxSE782TH/yAwKJLCf8zGvw== X-Google-Smtp-Source: ABdhPJzIDg+tqfNi88bXatjfuLgan0o7rWeJrc6KdiIrK+QN4bXnJ0HKPz1vKe4K1tSN0nslfBQxBQ== X-Received: by 2002:a1c:e255:: with SMTP id z82mr4604528wmg.93.1612288530812; Tue, 02 Feb 2021 09:55:30 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/21] hw/ssi: imx_spi: Disable chip selects when controller is disabled Date: Tue, 2 Feb 2021 17:55:07 +0000 Message-Id: <20210202175517.28729-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Xuzhou Cheng When a write to ECSPI_CONREG register to disable the SPI controller, imx_spi_soft_reset() is called to reset the controller, but chip select lines should have been disabled, otherwise the state machine of any devices (e.g.: SPI flashes) connected to the SPI master is stuck to its last state and responds incorrectly to any follow-up commands. Fixes: c906a3a01582 ("i.MX: Add the Freescale SPI Controller") Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20210129132323.30946-8-bmeng.cn@gmail.com Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index 4cfbb73e35e..2fb65498c3b 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -254,9 +254,15 @@ static void imx_spi_common_reset(IMXSPIState *s) =20 static void imx_spi_soft_reset(IMXSPIState *s) { + int i; + imx_spi_common_reset(s); =20 imx_spi_update_irq(s); + + for (i =3D 0; i < ECSPI_NUM_CS; i++) { + qemu_set_irq(s->cs_lines[i], 1); + } } =20 static void imx_spi_reset(DeviceState *dev) --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289535; cv=none; d=zohomail.com; s=zohoarc; b=QA+kpj/frlGmEs2MBdfRestdwWghbvMwZVagUUma7ICvNv7lXyNUA6jC+AZsHvbLVcCG7Lf5LVUL1Ts0z46ZgNFjwWAGpXx1QYTYGjLfOyR7gz5p9KYavIlBSn8L9asun0tbDvJjwA6temJrGys5M84ksUSV9hcrHDSJm7Q1wh8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289535; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0IbeLEv+nBGqgdfGoMlEhJ+BrvMFVB6OHrLiFHgUDlA=; b=aBtvb7vUkuwMnQC/207L7IpcK1oWnQ1maAAvt4pOFmvP5eU/p8c8b2QE7zwHYOwlmmQNt8lHacx7MN6NTIhd2P55yZ5WZ0f12Ho4IFndcoq8+u1b5UhOGRjOJwuqNGRcNP/fBF2S0UcNPTWWc9DRi3GpIhotx1jxbaJC2QRrUAo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289535388763.2579986260467; Tue, 2 Feb 2021 10:12:15 -0800 (PST) Received: from localhost ([::1]:47500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l709u-00069j-8j for importer@patchew.org; Tue, 02 Feb 2021 13:12:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ztz-0005WR-QT for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:47 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:34869) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztp-0002Gi-0s for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:47 -0500 Received: by mail-wr1-x42c.google.com with SMTP id l12so21439790wry.2 for ; Tue, 02 Feb 2021 09:55:32 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0IbeLEv+nBGqgdfGoMlEhJ+BrvMFVB6OHrLiFHgUDlA=; b=MBMTAd99AdxyL+9wT5RJTfh0bNUfLluVw8v8Y+AULOmERVkqhTIytEi0ycBtSPrMxZ /kRPON5Zxctr08465n7scXL0NfkyaBDn/zOh7S2Z/9gI3BmqSQ1e9tmWEGuOkJw+Y/jq sz6rx6znpMdxQ3mJJQmERs1gV5d3JZVbilUXVGXVI8BzQpkpCxyXLuAqi+YTkAOdZWrO N23yrzX/r0ZfT4smrnAXI86r0RAjyevFJ7rCXMnpRb2a6bPfGc+pphVOD8dJY0ozVlqI RukrlOMbtIOnP+VU/86BLUU33RQiE3pJ1LZ7t+QtjyHrEYO1uiMNX4mY1JXvTlAJaq/N cbCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0IbeLEv+nBGqgdfGoMlEhJ+BrvMFVB6OHrLiFHgUDlA=; b=HlT/gfMMH4JnNAc1n2bcWZBhJy/11Z5DoKzAT25U0bPP3a0YttsZlOIyS8iFsf6OsZ 4fU1vSrC1Tuq6bOIPJwjbB1V1Fn81+OVn8a+AGU7JfoowO4Mss/617YcEi/btZeu2sHh ZKEtlDfLbFyF55d9tvSxhm7WwAIJQm5Vi1iWk/2382Ca+xCRhAZKPU0NYmcR4x3eu1NE H/2kLUgmYJr0UUzEpCtK2FSVE+kEAH3e34qOEbmXuSJ7TQxrTpap7lmerCPXmLC8SIKE rdI70j3Zu8B9xuw579hs/vkpa1r/wM+wMoJcKgVE7Q2DAT8sv64Ht0GWG8sGamInzSDJ PSyw== X-Gm-Message-State: AOAM530bV4tpzixkomLiqK8D2I3kYkY8kEa5IyqXA9mkjCLv8easkpRp L6S1izmHdd/8nou31yoV9nG9ClzBtX1kvQ== X-Google-Smtp-Source: ABdhPJyDPZJjNuL0LajBgqb+ufw0JcqwcP7W5oYbfcWfl1/DYvGKxbA7hwpvqKBDTXB1sOSUhxicAg== X-Received: by 2002:a5d:4d86:: with SMTP id b6mr24800539wru.152.1612288531738; Tue, 02 Feb 2021 09:55:31 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/21] hw/ssi: imx_spi: Round up the burst length to be multiple of 8 Date: Tue, 2 Feb 2021 17:55:08 +0000 Message-Id: <20210202175517.28729-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Bin Meng Current implementation of the imx spi controller expects the burst length to be multiple of 8, which is the most common use case. In case the burst length is not what we expect, log it to give user a chance to notice it, and round it up to be multiple of 8. Signed-off-by: Bin Meng Message-id: 20210129132323.30946-9-bmeng.cn@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index 2fb65498c3b..41fe199c9f1 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -128,7 +128,14 @@ static uint8_t imx_spi_selected_channel(IMXSPIState *s) =20 static uint32_t imx_spi_burst_length(IMXSPIState *s) { - return EXTRACT(s->regs[ECSPI_CONREG], ECSPI_CONREG_BURST_LENGTH) + 1; + uint32_t burst; + + burst =3D EXTRACT(s->regs[ECSPI_CONREG], ECSPI_CONREG_BURST_LENGTH) + = 1; + if (burst % 8) { + burst =3D ROUND_UP(burst, 8); + } + + return burst; } =20 static bool imx_spi_is_enabled(IMXSPIState *s) @@ -328,6 +335,7 @@ static void imx_spi_write(void *opaque, hwaddr offset, = uint64_t value, IMXSPIState *s =3D opaque; uint32_t index =3D offset >> 2; uint32_t change_mask; + uint32_t burst; =20 if (index >=3D ECSPI_MAX) { qemu_log_mask(LOG_GUEST_ERROR, "[%s]%s: Bad register at offset 0x%" @@ -380,6 +388,13 @@ static void imx_spi_write(void *opaque, hwaddr offset,= uint64_t value, case ECSPI_CONREG: s->regs[ECSPI_CONREG] =3D value; =20 + burst =3D EXTRACT(s->regs[ECSPI_CONREG], ECSPI_CONREG_BURST_LENGTH= ) + 1; + if (burst % 8) { + qemu_log_mask(LOG_UNIMP, + "[%s]%s: burst length %d not supported: rounding= up to next multiple of 8\n", + TYPE_IMX_SPI, __func__, burst); + } + if (!imx_spi_is_enabled(s)) { /* device is disabled, so this is a soft reset */ imx_spi_soft_reset(s); --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289663; cv=none; d=zohomail.com; s=zohoarc; b=QrPMRLs5JK67HpWC80liC1TiatHzc3hshOtuQqwZLyMqGmLM9ASC7r6TrYXecI0zaujqBjfycFGSeGOBNwMn7/dnbINDyz20+wjsJjngmRlG1R15WgDrL95RBiWPpObJZh3Ee4K33n9mF4KRvnsZH0CJex+Yx11quwIPf+lYnu4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289663; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3psuB1ujp7JFYSza2o7U3rCXIKQg0wNOJZ1+v6YLYU8=; b=ldA5IurF06U9gO6UsFsjKpkCO+KfRXLhTYldatu6WkovucvfB9KHwkFuxjUE8VFz3xaxZEG/LrJwgsXR16ZAprWMYxxHVYueUaqusJRegCbsp/O2Wz7j0EsDL7P1+VIQZh2zJjCcBc7k/FeZpJgWY8U9BG3GbrnzTaUe4cDACpI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289663091875.0844217373357; Tue, 2 Feb 2021 10:14:23 -0800 (PST) Received: from localhost ([::1]:54028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70By-0000fG-11 for importer@patchew.org; Tue, 02 Feb 2021 13:14:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45510) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6ztz-0005UD-4s for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:47 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:34561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6zto-0002Gm-Vy for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:46 -0500 Received: by mail-wm1-x333.google.com with SMTP id o10so2415562wmc.1 for ; Tue, 02 Feb 2021 09:55:33 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3psuB1ujp7JFYSza2o7U3rCXIKQg0wNOJZ1+v6YLYU8=; b=PK78JQ2WxQdUHVuGycKPPxv1RwV1K077sakOFKGWXp5NcZDlvCnaMpjMDYxuCjLW0U C6n51/y3ut81kJ3+tLQOUgtrWm3V+9agfa3FEJoXB4itMPH+c7/i/guvWEeacI7/5lev o6+70fwTI5P3m15hCR0C6WG1yaNh1Nm/Dv18XMb4cM4ik6kuC3UgrMHD1ndQdo1eaM9/ DxIPQx4MmRi9klaGthNf8bRjIsSk/9/BXU4xpDy2WmNNSpV8iKS1r3UaQ3LaD002MPQY gBs0eoJYF2jRM6mw99roPjUdESoNrtmk44aHrNZoqZyhZWz3acPNQDEaX/W2ao87gmsn 1ITg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3psuB1ujp7JFYSza2o7U3rCXIKQg0wNOJZ1+v6YLYU8=; b=jBOTvHGGL3IASMnAWGavrozabpOUgXGJvwTnr6/Ia/pdMarBkCtsOvlfskft9C8FOw g3uTC+KIl+lp7ycH9HpzS4wARzBL77LHYKV3anThlEGJlW35XYPHUQ5q5Ig4QdOx0oZM jnlTdgUbFvOxuaIfW2HATCSumv/R3L0nGZFWq+3EPuWZUHX5o6u9+0Dll1lr6hjeGnxw QMFehNlNtQ+itc1ARMZZ3dtCpDvZ5qGEAJVZvdCploD24UYh9m+VKfaK0/oMOFGaXU48 4rUM+rP29MA7bepAvXPCqM82vnG+v+LeDwPSnI41o4hEzHXKVLgVj9T7LkvcS3LmEYXN m/eg== X-Gm-Message-State: AOAM533auyeDOhBQhYWWL6dqMBwpcevLnBjs1wHMeUWlxtoCEJwUvtl1 4u/MnzmKsu7XKtlQ5gljFqtReyy8gKdg4w== X-Google-Smtp-Source: ABdhPJzWVSuhZpWpH2Nc03tnKSuDghoC+XdQ9QPkv2c+kuVCBos/DsaQSFzutda4QZ/saueBrMwckw== X-Received: by 2002:a7b:c7c8:: with SMTP id z8mr4711019wmk.72.1612288532487; Tue, 02 Feb 2021 09:55:32 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/21] hw/ssi: imx_spi: Correct the burst length > 32 bit transfer logic Date: Tue, 2 Feb 2021 17:55:09 +0000 Message-Id: <20210202175517.28729-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Bin Meng For the ECSPIx_CONREG register BURST_LENGTH field, the manual says: 0x020 A SPI burst contains the 1 LSB in first word and all 32 bits in secon= d word. 0x021 A SPI burst contains the 2 LSB in first word and all 32 bits in secon= d word. Current logic uses either s->burst_length or 32, whichever smaller, to determine how many bits it should read from the tx fifo each time. For example, for a 48 bit burst length, current logic transfers the first 32 bit from the first word in the tx fifo, followed by a 16 bit from the second word in the tx fifo, which is wrong. The correct logic should be: transfer the first 16 bit from the first word in the tx fifo, followed by a 32 bit from the second word in the tx fifo. With this change, SPI flash can be successfully probed by U-Boot on imx6 sabrelite board. =3D> sf probe SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, tota= l 2 MiB Fixes: c906a3a01582 ("i.MX: Add the Freescale SPI Controller") Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20210129132323.30946-10-bmeng.cn@gmail.com Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index 41fe199c9f1..a34194c1b06 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -185,7 +185,7 @@ static void imx_spi_flush_txfifo(IMXSPIState *s) =20 DPRINTF("data tx:0x%08x\n", tx); =20 - tx_burst =3D MIN(s->burst_length, 32); + tx_burst =3D (s->burst_length % 32) ? : 32; =20 rx =3D 0; =20 --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289534; cv=none; d=zohomail.com; s=zohoarc; b=f0lfxCwJJI8taq9AFp21ujRhNEQTMNm4QxDEusms88dnSaJq38N0T/RG2HnNMFSgVzUw0Jgk8xSWNgvwkm9RPTvB1F/uYu7E5IY2A2KDNHW2mtlazhoWO2OtJCFf/xsVvHTr76fTus5KguouWdgR8SCiQsuPXnRdWDwawVeijxA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289534; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ucWUEoYYchXzDLEbvClJQp6sHbKPuWhIZgX+SOpoXsg=; b=StTA+CDO0CFq+FNr2zIsyBxP9xwSBBemv8HW23KH+oK9fDMbBzNHW4uM7vkEFI0fVeg5RzuZoqbrdExSZc8/1Lorxf49jwuz6l/FFTnGaDUA2qxljEYYNsPriSlO2ROhaB+xSj3vRuKiPpMpJdxK2c9SjoGgvLMOBBVnmlJKjeQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161228953488361.32856820683355; Tue, 2 Feb 2021 10:12:14 -0800 (PST) Received: from localhost ([::1]:47408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l709t-00067O-RO for importer@patchew.org; Tue, 02 Feb 2021 13:12:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu1-0005aM-Gi for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:49 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:37276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztr-0002Gw-O7 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:49 -0500 Received: by mail-wm1-x32e.google.com with SMTP id m1so3079149wml.2 for ; Tue, 02 Feb 2021 09:55:34 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ucWUEoYYchXzDLEbvClJQp6sHbKPuWhIZgX+SOpoXsg=; b=SksGykz9B4/hpM3xPo543HTI4nV5EP1Zd0O2IzKm57cqbFkgiGU3a68ch27vN59F8q 6FG/Ro55oSUifrjnXMcBYyTzAayL4owbXqzUg+zuu6SBEpeaFRdmhxYbQ4DdDi5I9PyT aVZn0iC/FyaXceUNnI2TnxoE3rJTgd6Hn1v9dQrAOsq6RmjsgmcLl+h7UyDP37VYta9A y5REkg3c82vs6BgSrTrBAMUiBVrFsMrO8McSh3mi6hpBxIt7GNGfzF9jGJ4JlwHIwHEt gJs6etbi90PAH57LSCPrZs7WZXNPYBj4c+f0KVwNdH+v1atwVHzjy2kwINd+t97D5eYz Vttw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ucWUEoYYchXzDLEbvClJQp6sHbKPuWhIZgX+SOpoXsg=; b=aC970nlpYpdZRD23pCA8Qq033ukC7oGOAyvmyCkKs4dX6wV1m0d/7QqtZd6y7sR+QZ uyICEPbH44SIWAG3zMTaJJUmO6N0pK0m28VZRMCFfICDApvkVnw60dFCzxF4k7kzwiDp j3kKSyiLeHOBPvqaw26GSwcuMB477edewyHKpTZt8WoX0h9yEk+3JOaswVt05YfFLEnk T2RXHhTGZvMxddSW0soXKm29SekayzuBHhpmL+zoUTfE7gu5fCUIMAwF5vwDUXFx5l9v fZgzxnhQeXp/FSUJNSOnJ3ejdVt4GqM5NEzAC8tS5lTILZkmDeiuwwF4ZSW6cYIemW7K tVMw== X-Gm-Message-State: AOAM533v9bjq+HzPWlZ+qLub6hNszH3a2F6EhaHF3RuWvsBUrhpcz9o3 tLH1S545f005JDW1bFhVp3FehQ1JGpSgdQ== X-Google-Smtp-Source: ABdhPJzItYtWtjJUINPhCFV5Hl+6niEVnhxjd0Fy81E9Tz4Ecix28n/I5v+IL4TiP1x+p3nSgodQjw== X-Received: by 2002:a7b:cb8a:: with SMTP id m10mr4593048wmi.127.1612288533260; Tue, 02 Feb 2021 09:55:33 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/21] hw/ssi: imx_spi: Correct tx and rx fifo endianness Date: Tue, 2 Feb 2021 17:55:10 +0000 Message-Id: <20210202175517.28729-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=peter.maydell@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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" From: Bin Meng The endianness of data exchange between tx and rx fifo is incorrect. Earlier bytes are supposed to show up on MSB and later bytes on LSB, ie: in big endian. The manual does not explicitly say this, but the U-Boot and Linux driver codes have a swap on the data transferred to tx fifo and from rx fifo. With this change, U-Boot read from / write to SPI flash tests pass. =3D> sf test 1ff000 1000 SPI flash test: 0 erase: 0 ticks, 4096000 KiB/s 32768.000 Mbps 1 check: 3 ticks, 1333 KiB/s 10.664 Mbps 2 write: 235 ticks, 17 KiB/s 0.136 Mbps 3 read: 2 ticks, 2000 KiB/s 16.000 Mbps Test passed 0 erase: 0 ticks, 4096000 KiB/s 32768.000 Mbps 1 check: 3 ticks, 1333 KiB/s 10.664 Mbps 2 write: 235 ticks, 17 KiB/s 0.136 Mbps 3 read: 2 ticks, 2000 KiB/s 16.000 Mbps Fixes: c906a3a01582 ("i.MX: Add the Freescale SPI Controller") Signed-off-by: Bin Meng Reviewed-by: Peter Maydell Message-id: 20210129132323.30946-11-bmeng.cn@gmail.com Signed-off-by: Peter Maydell --- hw/ssi/imx_spi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/ssi/imx_spi.c b/hw/ssi/imx_spi.c index a34194c1b06..189423bb3a5 100644 --- a/hw/ssi/imx_spi.c +++ b/hw/ssi/imx_spi.c @@ -169,7 +169,6 @@ static void imx_spi_flush_txfifo(IMXSPIState *s) =20 while (!fifo32_is_empty(&s->tx_fifo)) { int tx_burst =3D 0; - int index =3D 0; =20 if (s->burst_length <=3D 0) { s->burst_length =3D imx_spi_burst_length(s); @@ -190,7 +189,7 @@ static void imx_spi_flush_txfifo(IMXSPIState *s) rx =3D 0; =20 while (tx_burst > 0) { - uint8_t byte =3D tx & 0xff; + uint8_t byte =3D tx >> (tx_burst - 8); =20 DPRINTF("writing 0x%02x\n", (uint32_t)byte); =20 @@ -199,13 +198,11 @@ static void imx_spi_flush_txfifo(IMXSPIState *s) =20 DPRINTF("0x%02x read\n", (uint32_t)byte); =20 - tx =3D tx >> 8; - rx |=3D (byte << (index * 8)); + rx =3D (rx << 8) | byte; =20 /* Remove 8 bits from the actual burst */ tx_burst -=3D 8; s->burst_length -=3D 8; - index++; } =20 DPRINTF("data rx:0x%08x\n", rx); --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612290057; cv=none; d=zohomail.com; s=zohoarc; b=hdjSFoK+w3sEFznFrQFEHrkQqCbfzBBDZeUz7qWuWABFuEeVR7wzsLf4qvj4NDRmRxgdMcJnwak+KE8JtKh4RElwi1zJwGHsnrumLK2xk2TJg6m2Q4AVoOlyu8wVVDZVTmZd4luZYLcNzOaH1jRs1iGle+yVdyUPDRyBK0POoig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612290057; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=SQ4xA2yLq/phDq6xvwhKfOz8fL2buou5U7Bfn4DEe+E=; b=YT5rWK6/F2xy12HfAFPTAeSr70vY5FNeeu8MG9K7Aei8UkymquvpAhOj9k+Hcp4WUtjshTV6nuaJfEeSAAtqTiQtMgA2Sy1nCpEvwBUS+eCepsQRBtq6/oOh/DAPz9qmOwLvwwQaafCHMVAms9LiIFlUWy8FWO5kkRDNEE8Zvoc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612290057747661.6927204068367; Tue, 2 Feb 2021 10:20:57 -0800 (PST) Received: from localhost ([::1]:43210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70IJ-0000O9-Gd for importer@patchew.org; Tue, 02 Feb 2021 13:20:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu0-0005Xj-A6 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:48 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:52748) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztp-0002H6-TR for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:48 -0500 Received: by mail-wm1-x336.google.com with SMTP id l12so2225926wmq.2 for ; Tue, 02 Feb 2021 09:55:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=SQ4xA2yLq/phDq6xvwhKfOz8fL2buou5U7Bfn4DEe+E=; b=e3i34LADxU6ACmvk7RsDDsxrI+XEZsye3obE7td+/cmM50v2dnDOzC7whGUfo0Tx1x LU3cmam0GecPSX5+N/2zZ/AOqj0j2jfOO9truCceZmNU96cPD4hpHVEolnjxkgGbHhbE 7pase01eLY56P8blu0YztrpcubM5WT0t/qC+VA3qLuU0iN9BPyjqB2w5xq2sFDQJNGAG p1eeAclYfTOkoJrB53MqVEQniHE4VzNb9gX17VT0+iB6ZOZPl9hdFgoJxisNnKdEqZd5 4ZjRmY8lHBliBNCXWnR1F8t7kiERwLFNXFKNqoRaWw0YjGlC4n6TcNH0eMGcr2mzzgXN VnQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SQ4xA2yLq/phDq6xvwhKfOz8fL2buou5U7Bfn4DEe+E=; b=FIpccIexutro/S6cDOrh+P+SMDZOqwMdwI6vWPuRPj/YqnHIMlUqq0s0LTSH31GAnA TYQ5KUXJhag9iaCApIDnXBQWkNkPOYT+mzARG1HeHRb8jB9Ly2rHYkRSBK7eijq/j8x2 5SqdWWT5/H2D2zhBqpV8LsTGMdNEKTQJi2+WSexNHUKNkECXNQGOyp/+h2MT7nkj7euj d0HKBiyUYhNnVo1N+iJK8ZBIRpGN+J+/XcyF4g3/h8efxv9oB6TOYO7nvsYr5p6GPpKv 38UBjRxRj53CAC/ezAUAC8u9f9l90xQP2/uR7Bhi1vxixz+BPVs/Vmvy4IohDubPsG8N Y2Dg== X-Gm-Message-State: AOAM53184eaFI//OauGd0VdozDb1sS/zoa5L+H+Mo8PbyZ8j1evhoabE cBCxFO9hR8PYp815eclCLbTJtkGwJ29/Kg== X-Google-Smtp-Source: ABdhPJyFbKQJK8w/EfyLG2VS4byRL73xsKLz/mWnJgegAO8exgHJrWIYJEw9XXr4cYIM2cCF3XGGSw== X-Received: by 2002:a1c:46c6:: with SMTP id t189mr4763302wma.57.1612288534094; Tue, 02 Feb 2021 09:55:34 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/21] hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register Date: Tue, 2 Feb 2021 17:55:11 +0000 Message-Id: <20210202175517.28729-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 Per the ARM Generic Interrupt Controller Architecture specification (document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit, not 10: - 4.3 Distributor register descriptions - 4.3.15 Software Generated Interrupt Register, GICD_SG - Table 4-21 GICD_SGIR bit assignments The Interrupt ID of the SGI to forward to the specified CPU interfaces. The value of this field is the Interrupt ID, in the range 0-15, for example a value of 0b0011 specifies Interrupt ID 3. Correct the irq mask to fix an undefined behavior (which eventually lead to a heap-buffer-overflow, see [Buglink]): $ echo 'writel 0x8000f00 0xff4affb0' | qemu-system-aarch64 -M virt,accel= =3Dqtest -qtest stdio [I 1612088147.116987] OPENED [R +0.278293] writel 0x8000f00 0xff4affb0 ../hw/intc/arm_gic.c:1498:13: runtime error: index 944 out of bounds for = type 'uint8_t [16][8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../hw/intc/arm_gi= c.c:1498:13 This fixes a security issue when running with KVM on Arm with kernel-irqchip=3Doff. (The default is kernel-irqchip=3Don, which is unaffected, and which is also the correct choice for performance.) Cc: qemu-stable@nongnu.org Fixes: 9ee6e8bb853 ("ARMv7 support.") Buglink: https://bugs.launchpad.net/qemu/+bug/1913916 Buglink: https://bugs.launchpad.net/qemu/+bug/1913917 Reported-by: Alexander Bulekov Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20210131103401.217160-1-f4bug@amsat.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index c33b1c8c4bc..a994b1f0245 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -1477,7 +1477,7 @@ static void gic_dist_writel(void *opaque, hwaddr offs= et, int target_cpu; =20 cpu =3D gic_get_current_cpu(s); - irq =3D value & 0x3ff; + irq =3D value & 0xf; switch ((value >> 24) & 3) { case 0: mask =3D (value >> 16) & ALL_CPU_MASK; --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289876; cv=none; d=zohomail.com; s=zohoarc; b=n0ACxhwQN6XLKYgF2gAklOtZ47AxxQkASsCzI8lzwKGP9cLT+T8VjfxbrduFfdS6EuQJAMYKuwxcvQOKuDglDoCiyCX7mpm5Dv+KrrrLUK3z13iirncQdotyxg3HUoohd1SMjjipgXmGJdTbidfzAf3WOSZiPk4WD9ipkBoi7jc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289876; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/ui3mPYh//6P4ROb9feP98zESvjv3VvYW7WCODFKeEk=; b=Yq/5MIqOd0et22WlkG2mRyAsEe3O9jrgjSoBs7JeyavSycDubrQz8EVfUznn1JIYhAThYwIw4WJmrW89pcFaVuIH6x+d6hzb+T76DnGYWCzR+JHDbFOF9jTJoNor75Ro4u6jwRrilDNuSA2Yu5lObYwovfU38nAe7iasGxCa0uI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289876680438.97706917907124; Tue, 2 Feb 2021 10:17:56 -0800 (PST) Received: from localhost ([::1]:34572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70FO-0004cr-Gw for importer@patchew.org; Tue, 02 Feb 2021 13:17:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu0-0005Ws-0M for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:48 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:34874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztq-0002H9-8H for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:47 -0500 Received: by mail-wr1-x431.google.com with SMTP id l12so21439984wry.2 for ; Tue, 02 Feb 2021 09:55:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=/ui3mPYh//6P4ROb9feP98zESvjv3VvYW7WCODFKeEk=; b=l1biYz8WR2CQbSRQKMWthUQMMG3RsM+CipSi14dGqjUA7Mq+pAKCYrYY+xISlI3d5B D/bu6tcKA/vwEAngybv4NMg6cV0mD2we+ptTLRa+0eFE8ouU8oSV0En8FvaPmysYfcu6 KRuPIG7GcszJHoNOjXofISC8v8lm3pfwb9SQsd+1UOla9k/wxdSKceZosESZ9Soqr79D ZsRHFc9ZkRdhBGqhwspY48DxWStvStuDvtjf+5m+e18i7o2lyKyIFBo1wu8sW6sHcdZ9 Es5zApFknEoJSwLQ/gWb3vPsRwZEzLUqQhI+GAbd2RPiD0eSHMC2u6R0XNeKM5rIVBNp vk4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/ui3mPYh//6P4ROb9feP98zESvjv3VvYW7WCODFKeEk=; b=Pny1HHFH/TdKzQW575rTmh43t66hQRN08MCcccr4RZUwcTrJb8V0J7+pxvwNeNXdzB DGwhUir9gci7CtiCw8UgwcBWs0HVpxpw2Wyv6r0TxvncUZN+XSXqm6UqCh410+c2xyDF u4SZSCySfO85pgdNfDfYlrmPMjm9PD/0uxDYaRPQaHZn0cQHbuPD7cg1TQcndq5+gvlW UN7ryf3IuIVHiw10sa3Bgeq3s2Q9kWkDWcHwAkVpFzaLhqjjErsZPuvDE2Hp7Q+/XT/W CuewOSaF5s5HF955Rx6/7YRTy0iD7+GqZuVHn29OINjn5YqWEkJL6xux1TWEUPm4UtWJ T1og== X-Gm-Message-State: AOAM533fRr3IL2Uhdg02fqfP6y7TGGXfKR7Ve9YozqHwU4OlcNblKqsj YbNdu7xPs21zPXcCnd5yDM0BDofaYlcJMw== X-Google-Smtp-Source: ABdhPJyaflDjxYFtwN9XJwkdENxPRSHJG3wSQ1Iz0zN5aRKCCiDLKhYgIr/1Nutcs8nGeTMnP28fEg== X-Received: by 2002:adf:ed02:: with SMTP id a2mr13729480wro.197.1612288535051; Tue, 02 Feb 2021 09:55:35 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/21] hw/arm/stm32f405_soc: Add missing dependency on OR_IRQ Date: Tue, 2 Feb 2021 17:55:12 +0000 Message-Id: <20210202175517.28729-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 The STM32F405 SoC uses an OR gate on its ADC IRQs. Fixes: 529fc5fd3e1 ("hw/arm: Add the STM32F4xx SoC") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20210131184449.382425-2-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 13cc42dcc84..a320a124855 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -336,6 +336,7 @@ config STM32F205_SOC config STM32F405_SOC bool select ARM_V7M + select OR_IRQ select STM32F4XX_SYSCFG select STM32F4XX_EXTI =20 --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289686; cv=none; d=zohomail.com; s=zohoarc; b=S5nyabDPeeFQuppg3Xr6rclB0M9H4OOUrYYxuDywH55mo+fpRSEAfT/CloY3MovovgVzMT+K3yHxVprERi4Vx4WyRlNrvC52hWSVPBuskNQ2nNMZj3A8cgpS3HwEV4AV7ceYoHMM+5PJ/brw9RGUVkyhRmd07URrHVrGhF1Jgtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289686; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vhfnsqRF66KA3IZdcOFpf4wzU6AyLQ1ui2Fh2VXBMo0=; b=FZF0tUAzRM01ZBfbJaLJsutPvl4Tz7yFNUyWb7diYzHH8jxS1ainxeicI8Hy8TxpDLaamrU5pdKVxSl8+exaE9UvnvEB9qBCepIGRIEK1vGOLo+QlO998sZAW/ShY+NyURJEGuiqZBXZsmkabVC4a/qT+EGSBJ3N4gbDrMTdBN0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289686066874.0896574264005; Tue, 2 Feb 2021 10:14:46 -0800 (PST) Received: from localhost ([::1]:56178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70CK-0001Yu-TA for importer@patchew.org; Tue, 02 Feb 2021 13:14:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu0-0005YD-I9 for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:48 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:38746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztq-0002HD-9a for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:48 -0500 Received: by mail-wr1-x432.google.com with SMTP id b3so3301864wrj.5 for ; Tue, 02 Feb 2021 09:55:36 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=vhfnsqRF66KA3IZdcOFpf4wzU6AyLQ1ui2Fh2VXBMo0=; b=iyw6moOsM37ES1gxul4hEcFWeUeoLiQdPIMzJED9b/Cso3JdaBjo3iwYHMCk8uCDI2 GfHRkrn9Un0nIj2/ZhzPK7MZ4j+xZiEHfv/GRRljWcpgBdJrydRHxkgRZlhgrGlao+we 6VRhiHlDvBgHIwVUXD4P8d0RFdC8Rl6uoW0iD1XiUjsNWEyg9erXGBJ2exPglhGtZTtP xwuhMK4g/yayY6FqB4OtZWu0/e208v4JYkFTPLbu7Xox+SlXz5qudekbtDws80rjr6HT o2lebNUrobotqI8+dOur4xhwZe8UubfByHibwJA3YvOiclR1SiXbvyu0rICmjBlOrSpV wGcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vhfnsqRF66KA3IZdcOFpf4wzU6AyLQ1ui2Fh2VXBMo0=; b=EdAux0tVxB6pIQ0KSKId0GFLWq/5zlKhuswT/D/LP1A9dciN6gMKhuW5k2BaJ9sA6L 16ElbvSZ7hVTxNdJZshbLnQh0QxqYj6A/wZsKOE1cN0+IFDrDkEtKiKs0d2g8bzz5NLR 2mOgHISSuJ740EccmYb1IBpNFxwwFEsyslBg3HkkivfVG1nSMLOWUpo2aKQ2PmRNyaIS mwYsrgHnnQalrYCs+H84AwnmGRJ6UUuBv0gGe03KNH5HfCjoNwNPrgWfRGCAhhPbqby2 4ogxtvg3NV6IRWYho4BIg0wwSzClyWBcYVRW7HkDZ1ZcWAdiryHLiaEpZoS2On/ONM8d Escg== X-Gm-Message-State: AOAM532WbBmOGojUHdyK+asGn/gTRsT9w9RHyVDJwIgJ1gvUCRMsCQ1q ISk0jCzYZWFWHVmBnHXQ1JM85KIvV+20CA== X-Google-Smtp-Source: ABdhPJzaUHDDXYT3gOYG7xvqVDjF2d/zVpK/8B96RvPBUbGuNBhAJxyktleVug/BtV+hxBoZtLTW6Q== X-Received: by 2002:a5d:6947:: with SMTP id r7mr24717599wrw.150.1612288535808; Tue, 02 Feb 2021 09:55:35 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/21] hw/arm/exynos4210: Add missing dependency on OR_IRQ Date: Tue, 2 Feb 2021 17:55:13 +0000 Message-Id: <20210202175517.28729-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 The Exynos4210 SoC uses an OR gate on the PL330 IRQ lines. Fixes: dab15fbe2ab ("hw/arm/exynos4210: Fix DMA initialization") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20210131184449.382425-3-f4bug@amsat.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index a320a124855..223016bb4e8 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -52,6 +52,7 @@ config EXYNOS4 select PTIMER select SDHCI select USB_EHCI_SYSBUS + select OR_IRQ =20 config HIGHBANK bool --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289685; cv=none; d=zohomail.com; s=zohoarc; b=m2BuouMaGno9LRQtoNoocW+W0L0mH1+LaViL/6OsCgx+RLdDU895O1XcCA3+oHeCjOD18gvXs55hWXvdBtfS5GGfjw+1Lz6durZQ+Al3oRTLV+/MNVfA4c3i0exlgYEMINBOKHs1CKw/0ZoXmFZ5M9L94fAYTZ4cdc3lCeZ07rU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289685; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=f5MJPyJyH7FWjkGihdnK5D3TBgKTnXMtO9zeIWq+XYA=; b=nDjk2IMsNQr3ma2nRB4sdFqB38vJpt8XqtXviJqRuuDvvtSKQCO1L1jxB5HyYMauDictcM4buYFChKdeQiIgMa841gnuDG/xVisYhjf8r1DRbnteHdJSugD5Mq5RAQI/knA1KLFKCKYwUakdTW5G6ugd2WvdMxcC/9nbUm1yDw8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289685763432.18131246637995; Tue, 2 Feb 2021 10:14:45 -0800 (PST) Received: from localhost ([::1]:56212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70CK-0001Zj-HK for importer@patchew.org; Tue, 02 Feb 2021 13:14:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu2-0005c2-5M for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:50 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:45838) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6zts-0002HY-3B for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:49 -0500 Received: by mail-wr1-x42b.google.com with SMTP id m13so21435496wro.12 for ; Tue, 02 Feb 2021 09:55:37 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=f5MJPyJyH7FWjkGihdnK5D3TBgKTnXMtO9zeIWq+XYA=; b=B6d0VWYqHFY35qHdvtyGOvopV9Rkbpw2t6vcVG1FizkaBDdI6auxUaSxDSY6rV6OGU NTKm3hxH2L2iJAkxVXb+bW6gJ3g7J1v+Uy7pttjgS2YQBlYUitPRUr6bfeXvK9zV3ISX gn768TA4eSS1y5K9uqOUylthN7ZFn7YllMXj96lxDiBjWzWLxx+xmIdyRqlDHAfFhk38 xGwTpW6tEQ5vkTv5lkNfbRx+S8MSiI680ein+8SeLP8oV6xyjcBQtLLA7vXQQyxNiJjB R246VlDDgw4XdEHLfkh8f0PtwVniBSle3LjElyE6hgWkoWKbqV5DqBTqXI1NwpDtr/wr O5pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f5MJPyJyH7FWjkGihdnK5D3TBgKTnXMtO9zeIWq+XYA=; b=CyUpynr9EjBgi7e8dIx21Oiyj/paFvdsU2gHNlShAQ6m04MVObc14OABmDP29qlE6w pT56t4sbdu9hcxyAQYHiFs/FILMmJ54THCYipbvBaqgt8zt6yRPocpUgUcP1fOBZpPJJ +1mJhBVvgo3qMUBoiGSZgmTXPMy6yXNrO6aj5pwADUa/AY/yzJkHkd9zNClHNP5Sa+NX AUfjenD+/jy3TMV7RpT5IwEBVELYdcWbJyUldWxpMAzdaTFR+dor+5TPlE9KmBJpJ9/k dUlva2M6cghatIxWECGLbmzWrqsmXjBrpHaH/HtrmN4CaQGSOr2JQNbmp35P8CemUYwN k9Rw== X-Gm-Message-State: AOAM532SsSRI5gIsW0GYCryZ+kVCqjCUMZ3vB+BGdz+WWOl6TS/U4UdH SRESxhumEpD+RrRgaym4XptoSDVynKpJgQ== X-Google-Smtp-Source: ABdhPJxPMN8ANSvgNgcS5u136r8QmZuSmHTv/pLwIdhcvPjN0RGfC4CW/Qj7fhbZA8zlKdZWNREzUQ== X-Received: by 2002:adf:f90d:: with SMTP id b13mr18513232wrr.198.1612288537062; Tue, 02 Feb 2021 09:55:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/21] hw/arm/xlnx-versal: Versal SoC requires ZDMA Date: Tue, 2 Feb 2021 17:55:14 +0000 Message-Id: <20210202175517.28729-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 The Versal SoC instantiates the TYPE_XLNX_ZDMA object in versal_create_admas(). Introduce the XLNX_ZDMA configuration and select it to fix: $ qemu-system-aarch64 -M xlnx-versal-virt ... qemu-system-aarch64: missing object type 'xlnx.zdma' Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20210131184449.382425-4-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/arm/Kconfig | 2 ++ hw/dma/Kconfig | 3 +++ hw/dma/meson.build | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 223016bb4e8..09298881f2f 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -354,6 +354,7 @@ config XLNX_ZYNQMP_ARM select XILINX_AXI select XILINX_SPIPS select XLNX_ZYNQMP + select XLNX_ZDMA =20 config XLNX_VERSAL bool @@ -362,6 +363,7 @@ config XLNX_VERSAL select CADENCE select VIRTIO_MMIO select UNIMP + select XLNX_ZDMA =20 config NPCM7XX bool diff --git a/hw/dma/Kconfig b/hw/dma/Kconfig index d67492d36c1..5d6be1a7a7a 100644 --- a/hw/dma/Kconfig +++ b/hw/dma/Kconfig @@ -18,6 +18,9 @@ config ZYNQ_DEVCFG bool select REGISTER =20 +config XLNX_ZDMA + bool + config STP2000 bool =20 diff --git a/hw/dma/meson.build b/hw/dma/meson.build index b991d7698c7..47b4a7cb47b 100644 --- a/hw/dma/meson.build +++ b/hw/dma/meson.build @@ -9,7 +9,7 @@ softmmu_ss.add(when: 'CONFIG_ZYNQ_DEVCFG', if_true: files('= xlnx-zynq-devcfg.c')) softmmu_ss.add(when: 'CONFIG_ETRAXFS', if_true: files('etraxfs_dma.c')) softmmu_ss.add(when: 'CONFIG_STP2000', if_true: files('sparc32_dma.c')) softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx_dpdma.= c')) -softmmu_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zdma.c= ')) +softmmu_ss.add(when: 'CONFIG_XLNX_ZDMA', if_true: files('xlnx-zdma.c')) softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_dma.c', 'soc_dma.= c')) softmmu_ss.add(when: 'CONFIG_PXA2XX', if_true: files('pxa2xx_dma.c')) softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_dma.c')) --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612290134; cv=none; d=zohomail.com; s=zohoarc; b=U243UztzvVm/Hi8ojFjPBM8y5UWK8WiImxoPouM26SvqiTmOk80mKQYBYdJm2gL5T17YFMAVMAXKnoQ79aJ7RiknyYhxtgHbsUHC21QkYAFaNYBIqF0vITl/uNo4odq39gLf+VjgTXGbfYYEeImR4NwTcULcxLhmm9OE/NHutqg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612290134; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZMKRUtHDuX4hpPKu6tOVyoM1QFOvP6HE/wEDS5GtqAM=; b=dI7u80RLv/xCscMxZPUadMaTZKmAq3H2u0MOzAqRnmRILmfDQZVnOR7i8Njn04wAaGFg/c0I237bhrxSYNTQ6Ww3oqoGdXsX3LBz8WCq58LLXTEFcdRyxS6kFZ4BOvud2GP6AYrM82Qk5mBgVLmcwcqTbvCzi9Lnye+mq91zuss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612290134556145.39734400117663; Tue, 2 Feb 2021 10:22:14 -0800 (PST) Received: from localhost ([::1]:48404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70JZ-0002eB-FA for importer@patchew.org; Tue, 02 Feb 2021 13:22:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu5-0005hW-1m for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:53 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:50444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztw-0002IV-Jy for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:52 -0500 Received: by mail-wm1-x330.google.com with SMTP id 190so3300433wmz.0 for ; Tue, 02 Feb 2021 09:55:38 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZMKRUtHDuX4hpPKu6tOVyoM1QFOvP6HE/wEDS5GtqAM=; b=Iu156SsvDHBre5xoC48zKt1TG3s1FWcDBat99+WvKiz0hNoJE3uQaOQIII94s3A3fs sSQ+660TEICC82Rj1BKqTGG4V8oY7SOMs1vjdfkk2aWkqhZZB3zBtXAxTHRZFrrOrOqU /7IK9lWyxyu5g9l3NAFKzBaVy4WXp6HBtRqj/eonugk5YvsuYV8T0fDp8F394E4o0gHx 2tSiMEDEKu5O8Y4rPO4v1n5MeH0RcKT7af8RJuQh5bViU12Trs7hgtaV8TIOEzwagD9w v+krumVnbm1WD9jmm4dyG91DzE0QCi/DSa0V6s0m+wCI4ZFYHBLrskkU+bHUjs6+aRou TaXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZMKRUtHDuX4hpPKu6tOVyoM1QFOvP6HE/wEDS5GtqAM=; b=GHoEKqR6GO/lmC43V/b7lpVhEc72+i/KsRSqFZeGxduYcs43ruSnXzrCDosq7R1jf1 XlaJUenQA0Y6nAsjAJB+hRRYjP66Py3BJyjcvVlXjjrfOXY/rS7p3KhOOSuSl7K19Ti1 zejEPJfvwEzF4+Cu6hXK1LcpDE5YLc2x+Syznz+2Cti7GHJFcPKBA/hlR1HYcPtRb/X9 TRwig5Mv1fjUPWK9ImA7SuE8zRLODKH4sI+2uyvEqyzW9wTvcVBAVeUdzt9oX6/idTs2 9N8raBTzo7DXULRovqv9QNu1xi01FBAlj16mr+btgFRkB9T89mp2av1siRjfKVju7loL Ucmw== X-Gm-Message-State: AOAM530vN4vq8V/e3yKuDwaH6xZGrL4CcRYY+8ZAXxIwyW3ZDWOWZ/t+ QxE7Mj8px0dOaNcTSx+W/DxZT4yOSEDgaQ== X-Google-Smtp-Source: ABdhPJwS9iE0x10E5KMyJvKvC0H1mzFjZ+SgG8D1psUuRZZNLjeDw+g7RzgQiBNcG8WVFo2Dvv9vxw== X-Received: by 2002:a1c:46c5:: with SMTP id t188mr4697411wma.170.1612288537817; Tue, 02 Feb 2021 09:55:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/21] hw/arm/xlnx-versal: Versal SoC requires ZynqMP peripherals Date: Tue, 2 Feb 2021 17:55:15 +0000 Message-Id: <20210202175517.28729-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 The Versal SoC instantiates the TYPE_XLNX_ZYNQMP_RTC object in versal_create_rtc()(). Select CONFIG_XLNX_ZYNQMP to fix: $ make check-qtest-aarch64 ... Running test qtest-aarch64/qom-test qemu-system-aarch64: missing object type 'xlnx-zynmp.rtc' Broken pipe Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20210131184449.382425-5-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 09298881f2f..be017b997ab 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -364,6 +364,7 @@ config XLNX_VERSAL select VIRTIO_MMIO select UNIMP select XLNX_ZDMA + select XLNX_ZYNQMP =20 config NPCM7XX bool --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612289931; cv=none; d=zohomail.com; s=zohoarc; b=B5TaXJCvZR2e5PDOEL2VaqF0wn/0okm4LLyk57dIQQ0N0/tf/ZTmjrcmpZLGakjVCTbnQcwM5uyI7OmUU+ZLI1qmrIfGKBywQCAQTo2ez69d5EZWcjJ2hMhSsvyXChGNwLX3cs3zDBCE6f46tDfR+9f7gorVs3jE/9NO22cgaHk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612289931; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qBYzZonn4pEeu5HCg3gqbs/tT/khWqfB6p5+DdEP3kM=; b=cAa6RcrYfnGd2TpwqAj34W837knbNfIuc962rzF4L/+gXy1E+hTdfPD+TAIR9Vb9zUmWkR0wp3KEPqXvGJciYbcOY+Vy9TtAAAagAiVygHpTcEmOjnpSq9Dii+5CEm6PVQ84EUFpbc2xr7N5HxQxRH0NEtbtR3aVrJMOwe4A11g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612289931416121.63910936994523; Tue, 2 Feb 2021 10:18:51 -0800 (PST) Received: from localhost ([::1]:36832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70GH-0005lH-VW for importer@patchew.org; Tue, 02 Feb 2021 13:18:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu3-0005fj-Is for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:52 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:39024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztw-0002If-Jn for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:51 -0500 Received: by mail-wr1-x42d.google.com with SMTP id a1so21442145wrq.6 for ; Tue, 02 Feb 2021 09:55:39 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qBYzZonn4pEeu5HCg3gqbs/tT/khWqfB6p5+DdEP3kM=; b=P1HEWrhYD0B3pala6HaiI2TU4fqBnbkgHQpOD3E+YQAV1xjL3eXLJYI8ocTxFETD2r 8WkETTNtoUvUzdikLq40gJ7a3dYnUFrpnxonjcmhqcMVShhlYXGmyQe1acDfg8Sgb+SC 2o2qoN+06eiIWKYR8KfT90gUFkkK+1hCCio3UOwS9UgPXBJwayAo7dFmlFVQdLiVVQcN 1oI/NCLPCzaheiMPWKCoOE23VYZXPxjEn6ypu0t9eQui0V9IDZgMz2FLBtX3w0wJwstj JyF4BUDOccFVHVK41J1SjRmPMQK5OWB4AzjbrkqNdM1LYq/F0EP5qSYWUKrCpjR1et6y BA5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qBYzZonn4pEeu5HCg3gqbs/tT/khWqfB6p5+DdEP3kM=; b=I8BZhR/wGVkWbA69FDEdlXiewX2VBg5gtMHi8hIC7vzOjTHlK52nwMRzTFo9PYWbML 45ZAHtvJ6q3bcBC3HbSrG7jpOtbRwoxxcFn7Zv8YBVTmcIFN6fUjDdQTlaK13LmnLDPT hWYvCwvB5uqGqK+ax7bBLX2U5YQXTFV4TaL8r420QoRVaPA041B3049UBrm1khUSRIzt c5VXxZJCxpRf+kwAfHGZ87vb2/DgIAjCjT1suyYqnM7VfK+3fSqT3joS0VSKcGxw0HVU n6GMC7w22anzAB6YAZypsyuIKnEVWU39gHKkhlycJPuE7WXiqC8BnTfARbkBHqA1g6lo cZBg== X-Gm-Message-State: AOAM533Lv5JW7MvSbIjXG6UwAQ02CIpoqap4JKHqbIHeiw9CSEQgmINO 47yRT2i/JBDTRmPqOUoXW5c2sHXuMvbxww== X-Google-Smtp-Source: ABdhPJxh+slPFyj7+j1HxeG4MpjccUnAYbpwjNnvJraMsv1zoxqxUJnsRk1Ac5LHO4Dmlmjf0ZLYwg== X-Received: by 2002:a5d:554e:: with SMTP id g14mr25122558wrw.305.1612288538611; Tue, 02 Feb 2021 09:55:38 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/21] hw/net/can: ZynqMP CAN device requires PTIMER Date: Tue, 2 Feb 2021 17:55:16 +0000 Message-Id: <20210202175517.28729-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 Add a dependency XLNX_ZYNQMP -> PTIMER to fix: /usr/bin/ld: libcommon.fa.p/hw_net_can_xlnx-zynqmp-can.c.o: in function `xlnx_zynqmp_c= an_realize': hw/net/can/xlnx-zynqmp-can.c:1082: undefined reference to `ptimer_init' hw/net/can/xlnx-zynqmp-can.c:1085: undefined reference to `ptimer_transac= tion_begin' hw/net/can/xlnx-zynqmp-can.c:1087: undefined reference to `ptimer_set_fre= q' hw/net/can/xlnx-zynqmp-can.c:1088: undefined reference to `ptimer_set_lim= it' hw/net/can/xlnx-zynqmp-can.c:1089: undefined reference to `ptimer_run' hw/net/can/xlnx-zynqmp-can.c:1090: undefined reference to `ptimer_transac= tion_commit' libcommon.fa.p/hw_net_can_xlnx-zynqmp-can.c.o:(.data.rel+0x2c8): undefine= d reference to `vmstate_ptimer' Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Message-id: 20210131184449.382425-6-f4bug@amsat.org Signed-off-by: Peter Maydell --- hw/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/Kconfig b/hw/Kconfig index 5ad3c6b5a4b..d4cec9e476c 100644 --- a/hw/Kconfig +++ b/hw/Kconfig @@ -81,3 +81,4 @@ config XLNX_ZYNQMP bool select REGISTER select CAN_BUS + select PTIMER --=20 2.20.1 From nobody Thu Dec 18 22:24:46 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1612290332; cv=none; d=zohomail.com; s=zohoarc; b=gk3q6Ye+r8vvQ+tVe9GozYa3ScSl7e0+7BQ7Goju8qWt/qsGPHDyk9XcNBV1+l3XRLyCM6fEHwzJgkbWSqjcHpD/aopg3oaRT278Rd5wEcEr355c3B4g2KPEYqGP7Ja0Nuj4llXnt521y5GhmjkPTix2a5/J32aSmDRn0aaV7k4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612290332; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Nm5/v3GAFRWAcP6ZGflkMlT/2c75JEuKsAXc7vvx+2Y=; b=PmSX2YA5Ba+c9QaRM8DeVhHoegmiUL8As3etbR9T2Zu0QWzxF56aRW/9GCekcFm+u5/9jNW9fw0ugZviKsy4dYepMhvTjsUJm0X1XszpzAWeeB1hwDRL9zlXrINTFhftv0JlysbpnESeZcnyylT31BHSjv3CY02mMWZhf9RNnfk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161229033229311.921184851671228; Tue, 2 Feb 2021 10:25:32 -0800 (PST) Received: from localhost ([::1]:55842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l70Ml-0005re-77 for importer@patchew.org; Tue, 02 Feb 2021 13:25:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6zu3-0005ed-AP for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:51 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:54465) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6ztw-0002Io-JG for qemu-devel@nongnu.org; Tue, 02 Feb 2021 12:55:50 -0500 Received: by mail-wm1-x331.google.com with SMTP id w4so2004907wmi.4 for ; Tue, 02 Feb 2021 09:55:40 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id q6sm4142283wmj.32.2021.02.02.09.55.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Feb 2021 09:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Nm5/v3GAFRWAcP6ZGflkMlT/2c75JEuKsAXc7vvx+2Y=; b=qW7dw+M6+S0YWhAbznoZocyEBhdmMKbDx0UEAVCDZervgwb8GfqlT/vB1nb2LXHswM HO+DWBZRi/QtjFiU1vLK8b8+khPekA8jCHqZ4OTza3/Kha0epeLxmOwJFARxhm3l+tJT vHDA+PDiJJ5JSvEEl/MDCajLbF5/UI09ndwvpga2D3cX0On19+kvysyeIBAUaiJcYaiC 3AvE4EtQxriYEtcyvex4ilnKS3LZCUmgGiebhVhG4msNzQOFtd4sQvi679VXyqTqNJrq 8X8gxNyGrwcwWFBuyhRn9cRgcV6EbPSCOVi/EfNpoOvaF1Mwt9+5DJxYWGrzkBcwfPmf up4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Nm5/v3GAFRWAcP6ZGflkMlT/2c75JEuKsAXc7vvx+2Y=; b=U8d8H8x4aN6mF1HPTnwsV8uVTroLeZPcAb/0w2CAeWunmkJq++mntJTGJRD2R12NmJ 6BSr1r+tWrsc+6ZwWEc0w3zU0cbWUAo8xbwhdUwYSt6DONHddtBqQgsgrFSyTkD66ZAF yY2S156C13Baa5n5le7SHOt+7D6Ef0q35k9PKtwjjCCN9YQsf/OkuqP5hMwl0l96N/Vh n8HqTjxBilBsCJP9p5qLoWXqzuib9gffGFG++R1IskyOjD77pcOuo7Q57wq9R/PljcS+ mxFbQqkspvWFQIGwDjqhMLyxDqHOIzr1bwz1OIf9O/LMjR0BePxPtSgoFo++DKe62sU/ 7uvw== X-Gm-Message-State: AOAM532u/HLBuPkPJi+OpTl4yKoTKl8zHoEKRgIpg/GKwpWXrBFAttD7 emYRldiRlcTwq2yhh0rN9ihDdzr84a1Ddg== X-Google-Smtp-Source: ABdhPJwkPtTT8jPBnxo9Kl8QD02aFF+ojO5BAQnweAGia5hF5pMvEWrDL6DS7TkKxR3IB44I/tg/7Q== X-Received: by 2002:a1c:1f4d:: with SMTP id f74mr4850332wmf.12.1612288539384; Tue, 02 Feb 2021 09:55:39 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 21/21] hw/arm: Display CPU type in machine description Date: Tue, 2 Feb 2021 17:55:17 +0000 Message-Id: <20210202175517.28729-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210202175517.28729-1-peter.maydell@linaro.org> References: <20210202175517.28729-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 Most of ARM machines display their CPU when QEMU list the available machines (-M help). Some machines do not. Fix to unify the help output. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Niek Linnenbank Reviewed-by: Alistair Francis Message-id: 20210131184449.382425-7-f4bug@amsat.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/digic_boards.c | 2 +- hw/arm/microbit.c | 2 +- hw/arm/netduino2.c | 2 +- hw/arm/netduinoplus2.c | 2 +- hw/arm/orangepi.c | 2 +- hw/arm/stellaris.c | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c index be12873673b..6cdc1d83fca 100644 --- a/hw/arm/digic_boards.c +++ b/hw/arm/digic_boards.c @@ -142,7 +142,7 @@ static void canon_a1100_init(MachineState *machine) =20 static void canon_a1100_machine_init(MachineClass *mc) { - mc->desc =3D "Canon PowerShot A1100 IS"; + mc->desc =3D "Canon PowerShot A1100 IS (ARM946)"; mc->init =3D &canon_a1100_init; mc->ignore_memory_transaction_failures =3D true; mc->default_ram_size =3D 64 * MiB; diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c index 0947491cb97..e9494334ce7 100644 --- a/hw/arm/microbit.c +++ b/hw/arm/microbit.c @@ -64,7 +64,7 @@ static void microbit_machine_class_init(ObjectClass *oc, = void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 - mc->desc =3D "BBC micro:bit"; + mc->desc =3D "BBC micro:bit (Cortex-M0)"; mc->init =3D microbit_init; mc->max_cpus =3D 1; } diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c index 8f103341443..1733b71507c 100644 --- a/hw/arm/netduino2.c +++ b/hw/arm/netduino2.c @@ -54,7 +54,7 @@ static void netduino2_init(MachineState *machine) =20 static void netduino2_machine_init(MachineClass *mc) { - mc->desc =3D "Netduino 2 Machine"; + mc->desc =3D "Netduino 2 Machine (Cortex-M3)"; mc->init =3D netduino2_init; mc->ignore_memory_transaction_failures =3D true; } diff --git a/hw/arm/netduinoplus2.c b/hw/arm/netduinoplus2.c index 68abd3ec69d..d3ad7a2b675 100644 --- a/hw/arm/netduinoplus2.c +++ b/hw/arm/netduinoplus2.c @@ -55,7 +55,7 @@ static void netduinoplus2_init(MachineState *machine) =20 static void netduinoplus2_machine_init(MachineClass *mc) { - mc->desc =3D "Netduino Plus 2 Machine"; + mc->desc =3D "Netduino Plus 2 Machine (Cortex-M4)"; mc->init =3D netduinoplus2_init; } =20 diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c index d6306dfddae..40cdb5c6d2c 100644 --- a/hw/arm/orangepi.c +++ b/hw/arm/orangepi.c @@ -113,7 +113,7 @@ static void orangepi_init(MachineState *machine) =20 static void orangepi_machine_init(MachineClass *mc) { - mc->desc =3D "Orange Pi PC"; + mc->desc =3D "Orange Pi PC (Cortex-A7)"; mc->init =3D orangepi_init; mc->block_default_type =3D IF_SD; mc->units_per_default_bus =3D 1; diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index ad72c0959f1..27292ec4113 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -1538,7 +1538,7 @@ static void lm3s811evb_class_init(ObjectClass *oc, vo= id *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 - mc->desc =3D "Stellaris LM3S811EVB"; + mc->desc =3D "Stellaris LM3S811EVB (Cortex-M3)"; mc->init =3D lm3s811evb_init; mc->ignore_memory_transaction_failures =3D true; mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-m3"); @@ -1554,7 +1554,7 @@ static void lm3s6965evb_class_init(ObjectClass *oc, v= oid *data) { MachineClass *mc =3D MACHINE_CLASS(oc); =20 - mc->desc =3D "Stellaris LM3S6965EVB"; + mc->desc =3D "Stellaris LM3S6965EVB (Cortex-M3)"; mc->init =3D lm3s6965evb_init; mc->ignore_memory_transaction_failures =3D true; mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-m3"); --=20 2.20.1