Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp228248imu; Mon, 19 Nov 2018 21:22:35 -0800 (PST) X-Google-Smtp-Source: AJdET5fYvlZ8RG6wQ9HpnppMWPKCDsMwYhU7RJbVMDmEvuYUXMlMYzl2i7UBjAoylxl4IaEoVm/6 X-Received: by 2002:a63:d904:: with SMTP id r4mr627394pgg.207.1542691355420; Mon, 19 Nov 2018 21:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542691355; cv=none; d=google.com; s=arc-20160816; b=k7kU/qk00TVytMHQBIVTdbbr6XBTdHkl3C9craibRcUFgtdPAQ8OXglxgcUTOYtXfy FcbT2TH4KckF1xDYf/a6hJLWAk+mYd2+KkzRpJyc0X05BZarK4Pxs9kySGApbncyKvnd 2sVDSbE3OR0QbHLZiBn5/Re39FrEkkZ/JuBtdm/E5kwbM8RuhjwplqbYqrewagnnmh0c w2quHPoB0Vsb4h3QXdiMevx4lJhHQD8rs73JnxiyT2PIBtRRXKHpRtSKv2/WlBO8jxLX RpMt0Nb9VpQa9mSuE5Dkjf9j1tZonjpw3aYY/28/2czWwwsO0XejLNg8WQ/zTybyR9Ea qRCQ== 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:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=D54QJBSckR4RrGMiVjH7GnEKKcfSUn/wpn8NGIuUSkU=; b=fKkfjCWfN+8gEAXQ2ZykzFLrUTarBDSXO2OgNQYLbM3tm5v0aGAK2qTEYStC47UmIF bLYpAyWs3UJadg2ZMCBbxGpZlYStbDTcfj116pFOPWm6ITEfGhMntsxYe4j1Uu9ItUZA cYhg0/FA3stapDf81ub8gnbm5BzkAZBSOP33lFA850rNEFM+9u4GwrBSU1kDhU/aoecg OzobAEQbwuKC89wcS7ljHoG2XYaHzyw09bxB/EWB8SUmh3C8qDc8Equy/PBU8lERz9yz WldXHQcZ4OrGpkn/IesKV8a7oJQqT8UFcVSCq8/VhxzTjSXs58oOg2JYFGlgXt6HXN8u ABnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="NDF3CB/q"; 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=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si32120530pgj.56.2018.11.19.21.22.20; Mon, 19 Nov 2018 21:22:35 -0800 (PST) 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=@ti.com header.s=ti-com-17Q1 header.b="NDF3CB/q"; 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=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731296AbeKTP1l (ORCPT + 99 others); Tue, 20 Nov 2018 10:27:41 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:53582 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727880AbeKTP1l (ORCPT ); Tue, 20 Nov 2018 10:27:41 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id wAK50SwU121550; Mon, 19 Nov 2018 23:00:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1542690028; bh=D54QJBSckR4RrGMiVjH7GnEKKcfSUn/wpn8NGIuUSkU=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=NDF3CB/qxPa/YKgBDWbgm0fZMtZcDrdUcMQk4+rqOGG93beqZxZX/ogoxl9cz8b0W xqHxJKQe3mNM4pLR6i2i5s3n/xvyNnrsu9MIIvXwBrDKFzB0sKVEnHO8dvo6z6jMym 68TvJjM66/fJEsUDdFiFZM3Nn8IQ2noen/ENlZd0= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wAK50S4D050832 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 19 Nov 2018 23:00:28 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 19 Nov 2018 23:00:28 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 19 Nov 2018 23:00:28 -0600 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wAK50QQL023514; Mon, 19 Nov 2018 23:00:26 -0600 Subject: Re: [PATCH 3/4] mmc: sdhci-omap: Add platform specific reset callback To: Faiz Abbas , , CC: , References: <20181119111618.2745-1-faiz_abbas@ti.com> <20181119111618.2745-4-faiz_abbas@ti.com> From: Kishon Vijay Abraham I Message-ID: <04c28877-7705-ce7e-cb73-67d202174741@ti.com> Date: Tue, 20 Nov 2018 10:30:23 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20181119111618.2745-4-faiz_abbas@ti.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/11/18 4:46 PM, Faiz Abbas wrote: > The TRM (SPRUIC2C - January 2017 - Revised May 2018 [1]) forbids > assertion of data reset while tuning is happening. Implement a > platform specific callback that takes care of this condition. > > [1] http://www.ti.com/lit/pdf/spruic2 Section 25.5.1.2.4 > > Signed-off-by: Faiz Abbas Once patch 2 is merged with this patch, you can add Acked-by: Kishon Vijay Abraham I > --- > drivers/mmc/host/sdhci-omap.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c > index cfffcf58be3f..bf268b38ddc8 100644 > --- a/drivers/mmc/host/sdhci-omap.c > +++ b/drivers/mmc/host/sdhci-omap.c > @@ -688,6 +688,18 @@ static void sdhci_omap_set_uhs_signaling(struct sdhci_host *host, > sdhci_omap_start_clock(omap_host); > } > > +void sdhci_omap_reset(struct sdhci_host *host, u8 mask) > +{ > + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); > + struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host); > + > + /* Don't reset data lines during tuning operation */ > + if (omap_host->is_tuning) > + mask &= ~SDHCI_RESET_DATA; > + > + sdhci_reset(host, mask); > +} > + > static struct sdhci_ops sdhci_omap_ops = { > .set_clock = sdhci_omap_set_clock, > .set_power = sdhci_omap_set_power, > @@ -696,7 +708,7 @@ static struct sdhci_ops sdhci_omap_ops = { > .get_min_clock = sdhci_omap_get_min_clock, > .set_bus_width = sdhci_omap_set_bus_width, > .platform_send_init_74_clocks = sdhci_omap_init_74_clocks, > - .reset = sdhci_reset, > + .reset = sdhci_omap_reset, > .set_uhs_signaling = sdhci_omap_set_uhs_signaling, > }; > >