Received: by 10.192.165.148 with SMTP id m20csp24303imm; Thu, 19 Apr 2018 15:16:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/CtohIZcZGkzuIuDEi6rZLReuCo9OxhyZSHnAVlNzvDH5cg5GJz1SCNZ3G/SAekcGKMUzK X-Received: by 10.99.149.87 with SMTP id t23mr6330475pgn.77.1524176214130; Thu, 19 Apr 2018 15:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524176214; cv=none; d=google.com; s=arc-20160816; b=EgUZh48TpIe3lCu9Ah3Gk7UDiOdKWDyH6rgg+8djBqRqZcyuBOICeDJQsQE2qTas76 yZBzVI91zAVO12Ip4MtaL6z2jj8Ss2+C8h3fpIeNxSZ9i5kE18/ZlkOLpAnZGEjpFdO8 RIhHhhFpE+HhKea50Uwka0XJZmuQTabk+P3nMh06H6UmE4+RLtZ290VBbYiDaLiTkqc7 PSC49823c3oHTo6p3aTN67xJGmSK8HKHy6rpq/a0Icop5VUuz/7ThEQ9I+tvCV1IdLEd RolRzub02UO0o652t8QPdUcFbPMcYjgvS9qqNHnavsiXUSSoQD8GOaaG0qnEH1OeOIYK geiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=BhkY3cC+JDtTJZOVT+olJTpPXiMkg4604IF3lE3MnhA=; b=DqDgRYZxmmFHxImovsPrVZJBtnP2N2FGNr2aYywRurfEd+XEjd6vJdtg/bvSoYCcZp eqBfpUQRT2pr4sLx+bW0Omx8n/Dx0a7CCG8z04MB5dfec9is13GVqpzjFczOHpcVIzwf 4TOE70Qd1pEcHX6YmhU2RsMBMPq6W53c3iyNfn/v4O8QbJHkOAbORTHyyfnlvvup8q+z 7Vx9+unEv8yfo4kTwi1Zxq4is89nFvR5Se6r5Z8LEoYD9gJQjHz9qbvom4IJzFqhG6Cu iM7LfK981hwyHjebd7Iy+ikjOaPekg5pPiAS/B79gfpCJwxPsgx1M8IxjkeQUAQLlGU/ cmhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BHlBkXao; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f38-v6si2491820plb.44.2018.04.19.15.16.38; Thu, 19 Apr 2018 15:16:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BHlBkXao; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753817AbeDSWP3 (ORCPT + 99 others); Thu, 19 Apr 2018 18:15:29 -0400 Received: from mail-ot0-f174.google.com ([74.125.82.174]:46825 "EHLO mail-ot0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753786AbeDSWP1 (ORCPT ); Thu, 19 Apr 2018 18:15:27 -0400 Received: by mail-ot0-f174.google.com with SMTP id v64-v6so7560192otb.13; Thu, 19 Apr 2018 15:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BhkY3cC+JDtTJZOVT+olJTpPXiMkg4604IF3lE3MnhA=; b=BHlBkXao8hLEW2mEZKqr8u65bUfnJ6e+DzL+5m5slDTQeWva8F+zb2cf7L0+SYPWYf L/PRKCsQZ+NOb6RkSJkIX9HcNyrx4BauGBvWNll2TvdgbtYVD5MYupmZTzKlFgyjEx4j Xs8wC4hxG54EFPGSfHAKLcDwB4Cyz3Uw5fgQ2HK0/qm1e8Y7nMgjt4+H3aYQrH0ztMAL 88WSTHL4xdJ4+DdFkk6KQ3TJep5IaLH9NFOb7AOGNPHPKQTlQEAjES87Oxjhz0HDA5Bi 6FKp5EXHpsdOgG0Jo+A3w9sr5xBxmn+2MGcugZ3u/2wykPi+x4r+T0pWdYjgPTKHzPV4 vg3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BhkY3cC+JDtTJZOVT+olJTpPXiMkg4604IF3lE3MnhA=; b=FgvLuJfVMuDkMke58NBsR49HD1VeFRmRqCz32IWrSWo9x9fmoylznmAfdhsR+4A/qB eUtjWWxQrHfSJjAUzz7Yxbk+/xJMGZBGnd0LRjyB63x/urZHE0PSdagg6/ohLc9UIL0I eTg3Q5daAB/QMGi5rgILrNNpFxFZEUJ9w9iZP7rBB6TxBSzDDeRo7ZFKGgYENZOinuLv cH+zJhzkgnjlSPsNPoH0DzNpbVV+gIv4lfMH3sLme/9rqkcn4j2ObwxVhG+JfxAUimlf lYBUsw2gk54OucxTLRh29MvmgXgGIQ0yJhk5wfcdwELJzENhWOKJLDoGgPIT/EZxx3wD oKxA== X-Gm-Message-State: ALQs6tD5v1HGuVE8rViQz7hA05MRqD1iX76dmyKaZYomq3LGWFhJUBS1 6BvP2McEAtw/dKCfZlfd3f6n0x5OTtmHBd9UauM= X-Received: by 2002:a9d:e86:: with SMTP id 6-v6mr5300731otj.128.1524176126438; Thu, 19 Apr 2018 15:15:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:6010:0:0:0:0:0 with HTTP; Thu, 19 Apr 2018 15:15:26 -0700 (PDT) In-Reply-To: <20180416153502.11814-1-stefan@agner.ch> References: <20180416153502.11814-1-stefan@agner.ch> From: Fabio Estevam Date: Thu, 19 Apr 2018 19:15:26 -0300 Message-ID: Subject: Re: [PATCH] serial: imx: fix cached UCR2 read on software reset To: Stefan Agner Cc: Greg Kroah-Hartman , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 16, 2018 at 12:35 PM, Stefan Agner wrote: > To reset the UART the SRST needs be cleared (low active). According > to the documentation the bit will remain active for 4 module clocks > until it is cleared (set to 1). > > Hence the real register need to be read in case the cached register > indcates that the SRST bit is zero. s/indcates/indicates > This bug lead to wrong baudrate because the baud rate register got > restored before reset completed in imx_flush_buffer. > > Fixes: 3a0ab62f43de ("serial: imx: implement shadow registers for UCRx and UFCR") > Signed-off-by: Stefan Agner Reviewed-by: Fabio Estevam