Message ID | 20240911121422.52585-28-philmd@linaro.org |
---|---|
State | Accepted |
Commit | bd6051b7cf027e60080a5c0ab3b002685f73105c |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:ab1c:0:b0:367:895a:4699 with SMTP id q28csp765638wrc; Wed, 11 Sep 2024 05:24:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW8QSgVlEpog6KIilmn0IqQ7gj8L4d2qNwTmwJdl/MqqZH8N2Ib6C1nleIcCbpawZpG8wYJpw==@linaro.org X-Google-Smtp-Source: AGHT+IEIAhMZ3dZiKuY3iakLDqo1nOEZTri5U50Ifw+iqKEwydpOV/Y0XWSgLNMZboQXh3ei2Z8F X-Received: by 2002:a05:622a:342:b0:458:3116:f05a with SMTP id d75a77b69052e-4583116f2bamr148939891cf.24.1726057476889; Wed, 11 Sep 2024 05:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726057476; cv=none; d=google.com; s=arc-20240605; b=Q+5W2Z68cIun8Er+5nDqVYq1lPbjfbjaZKoIqlqt/E0iLe7VJ7I+pjUmL5kPLu42K2 wsmSknm4s/yUnJ3o8wQ1Z6y6xSQdMrZuKsyXtLCHeRDNurYr3RHaDoOn5XNaG+dypyeC mhvXdAiB9zxeuTI29MKZLEv4MS6oVpODk5cgqzvtKk3bXspWxaEoyGOKwVCH5zFM0gTZ jeV+PAgwArHMOUN9fFwYlEkDurvDipojWilWAjhMnuXFrkUAsN1/X/AQFlvV0bvR32IK +oWo22oTmvC3SyfRA2nHv04S5Oh1uDC3h2eeBo9Hl3FVqeAyuWL3kmqeUSXHUb3QgynZ RGFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v9gIofjX7RIq2gT0KXoGguqrnUK/Equy8B4Tk/49iCs=; fh=KEPLpLQVO77v+WBSDPeXmXKEnOIOhNHYNw7geHkyLGA=; b=krIYVDkm2AYKp3gPt0k7ImbmgdM8yfXFJq1PBPUqXOhZQ4PPAsWbv1vx4tKhIvsd3m Fbzy64azLPkgI48Cn8b3JxVHTuKhTbyN/jKQPAAhaTzycU0y4mnSzmicWgtwn9vqcD+r SsNDYLNv2/vXepPI1g7TmOQM1/R8V/OHFcvr5fsva5Uwetu7YPVDHoSB2/3Y0cfD8J2n k2wPqFDb2kbZYPCqav2Ll5jLJq83Rb3gFKQcFNETf4706YjtFSennsY0GOfZEQp+kPIV 588zWKvmaYGBU1NqtOKwx3NwhdLyo97PckAYTZ4RSIws4tT54HsXxD22u+IN0t3gawKs Ekzg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X9esdbGm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45822f3e851si96621531cf.296.2024.09.11.05.24.36 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2024 05:24: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=X9esdbGm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1soMIs-00058B-AF; Wed, 11 Sep 2024 08:18:34 -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 <philmd@linaro.org>) id 1soMHw-0001MX-D6 for qemu-devel@nongnu.org; Wed, 11 Sep 2024 08:17:40 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1soMHt-0007Yk-8a for qemu-devel@nongnu.org; Wed, 11 Sep 2024 08:17:36 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3770320574aso4227937f8f.2 for <qemu-devel@nongnu.org>; Wed, 11 Sep 2024 05:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1726057047; x=1726661847; 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=v9gIofjX7RIq2gT0KXoGguqrnUK/Equy8B4Tk/49iCs=; b=X9esdbGm+pv6nEEsRlzxpoGH3O/ynFVMIXlvQeZzW254NXRBh9xiRa791HaLeGZLh/ ZIuZ+BY2K+csrZKbBI8Z1ufGVpk2CCl271GV8Fg6pQZPRXewNt3mrel/UHCP74UKHchJ IlS/0nzk5SBdjHsY/caIsl7bHu+7FEMVH/w7HaMAuIMAk4TAJIYxC+upetw+Cpgdl6iV UCIx3OVZKLQ9TSbzECbuq1NXAI1pj0YnWPVE8LZonFSzoNcVXAkjtT6m48lVI7lcWMfv ORsFH/TPL6NWy12K1rS0VkEdjBPhHuD8AxL1fP/ULgk5Sj/Wz5qpZBpy3qrF7+AySK9G v+OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726057047; x=1726661847; 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=v9gIofjX7RIq2gT0KXoGguqrnUK/Equy8B4Tk/49iCs=; b=qEtTXfvlIk5jhhOisF/02i9fonKRO7eqZzDAaFWWj+XnwMNuqJlUrRdDzObHNFq61+ n5fEb+ZiTI8npUvX9/6dMZEPHls8bhfgn9M7XeOIBuAlkRfGeZa2WhnAiEX3SQMkXPJy oUfYaaGHEPUuiOHmsHHwOf3qwQKvMJzmxnODjptbCKRXzlLP2A3vqiwqHZ7o5vX+c2MM /0C3e9fGQvuIPu7AJGenUBHUS17ZOvsz6W6M3DJVrAAB5nGHiXYOBny2BJFyjEe9sPmF s2vq8SIowyCDxsAB0DmHYjhVcakHUlR57t7feiwfudXBYHqrsbPXFuzT7gkAHWpjcgHJ ZSNw== X-Gm-Message-State: AOJu0Yyh93JuwK94GzZG3En2OjFbscl/q3MyPI3MI8DKAPny9t7+GJKD QdkktXY9hblZTlwFIzljsq/ZlhR1Wvn5CoqSxDpRHqyKqDn4c7JuInRteuoVQobRXcKcDEICAHb R X-Received: by 2002:adf:db41:0:b0:374:c324:eab5 with SMTP id ffacd0b85a97d-3788967ab6amr11602696f8f.41.1726057047235; Wed, 11 Sep 2024 05:17:27 -0700 (PDT) Received: from m1x-phil.lan ([176.187.196.107]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895649733sm11446642f8f.8.2024.09.11.05.17.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 11 Sep 2024 05:17:26 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, =?utf-8?q?A?= =?utf-8?q?lex_Benn=C3=A9e?= <alex.bennee@linaro.org> Subject: [PULL 27/56] hw/char/pl011: Extract pl011_write_txdata() from pl011_write() Date: Wed, 11 Sep 2024 14:13:52 +0200 Message-ID: <20240911121422.52585-28-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121422.52585-1-philmd@linaro.org> References: <20240911121422.52585-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@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.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/56] hw/pci-host/designware: Declare CPU QOM types using DEFINE_TYPES() macro
|
expand
|
diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 3d294c3b52..1dfa60cb12 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -221,6 +221,20 @@ static void pl011_loopback_tx(PL011State *s, uint32_t value) pl011_put_fifo(s, value); } +static void pl011_write_txdata(PL011State *s, uint8_t data) +{ + /* ??? Check if transmitter is enabled. */ + + /* + * XXX this blocks entire thread. Rewrite to use + * qemu_chr_fe_write and background I/O callbacks + */ + qemu_chr_fe_write_all(&s->chr, &data, 1); + pl011_loopback_tx(s, data); + s->int_level |= INT_TX; + pl011_update(s); +} + static uint64_t pl011_read(void *opaque, hwaddr offset, unsigned size) { @@ -388,14 +402,8 @@ static void pl011_write(void *opaque, hwaddr offset, switch (offset >> 2) { case 0: /* UARTDR */ - /* ??? Check if transmitter is enabled. */ ch = value; - /* XXX this blocks entire thread. Rewrite to use - * qemu_chr_fe_write and background I/O callbacks */ - qemu_chr_fe_write_all(&s->chr, &ch, 1); - pl011_loopback_tx(s, ch); - s->int_level |= INT_TX; - pl011_update(s); + pl011_write_txdata(s, ch); break; case 1: /* UARTRSR/UARTECR */ s->rsr = 0;