From patchwork Wed Feb 18 19:15:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 5847401 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 B26ECBF440 for ; Wed, 18 Feb 2015 19:15:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D94D6201FA for ; Wed, 18 Feb 2015 19:15:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DA82D20120 for ; Wed, 18 Feb 2015 19:15:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752179AbbBRTPR (ORCPT ); Wed, 18 Feb 2015 14:15:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53789 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752120AbbBRTPQ (ORCPT ); Wed, 18 Feb 2015 14:15:16 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1IJFD3N002069 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 18 Feb 2015 14:15:13 -0500 Received: from shalem.localdomain (vpn1-7-131.ams2.redhat.com [10.36.7.131]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1IJFBch031678 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 18 Feb 2015 14:15:12 -0500 Message-ID: <54E4E4BF.3090507@redhat.com> Date: Wed, 18 Feb 2015 20:15:11 +0100 From: Hans de Goede User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ulf Hansson , Chris Ball , linux-mmc Subject: Help needed: Enabling HPI causes some eMMC devices to stop working X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Hi, As part of the Linux Allwinner SoC support work I do in my spare time, I'm working on getting stock Linux running on the Utoo P66 Allwinner A13 based tablet. This tablet is interesting because it uses an eMMC rather then raw nand as is typically seen on Allwinner tablets. It has taken me a while to get the kernel to talk to the eMMC, in the end the following hack does the trick: From: Hans de Goede Date: Wed, 18 Feb 2015 20:04:03 +0100 Subject: [PATCH] mmc: HACK: disable HPI HACK: trying to enable HPI breaks EMMC access on the Utoo P66 tablet I'm trying to get supported, so disable it. FIXME: come up with a proper fix. Signed-off-by: Hans de Goede --- drivers/mmc/core/mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) This patch has one good thing going for it, which it is that it makes the eMMC work, without this talking to the eMMC fails as soon as the kernel tries to read the partition table, with response-timeout errors when doing a mmc command 18 to read sector 0. So this is as far as I've come, and beyond this my mmc knowledge is simply not good enough. Could this be a controller specific problem ? IOW do we need a controller flag to not enable HPi, like we've MMC_CAP2_BOOTPART_NOACC ? Or is this likely more something specific to the eMMC used. Assuming for now it is something specific to the eMMC used, how do we fix this? Is there maybe some way to figure out that enabling HPI is not a good idea on this eMMC? Or do we need a quirk for this in devicetree? Now a days we can tie info to an sdio slave device in devicetree, so that is an option too. Thanks & Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 1d41e85..b343587 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1418,7 +1418,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, /* * Enable HPI feature (if supported) */ - if (card->ext_csd.hpi) { + if (0 && card->ext_csd.hpi) { err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HPI_MGMT, 1, card->ext_csd.generic_cmd6_time);