From patchwork Mon Jul 10 17:51:01 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: 701051 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5305519wrs; Mon, 10 Jul 2023 10:54:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMA/uO8gsPT/74sKhnAQB86akVze3k7roJJFXmdo/3ZfCDdderg6ZrqS8Mna2hm6m6dDe2 X-Received: by 2002:ac8:5785:0:b0:3fd:e5d2:f47 with SMTP id v5-20020ac85785000000b003fde5d20f47mr13560723qta.12.1689011664514; Mon, 10 Jul 2023 10:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689011664; cv=none; d=google.com; s=arc-20160816; b=mwJH40m4lSsX5CbvsqPD85Xm3iKzau/5o4y78ft4sOAFAeqRp3CnGBo0swm10w0zsS 6TN8sCbtMPMuYn+377QD06iJ+knMkK0ZpH59d05qJe7jPcTb9t9j1T4q5oF0u7v9sL4c JCEYvx7aUTlC6RgC70VeCFZAxPRjAmohjRQVHLBppnbdEfjKQAKRyWwpk58O198qTziL uTyu5A6cwXxVBc0gpKMYeA7IPHxuybppNaBYA7ftaeSfc6TeEHfjacgvL4Cy2I+CDmqP D9LkVRUbW/PfOpx62UEdUEGDCTbrmdau7tTVKOs48kllCgU1JFuSCcTeT9nngKRNvcXg /F3Q== 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=NZ8DNr0ETWD1Ms+NV1FciyuZYg6CvPu0oUthK2WDbYk=; fh=4TWVGTMFk+XB48cTX7H3L2FEUZf3X6lSQ5h15kr1III=; b=YTdolNmWuiWE2oLaDODp9pwOEq8rtVxRjff0fOuE5jeOL41bs+v/IaTO9T7AC6d53Q wUU/qtCxlXMHTkkU2fiKEMRmKcneOdFHO0dw1dhxV3P/Gv8RQoBy/XmP0xoeiJgUOivZ a5VH2SxkwhFiDohIesehjEoW6dbeKaxQaq9rWtlMVLWHkxdnW9NrXlpiwpfWAv6JwvoN W1Y4iXgj1NfbTD0dLkgVl0QwpjsFwA24M3gLONfbJbuqtbGS6GX1bOrKaQ3FgevPKSf4 vM04B0roID70I4B9eTBRx84YUpIVeap/5oFi/F1ompaBlC5qJ3iwIkYlpQze6qOk5IE2 U3CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="jRPo//N8"; 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 m15-20020a05622a054f00b00403a9409a48si112782qtx.718.2023.07.10.10.54.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 10:54:24 -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="jRPo//N8"; 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 1qIv3T-0001JO-Qz; Mon, 10 Jul 2023 13:52:11 -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 1qIv3R-0001Ip-5Q for qemu-devel@nongnu.org; Mon, 10 Jul 2023 13:52:09 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIv3O-0000ZH-RZ for qemu-devel@nongnu.org; Mon, 10 Jul 2023 13:52:08 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-314417861b9so4857164f8f.0 for ; Mon, 10 Jul 2023 10:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689011523; x=1691603523; 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=NZ8DNr0ETWD1Ms+NV1FciyuZYg6CvPu0oUthK2WDbYk=; b=jRPo//N88Xz2LKiydkosg17oCPcLw8bBUkxqEyYDL7buG+CtATrHJ/0Vbr0KK7fESh Y5jZtAtBb8faX3h0hzHRjbwptN6JV3RM4wcvuB/vp5tLRlCa1dBWSDEDNiAeW0DafnjW cVjoJyKV3HpPk+nx5qSGVRBiYpe2tWgekqYqqOVLbk4eFR4XvB2CHu4fmRgUI7SuuSq/ E43UpmrWHYeEmxwFRXFWKHAxt3mjqsKzoi6pNuwKiZ3lo6BYo4CgzSSBuaxtms2TlrPh tFTK7zP+EkXeOlJjdwJQNP5FUn4zxArGF3/zMPyrWylERgd4g4BnzVxSE9DRcxEWtGbj MR4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689011523; x=1691603523; 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=NZ8DNr0ETWD1Ms+NV1FciyuZYg6CvPu0oUthK2WDbYk=; b=ci1I24bM+WLC7bzcp/t/ll8QWrcJhMTwSu0+y8xa3+sk2MF36HlN+8UMr4Dlvpa2pm nZawIcVcAZkwfC6EqJxy8PFrc3UkW+21hg1XE8T4c9VPxCI1ckQPR3vAE2UJEiSiIRdD YnklIcFbr0G9bO1mhbNx0Cvhq+ASku8YB4v2P3qwZWfS0s4CdkRsFuK9VruDSQpMUlJW H8rrPIhEhNnLg35a/YSz+6NiNgxUR4mscwqHdXqPzFpPlw9rVbUVZyi3axfd2tfVVe2h GfULj6v5XNItRy67DhWT7bYsUCbkZ4JDUMqvlNYXy2Uq7hXD1q7vdN6zarpqiD9Aj5xM bJHA== X-Gm-Message-State: ABy/qLbVpQldBrwpZ7Y52fgOlHX9gU7RCeWeaPTWtrGray0JbJ5bQqPm FF8iYFeU7YlS4mUV/KTHybdvOxJbIFrcywdcgLY/Ww== X-Received: by 2002:adf:ecc8:0:b0:30f:af06:7320 with SMTP id s8-20020adfecc8000000b0030faf067320mr12999692wro.23.1689011523373; Mon, 10 Jul 2023 10:52:03 -0700 (PDT) Received: from m1x-phil.lan (mst45-h01-176-184-47-225.dsl.sta.abo.bbox.fr. [176.184.47.225]) by smtp.gmail.com with ESMTPSA id d6-20020adfe846000000b0030fd03e3d25sm20872wrn.75.2023.07.10.10.52.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Jul 2023 10:52:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Peter Maydell , Evgeny Iakovlev , =?utf-8?q?Alex_Benn=C3=A9e?= , Gavin Shan , Paolo Bonzini , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 10/11] hw/char/pl011: Rename RX FIFO methods Date: Mon, 10 Jul 2023 19:51:01 +0200 Message-Id: <20230710175102.32429-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230710175102.32429-1-philmd@linaro.org> References: <20230710175102.32429-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@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, T_SCC_BODY_TEXT_LINE=-0.01 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 In preparation of having a TX FIFO, rename the RX FIFO methods. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- hw/char/pl011.c | 10 +++++----- hw/char/trace-events | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 59d239cb83..7c785e7bb0 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -367,7 +367,7 @@ static int pl011_can_receive(void *opaque) return r; } -static void pl011_put_fifo(void *opaque, uint32_t value) +static void pl011_fifo_rx_put(void *opaque, uint32_t value) { PL011State *s = (PL011State *)opaque; int slot; @@ -378,9 +378,9 @@ static void pl011_put_fifo(void *opaque, uint32_t value) s->read_fifo[slot] = value; s->read_count++; s->flags &= ~PL011_FLAG_RXFE; - trace_pl011_put_fifo(value, s->read_count); + trace_pl011_fifo_rx_put(value, s->read_count); if (s->read_count == pipe_depth) { - trace_pl011_put_fifo_full(); + trace_pl011_fifo_rx_full(); s->flags |= PL011_FLAG_RXFF; } if (s->read_count == s->read_trigger) { @@ -391,13 +391,13 @@ static void pl011_put_fifo(void *opaque, uint32_t value) static void pl011_receive(void *opaque, const uint8_t *buf, int size) { - pl011_put_fifo(opaque, *buf); + pl011_fifo_rx_put(opaque, *buf); } static void pl011_event(void *opaque, QEMUChrEvent event) { if (event == CHR_EVENT_BREAK) { - pl011_put_fifo(opaque, DR_BE); + pl011_fifo_rx_put(opaque, DR_BE); } } diff --git a/hw/char/trace-events b/hw/char/trace-events index babf4d35ea..9fd40e3aae 100644 --- a/hw/char/trace-events +++ b/hw/char/trace-events @@ -58,8 +58,8 @@ pl011_read(uint32_t addr, uint32_t value, const char *regname) "addr 0x%03x valu pl011_read_fifo(int read_count) "FIFO read, read_count now %d" pl011_write(uint32_t addr, uint32_t value, const char *regname) "addr 0x%03x value 0x%08x reg %s" pl011_can_receive(uint32_t lcr, int read_count, int r) "LCR 0x%08x read_count %d returning %d" -pl011_put_fifo(uint32_t c, int read_count) "new char 0x%x read_count now %d" -pl011_put_fifo_full(void) "FIFO now full, RXFF set" +pl011_fifo_rx_put(uint32_t c, int read_count) "new char 0x%02x read_count now %d" +pl011_fifo_rx_full(void) "RX FIFO now full, RXFF set" pl011_baudrate_change(unsigned int baudrate, uint64_t clock, uint32_t ibrd, uint32_t fbrd) "new baudrate %u (clk: %" PRIu64 "hz, ibrd: %" PRIu32 ", fbrd: %" PRIu32 ")" # cmsdk-apb-uart.c