Received: by 10.213.65.68 with SMTP id h4csp1401433imn; Sun, 8 Apr 2018 02:37:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+lx4/d11VDKkB3SUcSFhm5lYYx1Rrz656g9n0+/W8AklkXIzp2bX6jJA2ObHmEZ2Q9Xpm9 X-Received: by 10.99.120.138 with SMTP id t132mr22333087pgc.280.1523180225763; Sun, 08 Apr 2018 02:37:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523180225; cv=none; d=google.com; s=arc-20160816; b=aCy7ialebLBIEok0SeJwjwbSLpgrzIXa823vDfE7uw2whn1T4W/qDocWdguwKF60oR YupNBccygzuwj6z6EP4bMvbg5CI0juRFzpM/uzGLwYE/9BVOc8QAAx4C8DTNdZp1ckiy Z2A16obqTlvyaAGH4WnnMdjyDGmNxMhg6V+pCW3Ugbq8nCXMwEqDKx+ina1fUucbQlXO T8eUrjU7ypYK6nyw+a8mQDeXyfjxaNy1sfhyld9dOKduOuoIlnr4FLjLRkwqBvWJh3JO Yr8SOh9PIHX/IYECnjLXGfOHXpJwghhxWNEVCQkb99L9L6ot7glOrYhIctbfrV3Bub1v HGfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=VG06D/NsZWXo1xNHQMwheLQf5Yuz3NVXtyT8KQuDlGI=; b=XH/RqsYFGkIi5y7KDr7mb5JSLwzU3Ct99WI+VZeNEfG6xV09w/mZnUFkvxaGk25Ctt Q8ym0UfWzCSuZ9vSSpFUq7oWoEbJ9EKtctyDIp3dkUyGbXO0RrtxBlVSpzDeZe1YAqeo wECDrMQI3bEGBbvOadOK6F1rL0NKC42GFaQtw8/5c6r26aM0C0AGwAXouLaz1RkCmwoy 5CzICJOcVaEjwSGNzx6f8bTT5In2ZBsjzTksuYGYHF1gbVFuNbwy1Nfp1D9a+Xbp00Wo ilD/8Yok4GXMO/kMp9xLZb7lUhMAausChwJ0uJSaGZT7nthWTkeFLgTV83GE2f6b0ZwX JtRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kresin-me.20150623.gappssmtp.com header.s=20150623 header.b=KV/or28b; 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 q1si9733581pgr.455.2018.04.08.02.35.56; Sun, 08 Apr 2018 02:37:05 -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=@kresin-me.20150623.gappssmtp.com header.s=20150623 header.b=KV/or28b; 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 S1751650AbeDHIcs (ORCPT + 99 others); Sun, 8 Apr 2018 04:32:48 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:39144 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750775AbeDHIcr (ORCPT ); Sun, 8 Apr 2018 04:32:47 -0400 Received: by mail-wm0-f65.google.com with SMTP id f125so9891468wme.4 for ; Sun, 08 Apr 2018 01:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kresin-me.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=VG06D/NsZWXo1xNHQMwheLQf5Yuz3NVXtyT8KQuDlGI=; b=KV/or28b1j9zyxQTHhTNjSL/ftkSVA1uVcn+PUW4QA+3wr3V4zkXbxbJqfv9NxtImE MgAV89A4Kl0aH7sgpziiB3pT/r/FlmLocc6gaL13NjzvUHvidIc6oZ1S0RBjbxVJ2xS4 pCcYNV6AFzORTAddcFkv6e5UAKVgMxxF3Z7XXTBMA7hbwBg1waM4APYefAnPwIAmcfWP TMkNvx/aeyI0bnOLeer/LnMwOaKno7Bk6hS8F8PTMqpIaw3Ve+HB3tty5DM6Ry/uqIPM orS8u7YdHRfHUsWjQYvwbvd2p7XnsZz/B95uMzbLxf+cv5yT6NfSH4Mjmd8DUSpwogic zKyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=VG06D/NsZWXo1xNHQMwheLQf5Yuz3NVXtyT8KQuDlGI=; b=irA1JQRynEGiPA9tyj09/biFXhl2d6lwOKv0bd8PFZpeyJwzW8KqQztjOd2XGTP5KZ 8MQZp0qq3nSOXTF4RVMfFx3Le9Nx5Dw9GLpaYD12eTWlGXBEK7Y/YRbcATkLZMFztCzJ VN909gIo5415cm73s2Z1F4U1plGQ2C/3pcyBSTu6tu3szY+OHagcxBbeKvzRrjNkx+8w n1w/38JP4CRJhY+h8xAxYe4TwlO2ZR27681tbQAn2BWizDQ8XQ03tdIM1Sdsq8PQ08OQ VSX2+w+qj0WGeKP3D4NEn8l4wi0ab7YNwh6hW8tcPDZ7fTevRGEpoPkpN0w+lADa/Koq 3GaQ== X-Gm-Message-State: AElRT7GRXpmUm0/jCE8PfOHTFftKk7EiLyANKrBq/RrnM3Z7BsjQF+cU k4E40Coflyz+uCdRiVYEm2MY+uAQI/So+w== X-Received: by 10.28.87.73 with SMTP id l70mr18897862wmb.123.1523176366066; Sun, 08 Apr 2018 01:32:46 -0700 (PDT) Received: from desktop.wvd.kresin.me (p2003008C2F64C100E07D0BF39ABE0ACD.dip0.t-ipconnect.de. [2003:8c:2f64:c100:e07d:bf3:9abe:acd]) by smtp.gmail.com with ESMTPSA id v74sm9014234wmv.48.2018.04.08.01.32.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Apr 2018 01:32:45 -0700 (PDT) From: Mathias Kresin To: john@phrozen.org, linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Cc: martin.blumenstingl@googlemail.com, hauke@hauke-m.de, stable@vger.kernel.org Subject: [PATCH] MIPS: lantiq: gphy: Drop reboot/remove reset asserts Date: Sun, 8 Apr 2018 10:30:03 +0200 Message-Id: <1523176203-18926-1-git-send-email-dev@kresin.me> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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