From patchwork Mon Jul 10 17:50:54 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: 701050 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp5305470wrs; Mon, 10 Jul 2023 10:54:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlEgh+WspnbCQPD6We74fGWrRokfCYizSkKy02NxH2HcRhlUz6sK0wNN3cYqi1eam8fG7rxN X-Received: by 2002:a05:622a:1653:b0:400:9c4e:2abe with SMTP id y19-20020a05622a165300b004009c4e2abemr15843693qtj.13.1689011656720; Mon, 10 Jul 2023 10:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689011656; cv=none; d=google.com; s=arc-20160816; b=I6WzTVOHTVxlT1tvrPs7kqqKE6zlnHuTgVKef/0vRylzHhMsp72hWMNL4SdVfSrHfA QAkFPRp+Fa04mcbKeMHrSjZFMudqRujYIktxw7icjDOsLIvS1fTs9pISsEQOU/tU7SxU fBvoKQEi1pZFXpCn13qDJAceKXs5W2L6rDLzTtk8uv4NCJreVL66vlQIlw0WBbgxc34L 5lRU9Gog+HP87FSXKnDxkn891MEfYmLK9yu7CSFgz4uLSm3TNmxn4AjAGfsLJsFPgmPZ 5udcAecQcknb/+5eQrcHILqwCqMpe0r/3ec9wS7vYVdz/s39neQ+qQT+0ILI4VjMJE2X p3nA== 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=MFiMwX80BmNyck0DZZOUXh/iAvr0cOgiPWTiwk+R4aM=; fh=4TWVGTMFk+XB48cTX7H3L2FEUZf3X6lSQ5h15kr1III=; b=xPXnIxN92sdJ0hTmZa7dKnL46vMAQ9B5qcrjxrgPJIO8gnhgxBujKxnOFckUK1GDI2 efORfFIFNC6Lfb5qXE0okRQyCfQwGt9lEmtPz76ZI/7dbAV9tc02N01SwO3FR0HsUIJP h1vyV4l4geuKR8nFFzeelE529vids7VO/UfH9p+2xMVw2BN+XSk9iBMBw+6BUh7VwaU6 l8sMyet+xIgRaXAFEiAFlJw/Y5V/OG5ORyf0jTOXfS5GKa1zU+20dOHQkIBKAFCPB2R6 zuJhO0A1ySq47cgUb6S13ZKwiTtYi7yYStBkTMt2SI+DJNKonkhBnnoLFYGV8rhaotws QNrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NJq6cF1M; 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 j20-20020a05622a039400b00403a662a31fsi117265qtx.523.2023.07.10.10.54.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jul 2023 10:54:16 -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=NJq6cF1M; 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 1qIv2v-00011Q-S0; Mon, 10 Jul 2023 13:51:37 -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 1qIv2n-0000yx-9U for qemu-devel@nongnu.org; Mon, 10 Jul 2023 13:51:31 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qIv2j-0000En-5b for qemu-devel@nongnu.org; Mon, 10 Jul 2023 13:51:27 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fbd33a57b6so61361915e9.2 for ; Mon, 10 Jul 2023 10:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689011483; x=1691603483; 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=MFiMwX80BmNyck0DZZOUXh/iAvr0cOgiPWTiwk+R4aM=; b=NJq6cF1MGbORrPghESeaZMPTdldDqRn8SaJQk9Lx0Bj+YAHX48XODawpstkOvRMiI/ XMl7JqR/qIg60irlnHtG+Y0+x9i1FVJfzAWsNDGsUEmzfeZiaOPloJG3QWcE2Xn8BW61 wdYzXLglLG9YPbcp8SFZmzqZUeR01B1IB4LusROjUE+HpsB3feBF8jH+R0urWJQLw7WF 7f6b5CijJ1cKgScaVZGXV/M5pPI/pl6820Q1hxOZeiIUxQuaPLnyY61ERhK3ilXh0oX3 XyHjZ7DkDnAwx/+4uIpVkKOimQOe48OFyCTPUf5Y6QFgGXpLkGwgY7EUIvOod4I584Rd U+OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689011483; x=1691603483; 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=MFiMwX80BmNyck0DZZOUXh/iAvr0cOgiPWTiwk+R4aM=; b=DHFztOnxvm91yTIP9gn2X2ZMmwldkhsd8i4f5ll7DmDOIun0RsLtyrZIi/RropbmNa tGcEIx6scOOAWzgqmdBgyQXJKhxbD7rMBvtCLva1E/BIMznM/2dk5/YNMZZG08TGP3dn vr3X/Yr/5w+SHkobBUiU2FhhXH5YeF5B7WDn4GlVUPqoAMI3CGGVn7ptVp6q20ZvQcia Jv1g2Fe3SOrCrRxo8qUOPEWTp+rGxPAoNbINbSIgIUUUnp6aKWUIP72y6VpgcgFNaDxL IljzYzqep6EqTVVFFsuZ49dRSD5tEWJDsb+5LFpVD+rYo4T6nUBwZoj3WlDI0lNB61S7 J0SQ== X-Gm-Message-State: ABy/qLYdObUdiwmjPkHH331eSrYxdBDn/iJR4jGrkV8NiralMC1zgiiC f/9/QQzikCsDsVNR70CGuiYsE2X/OU+MWRiLGiIaBw== X-Received: by 2002:a1c:6a04:0:b0:3fb:b9b7:fb0c with SMTP id f4-20020a1c6a04000000b003fbb9b7fb0cmr16810018wmc.31.1689011483625; Mon, 10 Jul 2023 10:51:23 -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 u13-20020a7bcb0d000000b003fbc9b9699dsm433256wmj.45.2023.07.10.10.51.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Jul 2023 10:51:23 -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 03/11] hw/char/pl011: Remove duplicated PL011_INT_[RT]X definitions Date: Mon, 10 Jul 2023 19:50:54 +0200 Message-Id: <20230710175102.32429-4-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::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 PL011_INT_TX duplicates INT_TX, and PL011_INT_RX INT_RX. Follow other register fields definitions from this file, keep the shorter form. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson --- hw/char/pl011.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index c3203e5b41..96675f52cc 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -48,9 +48,6 @@ DeviceState *pl011_create(hwaddr addr, qemu_irq irq, Chardev *chr) return dev; } -#define PL011_INT_TX 0x20 -#define PL011_INT_RX 0x10 - /* Flag Register, UARTFR */ #define PL011_FLAG_TXFE 0x80 #define PL011_FLAG_RXFF 0x40 @@ -157,7 +154,7 @@ static uint64_t pl011_read(void *opaque, hwaddr offset, s->flags |= PL011_FLAG_RXFE; } if (s->read_count == s->read_trigger - 1) - s->int_level &= ~ PL011_INT_RX; + s->int_level &= ~ INT_RX; trace_pl011_read_fifo(s->read_count); s->rsr = c >> 8; pl011_update(s); @@ -262,7 +259,7 @@ static void pl011_write(void *opaque, hwaddr offset, /* 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); - s->int_level |= PL011_INT_TX; + s->int_level |= INT_TX; pl011_update(s); break; case 1: /* UARTRSR/UARTECR */ @@ -350,7 +347,7 @@ static void pl011_put_fifo(void *opaque, uint32_t value) s->flags |= PL011_FLAG_RXFF; } if (s->read_count == s->read_trigger) { - s->int_level |= PL011_INT_RX; + s->int_level |= INT_RX; pl011_update(s); } }