diff for duplicates of <87sk19eneu.fsf@deeprootsystems.com> diff --git a/a/1.txt b/N1/1.txt index 745bd7a..7629368 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -5,7 +5,7 @@ Linus Walleij <linus.walleij@stericsson.com> writes: > 2010/9/15 Kevin Hilman <khilman@deeprootsystems.com>: > >> OMAP SOCs have a standard set of tuples consisting of frequency and ->> voltage pairs that the device will support per voltage domain. These +>> voltage pairs that the device will support per voltage domain. ?These >> are called Operating Performance Points or OPPs. >> (...) >> This introduces a common handling OPP mechanism accross all OMAPs. @@ -46,144 +46,3 @@ Nishanth, can take my hack below and continue this evolution? As I demonstrate with this hack, this won't really change anything for us. Kevin - -From 96c4e27ba0cb3d9a056693340c6221bc093bce2c Mon Sep 17 00:00:00 2001 -From: Kevin Hilman <khilman@deeprootsystems.com> -Date: Thu, 16 Sep 2010 07:58:16 -0700 -Subject: [PATCH] OPP: remove OMAP specifics to make more generic - -Internal OPP management is based on 'struct device *', so -we don't need to have omap_hwmod specific knowledge in this layer. - -Change opp_add() to take a 'struct device *' instead of using -the OMAP hwmod in the opp_def to lookup the struct device. - -Move OMAP-specific hwmod lookups into the OMAP specific layer -which adds OPPs to the database. - -Quickly tested on OMAP3 to see that all OPPs are still registered -correctly with CPUfreq - ---- - arch/arm/mach-omap2/opp3xxx_data.c | 18 +++++++++++++++++- - arch/arm/plat-omap/include/plat/opp.h | 2 +- - arch/arm/plat-omap/opp.c | 24 ++---------------------- - 3 files changed, 20 insertions(+), 24 deletions(-) - -diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c -index e337aeb..f3f9ae4 100644 ---- a/arch/arm/mach-omap2/opp3xxx_data.c -+++ b/arch/arm/mach-omap2/opp3xxx_data.c -@@ -23,6 +23,7 @@ - - #include <plat/opp.h> - #include <plat/cpu.h> -+#include <plat/omap_device.h> - - static struct omap_opp_def __initdata omap34xx_opp_def_list[] = { - /* MPU OPP1 */ -@@ -114,7 +115,22 @@ int __init omap3_pm_init_opp_table(void) - - opp_def = omap3_opp_def_list; - for (i = 0; i < omap3_opp_def_size; i++) { -- r = opp_add(opp_def++); -+ struct omap_hwmod *oh; -+ struct device *dev; -+ -+ if (!opp_def->hwmod_name) { -+ pr_err("%s: missing name of omap_hwmod, ignoring.\n", __func__); -+ return -EINVAL; -+ } -+ oh = omap_hwmod_lookup(opp_def->hwmod_name); -+ if (!oh || !oh->od) { -+ pr_warn("%s: no hwmod or odev for %s, cannot add OPPs.\n", -+ __func__, opp_def->hwmod_name); -+ return -EINVAL; -+ } -+ dev = &oh->od->pdev.dev; -+ -+ r = opp_add(dev, opp_def++); - if (r) - pr_err("unable to add OPP %ld Hz for %s\n", - opp_def->freq, opp_def->hwmod_name); -diff --git a/arch/arm/plat-omap/include/plat/opp.h b/arch/arm/plat-omap/include/plat/opp.h -index 9af8c83..82cfdd6 100644 ---- a/arch/arm/plat-omap/include/plat/opp.h -+++ b/arch/arm/plat-omap/include/plat/opp.h -@@ -75,7 +75,7 @@ struct omap_opp *opp_find_freq_floor(struct device *dev, unsigned long *freq); - - struct omap_opp *opp_find_freq_ceil(struct device *dev, unsigned long *freq); - --int opp_add(const struct omap_opp_def *opp_def); -+int opp_add(struct device *dev, const struct omap_opp_def *opp_def); - - int opp_enable(struct omap_opp *opp); - -diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c -index b26326b..f5295ca 100644 ---- a/arch/arm/plat-omap/opp.c -+++ b/arch/arm/plat-omap/opp.c -@@ -21,7 +21,6 @@ - #include <linux/list.h> - - #include <plat/opp.h> --#include <plat/omap_device.h> - - /** - * struct omap_opp - OMAP OPP description structure -@@ -58,7 +57,6 @@ struct omap_opp { - struct device_opp { - struct list_head node; - -- struct omap_hwmod *oh; - struct device *dev; - - struct list_head opp_list; -@@ -291,29 +289,12 @@ static void omap_opp_populate(struct omap_opp *opp, - * - * This function adds an opp definition to the opp list and returns status. - */ --int opp_add(const struct omap_opp_def *opp_def) -+int opp_add(struct device *dev, const struct omap_opp_def *opp_def) - { -- struct omap_hwmod *oh; -- struct device *dev = NULL; - struct device_opp *tmp_dev_opp, *dev_opp = NULL; - struct omap_opp *opp, *new_opp; -- struct platform_device *pdev; - struct list_head *head; - -- /* find the correct hwmod, and device */ -- if (!opp_def->hwmod_name) { -- pr_err("%s: missing name of omap_hwmod, ignoring.\n", __func__); -- return -EINVAL; -- } -- oh = omap_hwmod_lookup(opp_def->hwmod_name); -- if (!oh || !oh->od) { -- pr_warn("%s: no hwmod or odev for %s, cannot add OPPs.\n", -- __func__, opp_def->hwmod_name); -- return -EINVAL; -- } -- pdev = &oh->od->pdev; -- dev = &oh->od->pdev.dev; -- - /* Check for existing list for 'dev' */ - list_for_each_entry(tmp_dev_opp, &dev_opp_list, node) { - if (dev == tmp_dev_opp->dev) { -@@ -331,8 +312,7 @@ int opp_add(const struct omap_opp_def *opp_def) - return -ENOMEM; - } - -- dev_opp->oh = oh; -- dev_opp->dev = &oh->od->pdev.dev; -+ dev_opp->dev = dev; - INIT_LIST_HEAD(&dev_opp->opp_list); - - list_add(&dev_opp->node, &dev_opp_list); --- -1.7.2.1 - --- -To unsubscribe from this list: send the line "unsubscribe linux-omap" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index 57c951f..5d79708 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,13 +1,10 @@ "ref\01284587799-9637-1-git-send-email-khilman@deeprootsystems.com\0" "ref\01284587799-9637-2-git-send-email-khilman@deeprootsystems.com\0" "ref\0AANLkTimC9NOJ5TSqkb1ekBQ_ei2-Ci2ewL66+4aCnyk=@mail.gmail.com\0" - "From\0Kevin Hilman <khilman@deeprootsystems.com>\0" - "Subject\0Re: [PATCH 1/4] OMAP: introduce OPP layer for device-specific OPPs\0" + "From\0khilman@deeprootsystems.com (Kevin Hilman)\0" + "Subject\0[PATCH 1/4] OMAP: introduce OPP layer for device-specific OPPs\0" "Date\0Thu, 16 Sep 2010 08:08:41 -0700\0" - "To\0Linus Walleij <linus.walleij@stericsson.com>" - " Nishanth Menon <nm@ti.com>\0" - "Cc\0linux-omap@vger.kernel.org" - " linux-arm-kernel@lists.infradead.org\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Hi Linus,\n" @@ -17,7 +14,7 @@ "> 2010/9/15 Kevin Hilman <khilman@deeprootsystems.com>:\n" ">\n" ">> OMAP SOCs have a standard set of tuples consisting of frequency and\n" - ">> voltage pairs that the device will support per voltage domain. \302\240These\n" + ">> voltage pairs that the device will support per voltage domain. ?These\n" ">> are called Operating Performance Points or OPPs.\n" ">> (...)\n" ">> This introduces a common handling OPP mechanism accross all OMAPs.\n" @@ -57,147 +54,6 @@ "Nishanth, can take my hack below and continue this evolution? As I\n" "demonstrate with this hack, this won't really change anything for us.\n" "\n" - "Kevin\n" - "\n" - "From 96c4e27ba0cb3d9a056693340c6221bc093bce2c Mon Sep 17 00:00:00 2001\n" - "From: Kevin Hilman <khilman@deeprootsystems.com>\n" - "Date: Thu, 16 Sep 2010 07:58:16 -0700\n" - "Subject: [PATCH] OPP: remove OMAP specifics to make more generic\n" - "\n" - "Internal OPP management is based on 'struct device *', so\n" - "we don't need to have omap_hwmod specific knowledge in this layer.\n" - "\n" - "Change opp_add() to take a 'struct device *' instead of using\n" - "the OMAP hwmod in the opp_def to lookup the struct device.\n" - "\n" - "Move OMAP-specific hwmod lookups into the OMAP specific layer\n" - "which adds OPPs to the database.\n" - "\n" - "Quickly tested on OMAP3 to see that all OPPs are still registered\n" - "correctly with CPUfreq\n" - "\n" - "---\n" - " arch/arm/mach-omap2/opp3xxx_data.c | 18 +++++++++++++++++-\n" - " arch/arm/plat-omap/include/plat/opp.h | 2 +-\n" - " arch/arm/plat-omap/opp.c | 24 ++----------------------\n" - " 3 files changed, 20 insertions(+), 24 deletions(-)\n" - "\n" - "diff --git a/arch/arm/mach-omap2/opp3xxx_data.c b/arch/arm/mach-omap2/opp3xxx_data.c\n" - "index e337aeb..f3f9ae4 100644\n" - "--- a/arch/arm/mach-omap2/opp3xxx_data.c\n" - "+++ b/arch/arm/mach-omap2/opp3xxx_data.c\n" - "@@ -23,6 +23,7 @@\n" - " \n" - " #include <plat/opp.h>\n" - " #include <plat/cpu.h>\n" - "+#include <plat/omap_device.h>\n" - " \n" - " static struct omap_opp_def __initdata omap34xx_opp_def_list[] = {\n" - " \t/* MPU OPP1 */\n" - "@@ -114,7 +115,22 @@ int __init omap3_pm_init_opp_table(void)\n" - " \n" - " \topp_def = omap3_opp_def_list;\n" - " \tfor (i = 0; i < omap3_opp_def_size; i++) {\n" - "-\t\tr = opp_add(opp_def++);\n" - "+\t\tstruct omap_hwmod *oh;\n" - "+\t\tstruct device *dev;\n" - "+\n" - "+\t\tif (!opp_def->hwmod_name) {\n" - "+\t\t\tpr_err(\"%s: missing name of omap_hwmod, ignoring.\\n\", __func__);\n" - "+\t\t\treturn -EINVAL;\n" - "+\t\t}\n" - "+\t\toh = omap_hwmod_lookup(opp_def->hwmod_name);\n" - "+\t\tif (!oh || !oh->od) {\n" - "+\t\t\tpr_warn(\"%s: no hwmod or odev for %s, cannot add OPPs.\\n\",\n" - "+\t\t\t\t__func__, opp_def->hwmod_name);\n" - "+\t\t\treturn -EINVAL;\n" - "+\t\t}\n" - "+\t\tdev = &oh->od->pdev.dev;\n" - "+\n" - "+\t\tr = opp_add(dev, opp_def++);\n" - " \t\tif (r)\n" - " \t\t\tpr_err(\"unable to add OPP %ld Hz for %s\\n\",\n" - " \t\t\t opp_def->freq, opp_def->hwmod_name);\n" - "diff --git a/arch/arm/plat-omap/include/plat/opp.h b/arch/arm/plat-omap/include/plat/opp.h\n" - "index 9af8c83..82cfdd6 100644\n" - "--- a/arch/arm/plat-omap/include/plat/opp.h\n" - "+++ b/arch/arm/plat-omap/include/plat/opp.h\n" - "@@ -75,7 +75,7 @@ struct omap_opp *opp_find_freq_floor(struct device *dev, unsigned long *freq);\n" - " \n" - " struct omap_opp *opp_find_freq_ceil(struct device *dev, unsigned long *freq);\n" - " \n" - "-int opp_add(const struct omap_opp_def *opp_def);\n" - "+int opp_add(struct device *dev, const struct omap_opp_def *opp_def);\n" - " \n" - " int opp_enable(struct omap_opp *opp);\n" - " \n" - "diff --git a/arch/arm/plat-omap/opp.c b/arch/arm/plat-omap/opp.c\n" - "index b26326b..f5295ca 100644\n" - "--- a/arch/arm/plat-omap/opp.c\n" - "+++ b/arch/arm/plat-omap/opp.c\n" - "@@ -21,7 +21,6 @@\n" - " #include <linux/list.h>\n" - " \n" - " #include <plat/opp.h>\n" - "-#include <plat/omap_device.h>\n" - " \n" - " /**\n" - " * struct omap_opp - OMAP OPP description structure\n" - "@@ -58,7 +57,6 @@ struct omap_opp {\n" - " struct device_opp {\n" - " \tstruct list_head node;\n" - " \n" - "-\tstruct omap_hwmod *oh;\n" - " \tstruct device *dev;\n" - " \n" - " \tstruct list_head opp_list;\n" - "@@ -291,29 +289,12 @@ static void omap_opp_populate(struct omap_opp *opp,\n" - " *\n" - " * This function adds an opp definition to the opp list and returns status.\n" - " */\n" - "-int opp_add(const struct omap_opp_def *opp_def)\n" - "+int opp_add(struct device *dev, const struct omap_opp_def *opp_def)\n" - " {\n" - "-\tstruct omap_hwmod *oh;\n" - "-\tstruct device *dev = NULL;\n" - " \tstruct device_opp *tmp_dev_opp, *dev_opp = NULL;\n" - " \tstruct omap_opp *opp, *new_opp;\n" - "-\tstruct platform_device *pdev;\n" - " \tstruct list_head *head;\n" - " \n" - "-\t/* find the correct hwmod, and device */\n" - "-\tif (!opp_def->hwmod_name) {\n" - "-\t\tpr_err(\"%s: missing name of omap_hwmod, ignoring.\\n\", __func__);\n" - "-\t\treturn -EINVAL;\n" - "-\t}\n" - "-\toh = omap_hwmod_lookup(opp_def->hwmod_name);\n" - "-\tif (!oh || !oh->od) {\n" - "-\t\tpr_warn(\"%s: no hwmod or odev for %s, cannot add OPPs.\\n\",\n" - "-\t\t\t__func__, opp_def->hwmod_name);\n" - "-\t\treturn -EINVAL;\n" - "-\t}\n" - "-\tpdev = &oh->od->pdev;\n" - "-\tdev = &oh->od->pdev.dev;\n" - "-\n" - " \t/* Check for existing list for 'dev' */\n" - " \tlist_for_each_entry(tmp_dev_opp, &dev_opp_list, node) {\n" - " \t\tif (dev == tmp_dev_opp->dev) {\n" - "@@ -331,8 +312,7 @@ int opp_add(const struct omap_opp_def *opp_def)\n" - " \t\t\treturn -ENOMEM;\n" - " \t\t}\n" - " \n" - "-\t\tdev_opp->oh = oh;\n" - "-\t\tdev_opp->dev = &oh->od->pdev.dev;\n" - "+\t\tdev_opp->dev = dev;\n" - " \t\tINIT_LIST_HEAD(&dev_opp->opp_list);\n" - " \n" - " \t\tlist_add(&dev_opp->node, &dev_opp_list);\n" - "-- \n" - "1.7.2.1\n" - "\n" - "--\n" - "To unsubscribe from this list: send the line \"unsubscribe linux-omap\" in\n" - "the body of a message to majordomo@vger.kernel.org\n" - More majordomo info at http://vger.kernel.org/majordomo-info.html + Kevin -b5ecb193c0191da802e5b02c93c8434709b818d1f963709a0fc96ab6c2761002 +08bc9d389b4663f01abc0329f75d1ee7d46ae137c8015119520d1ba73e86cc7d
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.