From patchwork Fri Oct 20 17:00:05 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: 736278 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp410746wrl; Fri, 20 Oct 2023 10:01:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6CLPdQ2YTZx7LRve4FOxMaWWX/QaOtEUokj7x39FrDuE8905A2qRSAGrR0d4Yi5d5xOJL X-Received: by 2002:a05:6102:4705:b0:457:cccf:75eb with SMTP id ei5-20020a056102470500b00457cccf75ebmr3070635vsb.16.1697821302886; Fri, 20 Oct 2023 10:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697821302; cv=none; d=google.com; s=arc-20160816; b=phgDPKfgoGyB353en4eq9ByOB7yiyr7S446gro/TOXfDYoxFn1WZB+C3sdbJ6ViPDE 9oXctryK5E+J4K+6MvtBNIkBPwOivQOYet2MFReDLlno1qX/mA95oDTg98CNJs3UsVWk VOZHr4EZUCdfXPNpyikQrDhsZkJIkeFoVxd68/jj/kWJU50n2TaZZNbHEVg7eqK88VcE SQWl9xaJkMklcG5yXH0kOqBfPtmWabNnuiocZU6XNZXsIXPMwvVFOhxFppQD2m5S2fnT 1TbcxcyalWvRZc2Jel8Fzn4scy8foRBmnrvEGsyakX39mOy8gAD6y2+00VvG1V/jKP04 xljA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SZbdJuO1XaqUdGSgYAbogilRMESNu95+lra/cS1fLyE=; fh=CSV7ixVglXzcxb66Foh/+b7TyX0eETHj/jUl4XtrXPU=; b=nMP5/CqlbdXSBlsnSZ+XUCuWsnuInO8N0buHlGsUbv814h5z71rJjfr0RfMddHUbV7 zLQMtHkTQCmLXom8n0XVTK5J0Ss291pN0kUfSwxBejknjoTXNB8E7+BDk8G3BwWmlvq0 9LJVQm8C0HcgUVg0F15vK0DtUD6IiuceMWuJu0wR9/rhSEPfmriRCjqrAwI+BoTeLA9c 8+Wyx7ND8/ffPnp0pkZ7rNKmUrperHjdCuhDLkEIORAUsH5DZuVXZLKxCVm3vNI5n3+i x8phSV8IKquSnApmslJj7Hdyt4L23QlKoOyLVbcOZT3nW129H33w6nr1fTQOPSrDIfC/ 3e2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rVUy9awI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j23-20020a67e3b7000000b00452a281c2b5si231510vsm.163.2023.10.20.10.01.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 10:01:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rVUy9awI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtsrI-0002V6-Ft; Fri, 20 Oct 2023 13:00:24 -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 1qtsrG-0002Ty-Nb for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:22 -0400 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtsrE-0008QE-Uh for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:22 -0400 Received: by mail-lj1-x233.google.com with SMTP id 38308e7fff4ca-2c5210a1515so17158261fa.0 for ; Fri, 20 Oct 2023 10:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697821218; x=1698426018; 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=SZbdJuO1XaqUdGSgYAbogilRMESNu95+lra/cS1fLyE=; b=rVUy9awI97SavE1SO8l0eH2QA8JPf1HYrNFHWczkuHoecnEaSuDsv8N3zjprzRXC1I TqbiDUWYsUG2FskVWWO+fRPJTPJfpNBB44HX66sn2XLdqOFVCQEk7gc5LhGfEHWdYCRq bN1sq0PPHWIhDX7YIFm8Z1/RUtEf1QGdsluktf9fIMp9h6l+dUHm+0xoZElPwrvqQQDS bgTjgRfZ76uaBtvQNv0msD96wbImrC7V0n0ldlL5wek7yV5b+Lc/PP1A6w6bwdMNRVP7 6xUiESrMUt6YNGa+2EqWImZB0hJP5JXr7v2YY0KxFkqFUE6sPDrvuvggGlPb8YxjiPbZ s0vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697821218; x=1698426018; 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=SZbdJuO1XaqUdGSgYAbogilRMESNu95+lra/cS1fLyE=; b=Z2m/zQOrk89+VA5tTAQCrqVaYISizObyv5PGn5dl6tbCY0K3yPf4/CEmYGRDbvk1DR 7n8wRIyejMVmfVHbMLM/PgxXIdtD/3HfeABm7bbrr2l50k1L26996i2lRygEig2qa0lU 2if80SvLz/0rGGK5REG6cL4CNyerDfC6eG6qVx3PyeKnjz0myTTYxoRCN5ZSF4LgfMfe lMvzJs/0ZakB1tVDuZVkwr2Q18IiguxGmzv7K5fIPpi4soDJr8htyPY9GZxwuoTIEKdw MeORERqopkp6Mw9Srz14u9Hu3Is+GblD6yo7fJeArXj4a3BXQyDD+eMXear1SC3WgVxD 47Rw== X-Gm-Message-State: AOJu0Yx2kaqqFWQd5ziM55Lvm+kl+ZQnjq9YQvgzQpO/RaCzg+2nOjrN NByLHauF76JiQX6UsrXNvo+D4A== X-Received: by 2002:a05:651c:1a29:b0:2b9:ee3e:2412 with SMTP id by41-20020a05651c1a2900b002b9ee3e2412mr2520307ljb.22.1697821217878; Fri, 20 Oct 2023 10:00:17 -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 c17-20020a5d4151000000b0032d87b13240sm2079188wrq.73.2023.10.20.10.00.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 10:00:17 -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 1/4] hw/char/stm32f2xx_usart: Extract common IRQ update code to update_irq() Date: Fri, 20 Oct 2023 19:00:05 +0200 Message-ID: <20231020170009.86870-2-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::233; envelope-from=philmd@linaro.org; helo=mail-lj1-x233.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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Hans-Erik Floryd Signed-off-by: Hans-Erik Floryd [PMD: Split from bigger patch] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- hw/char/stm32f2xx_usart.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c index fde67f4f03..519d3461a3 100644 --- a/hw/char/stm32f2xx_usart.c +++ b/hw/char/stm32f2xx_usart.c @@ -53,6 +53,17 @@ static int stm32f2xx_usart_can_receive(void *opaque) return 0; } +static void stm32f2xx_update_irq(STM32F2XXUsartState *s) +{ + uint32_t mask = s->usart_sr & s->usart_cr1; + + if (mask & (USART_SR_TXE | USART_SR_TC | USART_SR_RXNE)) { + qemu_set_irq(s->irq, 1); + } else { + qemu_set_irq(s->irq, 0); + } +} + static void stm32f2xx_usart_receive(void *opaque, const uint8_t *buf, int size) { STM32F2XXUsartState *s = opaque; @@ -66,9 +77,7 @@ static void stm32f2xx_usart_receive(void *opaque, const uint8_t *buf, int size) s->usart_dr = *buf; s->usart_sr |= USART_SR_RXNE; - if (s->usart_cr1 & USART_CR1_RXNEIE) { - qemu_set_irq(s->irq, 1); - } + stm32f2xx_update_irq(s); DB_PRINT("Receiving: %c\n", s->usart_dr); } @@ -85,7 +94,7 @@ static void stm32f2xx_usart_reset(DeviceState *dev) s->usart_cr3 = 0x00000000; s->usart_gtpr = 0x00000000; - qemu_set_irq(s->irq, 0); + stm32f2xx_update_irq(s); } static uint64_t stm32f2xx_usart_read(void *opaque, hwaddr addr, @@ -106,7 +115,7 @@ static uint64_t stm32f2xx_usart_read(void *opaque, hwaddr addr, retvalue = s->usart_dr & 0x3FF; s->usart_sr &= ~USART_SR_RXNE; qemu_chr_fe_accept_input(&s->chr); - qemu_set_irq(s->irq, 0); + stm32f2xx_update_irq(s); return retvalue; case USART_BRR: return s->usart_brr; @@ -145,9 +154,7 @@ static void stm32f2xx_usart_write(void *opaque, hwaddr addr, } else { s->usart_sr &= value; } - if (!(s->usart_sr & USART_SR_RXNE)) { - qemu_set_irq(s->irq, 0); - } + stm32f2xx_update_irq(s); return; case USART_DR: if (value < 0xF000) { @@ -168,10 +175,7 @@ static void stm32f2xx_usart_write(void *opaque, hwaddr addr, return; case USART_CR1: s->usart_cr1 = value; - if (s->usart_cr1 & USART_CR1_RXNEIE && - s->usart_sr & USART_SR_RXNE) { - qemu_set_irq(s->irq, 1); - } + stm32f2xx_update_irq(s); return; case USART_CR2: s->usart_cr2 = value; 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: 736279 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp410918wrl; Fri, 20 Oct 2023 10:01:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGd871eabGQROy9qiVFlvnd8KApnbZTjrhJ6hk5p54+P6LuJZsSptvgwkgp9xWuMip+sL7H X-Received: by 2002:a05:6870:7b4a:b0:1b3:8cfb:78c5 with SMTP id ji10-20020a0568707b4a00b001b38cfb78c5mr2757065oab.34.1697821318782; Fri, 20 Oct 2023 10:01:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697821318; cv=none; d=google.com; s=arc-20160816; b=iqZxgwmYZuK1M0WeUCs/X+/fWv/MHT9qFqWEHKK0++QJw+m5fed4cZZFG0uFyXbfqG VR8/uy1cSe/uWrMOK4BQtFNdOqH3+fBVRFwVAgAG/uvDJjZidIhwlL+wF6d1xhp/8/vJ GUj5qeUdO1lEpu2TMhFhJSgodqdLzwjJHsbCeYtaOB8nnDWngm1rtIUHgWY2LlUBEeWt QEUokNd6NAsevOOQIV2L2mclc4sHE7qJ2UrJQuvBfReercb0TVjpwl5TNOcA5ZaP5dKG AHgsDVwJNiQfgrz8NDsbVtU3osiYJROx5Ixq/jXpMxG5buIYSJViVwFrAZw3GbKZaCRZ 7O3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Kt78QWV8SLX4gIgX7BJ1w/k7e1eNEVxwNDppyA4h62Y=; fh=CSV7ixVglXzcxb66Foh/+b7TyX0eETHj/jUl4XtrXPU=; b=XvqwFEnj4vrYXpxEzQ/oBqVxxY8ct7zBmChQrJD4ir7utaGFvYcTxvgqNbXgpsBQyw iabPAJDS2lIBe6+ovmfgweKh2m/oueGLPv5Xt+PAc9HpJxxY4ACxp/CfXCA02ADTTbhX nNlroTdYxkRnDWe43rXJBAfgveKjoXWCh/Bd4QZEhdxkcx2TpNdqjqNon5S8yVO5MeDy B/akXsRY8wYmyyH1TG8Ipqikfjc5fdaopMBsmZwQSlSSxL5a3KaviW2lr0zr+9vB2KOc YJnhGP0iZDoBxkKU2+LGy82ic6TnY/ZMZmEas75BTg/aCP2F4O7NYykOGf9WryAgtZIq Xiag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=buGso4mN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v18-20020a056102303200b00457be53ef45si214940vsa.531.2023.10.20.10.01.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 10:01:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=buGso4mN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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); From patchwork Fri Oct 20 17:00:07 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: 736276 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp410661wrl; Fri, 20 Oct 2023 10:01:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbSd+nWD0cuPCOuZzuLE98Lb8ptMN2C+CZCmSd9SG23sLDVPT+Kw79Wvx/fjEfe01zfSFe X-Received: by 2002:a05:6102:1624:b0:457:dae3:4895 with SMTP id cu36-20020a056102162400b00457dae34895mr2543538vsb.34.1697821296025; Fri, 20 Oct 2023 10:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697821296; cv=none; d=google.com; s=arc-20160816; b=M1IcybXGXukVpVFhZA6NznQlehH1DWujXs42JwrUGhgJx2rtCrpZIASypfp+CHG5Ns qM6lUUM7Nyd9iCHHKsAN9RH0sD7u9hnpoFlYONXzrdOnS35UhLVZTaPx7d75VzXcnvBQ Fi/5WQNkM2cvRUQOn7qjSrcHgrjDWdBul93tIORjzh+ZtDwwdAOFTaHCsp8dRONo1cL6 tWc9wpcC04/Qy22QYrLhIZS0rkLi62jYIeHGSg1YKur0nLlksKwBKUjjgetOSHDRC/vF cmtqM9cONUnbOv0ogNeObvd7VkNIBqYCkcSeh7JcC6RewZB9YE4qPEfaqgGEnffUtEpF 4A3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1xZSgqSQwwblLFwOLujd84tc/4RL/5RbsxrAj9sMqy8=; fh=CSV7ixVglXzcxb66Foh/+b7TyX0eETHj/jUl4XtrXPU=; b=fDH7l9CUJeuHTUT10Sd2lt0dmXwHahjL5L2tLpe7E26vdPDoWh8d8HMCOgQkoSZNaE vBO/t2M30UyWk6br569KFhRFPtNfM2QpQDanhms5EDzvEGRozcLt5fDkjl0Zu2uKqM7b hVtCPsU7fVOANnjyT7wZd3h9ml1jwRkLjH7f3073XPfS1Ckr0l2l+L8Hn982BTdxc7dN TsSExERrqcqaJirtg5JoLYJGiEn9GiOYNyo3zuu7i0SHA2Jbx0pBvVXKFsQFEsV7K8+7 9eCWRv76GpRadFhHf2G+sFpDXQxDDmOzEFdwbmMn+YXR41D4L2i/UKyWeRwZs+bUf9S/ sAXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uxu0caw9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q13-20020a056102126d00b004528cc49f2dsi224766vsg.134.2023.10.20.10.01.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 10:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Uxu0caw9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtsrU-0002aJ-72; Fri, 20 Oct 2023 13:00:36 -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 1qtsrS-0002Ys-Bh for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:34 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtsrQ-0000H4-8z for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:34 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4083f613272so8764815e9.1 for ; Fri, 20 Oct 2023 10:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697821230; x=1698426030; 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=1xZSgqSQwwblLFwOLujd84tc/4RL/5RbsxrAj9sMqy8=; b=Uxu0caw9V+mF9gc5xue8m5yGAWKN2t121DKBUV1Oo0t6RJMNvH/jucPFjUclMyc7h0 e5FtFgnbcASgWsPeZasAER1VpmYZE29GYeSRzzVbkewKnOsScs7iLQHtRcIh36h2aDBx 4DcMKi9gL0mD3J1Cemv6bEyocNKKB2NDiSZ8Z+CS03BapOp/hkyY7qZNEPaE0mWWA8V+ eFlU57gn6AJR0dlLJrpYrM61NzipbnbZRzn1kZki3MXQh6j+pmaS2leu/yVtpKtiv9WG JKE6AeKMu/3004yJa6nJangX7hQx2BbrqlqIq1i0ge70F+klYboy14zUi5Z6Q2GvsXmu aV9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697821230; x=1698426030; 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=1xZSgqSQwwblLFwOLujd84tc/4RL/5RbsxrAj9sMqy8=; b=Cjq/hK+fiTP0TcKHnZ/xOvx00GlCAnist2rohhqCkfq+pVK96lkN7BdnB4iAM9fNpm gGbbRfGLBKDuBCJOY0pz+urzCIpJb0S8XHqdKvuGPVfu1dpANRJUAt4rv8YZkgXuF7my bZ12PCVCKBjvmuv8FnsH5o90i93rD2RzlBHN2/m6Y94tbIGzFtbOdxCHJtlednvgfMGS Lc3rvFgJjxS3IVFB6kye6+9wTEkea0fYrdcl+iOOkreuXE2RaSmsiMRCbdxf79guVY69 59kiv9wcMuJEXcqd45QQkMgiqHifRGAXpC18RZy1S6PPuBSj7FnRLlDSWtsARfi6UsG4 3y8Q== X-Gm-Message-State: AOJu0YwoWPsYHQ9urYYip2xfgxUD/fpevuiJhvUXSlgZ+4KprScam0k+ N+NumyrgblVUHFJMnGhSNJL09A== X-Received: by 2002:a05:600c:35ca:b0:405:3955:5872 with SMTP id r10-20020a05600c35ca00b0040539555872mr2053594wmq.18.1697821229814; Fri, 20 Oct 2023 10:00:29 -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 e7-20020a05600c218700b00407efbc4361sm7346993wme.9.2023.10.20.10.00.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 10:00:29 -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 3/4] hw/char/stm32f2xx_usart: Update IRQ when DR is written Date: Fri, 20 Oct 2023 19:00:07 +0200 Message-ID: <20231020170009.86870-4-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::330; envelope-from=philmd@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Hans-Erik Floryd Signed-off-by: Hans-Erik Floryd [PMD: Split from bigger patch] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- 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 46e29089bc..74f007591a 100644 --- a/hw/char/stm32f2xx_usart.c +++ b/hw/char/stm32f2xx_usart.c @@ -169,6 +169,7 @@ static void stm32f2xx_usart_write(void *opaque, hwaddr addr, clear TC by writing 0 to the SR register, so set it again on each write. */ s->usart_sr |= USART_SR_TC; + stm32f2xx_update_irq(s); } return; case USART_BRR: From patchwork Fri Oct 20 17:00:08 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: 736280 Delivered-To: patch@linaro.org Received: by 2002:adf:dd81:0:b0:32d:baff:b0ca with SMTP id x1csp410925wrl; Fri, 20 Oct 2023 10:02:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHogmtycm8/smNpNkoRrBAV3Txnj2s2DiUbK68CCokQbvQWw5oHNGW4jDzYhj4L8U9WfNXK X-Received: by 2002:a05:6830:108f:b0:6b9:b1b0:fcd1 with SMTP id y15-20020a056830108f00b006b9b1b0fcd1mr2303830oto.31.1697821320162; Fri, 20 Oct 2023 10:02:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697821320; cv=none; d=google.com; s=arc-20160816; b=odmBkt7eS/JOsoiDjOcAewmwoLdeDpALgGu/heVTSSXItIaNCflsOeGgO+KBszQ0pQ l/NfcrX3wtCM6QBte88CAiw8dsQi5K00YX7Gw/S2DDEGGALjqLamN3yd2NXe+aE8WfXg yPk016b4BVr6/VKzaKy4snkwmCVbhb2Jh0R/fNMkna2FtWZloSEcjc/+dKy4TqLxf5Rj uBGQMpc2Lx9acLs9IRwHlYdXTcmokUZZ+Rdn1aXRXC5PZGu2gJuCG1jNstNnj75GV9iI +wfDU4dDpJeqcn+OWkw4WMUVFQuN+9tWSlaTsyoOjFcpglVziDARwqX0TRq/LwpntqSu n+6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pbtFw1Pjg71UOOCnDLcng5H0rDRsRUycUpGk3Jvwf+E=; fh=CSV7ixVglXzcxb66Foh/+b7TyX0eETHj/jUl4XtrXPU=; b=laKawHTRMdb9iRNqm+7X/MvXhd9sFTLSKiTYH+FKmckMBl3XBDoBFfPk2qqrBIJOrp C4kgYglx/udLmCAQ0U9ZnBhzCUAAiUIT8aWNMntjOX8XT/nL1ABoTIUXynZrWcRZe0I0 DlpvW1ZhPePRy4FlmT6cqN7ExSjrdr/+c/UzvOFLM1e2ipWLnEfXSoFASGiROfmBzp/i mnz+aTTuqkAOCPYDxDi3zoAgulqZR5YyWMRBPGSfCtUyQjO7EYZaVMteQtQdskSu4pzs IueGQFcOHRTyISBa8iGfP9hH9mpi93RqDm8VIon34skj1PXN/ezkynTETgH4uzPHiIea gb1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HVhWsJ12; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u23-20020a67cd17000000b004525f21db59si205748vsl.454.2023.10.20.10.01.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Oct 2023 10:02:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HVhWsJ12; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtsrd-0002cn-H1; Fri, 20 Oct 2023 13:00:45 -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 1qtsrX-0002bf-Hw for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:39 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtsrW-0000KC-2z for qemu-devel@nongnu.org; Fri, 20 Oct 2023 13:00:39 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4084095722aso8498185e9.1 for ; Fri, 20 Oct 2023 10:00:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697821235; x=1698426035; 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=pbtFw1Pjg71UOOCnDLcng5H0rDRsRUycUpGk3Jvwf+E=; b=HVhWsJ12DKZ8Ias3+ZxP+xhNixI8LvNChPDSguMrKjxp+PElSUgnURMXXu2I1hgYHS VNwWHasZDgdqKht1LlDjDFxDRFHNhlS6DXmNA++oJPFf1w3ktG7NiYUTYRdLmkrgcr6y aElMdEa7Vq7zzcjBfMABVmKYPOLk81Wre5OBRxtWTyb3W8dGlez/M0vBC4CRMfbxuSwN oW0coYyiGaZdOH9R5iXLJxcMoTAdJouvZ1UGpxt9DQSJxxGrgHom49zXVl/dhIiWspJq IDtQ0CI2zylbg7Uls/jL1fALGKgiLCdx8SOmzJ7YrO1kyKE1U98ExVxZEDJbLAwb19tU do1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697821235; x=1698426035; 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=pbtFw1Pjg71UOOCnDLcng5H0rDRsRUycUpGk3Jvwf+E=; b=ibQYLM9D12Bi9gqfxDI4wYY+630BjMhJEiOgd9Yps5WZWMuVuND/SlxwSQtgvuNaq0 BnNApL0WsF7DsLB/2AH9nMOvPye0x3Asl4mHHYkI54ouYG+S5zLKTcSv7HDXY1AKtMUb o7Z2EKLXVQT5+J31zHtn5LTNdQIPlJcL+pRe3uvCY2JPuA1eOVAk28GwtrrRfq5QLX/3 lTLhlG3EEeFxY72piMwcIFgv84n98SJauOhz9QcOlPlmno48gdz9e/Wm+sRUGfcd5ZV+ l16ly8j2m+dNj9OyH5ZUKV8R/7I/tgIzL38CT5hZ1YF8UF2ALZ6PH181QEb805IjUKa9 IN5g== X-Gm-Message-State: AOJu0YyAY+Q9LD8jy7oQFOjWEyv0J6JA9Fi4RxKtAQ4PcUXK8s3JMs6w mHTdCVD8oTWtOi9ImW1Y2srYVQ== X-Received: by 2002:a05:600c:4f49:b0:3fb:a100:2581 with SMTP id m9-20020a05600c4f4900b003fba1002581mr1888317wmq.14.1697821235488; Fri, 20 Oct 2023 10:00:35 -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 l8-20020a05600c1d0800b0040531f5c51asm2625453wms.5.2023.10.20.10.00.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Oct 2023 10:00:35 -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 4/4] hw/char/stm32f2xx_usart: Add more definitions for CR1 register Date: Fri, 20 Oct 2023 19:00:08 +0200 Message-ID: <20231020170009.86870-5-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::334; envelope-from=philmd@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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Hans-Erik Floryd Signed-off-by: Hans-Erik Floryd [PMD: Split from bigger patch] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Alistair Francis --- Useful if unused? --- include/hw/char/stm32f2xx_usart.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/hw/char/stm32f2xx_usart.h b/include/hw/char/stm32f2xx_usart.h index 65bcc85470..fdfa7424a7 100644 --- a/include/hw/char/stm32f2xx_usart.h +++ b/include/hw/char/stm32f2xx_usart.h @@ -48,10 +48,12 @@ #define USART_SR_TC (1 << 6) #define USART_SR_RXNE (1 << 5) -#define USART_CR1_UE (1 << 13) -#define USART_CR1_RXNEIE (1 << 5) -#define USART_CR1_TE (1 << 3) -#define USART_CR1_RE (1 << 2) +#define USART_CR1_UE (1 << 13) +#define USART_CR1_TXEIE (1 << 7) +#define USART_CR1_TCEIE (1 << 6) +#define USART_CR1_RXNEIE (1 << 5) +#define USART_CR1_TE (1 << 3) +#define USART_CR1_RE (1 << 2) #define TYPE_STM32F2XX_USART "stm32f2xx-usart" OBJECT_DECLARE_SIMPLE_TYPE(STM32F2XXUsartState, STM32F2XX_USART)