From patchwork Wed Mar 7 21:08:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 130920 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp5657118lja; Wed, 7 Mar 2018 13:09:49 -0800 (PST) X-Google-Smtp-Source: AG47ELt0y5b6wh4dyyvgKcHQ4xoK690baSidRbuQrLSjkGvZxDkY+MFUQJRnEGEV+JRms3h7/Sne X-Received: by 10.80.137.83 with SMTP id f19mr16362002edf.206.1520456989060; Wed, 07 Mar 2018 13:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520456989; cv=none; d=google.com; s=arc-20160816; b=CefmV6XmnrxsrB2WzA3piLWNZ2OOTyAx1u1DeVIaFo5UgJUEaTuexhn18a55Un1Kc1 xNU6/qVEGhXzK31rV+fhciD+XCDArJbz7XAYTJKIdZT4HHocJkTaD7ZNA8oS/yLql26Q I22I6AZW/XWW8wjiWi6q88oHoSq3ZDnTeDswssgwSsdXJOTfMjgNI2OTYi9Z5SzfRC5V ROzodifu4+BOihEMCXZDNUvrhheRCQFCPDxZZ6TXAAJXWa9hX6/Kjcr5sOD585L/66dK HggdnNUfbfAo0k8jxgC9WIKmZqFFch+DQyIP1aCTepLhEQBtn0SLfXOxVrv4dS8x0++g wWyA== 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=Z68GFqHOu1vr0mYzUuc2CDpwmwiEjRwb5pgpK7CIAIc=; b=m6EhFXGYNWvhoY9jVcWlk8qE2BCV83Sw/6/Dz+3V75FEsZK5qmco2BcYCl8Pp4m0c+ ixXnntBMc67TxNK9ZP6809rLi3lE3o6CZgKO4Ns9kzKm1qFPf9zLbcAsjB6+gelOnUDv rmkk5KoCw+IP7cbPX5xXejciJZdfXA8RWlJdbfm+5qyspcu3HKu3rU4EPy47u3S621wF Lwt1jO2k1ScCbj4Cus7P1UDzDlez7OB1RWCoC6GXtcCVvfrL2oNfnZiUBRg7WyPIxcir B4Sm2PJKO2i3ObXlb2yDvaqMShYD08NBqUY8izR4zy7IAAuVsCgvKLZgIXSDWx9+1hZ0 izWg== 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 y12si7569220edh.277.2018.03.07.13.09.48; Wed, 07 Mar 2018 13:09:49 -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 AFD9DC21F9B; Wed, 7 Mar 2018 21:09:07 +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=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED 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 BFC71C21F24; Wed, 7 Mar 2018 21:08:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 77967C21C2F; Wed, 7 Mar 2018 21:08:27 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id EA15AC21D74 for ; Wed, 7 Mar 2018 21:08:26 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 98D57ACAE; Wed, 7 Mar 2018 21:08:26 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Wed, 7 Mar 2018 22:08:23 +0100 Message-Id: <20180307210825.50709-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 MIME-Version: 1.0 Cc: Tom Rini Subject: [U-Boot] [PATCH v2 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. v1 -> v2: - fix pl011 draining 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(-)