Received: by 10.213.65.68 with SMTP id h4csp1928807imn; Sun, 8 Apr 2018 15:01:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/UZqPk4NY5t6rwmk7t8lzv5X39IRnYP4zDBCCgE7T18ueJXFNuNYW8Uzy+T5SXTxt+GUvE X-Received: by 10.98.253.17 with SMTP id p17mr26979628pfh.105.1523224872356; Sun, 08 Apr 2018 15:01:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523224872; cv=none; d=google.com; s=arc-20160816; b=VFlYF2KIw/tW02SNXbvkLjiucbdIP6nL3JzbkM7qNEHSXDsn3fZ4fuqEdMvbNrX8rP HmGXNMlpdv3t52qbYwzZ1YK/NgiB/9xnXetj87uLKfvam2DepBnWl9wlLaV/UF42RLqe yg+6GvwZob4F1AYgnOjN6WeAlqa9rgVnqIL/1OKnJg3ZIhR+uIC4Qc2rEmerYSyD+6Aw oSOrJPeOPQ7/tFQF1YiTEh1c9+XPdTEsmTSQ44s514E5CARu6OY+zBWterfz1UVHBqwq M5senOdj+eU7DjviCU+QE4jM0Pv7VCjY0ysOcnCsOxrRMc26YRAFUn9Rn3+wLAVJIkLt KBmQ== 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=LhmPbpCSJYRJGIiIJfvC3MVexdc1m4deLuErqrO/Po0=; b=TmwM0CGZKIjqBuCqGHzf1Fnc8YHfB8Aka2cKgA4Iivv7twQF0kPaHNur0u8CB3+0CM 7d10Wo80QZzFgIZF4iOcz2HPnN4pLlAH/fDxMU4P/6aVn7Tam/W2E8QFAF8AYTYF/DFI z17669uBoujxoZiRJ5R6Npb7GgfgqfvOC4HM8VtBG1ToceplkCXKskWCbQuQo/jLVvwh B+PaRTtbqxuZqJuafMQE9ncCIuXJeyMtTNLTKQaiQdkBnkTRWCcMO47m3w/rivXOvOHS v9dvDY4j2elsO0Y4xH79BkxI51pRg+wU6PL849CLiGIaxSnmKkPK1wtd0K599bRCkOvz ps4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=LEPyaE32; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y70si10301966pgd.777.2018.04.08.15.00.35; Sun, 08 Apr 2018 15:01:12 -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=@googlemail.com header.s=20161025 header.b=LEPyaE32; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753083AbeDHVau (ORCPT + 99 others); Sun, 8 Apr 2018 17:30:50 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:42223 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752381AbeDHVas (ORCPT ); Sun, 8 Apr 2018 17:30:48 -0400 Received: by mail-oi0-f65.google.com with SMTP id l190-v6so5805438oig.9; Sun, 08 Apr 2018 14:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=LhmPbpCSJYRJGIiIJfvC3MVexdc1m4deLuErqrO/Po0=; b=LEPyaE32fMt61wbH+w6aRlNbYVD3c3o0hHcAaovZXmKel+68QZVKNHqEwJeTmf5NMU x/+8JT7jmD8An/33SfS320Z+GkqBG+aT/ERt8YoMQwUVrT3Kr0ku4732mQSyTGSiBrjk 8fAFo7VzQGuIop3qy32X0Hoxbn9LaJeY9Fc+feabypoyfPGuZUmV5vqxKTjBqjqrTHHd 9OXFDvXJI44+IhkRBdANuNR2fmkJIgEHHt2yBl4RB157j+XDAc9Z0amIPmRNa2d50Iku 1S5kuRmypUqGwqp42nZ88oVHGz/EnOgebBPV6IVQJnB0nvquJB9ilbqxPsusJXd1pWSN 5qGg== 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=LhmPbpCSJYRJGIiIJfvC3MVexdc1m4deLuErqrO/Po0=; b=KlxzYmmud7I61qYxGGipnI8mmdU+VfP2D6PtpD8qdebP+ZMcW9+/+/3u4Qn8f2OAP5 sIwotRR9JH031ND073xvfszCQwG8AB0RYWRQ5K/scYbu9FXY3aVm3Z+fox8MHXYLgsS2 dZeJQ/TEzkSuCKWjZA8iERr64ZQqwZwIkiUZdmmpwrvJK0td6R/2t31uTjt6rKBD9xLs cTAKYz3fj1lmF0gEPXTpv7bT/zOYRHOsTftOpBGmXQNR5HVHJ34gNyY4kAY5useArcH9 dJIeUmIvBhqz9uxplRDPSeKyau41S+e0yT5V/S6J6FKiApjUsMnei1zVFBfUiPCvkgyD dK7Q== X-Gm-Message-State: ALQs6tDZE3TlykL2Iz/6QfjSk5IEreqLWZCJKJfJ9M8ZgFe2i7sC6NSX v37L1lKjUO2FQtriEXRtm7kjN0FYVxsaZUru52xryVB6 X-Received: by 2002:aca:e54b:: with SMTP id c72-v6mr19065856oih.65.1523223047880; Sun, 08 Apr 2018 14:30:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.5.70 with HTTP; Sun, 8 Apr 2018 14:30:27 -0700 (PDT) In-Reply-To: <1523176203-18926-1-git-send-email-dev@kresin.me> References: <1523176203-18926-1-git-send-email-dev@kresin.me> From: Martin Blumenstingl Date: Sun, 8 Apr 2018 23:30:27 +0200 Message-ID: Subject: Re: [PATCH] MIPS: lantiq: gphy: Drop reboot/remove reset asserts To: Mathias Kresin , Hauke Mehrtens Cc: john@phrozen.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org 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 Sun, Apr 8, 2018 at 10:30 AM, Mathias Kresin wrote: > While doing a global software reset, these bits are not cleared and let > some bootloader fail to initialise the GPHYs. The bootloader don't > expect the GPHYs in reset, as they aren't during power on. > > The asserts were a workaround for a wrong syscon-reboot mask. With a > mask set which includes the GPHY resets, these resets aren't required > any more. > > Fixes: 126534141b45 ("MIPS: lantiq: Add a GPHY driver which uses the RCU syscon-mfd") > Cc: stable@vger.kernel.org # 4.14+ > Signed-off-by: Mathias Kresin Acked-by: Martin Blumenstingl thank you Mathias! @Hauke: maybe you can also review this and give feedback? > --- > drivers/soc/lantiq/gphy.c | 34 ---------------------------------- > 1 file changed, 34 deletions(-) > > diff --git a/drivers/soc/lantiq/gphy.c b/drivers/soc/lantiq/gphy.c > index 8d86594..8c31ae7 100644 > --- a/drivers/soc/lantiq/gphy.c > +++ b/drivers/soc/lantiq/gphy.c > @@ -30,7 +30,6 @@ struct xway_gphy_priv { > struct clk *gphy_clk_gate; > struct reset_control *gphy_reset; > struct reset_control *gphy_reset2; > - struct notifier_block gphy_reboot_nb; > void __iomem *membase; > char *fw_name; > }; > @@ -64,24 +63,6 @@ static const struct of_device_id xway_gphy_match[] = { > }; > MODULE_DEVICE_TABLE(of, xway_gphy_match); > > -static struct xway_gphy_priv *to_xway_gphy_priv(struct notifier_block *nb) > -{ > - return container_of(nb, struct xway_gphy_priv, gphy_reboot_nb); > -} > - > -static int xway_gphy_reboot_notify(struct notifier_block *reboot_nb, > - unsigned long code, void *unused) > -{ > - struct xway_gphy_priv *priv = to_xway_gphy_priv(reboot_nb); > - > - if (priv) { > - reset_control_assert(priv->gphy_reset); > - reset_control_assert(priv->gphy_reset2); > - } > - > - return NOTIFY_DONE; > -} > - > static int xway_gphy_load(struct device *dev, struct xway_gphy_priv *priv, > dma_addr_t *dev_addr) > { > @@ -205,14 +186,6 @@ static int xway_gphy_probe(struct platform_device *pdev) > reset_control_deassert(priv->gphy_reset); > reset_control_deassert(priv->gphy_reset2); > > - /* assert the gphy reset because it can hang after a reboot: */ > - priv->gphy_reboot_nb.notifier_call = xway_gphy_reboot_notify; > - priv->gphy_reboot_nb.priority = -1; > - > - ret = register_reboot_notifier(&priv->gphy_reboot_nb); > - if (ret) > - dev_warn(dev, "Failed to register reboot notifier\n"); > - > platform_set_drvdata(pdev, priv); > > return ret; > @@ -224,17 +197,10 @@ static int xway_gphy_remove(struct platform_device *pdev) > struct xway_gphy_priv *priv = platform_get_drvdata(pdev); > int ret; > > - reset_control_assert(priv->gphy_reset); > - reset_control_assert(priv->gphy_reset2); > - > iowrite32be(0, priv->membase); > > clk_disable_unprepare(priv->gphy_clk_gate); > > - ret = unregister_reboot_notifier(&priv->gphy_reboot_nb); > - if (ret) > - dev_warn(dev, "Failed to unregister reboot notifier\n"); > - > return 0; > } > > -- > 2.7.4 >