Received: by 10.192.165.148 with SMTP id m20csp2671891imm; Sun, 22 Apr 2018 12:19:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx49mkOfU3KXtfHs1vwmokM2GB2P6Al1vldnCyHomEPNJuZl5aMotYb2Jph0WJwSscqMQptgE X-Received: by 2002:a17:902:6b87:: with SMTP id p7-v6mr18188775plk.101.1524424783283; Sun, 22 Apr 2018 12:19:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524424783; cv=none; d=google.com; s=arc-20160816; b=PO4O21YCwwbNQzJT88cj4JC5oFl8uBY3MWIBL0yQ4+/pcgBYIpzsdsZmqBp9hy7Gb6 AXLPJIMbQRS10c0r8i8ZcDixbUWEeIdq0Z/iZJi1uIBBPRYH+NJ0m64vuqdfmEPaG91o VZltuWZBfNPvVCR5rYGgEWIIZYOrOVJCeQzCxskO1fCRPT3hTJkykD8hnYq5lICPV77B ylV6mwxkY4Qb84rNcJSoxJGWiQyBNJK0YZnLV2+h97lFr42D3h2V4L0ESNBlOnDPaqrZ YQLlvwJ2DbDuJo0yPj48A2hM9uuGq5/lIV5DFjEXm8ZzZyrQEREf1SL9xvuMGUA21Ma7 psPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:from :references:cc:to:subject:arc-authentication-results; bh=cXzJ6wQhdTS7BufET4ah/VtNHs2XM4ilT8919KJ52LE=; b=J1WM1OCEM9gJ0JJjO3AFlQi8SbaafaUwhk0x4KipYedTNrITrRTMmnp8uiiw3RptIM bXMvPMzHV63GJOJZ+d7OFoxke4AKn2TciuESZlaUvTfyv3v38ETzrd/5vdVR47H3YIl3 dNkdlWxiMJ49qurcNpulNud6fJHkSM0OgtYwILhdrltteI8znidQ3MPYxfUs3+CXbZIJ r8hfC7EoqKowTIU0+7xmn8LWoj77DdU3jlZdBm2lhPOqu0XlwX+2dc70JQWIakcoVvup 0np5Fj0yLYdJqG0BqKh2HSCC3JnbPFP6aZPX1BLOZDXwhdUuCilEtdDEo+XzWjY0Njdz tmJQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11-v6si9588373pls.368.2018.04.22.12.19.28; Sun, 22 Apr 2018 12:19:43 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753502AbeDVTSZ (ORCPT + 99 others); Sun, 22 Apr 2018 15:18:25 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:38866 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbeDVTSX (ORCPT ); Sun, 22 Apr 2018 15:18:23 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 2630B410BB; Sun, 22 Apr 2018 21:18:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id LgC0IIU9Ef7R; Sun, 22 Apr 2018 21:18:20 +0200 (CEST) Subject: Re: [PATCH] MIPS: lantiq: gphy: Drop reboot/remove reset asserts To: Mathias Kresin , john@phrozen.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Cc: martin.blumenstingl@googlemail.com, stable@vger.kernel.org References: <1523176203-18926-1-git-send-email-dev@kresin.me> From: Hauke Mehrtens Message-ID: <2c128bec-ce46-5063-cd61-6f4257ba2a3e@hauke-m.de> Date: Sun, 22 Apr 2018 21:18:17 +0200 MIME-Version: 1.0 In-Reply-To: <1523176203-18926-1-git-send-email-dev@kresin.me> Content-Type: text/plain; charset=utf-8 Content-Language: de-LU Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/08/2018 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: Hauke Mehrtens > --- > 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; > } > >