diff for duplicates of <20140717142037.GA17494@ulmo> diff --git a/a/1.1.hdr b/a/1.1.hdr deleted file mode 100644 index 5a32186..0000000 --- a/a/1.1.hdr +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: text/plain; charset=us-ascii -Content-Disposition: inline -Content-Transfer-Encoding: quoted-printable diff --git a/a/1.2.hdr b/a/1.2.hdr deleted file mode 100644 index 5578f77..0000000 --- a/a/1.2.hdr +++ /dev/null @@ -1,3 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: inline; filename="0001-PCI-tegra-Preserve-DT-backwards-compatibility.patch" -Content-Transfer-Encoding: quoted-printable diff --git a/a/1.2.txt b/a/1.2.txt deleted file mode 100644 index e6b71a8..0000000 --- a/a/1.2.txt +++ /dev/null @@ -1,111 +0,0 @@ -From 569fd6029e77f6b3ea0dc23dfc0ef32239cf55c9 Mon Sep 17 00:00:00 2001 -From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> -Date: Thu, 17 Jul 2014 15:29:46 +0200 -Subject: [PATCH] PCI: tegra: Preserve DT backwards-compatibility - -Parse the set of power supplies in the deprecated version of the device -tree binding to remain backwards-compatible with old device trees. - -Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> ---- - drivers/pci/host/pci-tegra.c | 78 ++++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 76 insertions(+), 2 deletions(-) - -diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c -index 7df5aaf58921..d697587dbb7c 100644 ---- a/drivers/pci/host/pci-tegra.c -+++ b/drivers/pci/host/pci-tegra.c -@@ -1359,6 +1359,66 @@ static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes, - } - - /* -+ * Check whether a given set of supplies is available in a device tree node. -+ * This is used to check whether the new or the legacy device tree bindings -+ * should be used. -+ */ -+static bool of_regulator_bulk_available(struct device_node *np, -+ struct regulator_bulk_data *supplies, -+ unsigned int num_supplies) -+{ -+ char property[32]; -+ unsigned int i; -+ -+ for (i = 0; i < num_supplies; i++) { -+ snprintf(property, 32, "%s-supply", supplies[i].supply); -+ -+ if (of_find_property(np, property, NULL) == NULL) -+ return false; -+ } -+ -+ return true; -+} -+ -+/* -+ * Old versions of the device tree binding for this device used a set of power -+ * supplies that didn't match the hardware inputs. This happened to work for a -+ * number of cases but is not future proof. However to preserve backwards- -+ * compatibility with old device trees, this function will try to use the old -+ * set of supplies. -+ */ -+static int tegra_pcie_get_legacy_regulators(struct tegra_pcie *pcie) -+{ -+ struct device_node *np = pcie->dev->of_node; -+ -+ if (of_device_is_compatible(np, "nvidia,tegra30-pcie")) -+ pcie->num_supplies = 3; -+ else if (of_device_is_compatible(np, "nvidia,tegra20-pcie")) -+ pcie->num_supplies = 2; -+ -+ if (pcie->num_supplies == 0) { -+ dev_err(pcie->dev, "device %s not supported in legacy mode\n", -+ np->full_name); -+ return -ENODEV; -+ } -+ -+ pcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies, -+ sizeof(*pcie->supplies), -+ GFP_KERNEL); -+ if (!pcie->supplies) -+ return -ENOMEM; -+ -+ pcie->supplies[0].supply = "pex-clk"; -+ pcie->supplies[1].supply = "vdd"; -+ -+ if (pcie->num_supplies > 2) -+ pcie->supplies[2].supply = "avdd"; -+ -+ return devm_regulator_bulk_get(pcie->dev, pcie->num_supplies, -+ pcie->supplies); -+} -+ -+/* - * Obtains the list of regulators required for a particular generation of the - * IP block. - * -@@ -1422,8 +1482,22 @@ static int tegra_pcie_get_regulators(struct tegra_pcie *pcie, u32 lane_mask) - pcie->supplies[4].supply = "vddio-pex-clk"; - } - -- return devm_regulator_bulk_get(pcie->dev, pcie->num_supplies, -- pcie->supplies); -+ if (of_regulator_bulk_available(pcie->dev->of_node, pcie->supplies, -+ pcie->num_supplies)) -+ return devm_regulator_bulk_get(pcie->dev, pcie->num_supplies, -+ pcie->supplies); -+ -+ /* -+ * If not all regulators are available for this new scheme, assume -+ * that the device tree complies with an older version of the device -+ * tree binding. -+ */ -+ dev_info(pcie->dev, "using legacy DT binding for power supplies\n"); -+ -+ devm_kfree(pcie->dev, pcie->supplies); -+ pcie->num_supplies = 0; -+ -+ return tegra_pcie_get_legacy_regulators(pcie); - } - - static int tegra_pcie_parse_dt(struct tegra_pcie *pcie) --- -2.0.1 diff --git a/a/1.1.txt b/N1/1.txt similarity index 75% rename from a/1.1.txt rename to N1/1.txt index dce819a..a1d653b 100644 --- a/a/1.1.txt +++ b/N1/1.txt @@ -34,3 +34,17 @@ code (it's in fact new code in this case) for compatibility reasons, it ended up making the code look more mature. Thierry +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: 0001-PCI-tegra-Preserve-DT-backwards-compatibility.patch +Type: text/x-diff +Size: 3572 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/2f969e7c/attachment-0001.bin> +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: not available +Type: application/pgp-signature +Size: 819 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/2f969e7c/attachment-0001.sig> diff --git a/a/2.bin b/a/2.bin deleted file mode 100644 index c13666d..0000000 --- a/a/2.bin +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2 - -iQIcBAEBAgAGBQJTx9u1AAoJEN0jrNd/PrOhOIsQAJsI8GRwJdRYBR+9gLtBvAx0 -UlBUFsb7VC/r4q7dnNoNdxOCiSq0rp3W908ti4urAfqlckYMrFe3+aSfgFHD2F6i -/j1E/P1MD6LJSGpZ92sXiYl0U85ReAM5LJ7jKrnJRX+3IHE0x4k7A/4BgZQ8Ch4L -6dS9x/PUWc6MJ5mZfEFMX3/eecoB9wKH/h2xyHbFsMf9N25vsLzV/IkLkh3sNU7v -l8vcsEhsiZ9xqekSLLhbmT/uYK8caFeyTMceTD3pZQJFhHQ8rn0wEDUT+sK+9LSi -84JhDyBPBF6U/rI6TYYCEUHbWbTt1cAd9/xXmUxgAmoMd97n6RmYCIs14BseQTLV -WHunsECGgmtDK5RKi3KIjZnK2WnH6uOtQ2+rQVy7AO0b1BOyAJg8a24TctVMeyak -BjLM4RZvt7scu7u1TwcbzFa0uVjrZUsd6nmy4TQcGk2KQjhHpXBArYHfhI7u3bAA -a7KSoSca1fcmu2NWDJJ/0SajKvNMtJzTkIInmH3m7w7CSjaNjXjLkKjt1ZYnrfxT -VrD1KJDeRzXLv2Kwb8QfgEjqBZbe7su8b0H8QzjhTQKZJji3xuL7bqSRIKraZiK9 -FCRu4zz79/xCBrBG36F95FgPpciVjTp5xLcFv5L1lFHpce8sdJZVEx5DRr1SAE5B -OS4htHF8NDM5+ZQvlPRD -=5Jsx ------END PGP SIGNATURE----- diff --git a/a/2.hdr b/a/2.hdr deleted file mode 100644 index a09cc95..0000000 --- a/a/2.hdr +++ /dev/null @@ -1 +0,0 @@ -Content-Type: application/pgp-signature diff --git a/a/content_digest b/N1/content_digest index ba60e42..167434e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,16 +3,11 @@ "ref\020140707055211.GA15216@ulmo\0" "ref\0CAOesGMjwE=xThuUwmBF02YaQ32_uFogryW5anNoGc8yfkuN_Pg@mail.gmail.com\0" "ref\020140710101527.GC21583@ulmo\0" - "From\0Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>\0" - "Subject\0Re: [GIT PULL 1/3] ARM: tegra: rework PCIe regulators\0" + "From\0thierry.reding@gmail.com (Thierry Reding)\0" + "Subject\0[GIT PULL 1/3] ARM: tegra: rework PCIe regulators\0" "Date\0Thu, 17 Jul 2014 16:20:39 +0200\0" - "To\0Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>\0" - "Cc\0Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>" - arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org <arm-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> - linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org <linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org> - linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org <linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> - " Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>\0" - "\02:1.1\0" + "To\0linux-arm-kernel@lists.infradead.org\0" + "\00:1\0" "b\0" "On Thu, Jul 10, 2014 at 12:15:28PM +0200, Thierry Reding wrote:\n" "> On Mon, Jul 07, 2014 at 09:45:46PM -0700, Olof Johansson wrote:\n" @@ -49,139 +44,20 @@ "code (it's in fact new code in this case) for compatibility reasons, it\n" "ended up making the code look more mature.\n" "\n" - Thierry - "\02:1.2\0" - "fn\00001-PCI-tegra-Preserve-DT-backwards-compatibility.patch\0" - "b\0" - "From 569fd6029e77f6b3ea0dc23dfc0ef32239cf55c9 Mon Sep 17 00:00:00 2001\n" - "From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>\n" - "Date: Thu, 17 Jul 2014 15:29:46 +0200\n" - "Subject: [PATCH] PCI: tegra: Preserve DT backwards-compatibility\n" - "\n" - "Parse the set of power supplies in the deprecated version of the device\n" - "tree binding to remain backwards-compatible with old device trees.\n" - "\n" - "Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>\n" - "---\n" - " drivers/pci/host/pci-tegra.c | 78 ++++++++++++++++++++++++++++++++++++++++++--\n" - " 1 file changed, 76 insertions(+), 2 deletions(-)\n" - "\n" - "diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c\n" - "index 7df5aaf58921..d697587dbb7c 100644\n" - "--- a/drivers/pci/host/pci-tegra.c\n" - "+++ b/drivers/pci/host/pci-tegra.c\n" - "@@ -1359,6 +1359,66 @@ static int tegra_pcie_get_xbar_config(struct tegra_pcie *pcie, u32 lanes,\n" - " }\n" - " \n" - " /*\n" - "+ * Check whether a given set of supplies is available in a device tree node.\n" - "+ * This is used to check whether the new or the legacy device tree bindings\n" - "+ * should be used.\n" - "+ */\n" - "+static bool of_regulator_bulk_available(struct device_node *np,\n" - "+\t\t\t\t\tstruct regulator_bulk_data *supplies,\n" - "+\t\t\t\t\tunsigned int num_supplies)\n" - "+{\n" - "+\tchar property[32];\n" - "+\tunsigned int i;\n" - "+\n" - "+\tfor (i = 0; i < num_supplies; i++) {\n" - "+\t\tsnprintf(property, 32, \"%s-supply\", supplies[i].supply);\n" - "+\n" - "+\t\tif (of_find_property(np, property, NULL) == NULL)\n" - "+\t\t\treturn false;\n" - "+\t}\n" - "+\n" - "+\treturn true;\n" - "+}\n" - "+\n" - "+/*\n" - "+ * Old versions of the device tree binding for this device used a set of power\n" - "+ * supplies that didn't match the hardware inputs. This happened to work for a\n" - "+ * number of cases but is not future proof. However to preserve backwards-\n" - "+ * compatibility with old device trees, this function will try to use the old\n" - "+ * set of supplies.\n" - "+ */\n" - "+static int tegra_pcie_get_legacy_regulators(struct tegra_pcie *pcie)\n" - "+{\n" - "+\tstruct device_node *np = pcie->dev->of_node;\n" - "+\n" - "+\tif (of_device_is_compatible(np, \"nvidia,tegra30-pcie\"))\n" - "+\t\tpcie->num_supplies = 3;\n" - "+\telse if (of_device_is_compatible(np, \"nvidia,tegra20-pcie\"))\n" - "+\t\tpcie->num_supplies = 2;\n" - "+\n" - "+\tif (pcie->num_supplies == 0) {\n" - "+\t\tdev_err(pcie->dev, \"device %s not supported in legacy mode\\n\",\n" - "+\t\t\tnp->full_name);\n" - "+\t\treturn -ENODEV;\n" - "+\t}\n" - "+\n" - "+\tpcie->supplies = devm_kcalloc(pcie->dev, pcie->num_supplies,\n" - "+\t\t\t\t sizeof(*pcie->supplies),\n" - "+\t\t\t\t GFP_KERNEL);\n" - "+\tif (!pcie->supplies)\n" - "+\t\treturn -ENOMEM;\n" - "+\n" - "+\tpcie->supplies[0].supply = \"pex-clk\";\n" - "+\tpcie->supplies[1].supply = \"vdd\";\n" - "+\n" - "+\tif (pcie->num_supplies > 2)\n" - "+\t\tpcie->supplies[2].supply = \"avdd\";\n" - "+\n" - "+\treturn devm_regulator_bulk_get(pcie->dev, pcie->num_supplies,\n" - "+\t\t\t\t pcie->supplies);\n" - "+}\n" - "+\n" - "+/*\n" - " * Obtains the list of regulators required for a particular generation of the\n" - " * IP block.\n" - " *\n" - "@@ -1422,8 +1482,22 @@ static int tegra_pcie_get_regulators(struct tegra_pcie *pcie, u32 lane_mask)\n" - " \t\tpcie->supplies[4].supply = \"vddio-pex-clk\";\n" - " \t}\n" - " \n" - "-\treturn devm_regulator_bulk_get(pcie->dev, pcie->num_supplies,\n" - "-\t\t\t\t pcie->supplies);\n" - "+\tif (of_regulator_bulk_available(pcie->dev->of_node, pcie->supplies,\n" - "+\t\t\t\t\tpcie->num_supplies))\n" - "+\t\treturn devm_regulator_bulk_get(pcie->dev, pcie->num_supplies,\n" - "+\t\t\t\t\t pcie->supplies);\n" - "+\n" - "+\t/*\n" - "+\t * If not all regulators are available for this new scheme, assume\n" - "+\t * that the device tree complies with an older version of the device\n" - "+\t * tree binding.\n" - "+\t */\n" - "+\tdev_info(pcie->dev, \"using legacy DT binding for power supplies\\n\");\n" - "+\n" - "+\tdevm_kfree(pcie->dev, pcie->supplies);\n" - "+\tpcie->num_supplies = 0;\n" - "+\n" - "+\treturn tegra_pcie_get_legacy_regulators(pcie);\n" - " }\n" - " \n" - " static int tegra_pcie_parse_dt(struct tegra_pcie *pcie)\n" - "-- \n" - 2.0.1 - "\01:2\0" - "b\0" - "-----BEGIN PGP SIGNATURE-----\n" - "Version: GnuPG v2\n" - "\n" - "iQIcBAEBAgAGBQJTx9u1AAoJEN0jrNd/PrOhOIsQAJsI8GRwJdRYBR+9gLtBvAx0\n" - "UlBUFsb7VC/r4q7dnNoNdxOCiSq0rp3W908ti4urAfqlckYMrFe3+aSfgFHD2F6i\n" - "/j1E/P1MD6LJSGpZ92sXiYl0U85ReAM5LJ7jKrnJRX+3IHE0x4k7A/4BgZQ8Ch4L\n" - "6dS9x/PUWc6MJ5mZfEFMX3/eecoB9wKH/h2xyHbFsMf9N25vsLzV/IkLkh3sNU7v\n" - "l8vcsEhsiZ9xqekSLLhbmT/uYK8caFeyTMceTD3pZQJFhHQ8rn0wEDUT+sK+9LSi\n" - "84JhDyBPBF6U/rI6TYYCEUHbWbTt1cAd9/xXmUxgAmoMd97n6RmYCIs14BseQTLV\n" - "WHunsECGgmtDK5RKi3KIjZnK2WnH6uOtQ2+rQVy7AO0b1BOyAJg8a24TctVMeyak\n" - "BjLM4RZvt7scu7u1TwcbzFa0uVjrZUsd6nmy4TQcGk2KQjhHpXBArYHfhI7u3bAA\n" - "a7KSoSca1fcmu2NWDJJ/0SajKvNMtJzTkIInmH3m7w7CSjaNjXjLkKjt1ZYnrfxT\n" - "VrD1KJDeRzXLv2Kwb8QfgEjqBZbe7su8b0H8QzjhTQKZJji3xuL7bqSRIKraZiK9\n" - "FCRu4zz79/xCBrBG36F95FgPpciVjTp5xLcFv5L1lFHpce8sdJZVEx5DRr1SAE5B\n" - "OS4htHF8NDM5+ZQvlPRD\n" - "=5Jsx\n" - "-----END PGP SIGNATURE-----\n" + "Thierry\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: 0001-PCI-tegra-Preserve-DT-backwards-compatibility.patch\n" + "Type: text/x-diff\n" + "Size: 3572 bytes\n" + "Desc: not available\n" + "URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/2f969e7c/attachment-0001.bin>\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: not available\n" + "Type: application/pgp-signature\n" + "Size: 819 bytes\n" + "Desc: not available\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140717/2f969e7c/attachment-0001.sig> -9bfbb04a529546c22ed3e3ee824f464952905dc8c3f565eeccd54afb13f21939 +2c52eec478b05e60790edf0c1334df8e8588a4efc61ee90f8e89b09c2f206204
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.