From patchwork Thu Oct 20 12:21:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 616782 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp321861pvb; Thu, 20 Oct 2022 08:01:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6k1IcUvnj5EKNi5OiETpkdLA/W5wI92X+OgtYrPb2scJNtyE/qPDVPKpV4lpeevvt56aKE X-Received: by 2002:a05:6000:2a3:b0:231:892b:d7e2 with SMTP id l3-20020a05600002a300b00231892bd7e2mr9261102wry.397.1666278110737; Thu, 20 Oct 2022 08:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666278110; cv=none; d=google.com; s=arc-20160816; b=Oa1Nvr9qToyfjawf9ikmC6p8bG86FBUIQoZur9gGQ6ct9kexBhp0XZLWHpOk/EDrEb bP41y+f76lNQfdmyPpic3fOoUrBHEFpYJlhEcCtT4+JanFFlL07rRQmqbxBkcqPZCqAI pErov3kWiStiGYsCzlgOUyZ6Qo86D56Ee3+xgHZS+gR97SUHpuZv8d7j2OTJ/ROHc/IQ TbartV2OL3T8Ps5yxm+P/YoybS+UW2ctLJMcsDXyxLGQ0w8aEb9pduHZgwJliItKT8m3 j+BoM9KY63Lq6wYktRdDB5yZNKnyky4rIJSK5A4WKHtXjpIEf11NNZNcvu5Pyh4vaK0F cN1A== 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:to:from :dkim-signature; bh=nosYOQKfkjgUajEUXQZ4ETNzVq4tByHgwt2bGYf7lxU=; b=EFClp8tF3fLFk0MXJVypKFR7bJFobjJcjQ3C9kWgdsUWeT5MohOIhUZuNP+umZgGom BWLlNDzjtoKxm8YBiMkua2E6cAIu1TD3dVXNusW1RWMRKa3yOfJK8S1Cu/8ZmpvSlTOj UMa4+eqEkd7c+6dljbhX49UqkIcREKTjlcPIcChf6QKyn/RD4iSJakN/dAdhuV7YoPYO Tz8pOj+iUY02npvvi5T1HgV1Pzgcgwaj6GPzlFkIMc0a0vlDtaHEJwfT6IouVN2GcJrt Q0vCb+rJPwM1C5PBG4IbuA/G9yldZ/VkUYvI/g/yacTeWnANMEVn6+i6EEItzM01IZY7 PXJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eqPSsN7T; 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 r26-20020adfa15a000000b0022e64993161si10806520wrr.781.2022.10.20.08.01.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2022 08:01:50 -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=eqPSsN7T; 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]:60568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olX3F-0003xc-KW for patch@linaro.org; Thu, 20 Oct 2022 11:01:42 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olWyw-00057X-9K for patch@linaro.org; Thu, 20 Oct 2022 10:57:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olUYf-0001Dl-O1 for qemu-devel@nongnu.org; Thu, 20 Oct 2022 08:22:00 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:40712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olUYe-0000xk-5t for qemu-devel@nongnu.org; Thu, 20 Oct 2022 08:21:57 -0400 Received: by mail-wr1-x432.google.com with SMTP id w18so34118653wro.7 for ; Thu, 20 Oct 2022 05:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=nosYOQKfkjgUajEUXQZ4ETNzVq4tByHgwt2bGYf7lxU=; b=eqPSsN7TgmQgPEDFFwly087kql9PJhxQjDWfPCZZkjklthPush9z2nJDHmQHAPiXWm zJ7/SUIpwjBcBqfmedc0NmAq3rxJVMn3Ds9JlN/B9dQWYLNsXMo9ke/aLsVnOatfxFzh ZaSwvtpAJXGNakHI1MbnehsDSxgRkyMzmSNeA5wl/YWje7oS5O77fyky3pHQaI4m+Y7E XhLdHpgmBnHXYiodNgGIxkNjBgEaksi0lWkRayPi6amLkF8+I4h8KbNtimNceNTtNbJe Yjc04F8i6xEfg8LTD4vJWE6Ab25XD+ZMx8+qU5qogK4lopmAd3Npmb+UvgNP9lbDkv1d /7uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nosYOQKfkjgUajEUXQZ4ETNzVq4tByHgwt2bGYf7lxU=; b=Oj537kXD85flo6Vx/Lir+kqwxcsjUYYde/qywgwdHgvcaGngJy58xX3Rf/DPMbpvVq 1w/hgFrRNp6nRtG1JfeCAw418h4gM3/GlHBTMaW2X+Z5YJ1KVliqEIcyL+cgqZYGbFGa OHmK649MIBysUIr8fyP/KvMEafvpu2wbdcsLlL7CWKXHZ0d7BGhUSvgvCzwyno1XJyUl vw7VRw4ksBH4kkQNPrsCOp1HmVvx3nCAgzERhTKOoAkXy5YePldUqZYn0Fae5BM1SAY6 k1fv5GDjTis3tkn8qyfuBTiWMdWGKoHLwZ06rmPxUKOzaeLMkA0F53/RPtSJkgEFEAU9 R0Xw== X-Gm-Message-State: ACrzQf3kNGq5sO9jceexHnoEYhgEr4VqTb2ddS+srFmE/YH9pC0PRh9C rXmlQtlnqNZ5W1RwcJMcpyaCpN1iT9ADww== X-Received: by 2002:a05:6000:809:b0:22e:66a9:1212 with SMTP id bt9-20020a056000080900b0022e66a91212mr8931182wrb.710.1666268510122; Thu, 20 Oct 2022 05:21:50 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id t15-20020a5d49cf000000b00230c9d427f9sm16520192wrs.53.2022.10.20.05.21.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 05:21:49 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/24] hw/char/pl011: fix baud rate calculation Date: Thu, 20 Oct 2022 13:21:23 +0100 Message-Id: <20221020122146.3177980-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221020122146.3177980-1-peter.maydell@linaro.org> References: <20221020122146.3177980-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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" From: Baruch Siach The PL011 TRM says that "UARTIBRD = 0 is invalid and UARTFBRD is ignored when this is the case". But the code looks at FBRD for the invalid case. Fix this. Signed-off-by: Baruch Siach Message-id: 1408f62a2e45665816527d4845ffde650957d5ab.1665051588.git.baruchs-c@neureality.ai Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/char/pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index 6e2d7f75095..c076813423f 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -176,7 +176,7 @@ static unsigned int pl011_get_baudrate(const PL011State *s) { uint64_t clk; - if (s->fbrd == 0) { + if (s->ibrd == 0) { return 0; }