From patchwork Mon Aug 6 10:42:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 953816 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ide-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41kZ340p5Rz9s5H for ; Mon, 6 Aug 2018 20:42:08 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729717AbeHFMud (ORCPT ); Mon, 6 Aug 2018 08:50:33 -0400 Received: from sauhun.de ([88.99.104.3]:42516 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbeHFMuc (ORCPT ); Mon, 6 Aug 2018 08:50:32 -0400 Received: from localhost (p54B336E5.dip0.t-ipconnect.de [84.179.54.229]) by pokefinder.org (Postfix) with ESMTPSA id DF0336860F4; Mon, 6 Aug 2018 12:42:02 +0200 (CEST) From: Wolfram Sang To: linux-ide@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda , Tejun Heo , Masaharu Hayakawa , Wolfram Sang Subject: [PATCH] ata: sata_rcar: exclude setting of PHY registers in Gen3 Date: Mon, 6 Aug 2018 12:42:00 +0200 Message-Id: <20180806104200.29102-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: Masaharu Hayakawa According to documentation, setting of PHY registers is unnecessary with R-Car Gen3. The registers are not even described. So, don't initialize them. Signed-off-by: Masaharu Hayakawa [wsa: updated commit message] Signed-off-by: Wolfram Sang Reviewed-by: Sergei Shtylyov --- Tested with a Renesas R-Car M3N Salvator-XS board. I did a platform suspend to check if the controller and PHY work properly after resume. drivers/ata/sata_rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c index 1ad168f76ef3..10ecb232245d 100644 --- a/drivers/ata/sata_rcar.c +++ b/drivers/ata/sata_rcar.c @@ -830,10 +830,11 @@ static void sata_rcar_init_controller(struct ata_host *host) sata_rcar_gen1_phy_init(priv); break; case RCAR_GEN2_SATA: - case RCAR_GEN3_SATA: case RCAR_R8A7790_ES1_SATA: sata_rcar_gen2_phy_init(priv); break; + case RCAR_GEN3_SATA: + break; default: dev_warn(host->dev, "SATA phy is not initialized\n"); break; @@ -995,7 +996,6 @@ static int sata_rcar_resume(struct device *dev) return ret; if (priv->type == RCAR_GEN3_SATA) { - sata_rcar_gen2_phy_init(priv); sata_rcar_init_module(priv); } else { /* ack and mask */