From patchwork Tue May 15 09:57:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 135863 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp782252lji; Tue, 15 May 2018 02:58:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqXN/GfsyhW1sz5Mf3hSYzG2lc40sHp9Pia1GDgATMSbO2aQ6YabgnviilultVAr6+NCTWk X-Received: by 2002:a65:5041:: with SMTP id k1-v6mr7981402pgo.142.1526378288643; Tue, 15 May 2018 02:58:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526378288; cv=none; d=google.com; s=arc-20160816; b=GEqHjgCb22WLDS5u+DPgKUVyKeFGLinXNx/JplV9zF/HbOa7WFZh2ZZf5v7wbdfRY3 sgI0S2RlW3eAm0hxvQG5YvzaufHAaLPQTJ6z6tm3aReqLpXPRa6E363SgsdpPWuoW1z0 zTpKhOd0QYJx/5xcP/MiRpZbcuMcujI8mSkZgkTERTEOBO5clLYtqBY7BzngbuhkNeWz ZFqdZn9Q5KadpDAb8ZVzacIjp/vodvFlCLz2O6AFhC+InPYOqY8T2lGCVsC6BfMV9yNC xmyYz8/fVdUx5YylNdzBtLfXBNkUc6IaNSfCo08u5AzathLvz8sqO6MigcbIcQK26w+R JzlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Hugn3UQj6gjGgjJ8GhibfwKjZ7qgvy5nrT1Rolk16N4=; b=VHoOsRK3Y/qunhsJWaNvc4Mry7HrkOXqXVXPgDQ3KxwAvX9UxGypBUEZQoyC869QZ1 uNQ0sFHiWlvGgIKrQuz0iLO4azND29PXxnrAG3HXcQWvuOyUlRDeYIcoKnK84azH4y/9 kydhaPXXWzJJC8aY4M7oPvP/HnpILNEQAJ/R/GArX4cgWg9NwVY+e+FNnYTpoJ5Y7pfb ZrI1LGUJRo3OsULPyPPyUB2Gez5q6FQdKoGrueZhzXYaSh9ywtjbxRGrNxHNqN65+QPw H9YcoLZgrSW/D1zlZZdEtQwz3Uy+tgQg+4J4nQ7U96vJGvaDgA/OWM4m+wQXqocGXdBY CGiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=qU+xDz1g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay9-v6si11273495plb.259.2018.05.15.02.58.08; Tue, 15 May 2018 02:58:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=qU+xDz1g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729AbeEOJ6E (ORCPT + 29 others); Tue, 15 May 2018 05:58:04 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:37684 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752730AbeEOJ6B (ORCPT ); Tue, 15 May 2018 05:58:01 -0400 Received: by mail-wr0-f194.google.com with SMTP id h5-v6so15318119wrm.4 for ; Tue, 15 May 2018 02:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Hugn3UQj6gjGgjJ8GhibfwKjZ7qgvy5nrT1Rolk16N4=; b=qU+xDz1gz0QbcQTplp2oz+PgT3yEvemg9vZraHcDz4/CPTM2pez24hhqDAkWX1DIX2 c8RLry4oNwy8rqC8zrbEqPFP760MUYOl1WIaJOZaVt33vXb7CYTidB2u6AdrGZu/XwAS MG8dMcWQDcHIRqySo/VSs9gSsVejO1Y5nhCb5l6T8+HTnBaH9usL03gtNjVv8bcMitOj 44ji4CPrtuYm5SPOvFSmgJG5VVhas0vaL2jsRuJXM2RtqixV6cEbPZ51FH8VUXCxAlg6 BSTIF2coSeYYg16PuLgmAVs2KXeSDh3GJ5xx6ipzXYfJQOAk7QkkJH4JlrDkTLhlNUxw zpMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Hugn3UQj6gjGgjJ8GhibfwKjZ7qgvy5nrT1Rolk16N4=; b=gcXNHVI8XmlTRi2reoagDULfzWqrc8M+rYZ+SPWkVuIO5nc4DlqkOm3TW6YF67y6RX DkCF6pILEWZslKr9hUBsuF38mIXHpSL4/6xyzuib/b5u47EKg1Vxi6AK9ZU1ff4xfIS+ Et6EOxmI8cS95PynQsJjoQD6CB+pp2/r+DQViMy6okLH1YRuseREexq0Zf+Tx5pNC0QY Z+qMjFtd/JtrnNcAMoRyyfiXDXcJSU1MHdQGr6XC75laDQvJP+KWx+MMPcedL33+TOR3 xzkO9ls9nBd+WI1lZdf6hDWC4TM0RE8Kf+GZ+q1bp2xo+jSR0EGj3Kjn8cR/ZRs1UZbi SAIQ== X-Gm-Message-State: ALKqPwd+2sxzatMZ6bxEW3lVPG3iX1SV0qjru7SIelJqf32kEcJDE1W3 Ed1kooMf1HgEcBH8xCzuSVNpYg== X-Received: by 2002:adf:a9aa:: with SMTP id b39-v6mr10227654wrd.36.1526378280172; Tue, 15 May 2018 02:58:00 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 75-v6sm17253263wmw.37.2018.05.15.02.57.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 02:57:59 -0700 (PDT) From: Jerome Brunet To: Ulf Hansson , Carlo Caione , Kevin Hilman , Rob Herring , Mark Rutland Cc: Jerome Brunet , devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] dt-bindings: mmc: meson-gx: add reset Date: Tue, 15 May 2018 11:57:47 +0200 Message-Id: <20180515095748.6794-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180515095748.6794-1-jbrunet@baylibre.com> References: <20180515095748.6794-1-jbrunet@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the reset to the documentation of the meson-gx mmc controller bindings. Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet --- Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt | 2 ++ 1 file changed, 2 insertions(+) -- 2.14.3 diff --git a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt index 50bf611a4d2c..2d54a08487f5 100644 --- a/Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt +++ b/Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt @@ -19,6 +19,7 @@ Required properties: "clkin1" - Other parent clock of internal mux The driver has an internal mux clock which switches between clkin0 and clkin1 depending on the clock rate requested by the MMC core. +- resets : phandle of the internal reset line Example: @@ -29,4 +30,5 @@ Example: clocks = <&clkc CLKID_SD_EMMC_A>, <&xtal>, <&clkc CLKID_FCLK_DIV2>; clock-names = "core", "clkin0", "clkin1"; pinctrl-0 = <&emmc_pins>; + resets = <&reset RESET_SD_EMMC_A>; }; From patchwork Tue May 15 09:57:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 135864 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp782288lji; Tue, 15 May 2018 02:58:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq4s2KBOk+QFVhd4qdYEpUL+/mgXnfpZ2XKdqIRDeuLrsrfYBD1JFYrM7gAGjal0MibZv4H X-Received: by 2002:a65:639a:: with SMTP id h26-v6mr11307671pgv.290.1526378291523; Tue, 15 May 2018 02:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526378291; cv=none; d=google.com; s=arc-20160816; b=gkXJwZAKxHM7KCWPgBwBUwU4/vc6/Pl84NkLRRqZyiABAsLDSna4kekn3GCnhK4djM 9X3yYYMXGti05nslCFwrgw577mHV/+7Pztcn7xRvQW/AqYBZkHQlYx9O2ZAF04mW6CH8 u26AFGhPVODv4gzQ4mVrg/vXYnXKhGI48UpJZft19WacqIWpp5dmPQNm0iXfxVx3gvxZ yNidacKpwrfibjtSWigffIZMhrgM5iiAHx05bqA9xNa240jrqUk6hTb07WA/TtSES4pB /dST0GJBeyYUuz6tJFjL6bsuKiUoXgID74bv8cb8wUJYgwb6VX2XxuhRIqHdxNyFoKQt DJaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=tl/9E1K1OryN0PETVZ1inEtz97OJCjMyjmQFpnztezQ=; b=QJK60AMa5fKDIEonqnBz1loL1vwZ9oA4bsSzCRu5e+LGgXDLT57DVRJor5Da5dh8rK uEvYV64zwI3XEa3DAWtmHDBIDFFjFsIM0ZB2T2SNAdTydfNvpxh//Dy0LUArmQPk168g mq/S4ArPwqm6Tv37Zsy6mbAETczYAJktJwxL9bZ4en17udSzLPAPF+XvRMD1Hgw/7FRB C5NnEwWybEUDqWuo/JclCUiz9OubDvMut6q2v9eo4l8kijhVgS5UCtlkk+5eJH4paZ70 rdHVZmfcm56Td/jonHOuFY/7LMHEI+KwiDGuMlFpHzbueIPO2qSUCtTDUTxhk38QvjdV TfcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=gLaK9UzC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ay9-v6si11273495plb.259.2018.05.15.02.58.11; Tue, 15 May 2018 02:58:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=gLaK9UzC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752767AbeEOJ6I (ORCPT + 29 others); Tue, 15 May 2018 05:58:08 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:38091 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752744AbeEOJ6E (ORCPT ); Tue, 15 May 2018 05:58:04 -0400 Received: by mail-wr0-f194.google.com with SMTP id 94-v6so15324635wrf.5 for ; Tue, 15 May 2018 02:58:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tl/9E1K1OryN0PETVZ1inEtz97OJCjMyjmQFpnztezQ=; b=gLaK9UzCSXl8xeoYWpV2UzaIvHo+qgXDTWNPJPFygsVtrjN6zZL8fLK3ac4NUCjvck 0QmIQFEqX0co8xZCh+yjbNsCvb/bLF/F8TVO/HqeQYSMYJQtXRZ2Gai24zXZkp8atPWu e74JNmPbEEes4rFrMDvmZxeu1oYFtW+jiglgPwev5o/lyWvz0Nid/LaWWT7DGISax02f My5Fmag5Yv3CT8Z0Ch3WU4gJt7aoXASBHiPPV/G3KEy5c2zJCEmKSOOtRxy/+325vaxM bfBkOkwgJpNMSey3iz4y/LkXMBYZT4E6W5jYi/9lZTRovylgokCJYaR9VYKiqpRxBEa8 rV0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tl/9E1K1OryN0PETVZ1inEtz97OJCjMyjmQFpnztezQ=; b=Y5jiMwcqfIupSVGnFnh9AcpAsy4t2wc1YcMQYQs4okVUOtWIS+o0EO3igD7+yA/FLG xxbBAMdbVOkcA0lT9DcvC59zVqAYJh2wnEZQTOF65aCWam4/UXDTjeqjZroK7CsqtqRV tVGmwGNRdb1yhCIprEM688esDPl25RvFeyhru1ZQqLG5KbL7ioUaI/EfKps/I/tzva2i cmo2RRHXqcDBruuCTtoszW2kNtY90MnUt4+uVsDjcW7jlUCtEV0Gm6/9ulCsL5juJgbX DQi3my716HZcu2FbgcTg7z9fgvn+9zxTzBIpYIfjiWdK/E/WFJ8rQjwJspjQHF/V4PRg lDHw== X-Gm-Message-State: ALKqPweId/mgFhz7lX73EwAhTUaEe8SN7u0nFG1m+oQPlJC6/b1R7qCB Kv6NDKR0KOlb+T3nXvUdlkMNwA== X-Received: by 2002:adf:c88c:: with SMTP id k12-v6mr10518523wrh.6.1526378283394; Tue, 15 May 2018 02:58:03 -0700 (PDT) Received: from boomer.baylibre.local ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 75-v6sm17253263wmw.37.2018.05.15.02.58.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 02:58:02 -0700 (PDT) From: Jerome Brunet To: Ulf Hansson , Carlo Caione , Kevin Hilman Cc: Jerome Brunet , devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] mmc: meson-gx: add device reset Date: Tue, 15 May 2018 11:57:48 +0200 Message-Id: <20180515095748.6794-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180515095748.6794-1-jbrunet@baylibre.com> References: <20180515095748.6794-1-jbrunet@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Trigger the reset line of the mmc controller while probing, if available. The reset should be optional for now, at least until all related DT nodes have the reset property. Reviewed-by: Kevin Hilman Signed-off-by: Jerome Brunet --- drivers/mmc/host/meson-gx-mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.14.3 diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 4f972b879fe6..9bca359f7936 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -1184,6 +1185,14 @@ static int meson_mmc_probe(struct platform_device *pdev) goto free_host; } + ret = device_reset_optional(&pdev->dev); + if (ret) { + if (ret != -EPROBE_DEFER) + dev_err(&pdev->dev, "device reset failed: %d\n", ret); + + return ret; + } + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); host->regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(host->regs)) {