From patchwork Tue Apr 26 23:46:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 8949371 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 804CEBF29F for ; Tue, 26 Apr 2016 23:46:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A8C44200FE for ; Tue, 26 Apr 2016 23:46:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9DB020121 for ; Tue, 26 Apr 2016 23:46:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754798AbcDZXql (ORCPT ); Tue, 26 Apr 2016 19:46:41 -0400 Received: from muru.com ([72.249.23.125]:52325 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754844AbcDZXqi (ORCPT ); Tue, 26 Apr 2016 19:46:38 -0400 Received: from sampyla.monkeybrains.net (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id D04E582DC; Tue, 26 Apr 2016 23:48:01 +0000 (UTC) From: Tony Lindgren To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Aaro Koskinen , Ivaylo Dimitrov , Sebastian Reichel , Pavel Machel , Timo Kokkonen , Ulf Hansson , Kishon Vijay Abraham I , linux-mmc@vger.kernel.org Subject: [PATCH 2/2] mmc: omap_hsmmc: Check if MMC slot name is passed in pdata Date: Tue, 26 Apr 2016 16:46:23 -0700 Message-Id: <1461714383-9956-3-git-send-email-tony@atomide.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1461714383-9956-1-git-send-email-tony@atomide.com> References: <1461714383-9956-1-git-send-email-tony@atomide.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The legacy user space for n900 relies on the MMC slot names. Let's check if those are passed in pdata and use them. Then when we have a generic MMC slot name binding we can switch to use that assuming it works for the n900 legacy user space too. As this makes the DT booting compatible with legacy booting, we should be able to start dropping omap3 legacy booting support in v4.8. Cc: Ulf Hansson Cc: Kishon Vijay Abraham I Cc: linux-mmc@vger.kernel.org Signed-off-by: Tony Lindgren --- Ulf, this is safe to pick separately to the MMC tree if it looks acceptable to you. drivers/mmc/host/omap_hsmmc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e9d75c6..3563321 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1946,13 +1946,17 @@ MODULE_DEVICE_TABLE(of, omap_mmc_of_match); static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata(struct device *dev) { - struct omap_hsmmc_platform_data *pdata; + struct omap_hsmmc_platform_data *pdata, *legacy; struct device_node *np = dev->of_node; pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return ERR_PTR(-ENOMEM); /* out of memory */ + legacy = dev_get_platdata(dev); + if (legacy && legacy->name) + pdata->name = legacy->name; + if (of_find_property(np, "ti,dual-volt", NULL)) pdata->controller_flags |= OMAP_HSMMC_SUPPORTS_DUAL_VOLT;