* [PATCH 0/2] mmc: meson-gx: add device reset @ 2018-05-15 9:57 Jerome Brunet 2018-05-15 9:57 ` [PATCH 1/2] dt-bindings: mmc: meson-gx: add reset Jerome Brunet ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Jerome Brunet @ 2018-05-15 9:57 UTC (permalink / raw) To: Ulf Hansson, Carlo Caione, Kevin Hilman Cc: Jerome Brunet, devicetree, linux-amlogic, linux-mmc, linux-kernel This patchset adds the optional reset of the meson-gx mmc controller and the related documentation. Changes since v1: [0] * Correct typo in the documentation * Separate code and documentation patches * Error on reset failure. [0]: https://lkml.kernel.org/r/20180426103817.12675-1-jbrunet@baylibre.com Jerome Brunet (2): dt-bindings: mmc: meson-gx: add reset mmc: meson-gx: add device reset Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt | 2 ++ drivers/mmc/host/meson-gx-mmc.c | 9 +++++++++ 2 files changed, 11 insertions(+) -- 2.14.3 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] dt-bindings: mmc: meson-gx: add reset 2018-05-15 9:57 [PATCH 0/2] mmc: meson-gx: add device reset Jerome Brunet @ 2018-05-15 9:57 ` Jerome Brunet 2018-05-15 9:57 ` [PATCH 2/2] mmc: meson-gx: add device reset Jerome Brunet 2018-05-21 11:36 ` [PATCH 0/2] " Ulf Hansson 2 siblings, 0 replies; 6+ messages in thread From: Jerome Brunet @ 2018-05-15 9:57 UTC (permalink / raw) To: Ulf Hansson, Carlo Caione, Kevin Hilman, Rob Herring, Mark Rutland Cc: Jerome Brunet, devicetree, linux-amlogic, linux-mmc, linux-kernel Add the reset to the documentation of the meson-gx mmc controller bindings. Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt | 2 ++ 1 file changed, 2 insertions(+) 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>; }; -- 2.14.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] mmc: meson-gx: add device reset 2018-05-15 9:57 [PATCH 0/2] mmc: meson-gx: add device reset Jerome Brunet 2018-05-15 9:57 ` [PATCH 1/2] dt-bindings: mmc: meson-gx: add reset Jerome Brunet @ 2018-05-15 9:57 ` Jerome Brunet 2018-05-30 7:27 ` Ulf Hansson 2018-05-21 11:36 ` [PATCH 0/2] " Ulf Hansson 2 siblings, 1 reply; 6+ messages in thread From: Jerome Brunet @ 2018-05-15 9:57 UTC (permalink / raw) To: Ulf Hansson, Carlo Caione, Kevin Hilman Cc: Jerome Brunet, devicetree, linux-amlogic, linux-mmc, linux-kernel 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 <khilman@baylibre.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- drivers/mmc/host/meson-gx-mmc.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 <linux/clk.h> #include <linux/clk-provider.h> #include <linux/regulator/consumer.h> +#include <linux/reset.h> #include <linux/interrupt.h> #include <linux/bitfield.h> #include <linux/pinctrl/consumer.h> @@ -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)) { -- 2.14.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mmc: meson-gx: add device reset 2018-05-15 9:57 ` [PATCH 2/2] mmc: meson-gx: add device reset Jerome Brunet @ 2018-05-30 7:27 ` Ulf Hansson 2018-05-30 9:47 ` Jerome Brunet 0 siblings, 1 reply; 6+ messages in thread From: Ulf Hansson @ 2018-05-30 7:27 UTC (permalink / raw) To: Jerome Brunet Cc: Carlo Caione, Kevin Hilman, devicetree, open list:ARM/Amlogic Meson..., linux-mmc@vger.kernel.org, Linux Kernel Mailing List Jerome, On 15 May 2018 at 11:57, Jerome Brunet <jbrunet@baylibre.com> wrote: > 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 <khilman@baylibre.com> > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> I got a regression boot report from kernelci. The bisect doesn't point to a certain commit, but I found $subject patch a possible cause. Is it something you can have a look at and see if it's a valid problem? https://kernelci.org/boot/id/5b0d68a859b514726179a899/ Kind regards Uffe > --- > drivers/mmc/host/meson-gx-mmc.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > 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 <linux/clk.h> > #include <linux/clk-provider.h> > #include <linux/regulator/consumer.h> > +#include <linux/reset.h> > #include <linux/interrupt.h> > #include <linux/bitfield.h> > #include <linux/pinctrl/consumer.h> > @@ -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)) { > -- > 2.14.3 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] mmc: meson-gx: add device reset 2018-05-30 7:27 ` Ulf Hansson @ 2018-05-30 9:47 ` Jerome Brunet 0 siblings, 0 replies; 6+ messages in thread From: Jerome Brunet @ 2018-05-30 9:47 UTC (permalink / raw) To: Ulf Hansson Cc: Carlo Caione, Kevin Hilman, devicetree, open list:ARM/Amlogic Meson..., linux-mmc@vger.kernel.org, Linux Kernel Mailing List, Corentin Labbe On Wed, 2018-05-30 at 09:27 +0200, Ulf Hansson wrote: > Jerome, > > On 15 May 2018 at 11:57, Jerome Brunet <jbrunet@baylibre.com> wrote: > > 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 <khilman@baylibre.com> > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> > > I got a regression boot report from kernelci. The bisect doesn't point > to a certain commit, but I found $subject patch a possible cause. Is > it something you can have a look at and see if it's a valid problem? > https://kernelci.org/boot/id/5b0d68a859b514726179a899/ Hi Ulf, Looking at the log, there is an "un-explained" power reset in the middle of the boot sequence. With the maintainer of this lab, we have been over the logs of this board and we have seen several other power reset at different stages. There is no trace, error or warning, the board just resets. A few other boards show the same issue in this lab ATM. There has been some work done in this lab lately and we suspect a problem with the relays controlling the power supplies. We have taken this board offline until the problem is solved. Thanks for reporting the problem. Regards Jerome > > Kind regards > Uffe > > > --- > > drivers/mmc/host/meson-gx-mmc.c | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > 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 <linux/clk.h> > > #include <linux/clk-provider.h> > > #include <linux/regulator/consumer.h> > > +#include <linux/reset.h> > > #include <linux/interrupt.h> > > #include <linux/bitfield.h> > > #include <linux/pinctrl/consumer.h> > > @@ -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)) { > > -- > > 2.14.3 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] mmc: meson-gx: add device reset 2018-05-15 9:57 [PATCH 0/2] mmc: meson-gx: add device reset Jerome Brunet 2018-05-15 9:57 ` [PATCH 1/2] dt-bindings: mmc: meson-gx: add reset Jerome Brunet 2018-05-15 9:57 ` [PATCH 2/2] mmc: meson-gx: add device reset Jerome Brunet @ 2018-05-21 11:36 ` Ulf Hansson 2 siblings, 0 replies; 6+ messages in thread From: Ulf Hansson @ 2018-05-21 11:36 UTC (permalink / raw) To: Jerome Brunet Cc: Carlo Caione, Kevin Hilman, devicetree, open list:ARM/Amlogic Meson..., linux-mmc@vger.kernel.org, Linux Kernel Mailing List On 15 May 2018 at 11:57, Jerome Brunet <jbrunet@baylibre.com> wrote: > This patchset adds the optional reset of the meson-gx mmc controller and > the related documentation. > > Changes since v1: [0] > * Correct typo in the documentation > * Separate code and documentation patches > * Error on reset failure. > > [0]: https://lkml.kernel.org/r/20180426103817.12675-1-jbrunet@baylibre.com > > Jerome Brunet (2): > dt-bindings: mmc: meson-gx: add reset > mmc: meson-gx: add device reset > > Documentation/devicetree/bindings/mmc/amlogic,meson-gx.txt | 2 ++ > drivers/mmc/host/meson-gx-mmc.c | 9 +++++++++ > 2 files changed, 11 insertions(+) > > -- > 2.14.3 > Thanks, applied for next! Kind regards Uffe ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-05-30 9:47 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-05-15 9:57 [PATCH 0/2] mmc: meson-gx: add device reset Jerome Brunet 2018-05-15 9:57 ` [PATCH 1/2] dt-bindings: mmc: meson-gx: add reset Jerome Brunet 2018-05-15 9:57 ` [PATCH 2/2] mmc: meson-gx: add device reset Jerome Brunet 2018-05-30 7:27 ` Ulf Hansson 2018-05-30 9:47 ` Jerome Brunet 2018-05-21 11:36 ` [PATCH 0/2] " Ulf Hansson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).