From patchwork Tue Apr 7 00:53:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 6166481 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B57439F1BE for ; Tue, 7 Apr 2015 00:53:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD6EC20272 for ; Tue, 7 Apr 2015 00:53:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90E9620173 for ; Tue, 7 Apr 2015 00:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751563AbbDGAxr (ORCPT ); Mon, 6 Apr 2015 20:53:47 -0400 Received: from mail-vn0-f53.google.com ([209.85.216.53]:41289 "EHLO mail-vn0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752770AbbDGAxr (ORCPT ); Mon, 6 Apr 2015 20:53:47 -0400 Received: by vnbg190 with SMTP id g190so3459145vnb.8 for ; Mon, 06 Apr 2015 17:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=PUTlqymIJD3z19/ckdb3Z09/USE1ay2gALN6gtrLvkE=; b=tzj6dAK3iYdm9aDrYBOUVAyAvsAZnAANe/W/Jv9lc7hD3pYnml8DtlORlD0lT9fp44 r/6KOih9QkleKmiLhZqxryKFh0mr0QQdy7SUUdhIji3GDxgsBjPp0CNobGu0+Wysb+PC D1rnc+jpE0yGCWxH0qu03+wGcE4btVjvfzE75+v282Bw5fWIFhH+s6vhkQB5I9Dihk5r HMfkmboObgwICDfhNfHFrfflZCKPdv+LktdZPQUqm+6fwTDU1aQOqYwuwFS7TONXyI/s wWlCKxx+HY5ivyDYKshvrazXYil04PXZyhAy/pLHhIAGI3uN3zSYo+delPjKCwyQHTGA gPMw== X-Received: by 10.170.138.134 with SMTP id f128mr3760129ykc.90.1428368026088; Mon, 06 Apr 2015 17:53:46 -0700 (PDT) Received: from localhost.localdomain ([177.194.99.89]) by mx.google.com with ESMTPSA id n47sm5138864yha.55.2015.04.06.17.53.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Apr 2015 17:53:45 -0700 (PDT) From: Fabio Estevam To: ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux@arm.linux.org.uk, kernel@pengutronix.de, otavio@ossystems.com.br, Fabio Estevam Subject: [PATCH v2] mmc: sdhci-esdhc-imx: Call mmc_pwrseq_alloc() Date: Mon, 6 Apr 2015 21:53:30 -0300 Message-Id: <1428368010-10094-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 From: Fabio Estevam Currently it is not possible to use 'mmc-pwrseq-simple' property with this driver because mmc_pwrseq_alloc() is never called. Call mmc_pwrseq_alloc so that we enable the support for providing a reset GPIO to the Wifi/BT chipset. Tested on a imx6sl-warp board: root@imx6sl-warp:~# hciattach /dev/ttymxc1 3wire Device setup complete root@imx6sl-warp:~# hciconfig hci0 up root@imx6sl-warp:~# hciconfig hci0: Type: BR/EDR Bus: UART BD Address: 2A:23:AA:6E:C7:A0 ACL MTU: 1021:8 SCO MTU: 64:1 UP RUNNING RX bytes:795 acl:0 sco:0 events:29 errors:0 TX bytes:613 acl:0 sco:0 commands:29 errors:0 Signed-off-by: Fabio Estevam --- Changes since v1: - Calling mmc_of_parse() breaks some boards due to bad card detect parsing. Call only mmc_pwrseq_alloc() instead, which what we really need. drivers/mmc/host/sdhci-esdhc-imx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 7ee8312..5bcabdc 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -31,6 +31,8 @@ #include "sdhci-pltfm.h" #include "sdhci-esdhc.h" +#include "../core/pwrseq.h" + #define ESDHC_CTRL_D3CD 0x08 /* VENDOR SPEC register */ #define ESDHC_VENDOR_SPEC 0xc0 @@ -1079,6 +1081,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev) host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; } + err = mmc_pwrseq_alloc(host->mmc); + if (err) + goto disable_clk; + err = sdhci_add_host(host); if (err) goto disable_clk;