From patchwork Tue Mar 6 13:13:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 130799 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp3925111lja; Tue, 6 Mar 2018 05:15:08 -0800 (PST) X-Google-Smtp-Source: AG47ELvP9o7efffJaQebS+BoNYR0AWQPrUxhlZsK39poALWSNe8KoM5GXNl8TtuPYOLxzQNWh0qC X-Received: by 10.80.207.129 with SMTP id h1mr22839607edk.207.1520342108192; Tue, 06 Mar 2018 05:15:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520342108; cv=none; d=google.com; s=arc-20160816; b=Pno0eE92PRjGG4UTqFGeC3oPRY+P7YeeloKW3aK58sio7EbHWN42avvYUJO5q+VUlq prIFUubR3Upiy9Wl5mNA2sWsHAtBFAQiNmiAyYsXyq+BUaYhtoCZlm2YS8TrH+0NFvn5 U+FyIpaOC/hb+ZMxyfNGep8PA/wL4vrwYqiMsTKezgF6ScnMkRDd6dql66BUt311oM9F BB21VDFkdNKn/mY02cLaS6v5CKsi7ugih27oDJOgMgl4urLUfxUm0nTC2fzy0fJL1+54 ZJb5QnM02fD9ukhLTirJ5J3e9mVYtu3jM/VTVVJjArAFwJiPXFBONp/MMh0AEcQmFiod I4bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:arc-authentication-results; bh=sed/j5TM1JzaTlNiDEABD+p1w3u/o75wuO6MQ1AjrE8=; b=PRARe0IVrE1Ipc+mpHFe4hru8Q5Yajyd9Gali6C6FxHKuOUO1lWXDc8T87SDXYJPn6 w977g9MUi/deDOGgI+IxuOo0rYkrVvghliMv0A8LZGl+PnPlZuufsOdznZX9THN6DzD7 QgpmeCAWyD9HXghCfgj0bbl/TNKG6WQJXjobzN8WAcAtc134uhgTzfxvSfp8T7zMqGPl tdJ5ZtXGnDHUsaE90QL7SU3dhLf6psXS4457O/qL98zABaPCZ1gt0rtshixLO+GVSjC/ ismx636YxmCb71neuSNNaSnI/kLorDYaYMEYpTivCNu0Y2ZDKUEXKSvLlKkOeZ3mtmhT LMqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id r41si12295946eda.331.2018.03.06.05.15.07; Tue, 06 Mar 2018 05:15:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id BC80EC21C38; Tue, 6 Mar 2018 13:14:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7F2DCC21F6A; Tue, 6 Mar 2018 13:13:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E29FFC21DB6; Tue, 6 Mar 2018 13:13:30 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id A6C57C21C38 for ; Tue, 6 Mar 2018 13:13:30 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 73F4BAF6C; Tue, 6 Mar 2018 13:13:30 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Tue, 6 Mar 2018 14:13:25 +0100 Message-Id: <20180306131327.61174-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH 0/2] [for 2018.03] RPi: Drain RX queue on setbrg X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We had a few reports coming in from people that had their autoboot chain aborted after pinmuxing support was added for the RPi. The culprit is easy: The UARTs may have been enabled before, but muxed to an incorrect pin. That pin may have pulled the RX line down which again lead to lots of zero bytes gathered in the RX buffer. The easy fix for that is to drain the RX queue every time we set the baud rate. This patch set is the minimally intrusive fix for the RPi. We may want to do that generically for all serial devices later. Alexander Graf (2): serial_bcm283x_mu: Flush RX queue after setting baud rate bcm283x_pl011: Flush RX queue after setting baud rate drivers/serial/serial_bcm283x_mu.c | 8 +++++++- drivers/serial/serial_bcm283x_pl011.c | 25 ++++++++++++++++++++++++- drivers/serial/serial_pl01x.c | 10 +++++----- drivers/serial/serial_pl01x_internal.h | 7 ++++++- 4 files changed, 42 insertions(+), 8 deletions(-)