diff for duplicates of <501AE074.8090906@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 5af8fd3..623fe18 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -20,13 +20,3 @@ Well spotted. Amended patch below. Thanks, Daniel - - - --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0001-net-davinci_mdio-prepare-and-unprepare-clocks.patch -Type: text/x-patch -Size: 2045 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120802/2fa5d4e5/attachment.bin> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..5cce0f2 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,5 @@ +Content-Type: text/x-patch; + name="0001-net-davinci_mdio-prepare-and-unprepare-clocks.patch" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename*0="0001-net-davinci_mdio-prepare-and-unprepare-clocks.patch" diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..8bd717c --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,76 @@ +>From 57670e52d19218f897d835d25223bf4b4932252f Mon Sep 17 00:00:00 2001 +From: Daniel Mack <zonque@gmail.com> +Date: Thu, 2 Aug 2012 21:24:36 +0200 +Subject: [PATCH] net: davinci_mdio: prepare and unprepare clocks + +Make the driver control the device clocks. Appearantly, the Davinci +platform probes this driver with the clock all powered up, but on OMAP, +this isn't the case. + +While at it, also check for IS_ERR(data->clk) in the bail_out: label of +.probe(). + +Signed-off-by: Daniel Mack <zonque@gmail.com> +--- + drivers/net/ethernet/ti/davinci_mdio.c | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c +index cd7ee20..462f81d 100644 +--- a/drivers/net/ethernet/ti/davinci_mdio.c ++++ b/drivers/net/ethernet/ti/davinci_mdio.c +@@ -332,6 +332,8 @@ static int __devinit davinci_mdio_probe(struct platform_device *pdev) + goto bail_out; + } + ++ clk_prepare(data->clk); ++ + dev_set_drvdata(dev, data); + data->dev = dev; + spin_lock_init(&data->lock); +@@ -379,8 +381,11 @@ bail_out: + if (data->bus) + mdiobus_free(data->bus); + +- if (data->clk) ++ if (data->clk && !IS_ERR(data->clk)) { ++ clk_unprepare(data->clk); + clk_put(data->clk); ++ } ++ + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); + +@@ -397,8 +402,11 @@ static int __devexit davinci_mdio_remove(struct platform_device *pdev) + if (data->bus) + mdiobus_free(data->bus); + +- if (data->clk) ++ if (data->clk) { ++ clk_unprepare(data->clk); + clk_put(data->clk); ++ } ++ + pm_runtime_put_sync(&pdev->dev); + pm_runtime_disable(&pdev->dev); + +@@ -427,6 +435,8 @@ static int davinci_mdio_suspend(struct device *dev) + data->suspended = true; + spin_unlock(&data->lock); + ++ clk_unprepare(data->clk); ++ + return 0; + } + +@@ -435,6 +445,8 @@ static int davinci_mdio_resume(struct device *dev) + struct davinci_mdio_data *data = dev_get_drvdata(dev); + u32 ctrl; + ++ clk_prepare(data->clk); ++ + spin_lock(&data->lock); + pm_runtime_put_sync(data->dev); + +-- +1.7.11.2 diff --git a/a/content_digest b/N1/content_digest index 5f4e65b..b5121be 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,10 +1,16 @@ "ref\01343936616-29318-1-git-send-email-zonque@gmail.com\0" "ref\020120802195308.GZ6802@n2100.arm.linux.org.uk\0" - "From\0zonque@gmail.com (Daniel Mack)\0" - "Subject\0[PATCH 1/2] net: davinci_mdio: enable and disable clock\0" + "From\0Daniel Mack <zonque@gmail.com>\0" + "Subject\0Re: [PATCH 1/2] net: davinci_mdio: enable and disable clock\0" "Date\0Thu, 02 Aug 2012 22:17:56 +0200\0" - "To\0linux-arm-kernel@lists.infradead.org\0" - "\00:1\0" + "To\0Russell King - ARM Linux <linux@arm.linux.org.uk>\0" + "Cc\0netdev@vger.kernel.org" + mugunthanvnm@ti.com + paul@pwsan.com + devicetree-discuss@lists.ozlabs.org + koen@dominion.thruhere.net + " linux-arm-kernel@lists.infradead.org\0" + "\01:1\0" "b\0" "On 02.08.2012 21:53, Russell King - ARM Linux wrote:\n" "> On Thu, Aug 02, 2012 at 09:43:35PM +0200, Daniel Mack wrote:\n" @@ -27,16 +33,85 @@ "\n" "\n" "Thanks,\n" - "Daniel\n" + Daniel + "\01:2\0" + "fn\00001-net-davinci_mdio-prepare-and-unprepare-clocks.patch\0" + "b\0" + ">From 57670e52d19218f897d835d25223bf4b4932252f Mon Sep 17 00:00:00 2001\n" + "From: Daniel Mack <zonque@gmail.com>\n" + "Date: Thu, 2 Aug 2012 21:24:36 +0200\n" + "Subject: [PATCH] net: davinci_mdio: prepare and unprepare clocks\n" + "\n" + "Make the driver control the device clocks. Appearantly, the Davinci\n" + "platform probes this driver with the clock all powered up, but on OMAP,\n" + "this isn't the case.\n" "\n" + "While at it, also check for IS_ERR(data->clk) in the bail_out: label of\n" + ".probe().\n" "\n" + "Signed-off-by: Daniel Mack <zonque@gmail.com>\n" + "---\n" + " drivers/net/ethernet/ti/davinci_mdio.c | 16 ++++++++++++++--\n" + " 1 file changed, 14 insertions(+), 2 deletions(-)\n" "\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0001-net-davinci_mdio-prepare-and-unprepare-clocks.patch\n" - "Type: text/x-patch\n" - "Size: 2045 bytes\n" - "Desc: not available\n" - URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120802/2fa5d4e5/attachment.bin> + "diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c\n" + "index cd7ee20..462f81d 100644\n" + "--- a/drivers/net/ethernet/ti/davinci_mdio.c\n" + "+++ b/drivers/net/ethernet/ti/davinci_mdio.c\n" + "@@ -332,6 +332,8 @@ static int __devinit davinci_mdio_probe(struct platform_device *pdev)\n" + " \t\tgoto bail_out;\n" + " \t}\n" + " \n" + "+\tclk_prepare(data->clk);\n" + "+\n" + " \tdev_set_drvdata(dev, data);\n" + " \tdata->dev = dev;\n" + " \tspin_lock_init(&data->lock);\n" + "@@ -379,8 +381,11 @@ bail_out:\n" + " \tif (data->bus)\n" + " \t\tmdiobus_free(data->bus);\n" + " \n" + "-\tif (data->clk)\n" + "+\tif (data->clk && !IS_ERR(data->clk)) {\n" + "+\t\tclk_unprepare(data->clk);\n" + " \t\tclk_put(data->clk);\n" + "+\t}\n" + "+\n" + " \tpm_runtime_put_sync(&pdev->dev);\n" + " \tpm_runtime_disable(&pdev->dev);\n" + " \n" + "@@ -397,8 +402,11 @@ static int __devexit davinci_mdio_remove(struct platform_device *pdev)\n" + " \tif (data->bus)\n" + " \t\tmdiobus_free(data->bus);\n" + " \n" + "-\tif (data->clk)\n" + "+\tif (data->clk) {\n" + "+\t\tclk_unprepare(data->clk);\n" + " \t\tclk_put(data->clk);\n" + "+\t}\n" + "+\n" + " \tpm_runtime_put_sync(&pdev->dev);\n" + " \tpm_runtime_disable(&pdev->dev);\n" + " \n" + "@@ -427,6 +435,8 @@ static int davinci_mdio_suspend(struct device *dev)\n" + " \tdata->suspended = true;\n" + " \tspin_unlock(&data->lock);\n" + " \n" + "+\tclk_unprepare(data->clk);\n" + "+\n" + " \treturn 0;\n" + " }\n" + " \n" + "@@ -435,6 +445,8 @@ static int davinci_mdio_resume(struct device *dev)\n" + " \tstruct davinci_mdio_data *data = dev_get_drvdata(dev);\n" + " \tu32 ctrl;\n" + " \n" + "+\tclk_prepare(data->clk);\n" + "+\n" + " \tspin_lock(&data->lock);\n" + " \tpm_runtime_put_sync(data->dev);\n" + " \n" + "-- \n" + 1.7.11.2 -9c83d036e08e01277fdc5c3db234ea25d32b2befaf75b5f7d2419edef6e7bd54 +b9f43f4b9f43c1d0b6511bf02466783d1c2c5986e364436f3772590dac106368
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.