From patchwork Mon Oct 15 16:05:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkatraman S X-Patchwork-Id: 1594541 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 194D53FD86 for ; Mon, 15 Oct 2012 16:05:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752772Ab2JOQFX (ORCPT ); Mon, 15 Oct 2012 12:05:23 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:54148 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752693Ab2JOQFW (ORCPT ); Mon, 15 Oct 2012 12:05:22 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9FG5I9G023018; Mon, 15 Oct 2012 11:05:18 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9FG5IB4015093; Mon, 15 Oct 2012 11:05:18 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Mon, 15 Oct 2012 11:05:18 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9FG5ICS001614; Mon, 15 Oct 2012 11:05:18 -0500 Received: from localhost (ltuba0393540.apr.dhcp.ti.com [172.24.136.231]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q9FG5Fw03004; Mon, 15 Oct 2012 11:05:16 -0500 (CDT) From: Venkatraman S To: , CC: , Daniel Mack , Venkatraman S , Grant Likely , Rob Herring Subject: [PATCH 2/4] MMC: omap_hsmmc: add DT property for max bus frequency Date: Mon, 15 Oct 2012 21:35:06 +0530 Message-ID: <1350317108-10657-2-git-send-email-svenkatr@ti.com> X-Mailer: git-send-email 1.7.11.1.25.g0e18bef In-Reply-To: <1350317108-10657-1-git-send-email-svenkatr@ti.com> References: <1350317108-10657-1-git-send-email-svenkatr@ti.com> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Daniel Mack Maximum bus frequency can be limited by external circuitry like level shifters etc. Allow passing this value from DT. Signed-off-by: Daniel Mack Cc: Venkatraman S Cc: Chris Ball Cc: Grant Likely Cc: Rob Herring Cc: linux-omap@vger.kernel.org Signed-off-by: Venkatraman S --- drivers/mmc/host/omap_hsmmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 01eeeae..a33ab74 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1674,7 +1674,7 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) { struct omap_mmc_platform_data *pdata; struct device_node *np = dev->of_node; - u32 bus_width; + u32 bus_width, max_freq; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) @@ -1701,6 +1701,9 @@ static struct omap_mmc_platform_data *of_get_hsmmc_pdata(struct device *dev) if (of_find_property(np, "ti,needs-special-reset", NULL)) pdata->slots[0].features |= HSMMC_HAS_UPDATED_RESET; + if (!of_property_read_u32(np, "max-frequency", &max_freq)) + pdata->max_freq = max_freq; + return pdata; } #else