From patchwork Wed Jan 17 08:54:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 124787 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp1308604lje; Wed, 17 Jan 2018 00:55:08 -0800 (PST) X-Google-Smtp-Source: ACJfBouK7YOS63hCKi0bSont+2lxo38PWjjh2OQ/Im16jirFzs9TzpScKvFt9uJy/yUmwULHllH1 X-Received: by 10.80.179.146 with SMTP id s18mr1900256edd.190.1516179308460; Wed, 17 Jan 2018 00:55:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516179308; cv=none; d=google.com; s=arc-20160816; b=o8fuDP2ROINfakrqup5T59gQqgSScp8OR33PioI4KqUlOk0pEv/+JLmVaacBPWnu6N eCEko+ZMfQk9yubZSKT+a5KR3hwSpp6W0W8cNviE5ph8pDoQA6YbKSxyjy6kOdRnSXjk JRP/OczrDv0kqtXbAGsH2oWIm8JW8RPnu5LuPsRGLgodLeIngPlaNBNsUTetxedUizMK s2DzoLH4kSUaO8uLUFW5AdUbuYxsbY2n9sufDOIFQOpRQJd4nAdDdkeGtIj47D+Gh+mX aoPb/yPMgHgtsDs8gHVYwh8qBVY3ZywPf7OPmPzotfWmjopFsNeN+Hp42Ufzcj9FHh8t 5J9Q== 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=rOctOjfe5vTJgzXE+DbGP1ljbQyUUwlGQfamdnSoq/SJmGc86UGAeKpeUognzFaPY5 LuLOtgswR8bPhfIWLKMqqS0xJW+OvI4/iTCJSrJAt4YGVUdgvdnx186Whpj4d1fSkQb9 NPppB7UPKRqXW9320HvaDTFT7m6isk3dtKtf52QsoJsPtF6tPOdBbINb30yWsj3q5OS9 9s81Y3/02LUAhmSfkac6/EFqsoebqvDd2WZqhS18/rSAxMbmFC9yrPTZvCWu1kXBZBRH 0du4XlxQ9GTt/Hk0nWSGtFtA3r0nhtAXJR6sHjH9NCfgz8xmWOWAdGVa65REi8veKzXC 0Iag== 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 90si4248596edp.552.2018.01.17.00.55.08; Wed, 17 Jan 2018 00:55: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 ECB35C21E7F; Wed, 17 Jan 2018 08:55:04 +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=RCVD_IN_DNSWL_BLOCKED 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 9C861C21CA6; Wed, 17 Jan 2018 08:55:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id DF29DC21E0C; Wed, 17 Jan 2018 08:54:59 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id 92016C21DB5 for ; Wed, 17 Jan 2018 08:54:59 +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 17931AEBA; Wed, 17 Jan 2018 08:54:59 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Wed, 17 Jan 2018 09:54:55 +0100 Message-Id: <20180117085458.27293-5-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180117085458.27293-1-agraf@suse.de> References: <20180117085458.27293-1-agraf@suse.de> Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH v2 4/7] 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