From patchwork Mon Feb 5 12:50:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 126861 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1944891ljc; Mon, 5 Feb 2018 04:55:30 -0800 (PST) X-Google-Smtp-Source: AH8x227V4eUSNq3gyUr6t+NpucLm2A2jdvOqJlQFd5qv8++iAqszgGxqOWKdqSeMNtDhuCZNGykg X-Received: by 10.98.253.5 with SMTP id p5mr49030931pfh.132.1517835330806; Mon, 05 Feb 2018 04:55:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835330; cv=none; d=google.com; s=arc-20160816; b=WgD9sLLNznrqP4m6R3AZEMmtJ6afZF19ZV6sE3GBk0j51n5XFOyXe/vXu0ELX34aN2 JdplfcyAtErQdaz+iN38u2zxqbv4mdjfD6UTKjCmArgctQ34il1emo1PUX3xbgpN+yOU rJGbA2t9fCiuae+yOLgUeXP/9GdAP4ZbJm2PkEVjyQ0I2OMghv3usy3FNEbZR8Ar0mWk 0/GJrLD0vJkQQ+6/Ss9a56UV4Zb9wgxW7Xss5o6WQ2A89kPutyhJA+zpQJPybJ4K8qaV JCkhBWNyAZM7B0vp/Ym5vBJ/HimL3Aj3lzBc4no/ciOgBWaEWAC9SgF2Vyz2rkC8imCY 5Cuw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=26HG49b1LyADgqL68I07aMavhl5PNMV5EHW98+f+6SI=; b=vdFn9N1et2KLTGrJ0N8PI/RBwSGRWuNQfRqlZAQD0F27EiAckE7izygQgxc38wMnp9 SgX62M9IZVqfC3ukb3fSPUoQfn5Ok2uIvCJ4Wa096jI8TvOARQ3LR6cRUxifPjmigsSM yWA7GgbJSmd4wiOt29j/lQ/3NPD26KrcBOJRHZxOGDKk2iXpnt76NgdKVjSlpSldLk4S X7b9nw8etZMukRDjbQOpXsnKXQZHmkV3iErOcAZXrOdmUTeqtQ5O6Tb4/PrTG1FCN04f lNy+Z0/Cja9PsyARPBWNS91C7qqccbECGqzMuzFPRW29obvrHzLGDaAbb6lyck5/t6RH rHHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=gy5oTA4N; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) 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 a80si6833656pfa.6.2018.02.05.04.55.30; Mon, 05 Feb 2018 04:55:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=gy5oTA4N; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753015AbeBEMz2 (ORCPT + 5 others); Mon, 5 Feb 2018 07:55:28 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:63854 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbeBEMv0 (ORCPT ); Mon, 5 Feb 2018 07:51:26 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15Cotl8011260; Mon, 5 Feb 2018 06:50:55 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835055; bh=5sDFblgRSi57wMKxSqtDf8n0K2GIFFnj9FmoCU0Wpm8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gy5oTA4Nzx7ebfq73EVoKSE8lBqIYyhh9MWTtFyVYwrT+pB+G1mc+aY6LV63UMCpO VWnBG52KlyUlGRsCJRhsXgdEcAKGHf90gmkmBDDcl4p1d/KFoIwyXg9gashL2mOacj 0wdABUtXFFSkokrR+G6mNd8R4b2ARw2OADD99Dg4= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CotDI006733; Mon, 5 Feb 2018 06:50:55 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:50:55 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) 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.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:50:54 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGZ023963; Mon, 5 Feb 2018 06:50:51 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 04/16] mmc: sdhci-omap: Add tuning support Date: Mon, 5 Feb 2018 18:20:17 +0530 Message-ID: <20180205125029.21570-5-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org MMC tuning procedure is required to support SD card UHS1-SDR104 mode and EMMC HS200 mode. SDR104/HS200 DLL Tuning Procedure for AM572x platform is mentioned in Figure 25-51. SDR104/HS200 DLL Tuning Procedure of AM572x Sitara Processors Silicon Revision 2.0, 1.1 TRM (SPRUHZ6I - October 2014–Revised April 2017 [1]). The tuning function sdhci_omap_execute_tuning() will only be called by the MMC/SD core if the corresponding speed modes are supported by the OMAP silicon which is set in the mmc host "caps" field. [1] -> http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-omap.c | 130 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 86b6cc0a5380..36e0626d3de2 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -37,6 +37,13 @@ #define CON_INIT BIT(1) #define CON_OD BIT(0) +#define SDHCI_OMAP_DLL 0x0134 +#define DLL_SWT BIT(20) +#define DLL_FORCE_SR_C_SHIFT 13 +#define DLL_FORCE_SR_C_MASK (0x7f << DLL_FORCE_SR_C_SHIFT) +#define DLL_FORCE_VALUE BIT(12) +#define DLL_CALIB BIT(1) + #define SDHCI_OMAP_CMD 0x20c #define SDHCI_OMAP_PSTATE 0x0224 @@ -63,12 +70,16 @@ #define SDHCI_OMAP_AC12 0x23c #define AC12_V1V8_SIGEN BIT(19) +#define AC12_SCLK_SEL BIT(23) #define SDHCI_OMAP_CAPA 0x240 #define CAPA_VS33 BIT(24) #define CAPA_VS30 BIT(25) #define CAPA_VS18 BIT(26) +#define SDHCI_OMAP_CAPA2 0x0244 +#define CAPA2_TSDR50 BIT(13) + #define SDHCI_OMAP_TIMEOUT 1 /* 1 msec */ #define SYSCTL_CLKD_MAX 0x3FF @@ -77,6 +88,8 @@ #define IOV_3V0 3000000 /* 300000 uV */ #define IOV_3V3 3300000 /* 330000 uV */ +#define MAX_PHASE_DELAY 0x7C + struct sdhci_omap_data { u32 offset; }; @@ -198,6 +211,120 @@ static void sdhci_omap_conf_bus_power(struct sdhci_omap_host *omap_host, } } +static inline void sdhci_omap_set_dll(struct sdhci_omap_host *omap_host, + int count) +{ + int i; + u32 reg; + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_DLL); + reg |= DLL_FORCE_VALUE; + reg &= ~DLL_FORCE_SR_C_MASK; + reg |= (count << DLL_FORCE_SR_C_SHIFT); + sdhci_omap_writel(omap_host, SDHCI_OMAP_DLL, reg); + + reg |= DLL_CALIB; + sdhci_omap_writel(omap_host, SDHCI_OMAP_DLL, reg); + for (i = 0; i < 1000; i++) { + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_DLL); + if (reg & DLL_CALIB) + break; + } + reg &= ~DLL_CALIB; + sdhci_omap_writel(omap_host, SDHCI_OMAP_DLL, reg); +} + +static void sdhci_omap_disable_tuning(struct sdhci_omap_host *omap_host) +{ + u32 reg; + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_AC12); + reg &= ~AC12_SCLK_SEL; + sdhci_omap_writel(omap_host, SDHCI_OMAP_AC12, reg); + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_DLL); + reg &= ~(DLL_FORCE_VALUE | DLL_SWT); + sdhci_omap_writel(omap_host, SDHCI_OMAP_DLL, reg); +} + +static int sdhci_omap_execute_tuning(struct mmc_host *mmc, u32 opcode) +{ + struct sdhci_host *host = mmc_priv(mmc); + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host); + struct device *dev = omap_host->dev; + struct mmc_ios *ios = &mmc->ios; + u32 start_window = 0, max_window = 0; + u8 cur_match, prev_match = 0; + u32 length = 0, max_len = 0; + u32 phase_delay = 0; + int ret = 0; + u32 reg; + + pltfm_host = sdhci_priv(host); + omap_host = sdhci_pltfm_priv(pltfm_host); + dev = omap_host->dev; + + /* clock tuning is not needed for upto 52MHz */ + if (ios->clock <= 52000000) + return 0; + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_CAPA2); + if (ios->timing == MMC_TIMING_UHS_SDR50 && !(reg & CAPA2_TSDR50)) + return 0; + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_DLL); + reg |= DLL_SWT; + sdhci_omap_writel(omap_host, SDHCI_OMAP_DLL, reg); + + while (phase_delay <= MAX_PHASE_DELAY) { + sdhci_omap_set_dll(omap_host, phase_delay); + + cur_match = !mmc_send_tuning(mmc, opcode, NULL); + if (cur_match) { + if (prev_match) { + length++; + } else { + start_window = phase_delay; + length = 1; + } + } + + if (length > max_len) { + max_window = start_window; + max_len = length; + } + + prev_match = cur_match; + phase_delay += 4; + } + + if (!max_len) { + dev_err(dev, "Unable to find match\n"); + ret = -EIO; + goto tuning_error; + } + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_AC12); + if (!(reg & AC12_SCLK_SEL)) { + ret = -EIO; + goto tuning_error; + } + + phase_delay = max_window + 4 * (max_len >> 1); + sdhci_omap_set_dll(omap_host, phase_delay); + + goto ret; + +tuning_error: + dev_err(dev, "Tuning failed\n"); + sdhci_omap_disable_tuning(omap_host); + +ret: + sdhci_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); + return ret; +} + static int sdhci_omap_card_busy(struct mmc_host *mmc) { u32 reg, ac12; @@ -299,6 +426,8 @@ static int sdhci_omap_start_signal_voltage_switch(struct mmc_host *mmc, static void sdhci_omap_set_power_mode(struct sdhci_omap_host *omap_host, u8 power_mode) { + if (omap_host->bus_mode == MMC_POWER_OFF) + sdhci_omap_disable_tuning(omap_host); omap_host->power_mode = power_mode; } @@ -635,6 +764,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) sdhci_omap_start_signal_voltage_switch; host->mmc_host_ops.set_ios = sdhci_omap_set_ios; host->mmc_host_ops.card_busy = sdhci_omap_card_busy; + host->mmc_host_ops.execute_tuning = sdhci_omap_execute_tuning; sdhci_read_caps(host); host->caps |= SDHCI_CAN_DO_ADMA2; From patchwork Mon Feb 5 12:50:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 126853 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1942384ljc; Mon, 5 Feb 2018 04:52:06 -0800 (PST) X-Google-Smtp-Source: AH8x226GLPGp6gid5TWLUo2cBOlZqlZsUfLURY+LPLvWE6pDyUsyLVm4uN20HzynvWNR4yQ9zniW X-Received: by 10.98.162.10 with SMTP id m10mr48446725pff.168.1517835125903; Mon, 05 Feb 2018 04:52:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835125; cv=none; d=google.com; s=arc-20160816; b=Hr06qKyOtruTCiybweyEDwcbbmnHvIKWck0hYJaYklukkBvrHiiO9Jym0BjZV+pljU gsyfrrgApgUreMoIZSrvJn2Sg3DRErDccWxHhMy9R7PI4a26n0o6iK8fN+G0rKXuIieN VANfDtZQerMU9I5BxWYe9QkL3vo1wP2FNrkayNmrlqLXvP3fwJJVU3X9eh6XOZ7sXwnP ikK+dpJBE5H1wYLmo7PyTSoxaHRNVMaKn8MCLlMMQj3eB9NOGM6XLJsrcFrgH31MKeI5 vG8rPddCR8mwyMt0e4kzWFga5IkZ4xCqoNQP86z+Mfg928djbl6v4WRHYQ+RKY0rBO5T dmMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FrgSMUZJHW1bwn6G4MapHOAbh/7VbrQjaZZoXNtku6w=; b=FvStBr/aqf8XC17E+CU05QgQskChzQcVqGGSWbdACxBAfBveqodIcBbpUVscVyccU9 rMNV30uTEj6aZGyVrSKmY4m1GD/Nt+4QAi5v/g/S9buFlvUmmI9rWZYWSlAS6jmzc6ob 5jZ99WjzGVjoDVeEOOZj6YskoGaB/dcPKK5JW3SKmO8hHNQRbiMW9AGXWhoWF/bzAtfQ 0u3fhLnACxoct9nHZXkuyIKjPak5/5HG0dZodlEeyCpNUPN1W5qEBT2kMetR1K8wvUx7 hwEHWlda35zNwsNoTSNtuVnI0wwKPgJRZio7ihv9JVzp6yjvT+uzqjaka/euKiucJSsX GuNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=spuqTqk1; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) 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 j11si4433170pff.406.2018.02.05.04.52.05; Mon, 05 Feb 2018 04:52:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=spuqTqk1; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753176AbeBEMwD (ORCPT + 5 others); Mon, 5 Feb 2018 07:52:03 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:11515 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753085AbeBEMvp (ORCPT ); Mon, 5 Feb 2018 07:51:45 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15CpHSB004246; Mon, 5 Feb 2018 06:51:17 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835077; bh=/DCDbSe7GEd019mLxrbWUNKUxG33zzPLuCZTa3WzIb4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=spuqTqk1UUzDVjjRtt5Mxy0QKnA662HMzUmrhDcNPrFO9RvvyTXndasVsWSi9lXKT QD6ix7GzBE44/AVuWimk44O8IbaGy8qHWGg/aEhbB6bsAq6zCin8yEboKp42ARAtvf d0J08gsXd/Hd5u0/GzrDuftdVHD8ztTBeC6s/W0g= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CpHur020430; Mon, 5 Feb 2018 06:51:17 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:51:16 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:51:16 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGf023963; Mon, 5 Feb 2018 06:51:13 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 10/16] mmc: sdhci: Fix to use data_timer only for data line commands Date: Mon, 5 Feb 2018 18:20:23 +0530 Message-ID: <20180205125029.21570-11-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org commit d7422fb489eee5587d3eec ("mmc: sdhci: Separate timer timeout for command and data requests") while separating timer timeout for command and data requests, passed cmd->mrq to sdhci_mod_timer (cmd is an argument to sdhci_send_command) and in sdhci_mod_timer used mrq->cmd to check if it is a data line command. This results in using data timer for commands like MMC_SET_BLOCK_COUNT (CMD23) though it is not a data line command. Fix it here. Fixes: commit d7422fb489eee5587d3eec ("mmc: sdhci: Separate timer timeout for command and data requests") Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1aa74b4682f3..0489572d1892 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1073,10 +1073,10 @@ static void sdhci_finish_data(struct sdhci_host *host) } } -static void sdhci_mod_timer(struct sdhci_host *host, struct mmc_request *mrq, +static void sdhci_mod_timer(struct sdhci_host *host, struct mmc_command *cmd, unsigned long timeout) { - if (sdhci_data_line_cmd(mrq->cmd)) + if (sdhci_data_line_cmd(cmd)) mod_timer(&host->data_timer, timeout); else mod_timer(&host->timer, timeout); @@ -1135,7 +1135,7 @@ void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) timeout += DIV_ROUND_UP(cmd->busy_timeout, 1000) * HZ + HZ; else timeout += 10 * HZ; - sdhci_mod_timer(host, cmd->mrq, timeout); + sdhci_mod_timer(host, cmd, timeout); host->cmd = cmd; if (sdhci_data_line_cmd(cmd)) { From patchwork Mon Feb 5 12:50:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 126854 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1942454ljc; Mon, 5 Feb 2018 04:52:12 -0800 (PST) X-Google-Smtp-Source: AH8x227FQTMTVgiqOKNUglMfbrGcgYBMfrXl8j3z98Xl9Ld7IZt/HtfKAcW+P7dC0pWMqEBFSctC X-Received: by 10.99.121.11 with SMTP id u11mr2670047pgc.421.1517835132547; Mon, 05 Feb 2018 04:52:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835132; cv=none; d=google.com; s=arc-20160816; b=GZhZQfxxDuJy0ngSDx2aRLySehYGOP/W/RZI6Kj+ygnv7EZ7MLxbIPDVrwPLXBJxNu c4p066k7T77pVX+8R54U25/Pblo1ZNNvaOz5FdkJVxIN+D8y6sHxdr4dwNykXw92iL2Y FPrx5wWGDB83Eewp9PsdW8WW/sQG5i1aUuBapXOyxUoOxtCffQHE7yOCPmV68epKG4Tv 0NhxVli+q5HL8z62XbgczhWv9oubNokzybdRVEmp9/c72AwWTtstIQzVpPP330U2MN8q GQwiq3ob/WVW2mDk52RB80iaPGHEbDlbOuO9/GDgmFVrM8qycannlhqVqbWDOZn6+zDR vVhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=mAKm25G9x1VHIrqZCfFU2Q+NhhHlEywKZHyWFj2nqv4=; b=O0qVoWp2/YSpijlq1MDUKgSyXTTNrbWRINqfuOcTAY3glODFrtHbv5JGL6RbzK4xMP cjBLIaHngdZNbuqolDvp32bLnFqbYnoJTIoNiYd6iQOrN5ar60Tq8Rpmilcw14JMmM8F KsutxHgHHWTZgrCWItGHxDbZdjtaF+WBTKJ+NW5rvWo6SbFa5t09orqYGU9At3m245Mh k2+d0Id2L4LHXesv8l29FERAv5u8SRek8nfGRYT/uMYsN4UJABs9u8R7EzJcKplISrm8 H/0AGSvPZyv7LACX/AtbcnpkAp7cl9EQ+HJmglBaxg5gr6XVnFmWCPHi/RRY/Fc7M1lw qjxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=HKTaOkfP; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) 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 j11si4433170pff.406.2018.02.05.04.52.12; Mon, 05 Feb 2018 04:52:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=HKTaOkfP; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753150AbeBEMwJ (ORCPT + 5 others); Mon, 5 Feb 2018 07:52:09 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:11996 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753136AbeBEMv4 (ORCPT ); Mon, 5 Feb 2018 07:51:56 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15CpZeZ023536; Mon, 5 Feb 2018 06:51:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835095; bh=mlKlL48cHM89e2SV+KaFL7+R42Uo59De+hTMgjAzV40=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HKTaOkfPTMKSZGnzoJGnVM34CQgDAnyWVf2ldoukCtzdZJkhBIGysN5Jsk9myWTdx MqP3LimpjoHmyWE63Bxp2lXDvA4+4+TdOf9Ozn/4+frSuCkQBZdIaa9I8o3MpSpuCC FQPI1TG6jUyIY8OGC4Du+48HjB9iahvS/9k0B3aU= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CpZhq020650; Mon, 5 Feb 2018 06:51:35 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:51:34 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:51:35 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGk023963; Mon, 5 Feb 2018 06:51:31 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 15/16] mmc: sdhci-omap: Add SPDX identifier Date: Mon, 5 Feb 2018 18:20:28 +0530 Message-ID: <20180205125029.21570-16-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Update sdhci-omap driver with the correct SPDX license identifier. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci-omap.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" 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/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 863f6736c2fe..d44918172197 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -1,21 +1,7 @@ -/** - * SDHCI Controller driver for TI's OMAP SoCs - * - * Copyright (C) 2017 Texas Instruments - * Author: Kishon Vijay Abraham I - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 of - * the License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +// SPDX-License-Identifier: GPL-2.0 +// Copyright (c) 2018 Texas Instruments +// SDHCI Controller driver for TI's OMAP SoCs +// Author: Kishon Vijay Abraham I #include #include