From patchwork Thu Dec 14 13:09:40 2017 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: 121930 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6787581qgn; Thu, 14 Dec 2017 05:13:09 -0800 (PST) X-Google-Smtp-Source: ACJfBov/s2t85PlqWW3X80KVcjmQ4HVA0RUU3u28mQzKiTuHcOVTIhD4Om2a94nOUTIeZRZhi4J4 X-Received: by 10.84.217.86 with SMTP id e22mr9444065plj.283.1513257189838; Thu, 14 Dec 2017 05:13:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513257189; cv=none; d=google.com; s=arc-20160816; b=vWK941fDcVTEh5eflOt4b3dV5MCyBGfrgXZ6Cp9QGjgza4PmAutFyJdrl69gnjzBTJ ee/qgb376GCWY4k6E74aZDOmR8LkYaPGt3CwKj7qYLkKLTvogRPP5axa0mo0FgB89a0o PUhx2Yp58MMRC2vQg+FMWSwVomzVmeKf361P0ai/oEXBhOVfj45G+IxR4Ia9PIxW6ovx eb9SkbmiIzLDL8eYZI/ZsHcchPcShTM6vYQJOgdnJtTDc/go5v7OgfqRBXPENRtgtoOw DXDcwouPVZfrOxdB2Ohe++F6jvpZquJDTY5MCdPWzdKGXiXS1nWGDkim1JEv499vU3+f OWQQ== 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=yOIqGviWZhO01z6f4Sv8o5kl3X22AISn9xEuLWbs3M4=; b=BN4HyhgY3xg6N1esmHiHeB5fH4NMlAWLGwlgMdEnagIDT54osVZbZBVHkUGGkjbCbq miEFZOUPfhq+RxtpphwhlAHMlz97KHUd2nUUNa77OnYnHCY2DwZaSG1cdvXE9x2AhlF4 QejycVj/JSkvS6D7UEk/2lnxOufn2IPLH1pQ5J8/MlOq2FujebiGbgtV4jJ33T4OZbha 38Hk/d/4ZS/6RBkwF4octg6ThW96z7To44uPL8NvgLan5OJKirezPcVUttOV+Jr1YMPZ x+uwHluOtYiNsEu0TX3IKZwdT7pJm0KJ/ZGqqOUmUa+tL7K71zdsJrSbrX8cY1zJk/F+ v/JA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Y1YUn0Rt; 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 p5si2892253pgq.124.2017.12.14.05.13.09; Thu, 14 Dec 2017 05:13:09 -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=Y1YUn0Rt; 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 S1752632AbdLNNNF (ORCPT + 20 others); Thu, 14 Dec 2017 08:13:05 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:50713 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752585AbdLNNLX (ORCPT ); Thu, 14 Dec 2017 08:11:23 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBEDAja9004900; Thu, 14 Dec 2017 07:10:45 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513257045; bh=2Z+vq3ex9yhQTKMWSScT9yT5k+LhMY0GyOF0uaMCu2I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Y1YUn0RtkhxOBeGmlSJBykFuLonkU3V9pdLvaFBVUx4+yH/8tvr8Io4QGdrnnKNG2 wJDNRiGog8yrR8QmupNlNEu8Jfw2B2vbDRbIDRPM9mVc1lZvJE9TDOYOpCo5POv74H MmgUtSlHWa4Y292jDvkDm0mturSoBtljjiCC070g= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBEDAjX8014442; Thu, 14 Dec 2017 07:10:45 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Thu, 14 Dec 2017 07:10:44 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Thu, 14 Dec 2017 07:10:44 -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 vBED9wdX032017; Thu, 14 Dec 2017 07:10:41 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Rob Herring , Tony Lindgren , Adrian Hunter CC: Mark Rutland , Russell King , , , , , , , Subject: [PATCH 11/12] mmc: sdhci-omap: Add support for MMC/SD controller in k2g SoC Date: Thu, 14 Dec 2017 18:39:40 +0530 Message-ID: <20171214130941.26666-12-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171214130941.26666-1-kishon@ti.com> References: <20171214130941.26666-1-kishon@ti.com> MIME-Version: 1.0 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 Add support for the new compatible added specifically to support k2g's MMC/SD controller. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci-omap.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.11.0 diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index cddc3ad1331f..5e81e29383d9 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -767,6 +767,10 @@ static const struct sdhci_pltfm_data sdhci_omap_pdata = { .ops = &sdhci_omap_ops, }; +static const struct sdhci_omap_data k2g_data = { + .offset = 0x200, +}; + static const struct sdhci_omap_data dra7_data = { .offset = 0x200, .flags = SDHCI_OMAP_REQUIRE_IODELAY, @@ -774,6 +778,7 @@ static const struct sdhci_omap_data dra7_data = { static const struct of_device_id omap_sdhci_match[] = { { .compatible = "ti,dra7-sdhci", .data = &dra7_data }, + { .compatible = "ti,k2g-sdhci", .data = &k2g_data }, {}, }; MODULE_DEVICE_TABLE(of, omap_sdhci_match); @@ -882,6 +887,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) int ret; u32 offset; struct device *dev = &pdev->dev; + struct device_node *node = dev->of_node; struct sdhci_host *host; struct sdhci_pltfm_host *pltfm_host; struct sdhci_omap_host *omap_host; @@ -908,6 +914,9 @@ static int sdhci_omap_probe(struct platform_device *pdev) return PTR_ERR(host); } + if (of_device_is_compatible(node, "ti,k2g-sdhci")) + host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + pltfm_host = sdhci_priv(host); omap_host = sdhci_pltfm_priv(pltfm_host); omap_host->host = host;