From patchwork Thu Jan 25 11:05:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 125818 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1042876ljf; Thu, 25 Jan 2018 03:22:30 -0800 (PST) X-Google-Smtp-Source: AH8x2260wW943M6USWUtUIxUvuFNW02oPr9NKO4HkpAJSD8cG3Rf2yqLr4LeUW+qRIErZI2OBvgJ X-Received: by 10.80.157.141 with SMTP id w13mr7950619ede.123.1516879350729; Thu, 25 Jan 2018 03:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516879350; cv=none; d=google.com; s=arc-20160816; b=rhqpNVXf94FfvGNTt1XhQ4Dfi7SldnIAIvDlSXyfZAuNss0WCjxnv/q61Z0UZJ85Ku aMAoPtUKV6BgBVoaA78C4/SOnP37K8hjJBKb4emIHTQQKOhFXU2h09lzAUCmu7d7a6xA 9bjeLg0qQBXJ2rLTSEUgkEg8Bym/Qe+6Dqew7Wcgb7NjoqqjSDxbGTO1A2e9RdByIos8 EOBn8pXurmYajw6gI846KDVOSJKHdm9URUcMvyKh4WOTWTyWXWofP0AterzzE40V9VR8 U+LfSq/CKgUc01kAWDpBi6d4BQeSEix3APcB4bDWQy20hswz9mK/wdCyIrC+hgED4fmt EjqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:arc-authentication-results; bh=HJqILOaDFKg7ohORG24VvFdjWHLuwXj53eUdG+GG74I=; b=lijSrn/xysnidIybvLHScOhMwAnkfwwQC4t2P59YjYKv76C0YqnIZ99D+2Tll2PQP5 hrc5diDuTCDtorEp6hrpV3OoNbjkBGzIsWyIqCz/3W5MAWFn7NXTiXuGhgu9NyRqRDoU n3UP2pmZrRbWHaCnrnmWj553GEJeXgJbK0O3xIUF0DyAnABBdLYXqoBS7hmRgny/qBAA ECTp/OluXXn22uHl2Fz6gbJonx3Vu0xHll6k+3XuTQxzbgs6odMlU6u6OENREy+mYKzT rTvTZX/C53AfxCQn4WG9vyWUqmwMgG21XG3wHaWBzU7sQv+ZMoeHb+apSX2DhqKAyCTf E95A== 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 l13si2025450edj.196.2018.01.25.03.22.30; Thu, 25 Jan 2018 03:22:30 -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 47A06C2245A; Thu, 25 Jan 2018 11:14:39 +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 95DCFC22427; Thu, 25 Jan 2018 11:12:39 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D4F3AC2240E; Thu, 25 Jan 2018 11:05:58 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id C0C5EC22408 for ; Thu, 25 Jan 2018 11:05:57 +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 42F58AD0C; Thu, 25 Jan 2018 11:05:57 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Thu, 25 Jan 2018 12:05:44 +0100 Message-Id: <20180125110556.76352-4-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180125110556.76352-1-agraf@suse.de> References: <20180125110556.76352-1-agraf@suse.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v3 03/15] serial: bcm283x_mu: Remove support for post-init disabling 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We are switching to a model where a serial device doesn't even get probed when it's not muxed properly, so we don't need device specific disabling functionality anymore. Signed-off-by: Alexander Graf --- drivers/serial/serial_bcm283x_mu.c | 18 +----------------- include/dm/platform_data/serial_bcm283x_mu.h | 1 - 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/serial/serial_bcm283x_mu.c b/drivers/serial/serial_bcm283x_mu.c index 41c26b3d93..7ce990b9b8 100644 --- a/drivers/serial/serial_bcm283x_mu.c +++ b/drivers/serial/serial_bcm283x_mu.c @@ -59,7 +59,7 @@ static int bcm283x_mu_serial_setbrg(struct udevice *dev, int baudrate) struct bcm283x_mu_regs *regs = priv->regs; u32 divider; - if (plat->disabled || plat->skip_init) + if (plat->skip_init) return 0; divider = plat->clock / (baudrate * 8); @@ -75,9 +75,6 @@ static int bcm283x_mu_serial_probe(struct udevice *dev) struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev); struct bcm283x_mu_priv *priv = dev_get_priv(dev); - if (plat->disabled) - return -ENODEV; - priv->regs = (struct bcm283x_mu_regs *)plat->base; return 0; @@ -85,14 +82,10 @@ static int bcm283x_mu_serial_probe(struct udevice *dev) static int bcm283x_mu_serial_getc(struct udevice *dev) { - struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev); struct bcm283x_mu_priv *priv = dev_get_priv(dev); struct bcm283x_mu_regs *regs = priv->regs; u32 data; - if (plat->disabled) - return -EAGAIN; - /* Wait until there is data in the FIFO */ if (!(readl(®s->lsr) & BCM283X_MU_LSR_RX_READY)) return -EAGAIN; @@ -104,13 +97,9 @@ static int bcm283x_mu_serial_getc(struct udevice *dev) static int bcm283x_mu_serial_putc(struct udevice *dev, const char data) { - struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev); struct bcm283x_mu_priv *priv = dev_get_priv(dev); struct bcm283x_mu_regs *regs = priv->regs; - if (plat->disabled) - return 0; - /* Wait until there is space in the FIFO */ if (!(readl(®s->lsr) & BCM283X_MU_LSR_TX_EMPTY)) return -EAGAIN; @@ -123,14 +112,10 @@ static int bcm283x_mu_serial_putc(struct udevice *dev, const char data) static int bcm283x_mu_serial_pending(struct udevice *dev, bool input) { - struct bcm283x_mu_serial_platdata *plat = dev_get_platdata(dev); struct bcm283x_mu_priv *priv = dev_get_priv(dev); struct bcm283x_mu_regs *regs = priv->regs; unsigned int lsr; - if (plat->disabled) - return 0; - lsr = readl(®s->lsr); if (input) { @@ -168,7 +153,6 @@ static int bcm283x_mu_serial_ofdata_to_platdata(struct udevice *dev) 1); plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev), "skip-init"); - plat->disabled = false; return 0; } #endif diff --git a/include/dm/platform_data/serial_bcm283x_mu.h b/include/dm/platform_data/serial_bcm283x_mu.h index c47d3c0e60..57ae6adc05 100644 --- a/include/dm/platform_data/serial_bcm283x_mu.h +++ b/include/dm/platform_data/serial_bcm283x_mu.h @@ -19,7 +19,6 @@ struct bcm283x_mu_serial_platdata { unsigned long base; unsigned int clock; bool skip_init; - bool disabled; }; #endif