From patchwork Fri Oct 20 17:00:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1852708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=buGso4mN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SBrV00mX0z20cX for ; Sat, 21 Oct 2023 04:02:00 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtsrN-0002Vi-IJ; Fri, 20 Oct 2023 13:00:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtsrL-0002VM-4Z for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:27 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtsrJ-0008Qx-9o for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:26 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-31427ddd3fbso775308f8f.0 for ; Fri, 20 Oct 2023 10:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697821224; x=1698426024; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Kt78QWV8SLX4gIgX7BJ1w/k7e1eNEVxwNDppyA4h62Y=; b=buGso4mNLI77CVJxVv1P21yRdMP8Galoo/kQIGf25ymVheKhYkOPtoYeUuG1osbshq SVcF92XDIZMAg06cw5/sHNGv74RQaDp0wfhjkO4iOoe7t5iyT+fukAM6+4YRGheAr8lR pqIii50ZiqEQDLE0NSSg93Rs3lpxPxciHCOk+tqE4oRhE6cNngjzqRr8AarV4CVgvkNE /qoNeQaiBkpREqXLWcdxI+7lIPMtCu++MwG08/uovlu6LNTGqcPzaebb0DLWMBItRVMK DsKUDps1RRqKQWfks/slFbUJI6O9Png7L+5EtASMgRAad5fYWqFweVQ1lraXZwEFjxcW IQIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697821224; x=1698426024; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kt78QWV8SLX4gIgX7BJ1w/k7e1eNEVxwNDppyA4h62Y=; b=vDoCAyuNUy3/0RW2/QJdTLeavfUnum91EHZgdRD1fhm1xcCaB4lGVhA95aqnCWBLVI IazsijkNOSLyU4rRYFI6qC0gHI0ty4tKGPbpzoYLgU7qAhl+3EVmjwu/TcxxpSPfdTzR BGhxleqwaF/QGgXXcJsUIqQqOM8Xh1gc8sT65pR0YmHz5chG30v7OB5gj6Myu40tmbky x3yOfHIcMaDt3DOU8NtwfGtD+BALk571uGSn1I1iEyarC2MjFpImFhQX3HAquDW0fAe7 SegYX88v5zbX6rV+tqvFIA/q1soQvGOOactrGJUEtRF1Bf41xk6UVQlQqnk2uRuH5/Xc 4WVw== X-Gm-Message-State: AOJu0YwFOiJIVAHIp9jBtFF5l4UJvRqkpeEH3fPiqeDuMt9J9IG6NBMA TyHc5idxWO/pRocS/xpfjV9xRQ== X-Google-Smtp-Source: AGHT+IE0rkveu5itzxct08yLC/FHyKKiTJ4w/QvK65rA2OK2aJf041pbt3f1hLmyfW/hiXX8Ryl/0w== X-Received: by 2002:adf:ea4e:0:b0:32d:9524:386b with SMTP id j14-20020adfea4e000000b0032d9524386bmr1975736wrn.32.1697821223908; Fri, 20 Oct 2023 10:00:23 -0700 (PDT) Received: from m1x-phil.lan (tbo33-h01-176-171-212-97.dsl.sta.abo.bbox.fr. [176.171.212.97]) by smtp.gmail.com with ESMTPSA id r17-20020a5d4e51000000b0032d09f7a713sm2068815wrt.18.2023.10.20.10.00.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 10:00:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Hans-Erik Floryd , qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v2 2/4] hw/char/stm32f2xx_usart: Update IRQ when SR is read Date: Fri, 20 Oct 2023 19:00:06 +0200 Message-ID: <20231020170009.86870-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020170009.86870-1-philmd@linaro.org> References: <20231020170009.86870-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Hans-Erik Floryd Signed-off-by: Hans-Erik Floryd [PMD: Split from bigger patch] Signed-off-by: Philippe Mathieu-Daudé --- Is this required? --- hw/char/stm32f2xx_usart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c index 519d3461a3..46e29089bc 100644 --- a/hw/char/stm32f2xx_usart.c +++ b/hw/char/stm32f2xx_usart.c @@ -109,6 +109,7 @@ static uint64_t stm32f2xx_usart_read(void *opaque, hwaddr addr, case USART_SR: retvalue = s->usart_sr; qemu_chr_fe_accept_input(&s->chr); + stm32f2xx_update_irq(s); return retvalue; case USART_DR: DB_PRINT("Value: 0x%" PRIx32 ", %c\n", s->usart_dr, (char) s->usart_dr);