From patchwork Mon Jul 14 05:34:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 4542561 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4C3CAC0514 for ; Mon, 14 Jul 2014 05:34:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 851D620155 for ; Mon, 14 Jul 2014 05:34:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A121D20149 for ; Mon, 14 Jul 2014 05:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752553AbaGNFeS (ORCPT ); Mon, 14 Jul 2014 01:34:18 -0400 Received: from mail-oa0-f43.google.com ([209.85.219.43]:56012 "EHLO mail-oa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750844AbaGNFeR (ORCPT ); Mon, 14 Jul 2014 01:34:17 -0400 Received: by mail-oa0-f43.google.com with SMTP id i7so2734768oag.30 for ; Sun, 13 Jul 2014 22:34:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Sxze3uqntGud7ZxSVkAtGlpe9btojJYuRFIopVoH2mM=; b=cgMzT8jm1hrRYX285ORHu2SaNZrUXQWe2q64XVYvyA+KSiycXgXYhDYcdfXcN/BqOJ wjVOEc6R7HTA4a88vp85+IZEQzvFgmL9c2I+zqKm0cEFtw3MoUKSeI7C/OZMxPD3enFY 6W3wheTaes+G02cF3GWzo1kSJ4srhjvY9j0wFR9YeBFdZZ17aAX8gJDsCnb4bibfc+AB M3CM79P/Amfb00Cks2GyBYUjZnxpaxDyY2mR4bxDWePsq8eynwRYYFHmxzg9RYNxoI3A budFwyStwr9pgzvbm25yww79g4GwuTE047vantNhNIOnSFDS4bFZ8eGK2429G0sNZvbq vTZA== X-Gm-Message-State: ALoCoQmGJlOtd+bz1DrYFYHkC+cVC+t65GaANYTXy6L/dKDAYDuiXdfJnZHV0IsvsfAbsaKOTxRf MIME-Version: 1.0 X-Received: by 10.182.24.101 with SMTP id t5mr6155619obf.66.1405316056915; Sun, 13 Jul 2014 22:34:16 -0700 (PDT) Received: by 10.182.233.166 with HTTP; Sun, 13 Jul 2014 22:34:16 -0700 (PDT) In-Reply-To: References: <53BE926A.2070005@ti.com> <53BFA120.2070005@ti.com> <2CC2A0A4A178534D93D5159BF3BCB661A47A2A7BF3@EAPEX1MAIL1.st.com> Date: Mon, 14 Jul 2014 11:04:16 +0530 Message-ID: Subject: Re: [PATCH V9 2/7] phy: Add drivers for PCIe and SATA phy on SPEAr13xx From: Viresh Kumar To: Mohit KUMAR DCG Cc: Kishon Vijay Abraham I , Arnd Bergmann , "olof@lixom.net" , "linux-arm-kernel@lists.infradead.org" , spear-devel , Bartlomiej Zolnierkiewicz , Bjorn Helgaas , Mark Nicholson , "linux-pci@vger.kernel.org" , Pratyush ANAND Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 14 July 2014 10:54, Viresh Kumar wrote: > These makes sense. Will add them. Kishon, here is how the diff looks like now: return 0; @@ -121,10 +124,12 @@ static int spear1340_miphy_sata_exit(struct spear1340_miphy_priv *priv) regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST, SPEAR1340_PERIP1_SW_RSATA, SPEAR1340_PERIP1_SW_RSATA); + /* Wait for SATA power domain off */ msleep(20); /* Switch off sata power domain */ regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG, SPEAR1340_PCM_CFG_SATA_POWER_EN, 0); + /* Wait for SATA reset assert completion */ msleep(20); return 0; --- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c index 5e39231..8de98ad 100644 --- a/drivers/phy/phy-spear1340-miphy.c +++ b/drivers/phy/phy-spear1340-miphy.c @@ -101,10 +101,13 @@ static int spear1340_miphy_sata_init(struct spear1340_miphy_priv *priv) regmap_update_bits(priv->misc, SPEAR1340_PCM_CFG, SPEAR1340_PCM_CFG_SATA_POWER_EN, SPEAR1340_PCM_CFG_SATA_POWER_EN); + /* Wait for SATA power domain on */ msleep(20); + /* Disable PCIE SATA Controller reset */ regmap_update_bits(priv->misc, SPEAR1340_PERIP1_SW_RST, SPEAR1340_PERIP1_SW_RSATA, 0); + /* Wait for SATA reset de-assert completion */ msleep(20);