{"id":816914,"url":"http://patchwork.ozlabs.org/api/patches/816914/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1506004213-22620-2-git-send-email-jjhiblot@ti.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1506004213-22620-2-git-send-email-jjhiblot@ti.com>","list_archive_url":null,"date":"2017-09-21T14:29:48","name":"[U-Boot,v2,01/26] mmc: dm: get the IO-line and main voltage regulators from the dts","commit_ref":"06ec045feeea08993834e2f1d2d1e4ec52cdeff1","pull_url":null,"state":"accepted","archived":false,"hash":"dce2b24b04b186194e9eab7947c30e2c4af44bbe","submitter":{"id":70508,"url":"http://patchwork.ozlabs.org/api/people/70508/?format=json","name":"Jean-Jacques Hiblot","email":"jjhiblot@ti.com"},"delegate":{"id":12423,"url":"http://patchwork.ozlabs.org/api/users/12423/?format=json","username":"Jaehoon","first_name":"Jaehoon","last_name":"Chung","email":"jh80.chung@samsung.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1506004213-22620-2-git-send-email-jjhiblot@ti.com/mbox/","series":[{"id":4400,"url":"http://patchwork.ozlabs.org/api/series/4400/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=4400","date":"2017-09-21T14:29:47","name":"mmc: Add support for HS200 and UHS modes","version":2,"mbox":"http://patchwork.ozlabs.org/series/4400/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/816914/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/816914/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"cmRIkIXS\";\n\tdkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyfW66yhXz9t3C\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 00:43:46 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 99674C2206E; Thu, 21 Sep 2017 14:37:31 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 6028BC22025;\n\tThu, 21 Sep 2017 14:33:46 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 325C7C21F7D; Thu, 21 Sep 2017 14:31:36 +0000 (UTC)","from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16])\n\tby lists.denx.de (Postfix) with ESMTPS id 68937C21ED3\n\tfor <u-boot@lists.denx.de>; Thu, 21 Sep 2017 14:31:30 +0000 (UTC)","from dflxv15.itg.ti.com ([128.247.5.124])\n\tby fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8LEUQOe032395; \n\tThu, 21 Sep 2017 09:30:26 -0500","from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35])\n\tby dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LEULWp028077;\n\tThu, 21 Sep 2017 09:30:21 -0500","from DLEE107.ent.ti.com (157.170.170.37) by DLEE105.ent.ti.com\n\t(157.170.170.35) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tThu, 21 Sep 2017 09:30:21 -0500","from dlep32.itg.ti.com (157.170.170.100) by DLEE107.ent.ti.com\n\t(157.170.170.37) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Thu, 21 Sep 2017 09:30:21 -0500","from localhost (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8LEUKxY030520;\n\tThu, 21 Sep 2017 09:30:20 -0500"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1506004226;\n\tbh=BBH4y6JDRVxYKjvoGAT0Z3SeOJJGuPJzrwAD7jNlQNo=;\n\th=From:To:CC:Subject:Date:In-Reply-To:References;\n\tb=cmRIkIXScFfoQ6DlThcP34Jq4lebQQBGrdnW3y4m+c3xj8c3ijX0tNTXiqH8UNhW3\n\tHdTBXhxMpQ1eCh82/7W8TJOC1M/BlVsqu5ZDN8iexk+1dwyzZAuZpzCjoNv46ElXhm\n\ty4b+uBv4VlFRCjN1F4ygF27dTOBZIZmLH9mylYQc=","From":"Jean-Jacques Hiblot <jjhiblot@ti.com>","To":"<jh80.chung@samsung.com>, <trini@konsulko.com>, <kishon@ti.com>,\n\t<sjg@chromium.org>","Date":"Thu, 21 Sep 2017 16:29:48 +0200","Message-ID":"<1506004213-22620-2-git-send-email-jjhiblot@ti.com>","X-Mailer":"git-send-email 1.9.1","In-Reply-To":"<1506004213-22620-1-git-send-email-jjhiblot@ti.com>","References":"<1506004213-22620-1-git-send-email-jjhiblot@ti.com>","MIME-Version":"1.0","X-EXCLAIMER-MD-CONFIG":"e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180","Cc":"u-boot@lists.denx.de","Subject":"[U-Boot] [PATCH v2 01/26] mmc: dm: get the IO-line and main voltage\n\tregulators from the dts","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Get a reference to the regulator devices from the dts and store them\nin the struct mmc for later use.\n\nSigned-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>\n---\n drivers/mmc/mmc.c | 24 ++++++++++++++----------\n include/mmc.h     |  4 ++++\n 2 files changed, 18 insertions(+), 10 deletions(-)","diff":"diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c\nindex 38d2e07..11285be 100644\n--- a/drivers/mmc/mmc.c\n+++ b/drivers/mmc/mmc.c\n@@ -1618,21 +1618,25 @@ __weak void board_mmc_power_init(void)\n static int mmc_power_init(struct mmc *mmc)\n {\n #if CONFIG_IS_ENABLED(DM_MMC)\n-#if defined(CONFIG_DM_REGULATOR) && !defined(CONFIG_SPL_BUILD)\n-\tstruct udevice *vmmc_supply;\n+#if CONFIG_IS_ENABLED(DM_REGULATOR)\n \tint ret;\n \n \tret = device_get_supply_regulator(mmc->dev, \"vmmc-supply\",\n-\t\t\t\t\t  &vmmc_supply);\n-\tif (ret) {\n+\t\t\t\t\t  &mmc->vmmc_supply);\n+\tif (ret)\n \t\tdebug(\"%s: No vmmc supply\\n\", mmc->dev->name);\n-\t\treturn 0;\n-\t}\n \n-\tret = regulator_set_enable(vmmc_supply, true);\n-\tif (ret) {\n-\t\tputs(\"Error enabling VMMC supply\\n\");\n-\t\treturn ret;\n+\tret = device_get_supply_regulator(mmc->dev, \"vqmmc-supply\",\n+\t\t\t\t\t  &mmc->vqmmc_supply);\n+\tif (ret)\n+\t\tdebug(\"%s: No vqmmc supply\\n\", mmc->dev->name);\n+\n+\tif (mmc->vmmc_supply) {\n+\t\tret = regulator_set_enable(mmc->vmmc_supply, true);\n+\t\tif (ret) {\n+\t\t\tputs(\"Error enabling VMMC supply\\n\");\n+\t\t\treturn ret;\n+\t\t}\n \t}\n #endif\n #else /* !CONFIG_DM_MMC */\ndiff --git a/include/mmc.h b/include/mmc.h\nindex 010ebe0..188dc74 100644\n--- a/include/mmc.h\n+++ b/include/mmc.h\n@@ -457,6 +457,10 @@ struct mmc {\n \tint ddr_mode;\n #if CONFIG_IS_ENABLED(DM_MMC)\n \tstruct udevice *dev;\t/* Device for this MMC controller */\n+#if CONFIG_IS_ENABLED(DM_REGULATOR)\n+\tstruct udevice *vmmc_supply;\t/* Main voltage regulator (Vcc)*/\n+\tstruct udevice *vqmmc_supply;\t/* IO voltage regulator (Vccq)*/\n+#endif\n #endif\n };\n \n","prefixes":["U-Boot","v2","01/26"]}