From patchwork Mon May 22 15:31:43 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: 684725 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1262339wrt; Mon, 22 May 2023 08:37:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Al8+0leIS4lpac2QYrJPhe4DR+jJLE9tvSewuPrVGAGTDUWoY1n2YNZ/TBAo1wfnQ0lUk X-Received: by 2002:a05:6214:2aac:b0:621:53d1:3c69 with SMTP id js12-20020a0562142aac00b0062153d13c69mr17661843qvb.20.1684769845052; Mon, 22 May 2023 08:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684769845; cv=none; d=google.com; s=arc-20160816; b=AdrExzkDKBC4BFoP0KW75aBUPKfpgUYCVU1rKhoAJ97No6o241rPRjifXDR5sGA6Hk c+h0DbLfACVxQjje0CbI/qCz+l8ixfRp5n6KURY0mLNdOiw+Xfh70YitVSqMly+LnF8l XhdY7ZR/1OLCXDrY0tA9fW9FVSakWszC3WGsgdx46+WmUJ5jA4FbQZ+AhOl2Drq4nRK7 5ZZeJSFejbi6GL6q2h4YlfXP0tYUW+izK0VYbdVymgCJDtkVRYgpOfPmyvTfJXi2B2/d NuCPMVZMIxIlDD/7Xi62AkxZfeDnDKhn6yG6LhR7esoqC63TdiqemKgZNpRm12U9FVwf 8l+Q== 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=A4NEdvvVpuVzw0Qn5uC2iypDr0fWHEDLqqeZGtVwP7o=; b=uQNQb1EhWf06tXZqI7byTbmBB6uCgijc3g4/m3TCTU1WwnCs+sTaO5WN9cD+uU1pYY u12TIz7lxRLGCa/lxl1vG/b6Rwb1McOtGJXQIE+eDkjfKEdOHQSK3hL75+zG1WDw/zS+ G2hvX/QqDTCAVdp0sz9NjzYMMR2ykUK/JIlFUfqjhnKn000fvQb6TNo4kbHk6DXSrBUX sQm8OMV5VM+rj+Lm9HoV38nmXBIOClbMUjaisHXhZsxY9s3P6Ww6EkcaXd+d1IzD5Unx txdyNS+AhXublhXUeQT5/iLmjiUUfX9Ac7uHHajMVkbufcw1rHABqwkPq50WGwK8SW9j N32A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bb/CPJDl"; 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 pt15-20020a056214048f00b005a295abc1bbsi3878056qvb.333.2023.05.22.08.37.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2023 08:37:25 -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="bb/CPJDl"; 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 1q17Ws-0007l6-8a; Mon, 22 May 2023 11:32:58 -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 1q17Wo-0007kN-8T for qemu-devel@nongnu.org; Mon, 22 May 2023 11:32:54 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q17Wk-0001WZ-HW for qemu-devel@nongnu.org; Mon, 22 May 2023 11:32:53 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3078cc99232so5978155f8f.3 for ; Mon, 22 May 2023 08:32:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684769569; x=1687361569; 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=A4NEdvvVpuVzw0Qn5uC2iypDr0fWHEDLqqeZGtVwP7o=; b=bb/CPJDlZE3O8+Gr6hYx0FTiPCVvThuj/wbwKpHTQ6taKkcCafnD0RUUdXqgOQdTfP vZCL5mKUV0TGhagPeetazHKAhjwh94/TFmOWrB8v4jzILm0YXtNmfob0TPTIXiuoGWWE 7n77wj/R4gFxkF0YA9mygsxMHho1a6ZQYDJjiKJmktaGifNR2O8yKOxE28imuCglHntg xmm0obzCX/wASoYmjRYiDAY2IicsVSfmsI13NXleKZ2tWDi0O2+Mq12rk7xK3Gbplm2M zK5ykPaLQZzpoH++aPOQ5vr4TmnuqgYpmAwQBGmy3e12PRbVB6yakD7jCmm11a3suFbr mWaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684769569; x=1687361569; 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=A4NEdvvVpuVzw0Qn5uC2iypDr0fWHEDLqqeZGtVwP7o=; b=dbiCkvMc+2VzJxfnPw/t9aaefKhzg6tdm2JEe/d2RxFIYcUHlVUrDZjJN8SEr853dc Imm1Lj5CxmxGHpC+hVeW987HbGONp5J4wq33dErJFbWaZJx1T86n284DCG2UoJiy5zy8 89mxg0R+2Rul5EZWFWQRqYvR9tz++DCODIdJ4LAIyaJcM0NCCOYUcsubzBFamd6a/KHu XKzJDT/AOaX89fvsX4VLZcvYXHSe9GFEgWl/qPDuyicKfwRoHpKseU+9nl0c0DRj7Yxm JPa8HHBTGZJ6nAt7LN4JfsXc1CGbeRomXu6d/f18wieOmaxu77G7G+YYcecumtxxBjxx cz8g== X-Gm-Message-State: AC+VfDxf6GrD8Rs7Q15Yhgizp0xIapblhMjV2/fPBc3h+XcXkWN1O1KL /qkfyL85uyL5PeuCivGwIEv7jEEgkiO0oCp64y4= X-Received: by 2002:adf:cf11:0:b0:306:36b5:8ada with SMTP id o17-20020adfcf11000000b0030636b58adamr7958771wrj.29.1684769568907; Mon, 22 May 2023 08:32:48 -0700 (PDT) Received: from localhost.localdomain ([176.176.153.164]) by smtp.gmail.com with ESMTPSA id y11-20020adff6cb000000b003063a1cdaf2sm8046868wrp.48.2023.05.22.08.32.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 22 May 2023 08:32:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-arm@nongnu.org, =?utf-8?q?Alex?= =?utf-8?q?_Benn=C3=A9e?= , Evgeny Iakovlev , =?utf-8?q?Marc-Andr=C3=A9_?= =?utf-8?q?Lureau?= , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 11/12] hw/char/pl011: Rename RX FIFO methods Date: Mon, 22 May 2023 17:31:43 +0200 Message-Id: <20230522153144.30610-12-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230522153144.30610-1-philmd@linaro.org> References: <20230522153144.30610-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@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, T_SCC_BODY_TEXT_LINE=-0.01 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 In preparation of having a TX FIFO, rename the RX FIFO methods. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- 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 1ec102d8de..03c006199e 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -358,7 +358,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; @@ -369,9 +369,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) { @@ -382,13 +382,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