From patchwork Mon Jun 6 22:44:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: subhashj@codeaurora.org X-Patchwork-Id: 854722 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p56MiLJt013205 for ; Mon, 6 Jun 2011 22:44:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758454Ab1FFWoO (ORCPT ); Mon, 6 Jun 2011 18:44:14 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:50953 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758431Ab1FFWoL (ORCPT ); Mon, 6 Jun 2011 18:44:11 -0400 X-IronPort-AV: E=McAfee;i="5400,1158,6369"; a="95799388" Received: from pdmz-css-vrrp.qualcomm.com (HELO www.codeaurora.org) ([199.106.114.130]) by wolverine02.qualcomm.com with ESMTP; 06 Jun 2011 15:44:10 -0700 Received: from 192.168.218.1 (proxying for 10.46.233.133) (SquirrelMail authenticated user subhashj) by www.codeaurora.org with HTTP; Mon, 6 Jun 2011 15:44:10 -0700 (PDT) Message-ID: <1cf840ce9d2fa852cb8d4e0e1bf9b559.squirrel@www.codeaurora.org> Date: Mon, 6 Jun 2011 15:44:10 -0700 (PDT) Subject: UHS-I bus speed mode should be set last in UHS initialization From: "Subhash Jadavani" To: linux-mmc@vger.kernel.org User-Agent: SquirrelMail/1.4.17 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 06 Jun 2011 22:44:21 +0000 (UTC) Hi Chris, Arindam, mmc_sd_init_uhs_card function sets the driver type, current limit and bus speed mode on card as well as on host controller side. Currently bus speed mode is set by sending CMD6 to card and setting timing mode in host controller and then before initiating tuning sequence, it also tries to set current limit by sending CMD6 to card which fails on our host controller (due to data CRC or timeout errors) if bus speed mode is SDR50/SDR104 mode. So basically bus speed mode should be set only after current limit is set in the card and immediately after setting the bus speed mode, tuning sequence should be initiated. So following changes is needed. If it looks fine then I can send you this change in patch. Regards, Subhash diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 0da37eb..19634d5 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -610,13 +610,13 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card) if (err) goto out; - /* Set bus speed mode of the card */ - err = sd_set_bus_speed_mode(card, status); + /* Set current limit for the card */ + err = sd_set_current_limit(card, status); if (err) goto out; - /* Set current limit for the card */ - err = sd_set_current_limit(card, status); + /* Set bus speed mode of the card */ + err = sd_set_bus_speed_mode(card, status); if (err) goto out;