All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-10 11:42 ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

This collection of patches fixup smp_twd clk so clk notifiers can use it
properly.

An armss clk is added which is used from cpufreq driver to update frequency
instead of using the prcmu_set|get_arm_opp API. The smp_twd clk is converted
to a fixed_factor clk with armss clk as parent and with a fixed divider of two.
Therfore it will be updated when armss clk is updated and thus corresponding
notifications will be triggered.

I would prefer if these patches could be merged through Mike Turquette's clk
tree, if he think it seems feasible of course. For the mfd and cpufreq patches
I hope Samuel Ortiz and Rafael J. Wysocki if fine by acking patches. If there
are other preferred way of dealing with this I am happy to change setup.

Do note that, the four below patches have already been sent and most of them
have already been acked/reviewed but not merged. I have included them in this
series to provide full overview for reviewers.

ARM: ux500: Remove cpufreq platform device
mfd: db8500: Provide cpufreq table as platform data
cpufreq: db8500: Register as a platform driver
cpufreq: db8500: Fetch cpufreq table from platform data

Patches are based on Linus Torvalds tree with latest commit as of okt 10.

Ulf Hansson (8):
  ARM: ux500: Remove cpufreq platform device
  mfd: db8500: Provide cpufreq table as platform data
  cpufreq: db8500: Register as a platform driver
  cpufreq: db8500: Fetch cpufreq table from platform data
  mfd: db8500: Connect ARMSS clk to ARM OPP
  clk: ux500: Support for prcmu_scalable_rate clock
  clk: ux500: Add armss clk and fixup smp_twd clk for u8500
  cpufreq: db8500: Use armss clk to update frequency

 arch/arm/mach-ux500/cpu-db8500.c |    6 ---
 drivers/clk/ux500/clk-prcmu.c    |   17 +++++++
 drivers/clk/ux500/clk.h          |    6 +++
 drivers/clk/ux500/u8500_clk.c    |   14 +++---
 drivers/cpufreq/db8500-cpufreq.c |  101 +++++++++++++++++++++-----------------
 drivers/mfd/db8500-prcmu.c       |   82 ++++++++++++++++++++++++++-----
 6 files changed, 155 insertions(+), 71 deletions(-)

-- 
1.7.10

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-10 11:42 ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

This collection of patches fixup smp_twd clk so clk notifiers can use it
properly.

An armss clk is added which is used from cpufreq driver to update frequency
instead of using the prcmu_set|get_arm_opp API. The smp_twd clk is converted
to a fixed_factor clk with armss clk as parent and with a fixed divider of two.
Therfore it will be updated when armss clk is updated and thus corresponding
notifications will be triggered.

I would prefer if these patches could be merged through Mike Turquette's clk
tree, if he think it seems feasible of course. For the mfd and cpufreq patches
I hope Samuel Ortiz and Rafael J. Wysocki if fine by acking patches. If there
are other preferred way of dealing with this I am happy to change setup.

Do note that, the four below patches have already been sent and most of them
have already been acked/reviewed but not merged. I have included them in this
series to provide full overview for reviewers.

ARM: ux500: Remove cpufreq platform device
mfd: db8500: Provide cpufreq table as platform data
cpufreq: db8500: Register as a platform driver
cpufreq: db8500: Fetch cpufreq table from platform data

Patches are based on Linus Torvalds tree with latest commit as of okt 10.

Ulf Hansson (8):
  ARM: ux500: Remove cpufreq platform device
  mfd: db8500: Provide cpufreq table as platform data
  cpufreq: db8500: Register as a platform driver
  cpufreq: db8500: Fetch cpufreq table from platform data
  mfd: db8500: Connect ARMSS clk to ARM OPP
  clk: ux500: Support for prcmu_scalable_rate clock
  clk: ux500: Add armss clk and fixup smp_twd clk for u8500
  cpufreq: db8500: Use armss clk to update frequency

 arch/arm/mach-ux500/cpu-db8500.c |    6 ---
 drivers/clk/ux500/clk-prcmu.c    |   17 +++++++
 drivers/clk/ux500/clk.h          |    6 +++
 drivers/clk/ux500/u8500_clk.c    |   14 +++---
 drivers/cpufreq/db8500-cpufreq.c |  101 +++++++++++++++++++++-----------------
 drivers/mfd/db8500-prcmu.c       |   82 ++++++++++++++++++++++++++-----
 6 files changed, 155 insertions(+), 71 deletions(-)

-- 
1.7.10


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 1/8] ARM: ux500: Remove cpufreq platform device
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

The cpufreq device is already added from the prcmu driver as
a mfd child device.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
---
 arch/arm/mach-ux500/cpu-db8500.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index bcdfe6b..41b2779 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -214,9 +214,6 @@ struct device * __init u8500_init_devices(struct ab8500_platform_data *ab8500)
 	db8500_add_gpios(parent);
 	db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
 
-	platform_device_register_data(parent,
-		"cpufreq-u8500", -1, NULL, 0);
-
 	for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
 		platform_devs[i]->dev.parent = parent;
 
@@ -236,9 +233,6 @@ struct device * __init u8500_of_init_devices(void)
 
 	db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
 
-	platform_device_register_data(parent,
-		"cpufreq-u8500", -1, NULL, 0);
-
 	u8500_dma40_device.dev.parent = parent;
 
 	/*
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 1/8] ARM: ux500: Remove cpufreq platform device
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

The cpufreq device is already added from the prcmu driver as
a mfd child device.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
---
 arch/arm/mach-ux500/cpu-db8500.c |    6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index bcdfe6b..41b2779 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -214,9 +214,6 @@ struct device * __init u8500_init_devices(struct ab8500_platform_data *ab8500)
 	db8500_add_gpios(parent);
 	db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
 
-	platform_device_register_data(parent,
-		"cpufreq-u8500", -1, NULL, 0);
-
 	for (i = 0; i < ARRAY_SIZE(platform_devs); i++)
 		platform_devs[i]->dev.parent = parent;
 
@@ -236,9 +233,6 @@ struct device * __init u8500_of_init_devices(void)
 
 	db8500_add_usb(parent, usb_db8500_rx_dma_cfg, usb_db8500_tx_dma_cfg);
 
-	platform_device_register_data(parent,
-		"cpufreq-u8500", -1, NULL, 0);
-
 	u8500_dma40_device.dev.parent = parent;
 
 	/*
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

The cpufreq table needs dynamically update due to what the PRCMU
firmware is supporting. The table is then provided through to the
mfd child device as platform data.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
 drivers/mfd/db8500-prcmu.c |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 00b8b0f..53c24c4 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -31,6 +31,7 @@
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/regulator/db8500-prcmu.h>
 #include <linux/regulator/machine.h>
+#include <linux/cpufreq.h>
 #include <asm/hardware/gic.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
@@ -3002,6 +3003,15 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
 	},
 };
 
+/* CPU FREQ table, may be changed due to if MAX_OPP is supported. */
+static struct cpufreq_frequency_table db8500_cpufreq_table[] = {
+	{ .frequency = 200000, .index = ARM_EXTCLK,},
+	{ .frequency = 400000, .index = ARM_50_OPP,},
+	{ .frequency = 800000, .index = ARM_100_OPP,},
+	{ .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */
+	{ .frequency = CPUFREQ_TABLE_END,},
+};
+
 static struct resource ab8500_resources[] = {
 	[0] = {
 		.start	= IRQ_DB8500_AB8500,
@@ -3020,6 +3030,8 @@ static struct mfd_cell db8500_prcmu_devs[] = {
 	{
 		.name = "cpufreq-u8500",
 		.of_compatible = "stericsson,cpufreq-u8500",
+		.platform_data = &db8500_cpufreq_table,
+		.pdata_size = sizeof(db8500_cpufreq_table),
 	},
 	{
 		.name = "ab8500-core",
@@ -3030,6 +3042,14 @@ static struct mfd_cell db8500_prcmu_devs[] = {
 	},
 };
 
+static void db8500_prcmu_update_cpufreq(void)
+{
+	if (prcmu_has_arm_maxopp()) {
+		db8500_cpufreq_table[3].frequency = 1000000;
+		db8500_cpufreq_table[3].index = ARM_MAX_OPP;
+	}
+}
+
 /**
  * prcmu_fw_init - arch init call for the Linux PRCMU fw init logic
  *
@@ -3074,6 +3094,8 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
 	if (cpu_is_u8500v20_or_later())
 		prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);
 
+	db8500_prcmu_update_cpufreq();
+
 	err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
 			      ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, NULL);
 	if (err) {
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

The cpufreq table needs dynamically update due to what the PRCMU
firmware is supporting. The table is then provided through to the
mfd child device as platform data.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
---
 drivers/mfd/db8500-prcmu.c |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 00b8b0f..53c24c4 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -31,6 +31,7 @@
 #include <linux/mfd/abx500/ab8500.h>
 #include <linux/regulator/db8500-prcmu.h>
 #include <linux/regulator/machine.h>
+#include <linux/cpufreq.h>
 #include <asm/hardware/gic.h>
 #include <mach/hardware.h>
 #include <mach/irqs.h>
@@ -3002,6 +3003,15 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
 	},
 };
 
+/* CPU FREQ table, may be changed due to if MAX_OPP is supported. */
+static struct cpufreq_frequency_table db8500_cpufreq_table[] = {
+	{ .frequency = 200000, .index = ARM_EXTCLK,},
+	{ .frequency = 400000, .index = ARM_50_OPP,},
+	{ .frequency = 800000, .index = ARM_100_OPP,},
+	{ .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */
+	{ .frequency = CPUFREQ_TABLE_END,},
+};
+
 static struct resource ab8500_resources[] = {
 	[0] = {
 		.start	= IRQ_DB8500_AB8500,
@@ -3020,6 +3030,8 @@ static struct mfd_cell db8500_prcmu_devs[] = {
 	{
 		.name = "cpufreq-u8500",
 		.of_compatible = "stericsson,cpufreq-u8500",
+		.platform_data = &db8500_cpufreq_table,
+		.pdata_size = sizeof(db8500_cpufreq_table),
 	},
 	{
 		.name = "ab8500-core",
@@ -3030,6 +3042,14 @@ static struct mfd_cell db8500_prcmu_devs[] = {
 	},
 };
 
+static void db8500_prcmu_update_cpufreq(void)
+{
+	if (prcmu_has_arm_maxopp()) {
+		db8500_cpufreq_table[3].frequency = 1000000;
+		db8500_cpufreq_table[3].index = ARM_MAX_OPP;
+	}
+}
+
 /**
  * prcmu_fw_init - arch init call for the Linux PRCMU fw init logic
  *
@@ -3074,6 +3094,8 @@ static int __devinit db8500_prcmu_probe(struct platform_device *pdev)
 	if (cpu_is_u8500v20_or_later())
 		prcmu_config_esram0_deep_sleep(ESRAM0_DEEP_SLEEP_STATE_RET);
 
+	db8500_prcmu_update_cpufreq();
+
 	err = mfd_add_devices(&pdev->dev, 0, db8500_prcmu_devs,
 			      ARRAY_SIZE(db8500_prcmu_devs), NULL, 0, NULL);
 	if (err) {
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 3/8] cpufreq: db8500: Register as a platform driver
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

To fetch the mfd child device we register the cpufreq driver
as a platform driver.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/cpufreq/db8500-cpufreq.c |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index 74b830b..7d61a6c 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -8,10 +8,12 @@
  * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
  *
  */
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/cpufreq.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/platform_device.h>
 #include <linux/mfd/dbx500-prcmu.h>
 #include <mach/id.h>
 
@@ -159,12 +161,28 @@ static struct cpufreq_driver db8500_cpufreq_driver = {
 	.attr   = db8500_cpufreq_attr,
 };
 
+static int db8500_cpufreq_probe(struct platform_device *pdev)
+{
+	return cpufreq_register_driver(&db8500_cpufreq_driver);
+}
+
+static struct platform_driver db8500_cpufreq_plat_driver = {
+	.driver = {
+		.name = "cpufreq-u8500",
+		.owner = THIS_MODULE,
+	},
+	.probe = db8500_cpufreq_probe,
+};
+
 static int __init db8500_cpufreq_register(void)
 {
 	if (!cpu_is_u8500_family())
 		return -ENODEV;
 
 	pr_info("cpufreq for DB8500 started\n");
-	return cpufreq_register_driver(&db8500_cpufreq_driver);
+	return platform_driver_register(&db8500_cpufreq_plat_driver);
 }
 device_initcall(db8500_cpufreq_register);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("cpufreq driver for DB8500");
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 3/8] cpufreq: db8500: Register as a platform driver
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

To fetch the mfd child device we register the cpufreq driver
as a platform driver.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/cpufreq/db8500-cpufreq.c |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index 74b830b..7d61a6c 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -8,10 +8,12 @@
  * Author: Jonas Aaberg <jonas.aberg@stericsson.com>
  *
  */
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/cpufreq.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
+#include <linux/platform_device.h>
 #include <linux/mfd/dbx500-prcmu.h>
 #include <mach/id.h>
 
@@ -159,12 +161,28 @@ static struct cpufreq_driver db8500_cpufreq_driver = {
 	.attr   = db8500_cpufreq_attr,
 };
 
+static int db8500_cpufreq_probe(struct platform_device *pdev)
+{
+	return cpufreq_register_driver(&db8500_cpufreq_driver);
+}
+
+static struct platform_driver db8500_cpufreq_plat_driver = {
+	.driver = {
+		.name = "cpufreq-u8500",
+		.owner = THIS_MODULE,
+	},
+	.probe = db8500_cpufreq_probe,
+};
+
 static int __init db8500_cpufreq_register(void)
 {
 	if (!cpu_is_u8500_family())
 		return -ENODEV;
 
 	pr_info("cpufreq for DB8500 started\n");
-	return cpufreq_register_driver(&db8500_cpufreq_driver);
+	return platform_driver_register(&db8500_cpufreq_plat_driver);
 }
 device_initcall(db8500_cpufreq_register);
+
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("cpufreq driver for DB8500");
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 4/8] cpufreq: db8500: Fetch cpufreq table from platform data
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

By fetching the table as platform data we do not need the internally
hardcoded cpufreq table anymore.

Moreover the corresponding arm_opp idx2opp table, used for mapping
frequency to correct opp bits is also removed. This due to that the
opp bits is put directly in the index field of the cpufreq table.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/cpufreq/db8500-cpufreq.c |   67 ++++++++++++++------------------------
 1 file changed, 25 insertions(+), 42 deletions(-)

diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index 7d61a6c..dea9a49 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -17,36 +17,7 @@
 #include <linux/mfd/dbx500-prcmu.h>
 #include <mach/id.h>
 
-static struct cpufreq_frequency_table freq_table[] = {
-	[0] = {
-		.index = 0,
-		.frequency = 200000,
-	},
-	[1] = {
-		.index = 1,
-		.frequency = 400000,
-	},
-	[2] = {
-		.index = 2,
-		.frequency = 800000,
-	},
-	[3] = {
-		/* Used for MAX_OPP, if available */
-		.index = 3,
-		.frequency = CPUFREQ_TABLE_END,
-	},
-	[4] = {
-		.index = 4,
-		.frequency = CPUFREQ_TABLE_END,
-	},
-};
-
-static enum arm_opp idx2opp[] = {
-	ARM_EXTCLK,
-	ARM_50_OPP,
-	ARM_100_OPP,
-	ARM_MAX_OPP
-};
+static struct cpufreq_frequency_table *freq_table;
 
 static struct freq_attr *db8500_cpufreq_attr[] = {
 	&cpufreq_freq_attr_scaling_available_freqs,
@@ -88,7 +59,7 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 
 	/* request the PRCM unit for opp change */
-	if (prcmu_set_arm_opp(idx2opp[idx])) {
+	if (prcmu_set_arm_opp(freq_table[idx].index)) {
 		pr_err("db8500-cpufreq:  Failed to set OPP level\n");
 		return -EINVAL;
 	}
@@ -102,25 +73,30 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 
 static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
 {
-	int i;
+	int i = 0;
 	/* request the prcm to get the current ARM opp */
-	for (i = 0; prcmu_get_arm_opp() != idx2opp[i]; i++)
-		;
-	return freq_table[i].frequency;
+	int opp = prcmu_get_arm_opp();
+
+	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
+		if (opp == freq_table[i].index)
+			return freq_table[i].frequency;
+		i++;
+	}
+
+	/* We could not find a corresponding opp frequency. */
+	return 0;
 }
 
 static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
 {
-	int i, res;
-
-	BUILD_BUG_ON(ARRAY_SIZE(idx2opp) + 1 != ARRAY_SIZE(freq_table));
-
-	if (prcmu_has_arm_maxopp())
-		freq_table[3].frequency = 1000000;
+	int i = 0;
+	int res;
 
 	pr_info("db8500-cpufreq : Available frequencies:\n");
-	for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++)
+	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
 		pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
+		i++;
+	}
 
 	/* get policy fields based on the table */
 	res = cpufreq_frequency_table_cpuinfo(policy, freq_table);
@@ -163,6 +139,13 @@ static struct cpufreq_driver db8500_cpufreq_driver = {
 
 static int db8500_cpufreq_probe(struct platform_device *pdev)
 {
+	freq_table = dev_get_platdata(&pdev->dev);
+
+	if (!freq_table) {
+		pr_err("db8500-cpufreq: Failed to fetch cpufreq table\n");
+		return -ENODEV;
+	}
+
 	return cpufreq_register_driver(&db8500_cpufreq_driver);
 }
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 4/8] cpufreq: db8500: Fetch cpufreq table from platform data
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: Philippe Begnic, Ulf Hansson, Vincent Guittot, Jonas Aberg,
	linux-pm, Linus Walleij, cpufreq, Rickard Andersson, Lee Jones

From: Ulf Hansson <ulf.hansson@linaro.org>

By fetching the table as platform data we do not need the internally
hardcoded cpufreq table anymore.

Moreover the corresponding arm_opp idx2opp table, used for mapping
frequency to correct opp bits is also removed. This due to that the
opp bits is put directly in the index field of the cpufreq table.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/cpufreq/db8500-cpufreq.c |   67 ++++++++++++++------------------------
 1 file changed, 25 insertions(+), 42 deletions(-)

diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index 7d61a6c..dea9a49 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -17,36 +17,7 @@
 #include <linux/mfd/dbx500-prcmu.h>
 #include <mach/id.h>
 
-static struct cpufreq_frequency_table freq_table[] = {
-	[0] = {
-		.index = 0,
-		.frequency = 200000,
-	},
-	[1] = {
-		.index = 1,
-		.frequency = 400000,
-	},
-	[2] = {
-		.index = 2,
-		.frequency = 800000,
-	},
-	[3] = {
-		/* Used for MAX_OPP, if available */
-		.index = 3,
-		.frequency = CPUFREQ_TABLE_END,
-	},
-	[4] = {
-		.index = 4,
-		.frequency = CPUFREQ_TABLE_END,
-	},
-};
-
-static enum arm_opp idx2opp[] = {
-	ARM_EXTCLK,
-	ARM_50_OPP,
-	ARM_100_OPP,
-	ARM_MAX_OPP
-};
+static struct cpufreq_frequency_table *freq_table;
 
 static struct freq_attr *db8500_cpufreq_attr[] = {
 	&cpufreq_freq_attr_scaling_available_freqs,
@@ -88,7 +59,7 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 
 	/* request the PRCM unit for opp change */
-	if (prcmu_set_arm_opp(idx2opp[idx])) {
+	if (prcmu_set_arm_opp(freq_table[idx].index)) {
 		pr_err("db8500-cpufreq:  Failed to set OPP level\n");
 		return -EINVAL;
 	}
@@ -102,25 +73,30 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 
 static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
 {
-	int i;
+	int i = 0;
 	/* request the prcm to get the current ARM opp */
-	for (i = 0; prcmu_get_arm_opp() != idx2opp[i]; i++)
-		;
-	return freq_table[i].frequency;
+	int opp = prcmu_get_arm_opp();
+
+	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
+		if (opp == freq_table[i].index)
+			return freq_table[i].frequency;
+		i++;
+	}
+
+	/* We could not find a corresponding opp frequency. */
+	return 0;
 }
 
 static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
 {
-	int i, res;
-
-	BUILD_BUG_ON(ARRAY_SIZE(idx2opp) + 1 != ARRAY_SIZE(freq_table));
-
-	if (prcmu_has_arm_maxopp())
-		freq_table[3].frequency = 1000000;
+	int i = 0;
+	int res;
 
 	pr_info("db8500-cpufreq : Available frequencies:\n");
-	for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++)
+	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
 		pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
+		i++;
+	}
 
 	/* get policy fields based on the table */
 	res = cpufreq_frequency_table_cpuinfo(policy, freq_table);
@@ -163,6 +139,13 @@ static struct cpufreq_driver db8500_cpufreq_driver = {
 
 static int db8500_cpufreq_probe(struct platform_device *pdev)
 {
+	freq_table = dev_get_platdata(&pdev->dev);
+
+	if (!freq_table) {
+		pr_err("db8500-cpufreq: Failed to fetch cpufreq table\n");
+		return -ENODEV;
+	}
+
 	return cpufreq_register_driver(&db8500_cpufreq_driver);
 }
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

ARMSS clk directly maps it's frequency towards the cpufreq table.
To be able to update the ARMSS clk rate, a new set_rate function for
the ARMSS clk is added, which also will trigger a corresponding ARM
OPP request. Additionally an ARMSS clk round_rate function is added
to fetch valid cpufreq frequencies.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mfd/db8500-prcmu.c |   78 +++++++++++++++++++++++++++++++-------------
 1 file changed, 56 insertions(+), 22 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 53c24c4..e91a6e6 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -421,9 +421,6 @@ static struct {
 
 static atomic_t ac_wake_req_state = ATOMIC_INIT(0);
 
-/* Functions definition */
-static void compute_armss_rate(void);
-
 /* Spinlocks */
 static DEFINE_SPINLOCK(prcmu_lock);
 static DEFINE_SPINLOCK(clkout_lock);
@@ -1020,7 +1017,6 @@ int db8500_prcmu_set_arm_opp(u8 opp)
 		(mb1_transfer.ack.arm_opp != opp))
 		r = -EIO;
 
-	compute_armss_rate();
 	mutex_unlock(&mb1_transfer.lock);
 
 	return r;
@@ -1670,13 +1666,8 @@ static unsigned long clock_rate(u8 clock)
 	else
 		return 0;
 }
-static unsigned long latest_armss_rate;
-static unsigned long armss_rate(void)
-{
-	return latest_armss_rate;
-}
 
-static void compute_armss_rate(void)
+static unsigned long armss_rate(void)
 {
 	u32 r;
 	unsigned long rate;
@@ -1701,7 +1692,7 @@ static void compute_armss_rate(void)
 		rate = pll_rate(PRCM_PLLARM_FREQ, ROOT_CLOCK_RATE, PLL_DIV);
 	}
 
-	latest_armss_rate = rate;
+	return rate;
 }
 
 static unsigned long dsiclk_rate(u8 n)
@@ -1821,6 +1812,35 @@ static long round_clock_rate(u8 clock, unsigned long rate)
 	return rounded_rate;
 }
 
+/* CPU FREQ table, may be changed due to if MAX_OPP is supported. */
+static struct cpufreq_frequency_table db8500_cpufreq_table[] = {
+	{ .frequency = 200000, .index = ARM_EXTCLK,},
+	{ .frequency = 400000, .index = ARM_50_OPP,},
+	{ .frequency = 800000, .index = ARM_100_OPP,},
+	{ .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */
+	{ .frequency = CPUFREQ_TABLE_END,},
+};
+
+static long round_armss_rate(unsigned long rate)
+{
+	long freq = 0;
+	int i = 0;
+
+	/* cpufreq table frequencies is in KHz. */
+	rate = rate / 1000;
+
+	/* Find the corresponding arm opp from the cpufreq table. */
+	while (db8500_cpufreq_table[i].frequency != CPUFREQ_TABLE_END) {
+		freq = db8500_cpufreq_table[i].frequency;
+		if (freq == rate)
+			break;
+		i++;
+	}
+
+	/* Return the last valid value, even if a match was not found. */
+	return freq * 1000;
+}
+
 #define MIN_PLL_VCO_RATE 600000000ULL
 #define MAX_PLL_VCO_RATE 1680640000ULL
 
@@ -1892,6 +1912,8 @@ long prcmu_round_clock_rate(u8 clock, unsigned long rate)
 {
 	if (clock < PRCMU_NUM_REG_CLOCKS)
 		return round_clock_rate(clock, rate);
+	else if (clock == PRCMU_ARMSS)
+		return round_armss_rate(rate);
 	else if (clock == PRCMU_PLLDSI)
 		return round_plldsi_rate(rate);
 	else if ((clock == PRCMU_DSI0CLK) || (clock == PRCMU_DSI1CLK))
@@ -1951,6 +1973,27 @@ static void set_clock_rate(u8 clock, unsigned long rate)
 	spin_unlock_irqrestore(&clk_mgt_lock, flags);
 }
 
+static int set_armss_rate(unsigned long rate)
+{
+	int i = 0;
+
+	/* cpufreq table frequencies is in KHz. */
+	rate = rate / 1000;
+
+	/* Find the corresponding arm opp from the cpufreq table. */
+	while (db8500_cpufreq_table[i].frequency != CPUFREQ_TABLE_END) {
+		if (db8500_cpufreq_table[i].frequency == rate)
+			break;
+		i++;
+	}
+
+	if (db8500_cpufreq_table[i].frequency != rate)
+		return -EINVAL;
+
+	/* Set the new arm opp. */
+	return db8500_prcmu_set_arm_opp(db8500_cpufreq_table[i].index);
+}
+
 static int set_plldsi_rate(unsigned long rate)
 {
 	unsigned long src_rate;
@@ -2031,6 +2074,8 @@ int prcmu_set_clock_rate(u8 clock, unsigned long rate)
 {
 	if (clock < PRCMU_NUM_REG_CLOCKS)
 		set_clock_rate(clock, rate);
+	else if (clock == PRCMU_ARMSS)
+		return set_armss_rate(rate);
 	else if (clock == PRCMU_PLLDSI)
 		return set_plldsi_rate(rate);
 	else if ((clock == PRCMU_DSI0CLK) || (clock == PRCMU_DSI1CLK))
@@ -2755,8 +2800,6 @@ void __init db8500_prcmu_early_init(void)
 	init_completion(&mb5_transfer.work);
 
 	INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work);
-
-	compute_armss_rate();
 }
 
 static void __init init_prcm_registers(void)
@@ -3003,15 +3046,6 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
 	},
 };
 
-/* CPU FREQ table, may be changed due to if MAX_OPP is supported. */
-static struct cpufreq_frequency_table db8500_cpufreq_table[] = {
-	{ .frequency = 200000, .index = ARM_EXTCLK,},
-	{ .frequency = 400000, .index = ARM_50_OPP,},
-	{ .frequency = 800000, .index = ARM_100_OPP,},
-	{ .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */
-	{ .frequency = CPUFREQ_TABLE_END,},
-};
-
 static struct resource ab8500_resources[] = {
 	[0] = {
 		.start	= IRQ_DB8500_AB8500,
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

ARMSS clk directly maps it's frequency towards the cpufreq table.
To be able to update the ARMSS clk rate, a new set_rate function for
the ARMSS clk is added, which also will trigger a corresponding ARM
OPP request. Additionally an ARMSS clk round_rate function is added
to fetch valid cpufreq frequencies.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mfd/db8500-prcmu.c |   78 +++++++++++++++++++++++++++++++-------------
 1 file changed, 56 insertions(+), 22 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 53c24c4..e91a6e6 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -421,9 +421,6 @@ static struct {
 
 static atomic_t ac_wake_req_state = ATOMIC_INIT(0);
 
-/* Functions definition */
-static void compute_armss_rate(void);
-
 /* Spinlocks */
 static DEFINE_SPINLOCK(prcmu_lock);
 static DEFINE_SPINLOCK(clkout_lock);
@@ -1020,7 +1017,6 @@ int db8500_prcmu_set_arm_opp(u8 opp)
 		(mb1_transfer.ack.arm_opp != opp))
 		r = -EIO;
 
-	compute_armss_rate();
 	mutex_unlock(&mb1_transfer.lock);
 
 	return r;
@@ -1670,13 +1666,8 @@ static unsigned long clock_rate(u8 clock)
 	else
 		return 0;
 }
-static unsigned long latest_armss_rate;
-static unsigned long armss_rate(void)
-{
-	return latest_armss_rate;
-}
 
-static void compute_armss_rate(void)
+static unsigned long armss_rate(void)
 {
 	u32 r;
 	unsigned long rate;
@@ -1701,7 +1692,7 @@ static void compute_armss_rate(void)
 		rate = pll_rate(PRCM_PLLARM_FREQ, ROOT_CLOCK_RATE, PLL_DIV);
 	}
 
-	latest_armss_rate = rate;
+	return rate;
 }
 
 static unsigned long dsiclk_rate(u8 n)
@@ -1821,6 +1812,35 @@ static long round_clock_rate(u8 clock, unsigned long rate)
 	return rounded_rate;
 }
 
+/* CPU FREQ table, may be changed due to if MAX_OPP is supported. */
+static struct cpufreq_frequency_table db8500_cpufreq_table[] = {
+	{ .frequency = 200000, .index = ARM_EXTCLK,},
+	{ .frequency = 400000, .index = ARM_50_OPP,},
+	{ .frequency = 800000, .index = ARM_100_OPP,},
+	{ .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */
+	{ .frequency = CPUFREQ_TABLE_END,},
+};
+
+static long round_armss_rate(unsigned long rate)
+{
+	long freq = 0;
+	int i = 0;
+
+	/* cpufreq table frequencies is in KHz. */
+	rate = rate / 1000;
+
+	/* Find the corresponding arm opp from the cpufreq table. */
+	while (db8500_cpufreq_table[i].frequency != CPUFREQ_TABLE_END) {
+		freq = db8500_cpufreq_table[i].frequency;
+		if (freq == rate)
+			break;
+		i++;
+	}
+
+	/* Return the last valid value, even if a match was not found. */
+	return freq * 1000;
+}
+
 #define MIN_PLL_VCO_RATE 600000000ULL
 #define MAX_PLL_VCO_RATE 1680640000ULL
 
@@ -1892,6 +1912,8 @@ long prcmu_round_clock_rate(u8 clock, unsigned long rate)
 {
 	if (clock < PRCMU_NUM_REG_CLOCKS)
 		return round_clock_rate(clock, rate);
+	else if (clock == PRCMU_ARMSS)
+		return round_armss_rate(rate);
 	else if (clock == PRCMU_PLLDSI)
 		return round_plldsi_rate(rate);
 	else if ((clock == PRCMU_DSI0CLK) || (clock == PRCMU_DSI1CLK))
@@ -1951,6 +1973,27 @@ static void set_clock_rate(u8 clock, unsigned long rate)
 	spin_unlock_irqrestore(&clk_mgt_lock, flags);
 }
 
+static int set_armss_rate(unsigned long rate)
+{
+	int i = 0;
+
+	/* cpufreq table frequencies is in KHz. */
+	rate = rate / 1000;
+
+	/* Find the corresponding arm opp from the cpufreq table. */
+	while (db8500_cpufreq_table[i].frequency != CPUFREQ_TABLE_END) {
+		if (db8500_cpufreq_table[i].frequency == rate)
+			break;
+		i++;
+	}
+
+	if (db8500_cpufreq_table[i].frequency != rate)
+		return -EINVAL;
+
+	/* Set the new arm opp. */
+	return db8500_prcmu_set_arm_opp(db8500_cpufreq_table[i].index);
+}
+
 static int set_plldsi_rate(unsigned long rate)
 {
 	unsigned long src_rate;
@@ -2031,6 +2074,8 @@ int prcmu_set_clock_rate(u8 clock, unsigned long rate)
 {
 	if (clock < PRCMU_NUM_REG_CLOCKS)
 		set_clock_rate(clock, rate);
+	else if (clock == PRCMU_ARMSS)
+		return set_armss_rate(rate);
 	else if (clock == PRCMU_PLLDSI)
 		return set_plldsi_rate(rate);
 	else if ((clock == PRCMU_DSI0CLK) || (clock == PRCMU_DSI1CLK))
@@ -2755,8 +2800,6 @@ void __init db8500_prcmu_early_init(void)
 	init_completion(&mb5_transfer.work);
 
 	INIT_WORK(&mb0_transfer.mask_work, prcmu_mask_work);
-
-	compute_armss_rate();
 }
 
 static void __init init_prcm_registers(void)
@@ -3003,15 +3046,6 @@ static struct regulator_init_data db8500_regulators[DB8500_NUM_REGULATORS] = {
 	},
 };
 
-/* CPU FREQ table, may be changed due to if MAX_OPP is supported. */
-static struct cpufreq_frequency_table db8500_cpufreq_table[] = {
-	{ .frequency = 200000, .index = ARM_EXTCLK,},
-	{ .frequency = 400000, .index = ARM_50_OPP,},
-	{ .frequency = 800000, .index = ARM_100_OPP,},
-	{ .frequency = CPUFREQ_TABLE_END,}, /* To be used for MAX_OPP. */
-	{ .frequency = CPUFREQ_TABLE_END,},
-};
-
 static struct resource ab8500_resources[] = {
 	[0] = {
 		.start	= IRQ_DB8500_AB8500,
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 6/8] clk: ux500: Support for prcmu_scalable_rate clock
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

The prcmu_scalable_rate clock can change rate but is not gateable.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/clk/ux500/clk-prcmu.c |   17 +++++++++++++++++
 drivers/clk/ux500/clk.h       |    6 ++++++
 2 files changed, 23 insertions(+)

diff --git a/drivers/clk/ux500/clk-prcmu.c b/drivers/clk/ux500/clk-prcmu.c
index 930cdfe..2e5ef7a 100644
--- a/drivers/clk/ux500/clk-prcmu.c
+++ b/drivers/clk/ux500/clk-prcmu.c
@@ -153,6 +153,13 @@ static struct clk_ops clk_prcmu_gate_ops = {
 	.recalc_rate = clk_prcmu_recalc_rate,
 };
 
+static struct clk_ops clk_prcmu_scalable_rate_ops = {
+	.is_enabled = clk_prcmu_is_enabled,
+	.recalc_rate = clk_prcmu_recalc_rate,
+	.round_rate = clk_prcmu_round_rate,
+	.set_rate = clk_prcmu_set_rate,
+};
+
 static struct clk_ops clk_prcmu_rate_ops = {
 	.is_enabled = clk_prcmu_is_enabled,
 	.recalc_rate = clk_prcmu_recalc_rate,
@@ -233,6 +240,16 @@ struct clk *clk_reg_prcmu_gate(const char *name,
 			&clk_prcmu_gate_ops);
 }
 
+struct clk *clk_reg_prcmu_scalable_rate(const char *name,
+					const char *parent_name,
+					u8 cg_sel,
+					unsigned long rate,
+					unsigned long flags)
+{
+	return clk_reg_prcmu(name, parent_name, cg_sel, rate, flags,
+			&clk_prcmu_scalable_rate_ops);
+}
+
 struct clk *clk_reg_prcmu_rate(const char *name,
 			       const char *parent_name,
 			       u8 cg_sel,
diff --git a/drivers/clk/ux500/clk.h b/drivers/clk/ux500/clk.h
index 836d7d1..a9e2961 100644
--- a/drivers/clk/ux500/clk.h
+++ b/drivers/clk/ux500/clk.h
@@ -35,6 +35,12 @@ struct clk *clk_reg_prcmu_gate(const char *name,
 			       u8 cg_sel,
 			       unsigned long flags);
 
+struct clk *clk_reg_prcmu_scalable_rate(const char *name,
+					const char *parent_name,
+					u8 cg_sel,
+					unsigned long rate,
+					unsigned long flags);
+
 struct clk *clk_reg_prcmu_rate(const char *name,
 			       const char *parent_name,
 			       u8 cg_sel,
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 6/8] clk: ux500: Support for prcmu_scalable_rate clock
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

The prcmu_scalable_rate clock can change rate but is not gateable.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/clk/ux500/clk-prcmu.c |   17 +++++++++++++++++
 drivers/clk/ux500/clk.h       |    6 ++++++
 2 files changed, 23 insertions(+)

diff --git a/drivers/clk/ux500/clk-prcmu.c b/drivers/clk/ux500/clk-prcmu.c
index 930cdfe..2e5ef7a 100644
--- a/drivers/clk/ux500/clk-prcmu.c
+++ b/drivers/clk/ux500/clk-prcmu.c
@@ -153,6 +153,13 @@ static struct clk_ops clk_prcmu_gate_ops = {
 	.recalc_rate = clk_prcmu_recalc_rate,
 };
 
+static struct clk_ops clk_prcmu_scalable_rate_ops = {
+	.is_enabled = clk_prcmu_is_enabled,
+	.recalc_rate = clk_prcmu_recalc_rate,
+	.round_rate = clk_prcmu_round_rate,
+	.set_rate = clk_prcmu_set_rate,
+};
+
 static struct clk_ops clk_prcmu_rate_ops = {
 	.is_enabled = clk_prcmu_is_enabled,
 	.recalc_rate = clk_prcmu_recalc_rate,
@@ -233,6 +240,16 @@ struct clk *clk_reg_prcmu_gate(const char *name,
 			&clk_prcmu_gate_ops);
 }
 
+struct clk *clk_reg_prcmu_scalable_rate(const char *name,
+					const char *parent_name,
+					u8 cg_sel,
+					unsigned long rate,
+					unsigned long flags)
+{
+	return clk_reg_prcmu(name, parent_name, cg_sel, rate, flags,
+			&clk_prcmu_scalable_rate_ops);
+}
+
 struct clk *clk_reg_prcmu_rate(const char *name,
 			       const char *parent_name,
 			       u8 cg_sel,
diff --git a/drivers/clk/ux500/clk.h b/drivers/clk/ux500/clk.h
index 836d7d1..a9e2961 100644
--- a/drivers/clk/ux500/clk.h
+++ b/drivers/clk/ux500/clk.h
@@ -35,6 +35,12 @@ struct clk *clk_reg_prcmu_gate(const char *name,
 			       u8 cg_sel,
 			       unsigned long flags);
 
+struct clk *clk_reg_prcmu_scalable_rate(const char *name,
+					const char *parent_name,
+					u8 cg_sel,
+					unsigned long rate,
+					unsigned long flags);
+
 struct clk *clk_reg_prcmu_rate(const char *name,
 			       const char *parent_name,
 			       u8 cg_sel,
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 7/8] clk: ux500: Add armss clk and fixup smp_twd clk for u8500
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

The new armss clk is a prcmu_scalable_rate clk which represents
the ARMSS clk. This then makes it possible to convert the smp_twd
clk to a fixed factor clock type, using a fixed divider of 2 and
with the armss clk as parent.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/clk/ux500/u8500_clk.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c
index ca4a25e..b1bd1c46 100644
--- a/drivers/clk/ux500/u8500_clk.c
+++ b/drivers/clk/ux500/u8500_clk.c
@@ -205,16 +205,18 @@ void u8500_clk_init(void)
 	clk_register_clkdev(clk, "dsilp2", "dsilink.2");
 	clk_register_clkdev(clk, "dsilp2", "mcde");
 
-	clk = clk_reg_prcmu_rate("smp_twd", NULL, PRCMU_ARMSS,
-				CLK_IS_ROOT|CLK_GET_RATE_NOCACHE|
-				CLK_IGNORE_UNUSED);
+	clk = clk_reg_prcmu_scalable_rate("armss", NULL,
+				PRCMU_ARMSS, 0, CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+	clk_register_clkdev(clk, "armss", NULL);
+
+	clk = clk_register_fixed_factor(NULL, "smp_twd", "armss",
+				CLK_IGNORE_UNUSED, 1, 2);
 	clk_register_clkdev(clk, NULL, "smp_twd");
 
 	/*
 	 * FIXME: Add special handled PRCMU clocks here:
-	 * 1. clk_arm, use PRCMU_ARMCLK.
-	 * 2. clkout0yuv, use PRCMU as parent + need regulator + pinctrl.
-	 * 3. ab9540_clkout1yuv, see clkout0yuv
+	 * 1. clkout0yuv, use PRCMU as parent + need regulator + pinctrl.
+	 * 2. ab9540_clkout1yuv, see clkout0yuv
 	 */
 
 	/* PRCC P-clocks */
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 7/8] clk: ux500: Add armss clk and fixup smp_twd clk for u8500
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

The new armss clk is a prcmu_scalable_rate clk which represents
the ARMSS clk. This then makes it possible to convert the smp_twd
clk to a fixed factor clock type, using a fixed divider of 2 and
with the armss clk as parent.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/clk/ux500/u8500_clk.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c
index ca4a25e..b1bd1c46 100644
--- a/drivers/clk/ux500/u8500_clk.c
+++ b/drivers/clk/ux500/u8500_clk.c
@@ -205,16 +205,18 @@ void u8500_clk_init(void)
 	clk_register_clkdev(clk, "dsilp2", "dsilink.2");
 	clk_register_clkdev(clk, "dsilp2", "mcde");
 
-	clk = clk_reg_prcmu_rate("smp_twd", NULL, PRCMU_ARMSS,
-				CLK_IS_ROOT|CLK_GET_RATE_NOCACHE|
-				CLK_IGNORE_UNUSED);
+	clk = clk_reg_prcmu_scalable_rate("armss", NULL,
+				PRCMU_ARMSS, 0, CLK_IS_ROOT|CLK_IGNORE_UNUSED);
+	clk_register_clkdev(clk, "armss", NULL);
+
+	clk = clk_register_fixed_factor(NULL, "smp_twd", "armss",
+				CLK_IGNORE_UNUSED, 1, 2);
 	clk_register_clkdev(clk, NULL, "smp_twd");
 
 	/*
 	 * FIXME: Add special handled PRCMU clocks here:
-	 * 1. clk_arm, use PRCMU_ARMCLK.
-	 * 2. clkout0yuv, use PRCMU as parent + need regulator + pinctrl.
-	 * 3. ab9540_clkout1yuv, see clkout0yuv
+	 * 1. clkout0yuv, use PRCMU as parent + need regulator + pinctrl.
+	 * 2. ab9540_clkout1yuv, see clkout0yuv
 	 */
 
 	/* PRCC P-clocks */
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-10 11:42   ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ulf Hansson <ulf.hansson@linaro.org>

Using the armss clk to update the frequency makes the driver no more
directly dependant on the prmcu API.

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/cpufreq/db8500-cpufreq.c |   24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index dea9a49..4f154bc 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -14,10 +14,11 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
-#include <linux/mfd/dbx500-prcmu.h>
+#include <linux/clk.h>
 #include <mach/id.h>
 
 static struct cpufreq_frequency_table *freq_table;
+static struct clk *armss_clk;
 
 static struct freq_attr *db8500_cpufreq_attr[] = {
 	&cpufreq_freq_attr_scaling_available_freqs,
@@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 	for_each_cpu(freqs.cpu, policy->cpus)
 		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 
-	/* request the PRCM unit for opp change */
-	if (prcmu_set_arm_opp(freq_table[idx].index)) {
-		pr_err("db8500-cpufreq:  Failed to set OPP level\n");
+	/* update armss clk frequency */
+	if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) {
+		pr_err("db8500-cpufreq: Failed to update armss clk\n");
 		return -EINVAL;
 	}
 
@@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
 {
 	int i = 0;
-	/* request the prcm to get the current ARM opp */
-	int opp = prcmu_get_arm_opp();
+	unsigned long freq = clk_get_rate(armss_clk) / 1000;
 
 	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
-		if (opp == freq_table[i].index)
+		if (freq <= freq_table[i].frequency)
 			return freq_table[i].frequency;
 		i++;
 	}
 
-	/* We could not find a corresponding opp frequency. */
+	/* We could not find a corresponding frequency. */
+	pr_err("db8500-cpufreq: Failed to find cpufreq speed\n");
 	return 0;
 }
 
@@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
 	int i = 0;
 	int res;
 
+	armss_clk = clk_get(NULL, "armss");
+	if (IS_ERR(armss_clk)) {
+		pr_err("db8500-cpufreq : Failed to get armss clk\n");
+		return PTR_ERR(armss_clk);
+	}
+
 	pr_info("db8500-cpufreq : Available frequencies:\n");
 	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
 		pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
@@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
 		cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
 	else {
 		pr_err("db8500-cpufreq : Failed to read policy table\n");
+		clk_put(armss_clk);
 		return res;
 	}
 
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency
@ 2012-10-10 11:42   ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki
  Cc: cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot, Ulf Hansson

From: Ulf Hansson <ulf.hansson@linaro.org>

Using the armss clk to update the frequency makes the driver no more
directly dependant on the prmcu API.

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/cpufreq/db8500-cpufreq.c |   24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
index dea9a49..4f154bc 100644
--- a/drivers/cpufreq/db8500-cpufreq.c
+++ b/drivers/cpufreq/db8500-cpufreq.c
@@ -14,10 +14,11 @@
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
-#include <linux/mfd/dbx500-prcmu.h>
+#include <linux/clk.h>
 #include <mach/id.h>
 
 static struct cpufreq_frequency_table *freq_table;
+static struct clk *armss_clk;
 
 static struct freq_attr *db8500_cpufreq_attr[] = {
 	&cpufreq_freq_attr_scaling_available_freqs,
@@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 	for_each_cpu(freqs.cpu, policy->cpus)
 		cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
 
-	/* request the PRCM unit for opp change */
-	if (prcmu_set_arm_opp(freq_table[idx].index)) {
-		pr_err("db8500-cpufreq:  Failed to set OPP level\n");
+	/* update armss clk frequency */
+	if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) {
+		pr_err("db8500-cpufreq: Failed to update armss clk\n");
 		return -EINVAL;
 	}
 
@@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
 static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
 {
 	int i = 0;
-	/* request the prcm to get the current ARM opp */
-	int opp = prcmu_get_arm_opp();
+	unsigned long freq = clk_get_rate(armss_clk) / 1000;
 
 	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
-		if (opp == freq_table[i].index)
+		if (freq <= freq_table[i].frequency)
 			return freq_table[i].frequency;
 		i++;
 	}
 
-	/* We could not find a corresponding opp frequency. */
+	/* We could not find a corresponding frequency. */
+	pr_err("db8500-cpufreq: Failed to find cpufreq speed\n");
 	return 0;
 }
 
@@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
 	int i = 0;
 	int res;
 
+	armss_clk = clk_get(NULL, "armss");
+	if (IS_ERR(armss_clk)) {
+		pr_err("db8500-cpufreq : Failed to get armss clk\n");
+		return PTR_ERR(armss_clk);
+	}
+
 	pr_info("db8500-cpufreq : Available frequencies:\n");
 	while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
 		pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
@@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
 		cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
 	else {
 		pr_err("db8500-cpufreq : Failed to read policy table\n");
+		clk_put(armss_clk);
 		return res;
 	}
 
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH 4/8] cpufreq: db8500: Fetch cpufreq table from platform data
  2012-10-10 11:42   ` Ulf Hansson
@ 2012-10-11 13:41     ` Lee Jones
  -1 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 13:41 UTC (permalink / raw)
  To: linux-arm-kernel

> -static struct cpufreq_frequency_table freq_table[] = {
> -	[0] = {
> -		.index = 0,
> -		.frequency = 200000,
> -	},
> -	[1] = {
> -		.index = 1,
> -		.frequency = 400000,
> -	},
> -	[2] = {
> -		.index = 2,
> -		.frequency = 800000,
> -	},
> -	[3] = {
> -		/* Used for MAX_OPP, if available */
> -		.index = 3,
> -		.frequency = CPUFREQ_TABLE_END,
> -	},
> -	[4] = {
> -		.index = 4,
> -		.frequency = CPUFREQ_TABLE_END,
> -	},
> -};

So where has this table gone? Am I missing a patch?

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 4/8] cpufreq: db8500: Fetch cpufreq table from platform data
@ 2012-10-11 13:41     ` Lee Jones
  0 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 13:41 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki, cpufreq, linux-pm, Linus Walleij,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot,
	Ulf Hansson

> -static struct cpufreq_frequency_table freq_table[] = {
> -	[0] = {
> -		.index = 0,
> -		.frequency = 200000,
> -	},
> -	[1] = {
> -		.index = 1,
> -		.frequency = 400000,
> -	},
> -	[2] = {
> -		.index = 2,
> -		.frequency = 800000,
> -	},
> -	[3] = {
> -		/* Used for MAX_OPP, if available */
> -		.index = 3,
> -		.frequency = CPUFREQ_TABLE_END,
> -	},
> -	[4] = {
> -		.index = 4,
> -		.frequency = CPUFREQ_TABLE_END,
> -	},
> -};

So where has this table gone? Am I missing a patch?

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-10 11:42 ` Ulf Hansson
@ 2012-10-11 13:44   ` Lee Jones
  -1 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

> Patches are based on Linus Torvalds tree with latest commit as of okt 10.

Hmm... I get:

Applying: clk: ux500: Support for prcmu_scalable_rate clock
error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
error: drivers/clk/ux500/clk.h: does not exist in index
Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock

So when did drivers/clk/ux500/* arrive? 

Or is it still sitting in your tree?

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-11 13:44   ` Lee Jones
  0 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 13:44 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki, cpufreq, linux-pm, Linus Walleij,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot,
	Ulf Hansson

> Patches are based on Linus Torvalds tree with latest commit as of okt 10.

Hmm... I get:

Applying: clk: ux500: Support for prcmu_scalable_rate clock
error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
error: drivers/clk/ux500/clk.h: does not exist in index
Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock

So when did drivers/clk/ux500/* arrive? 

Or is it still sitting in your tree?

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-11 13:44   ` Lee Jones
@ 2012-10-11 14:24     ` Linus Walleij
  -1 siblings, 0 replies; 47+ messages in thread
From: Linus Walleij @ 2012-10-11 14:24 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:

>> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>
> Hmm... I get:
>
> Applying: clk: ux500: Support for prcmu_scalable_rate clock
> error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
> error: drivers/clk/ux500/clk.h: does not exist in index
> Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>
> So when did drivers/clk/ux500/* arrive?

Exactly here, 10 days ago on Torvalds' master branch:

commit 2c0c86d5b67ee04e8b71a2ea2a3af6d224611cfc
Merge: fdb2f9c 494bfec
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Mon Oct 1 12:09:04 2012 -0700

    Merge tag 'clk-for-linus' of git://git.linaro.org/people/mturquette/linux

    Pull clk framework update from Michael Turquette:
     "The common clk framework changes for 3.7 are dominated by ARM platform
      ports to the framework along with one MIPS port, one MFD port, one
      minor framework enhancement and one helper function for platforms
      expressing their clock data through device tree."

    * tag 'clk-for-linus' of git://git.linaro.org/people/mturquette/linux:
      clk: add of_clk_src_onecell_get() support
      clk: ux500: Define smp_twd clock for u8500
      mfd: dbx500: Provide a more accurate smp_twd clock
      clk: ux500: Support for prmcu_rate clock
      clk: Provide option for clk_get_rate to issue hw for new rate
      clock: max77686: Add driver for Maxim 77686 32Khz crystal oscillator.
      ARM: ux500: Switch to use common clock framework
      clk: ux500: Clock definitions for u8500
      clk: ux500: First version of clock definitions for ux500
      clk: ux500: Adapt PRCMU and PRCC clocks for common clk
(...)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-11 14:24     ` Linus Walleij
  0 siblings, 0 replies; 47+ messages in thread
From: Linus Walleij @ 2012-10-11 14:24 UTC (permalink / raw)
  To: Lee Jones
  Cc: Ulf Hansson, linux-arm-kernel, Mike Turquette, Mike Turquette,
	Samuel Ortiz, Rafael J. Wysocki, cpufreq, linux-pm,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot,
	Ulf Hansson

On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:

>> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>
> Hmm... I get:
>
> Applying: clk: ux500: Support for prcmu_scalable_rate clock
> error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
> error: drivers/clk/ux500/clk.h: does not exist in index
> Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>
> So when did drivers/clk/ux500/* arrive?

Exactly here, 10 days ago on Torvalds' master branch:

commit 2c0c86d5b67ee04e8b71a2ea2a3af6d224611cfc
Merge: fdb2f9c 494bfec
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Mon Oct 1 12:09:04 2012 -0700

    Merge tag 'clk-for-linus' of git://git.linaro.org/people/mturquette/linux

    Pull clk framework update from Michael Turquette:
     "The common clk framework changes for 3.7 are dominated by ARM platform
      ports to the framework along with one MIPS port, one MFD port, one
      minor framework enhancement and one helper function for platforms
      expressing their clock data through device tree."

    * tag 'clk-for-linus' of git://git.linaro.org/people/mturquette/linux:
      clk: add of_clk_src_onecell_get() support
      clk: ux500: Define smp_twd clock for u8500
      mfd: dbx500: Provide a more accurate smp_twd clock
      clk: ux500: Support for prmcu_rate clock
      clk: Provide option for clk_get_rate to issue hw for new rate
      clock: max77686: Add driver for Maxim 77686 32Khz crystal oscillator.
      ARM: ux500: Switch to use common clock framework
      clk: ux500: Clock definitions for u8500
      clk: ux500: First version of clock definitions for ux500
      clk: ux500: Adapt PRCMU and PRCC clocks for common clk
(...)

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-11 14:24     ` Linus Walleij
@ 2012-10-11 15:19       ` Lee Jones
  -1 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 15:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 11 Oct 2012, Linus Walleij wrote:

> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
> 
> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
> >
> > Hmm... I get:
> >
> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
> > error: drivers/clk/ux500/clk.h: does not exist in index
> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
> >
> > So when did drivers/clk/ux500/* arrive?
> 
> Exactly here, 10 days ago on Torvalds' master branch:

Ah I see. Basing patches on commits half way through the merge
window. Good move! ;)

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-11 15:19       ` Lee Jones
  0 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 15:19 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Ulf Hansson, linux-arm-kernel, Mike Turquette, Mike Turquette,
	Samuel Ortiz, Rafael J. Wysocki, cpufreq, linux-pm,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot,
	Ulf Hansson

On Thu, 11 Oct 2012, Linus Walleij wrote:

> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
> 
> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
> >
> > Hmm... I get:
> >
> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
> > error: drivers/clk/ux500/clk.h: does not exist in index
> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
> >
> > So when did drivers/clk/ux500/* arrive?
> 
> Exactly here, 10 days ago on Torvalds' master branch:

Ah I see. Basing patches on commits half way through the merge
window. Good move! ;)

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 4/8] cpufreq: db8500: Fetch cpufreq table from platform data
  2012-10-11 13:41     ` Lee Jones
@ 2012-10-11 15:49       ` Lee Jones
  -1 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 11 Oct 2012, Lee Jones wrote:

> > -static struct cpufreq_frequency_table freq_table[] = {
> > -	[0] = {
> > -		.index = 0,
> > -		.frequency = 200000,
> > -	},
> > -	[1] = {
> > -		.index = 1,
> > -		.frequency = 400000,
> > -	},
> > -	[2] = {
> > -		.index = 2,
> > -		.frequency = 800000,
> > -	},
> > -	[3] = {
> > -		/* Used for MAX_OPP, if available */
> > -		.index = 3,
> > -		.frequency = CPUFREQ_TABLE_END,
> > -	},
> > -	[4] = {
> > -		.index = 4,
> > -		.frequency = CPUFREQ_TABLE_END,
> > -	},
> > -};
> 
> So where has this table gone? Am I missing a patch?

Ah, I see it now. Nice!

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 4/8] cpufreq: db8500: Fetch cpufreq table from platform data
@ 2012-10-11 15:49       ` Lee Jones
  0 siblings, 0 replies; 47+ messages in thread
From: Lee Jones @ 2012-10-11 15:49 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	Rafael J. Wysocki, cpufreq, linux-pm, Linus Walleij,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot,
	Ulf Hansson

On Thu, 11 Oct 2012, Lee Jones wrote:

> > -static struct cpufreq_frequency_table freq_table[] = {
> > -	[0] = {
> > -		.index = 0,
> > -		.frequency = 200000,
> > -	},
> > -	[1] = {
> > -		.index = 1,
> > -		.frequency = 400000,
> > -	},
> > -	[2] = {
> > -		.index = 2,
> > -		.frequency = 800000,
> > -	},
> > -	[3] = {
> > -		/* Used for MAX_OPP, if available */
> > -		.index = 3,
> > -		.frequency = CPUFREQ_TABLE_END,
> > -	},
> > -	[4] = {
> > -		.index = 4,
> > -		.frequency = CPUFREQ_TABLE_END,
> > -	},
> > -};
> 
> So where has this table gone? Am I missing a patch?

Ah, I see it now. Nice!

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency
  2012-10-10 11:42   ` Ulf Hansson
@ 2012-10-26  8:10     ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-26  8:10 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot

On 10 October 2012 13:42, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
> From: Ulf Hansson <ulf.hansson@linaro.org>
>
> Using the armss clk to update the frequency makes the driver no more
> directly dependant on the prmcu API.
>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/cpufreq/db8500-cpufreq.c |   24 ++++++++++++++++--------
>  1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
> index dea9a49..4f154bc 100644
> --- a/drivers/cpufreq/db8500-cpufreq.c
> +++ b/drivers/cpufreq/db8500-cpufreq.c
> @@ -14,10 +14,11 @@
>  #include <linux/delay.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
> -#include <linux/mfd/dbx500-prcmu.h>
> +#include <linux/clk.h>
>  #include <mach/id.h>
>
>  static struct cpufreq_frequency_table *freq_table;
> +static struct clk *armss_clk;
>
>  static struct freq_attr *db8500_cpufreq_attr[] = {
>         &cpufreq_freq_attr_scaling_available_freqs,
> @@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
>         for_each_cpu(freqs.cpu, policy->cpus)
>                 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
>
> -       /* request the PRCM unit for opp change */
> -       if (prcmu_set_arm_opp(freq_table[idx].index)) {
> -               pr_err("db8500-cpufreq:  Failed to set OPP level\n");
> +       /* update armss clk frequency */
> +       if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) {
> +               pr_err("db8500-cpufreq: Failed to update armss clk\n");
>                 return -EINVAL;
>         }
>
> @@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
>  static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
>  {
>         int i = 0;
> -       /* request the prcm to get the current ARM opp */
> -       int opp = prcmu_get_arm_opp();
> +       unsigned long freq = clk_get_rate(armss_clk) / 1000;
>
>         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
> -               if (opp == freq_table[i].index)
> +               if (freq <= freq_table[i].frequency)
>                         return freq_table[i].frequency;
>                 i++;
>         }
>
> -       /* We could not find a corresponding opp frequency. */
> +       /* We could not find a corresponding frequency. */
> +       pr_err("db8500-cpufreq: Failed to find cpufreq speed\n");
>         return 0;
>  }
>
> @@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
>         int i = 0;
>         int res;
>
> +       armss_clk = clk_get(NULL, "armss");
> +       if (IS_ERR(armss_clk)) {
> +               pr_err("db8500-cpufreq : Failed to get armss clk\n");
> +               return PTR_ERR(armss_clk);
> +       }
> +
>         pr_info("db8500-cpufreq : Available frequencies:\n");
>         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
>                 pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
> @@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
>                 cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
>         else {
>                 pr_err("db8500-cpufreq : Failed to read policy table\n");
> +               clk_put(armss_clk);
>                 return res;
>         }
>
> --
> 1.7.10
>

Just a kind reminder on this Rafael; trying to collect acks, do you
think we can advise Mike to merge this though his clk tree?

Kind regards
Ulf Hansson

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency
@ 2012-10-26  8:10     ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-26  8:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 10 October 2012 13:42, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
> From: Ulf Hansson <ulf.hansson@linaro.org>
>
> Using the armss clk to update the frequency makes the driver no more
> directly dependant on the prmcu API.
>
> Cc: Rafael J. Wysocki <rjw@sisk.pl>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/cpufreq/db8500-cpufreq.c |   24 ++++++++++++++++--------
>  1 file changed, 16 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
> index dea9a49..4f154bc 100644
> --- a/drivers/cpufreq/db8500-cpufreq.c
> +++ b/drivers/cpufreq/db8500-cpufreq.c
> @@ -14,10 +14,11 @@
>  #include <linux/delay.h>
>  #include <linux/slab.h>
>  #include <linux/platform_device.h>
> -#include <linux/mfd/dbx500-prcmu.h>
> +#include <linux/clk.h>
>  #include <mach/id.h>
>
>  static struct cpufreq_frequency_table *freq_table;
> +static struct clk *armss_clk;
>
>  static struct freq_attr *db8500_cpufreq_attr[] = {
>         &cpufreq_freq_attr_scaling_available_freqs,
> @@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
>         for_each_cpu(freqs.cpu, policy->cpus)
>                 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
>
> -       /* request the PRCM unit for opp change */
> -       if (prcmu_set_arm_opp(freq_table[idx].index)) {
> -               pr_err("db8500-cpufreq:  Failed to set OPP level\n");
> +       /* update armss clk frequency */
> +       if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) {
> +               pr_err("db8500-cpufreq: Failed to update armss clk\n");
>                 return -EINVAL;
>         }
>
> @@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
>  static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
>  {
>         int i = 0;
> -       /* request the prcm to get the current ARM opp */
> -       int opp = prcmu_get_arm_opp();
> +       unsigned long freq = clk_get_rate(armss_clk) / 1000;
>
>         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
> -               if (opp == freq_table[i].index)
> +               if (freq <= freq_table[i].frequency)
>                         return freq_table[i].frequency;
>                 i++;
>         }
>
> -       /* We could not find a corresponding opp frequency. */
> +       /* We could not find a corresponding frequency. */
> +       pr_err("db8500-cpufreq: Failed to find cpufreq speed\n");
>         return 0;
>  }
>
> @@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
>         int i = 0;
>         int res;
>
> +       armss_clk = clk_get(NULL, "armss");
> +       if (IS_ERR(armss_clk)) {
> +               pr_err("db8500-cpufreq : Failed to get armss clk\n");
> +               return PTR_ERR(armss_clk);
> +       }
> +
>         pr_info("db8500-cpufreq : Available frequencies:\n");
>         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
>                 pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
> @@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
>                 cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
>         else {
>                 pr_err("db8500-cpufreq : Failed to read policy table\n");
> +               clk_put(armss_clk);
>                 return res;
>         }
>
> --
> 1.7.10
>

Just a kind reminder on this Rafael; trying to collect acks, do you
think we can advise Mike to merge this though his clk tree?

Kind regards
Ulf Hansson

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-11 15:19       ` Lee Jones
  (?)
@ 2012-10-26  8:19         ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-26  8:19 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: Linus Walleij, Ulf Hansson, linux-arm-kernel, Mike Turquette,
	Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot

On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
> On Thu, 11 Oct 2012, Linus Walleij wrote:
>
>> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
>>
>> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>> >
>> > Hmm... I get:
>> >
>> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
>> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
>> > error: drivers/clk/ux500/clk.h: does not exist in index
>> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>> >
>> > So when did drivers/clk/ux500/* arrive?
>>
>> Exactly here, 10 days ago on Torvalds' master branch:
>
> Ah I see. Basing patches on commits half way through the merge
> window. Good move! ;)
>
> --
> Lee Jones
> Linaro ST-Ericsson Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

Samuel, a kind reminder on this, trying to collect acks to be able to
advise Mike to take this series through his clk tree. There are two
mfd patches.
[PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
[PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP


Kind regards
Ulf Hansson

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-26  8:19         ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-26  8:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
> On Thu, 11 Oct 2012, Linus Walleij wrote:
>
>> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
>>
>> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>> >
>> > Hmm... I get:
>> >
>> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
>> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
>> > error: drivers/clk/ux500/clk.h: does not exist in index
>> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>> >
>> > So when did drivers/clk/ux500/* arrive?
>>
>> Exactly here, 10 days ago on Torvalds' master branch:
>
> Ah I see. Basing patches on commits half way through the merge
> window. Good move! ;)
>
> --
> Lee Jones
> Linaro ST-Ericsson Landing Team Lead
> Linaro.org ? Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

Samuel, a kind reminder on this, trying to collect acks to be able to
advise Mike to take this series through his clk tree. There are two
mfd patches.
[PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
[PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP


Kind regards
Ulf Hansson

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-26  8:19         ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-10-26  8:19 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: Linus Walleij, Ulf Hansson, linux-arm-kernel, Mike Turquette,
	Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot

On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
> On Thu, 11 Oct 2012, Linus Walleij wrote:
>
>> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
>>
>> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>> >
>> > Hmm... I get:
>> >
>> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
>> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
>> > error: drivers/clk/ux500/clk.h: does not exist in index
>> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>> >
>> > So when did drivers/clk/ux500/* arrive?
>>
>> Exactly here, 10 days ago on Torvalds' master branch:
>
> Ah I see. Basing patches on commits half way through the merge
> window. Good move! ;)
>
> --
> Lee Jones
> Linaro ST-Ericsson Landing Team Lead
> Linaro.org │ Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

Samuel, a kind reminder on this, trying to collect acks to be able to
advise Mike to take this series through his clk tree. There are two
mfd patches.
[PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
[PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP


Kind regards
Ulf Hansson

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-26  8:19         ` Ulf Hansson
@ 2012-10-26  8:57           ` Linus Walleij
  -1 siblings, 0 replies; 47+ messages in thread
From: Linus Walleij @ 2012-10-26  8:57 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Samuel Ortiz, Ulf Hansson, linux-arm-kernel, Mike Turquette,
	Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot

On Fri, Oct 26, 2012 at 10:19 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:

> Samuel, a kind reminder on this, trying to collect acks to be able to
> advise Mike to take this series through his clk tree. There are two
> mfd patches.
> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP

Two weeks of slack for review is good enough, involved
subsystem maintainers have been Cc:ed.

Mike T, can you just apply the patches please.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-26  8:57           ` Linus Walleij
  0 siblings, 0 replies; 47+ messages in thread
From: Linus Walleij @ 2012-10-26  8:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 26, 2012 at 10:19 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:

> Samuel, a kind reminder on this, trying to collect acks to be able to
> advise Mike to take this series through his clk tree. There are two
> mfd patches.
> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP

Two weeks of slack for review is good enough, involved
subsystem maintainers have been Cc:ed.

Mike T, can you just apply the patches please.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency
  2012-10-26  8:10     ` Ulf Hansson
@ 2012-10-26 11:20       ` Rafael J. Wysocki
  -1 siblings, 0 replies; 47+ messages in thread
From: Rafael J. Wysocki @ 2012-10-26 11:20 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: linux-arm-kernel, Mike Turquette, Mike Turquette, Samuel Ortiz,
	cpufreq, linux-pm, Linus Walleij, Lee Jones, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot

On Friday, October 26, 2012 10:10:40 AM Ulf Hansson wrote:
> On 10 October 2012 13:42, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
> > From: Ulf Hansson <ulf.hansson@linaro.org>
> >
> > Using the armss clk to update the frequency makes the driver no more
> > directly dependant on the prmcu API.
> >
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > ---
> >  drivers/cpufreq/db8500-cpufreq.c |   24 ++++++++++++++++--------
> >  1 file changed, 16 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
> > index dea9a49..4f154bc 100644
> > --- a/drivers/cpufreq/db8500-cpufreq.c
> > +++ b/drivers/cpufreq/db8500-cpufreq.c
> > @@ -14,10 +14,11 @@
> >  #include <linux/delay.h>
> >  #include <linux/slab.h>
> >  #include <linux/platform_device.h>
> > -#include <linux/mfd/dbx500-prcmu.h>
> > +#include <linux/clk.h>
> >  #include <mach/id.h>
> >
> >  static struct cpufreq_frequency_table *freq_table;
> > +static struct clk *armss_clk;
> >
> >  static struct freq_attr *db8500_cpufreq_attr[] = {
> >         &cpufreq_freq_attr_scaling_available_freqs,
> > @@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
> >         for_each_cpu(freqs.cpu, policy->cpus)
> >                 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
> >
> > -       /* request the PRCM unit for opp change */
> > -       if (prcmu_set_arm_opp(freq_table[idx].index)) {
> > -               pr_err("db8500-cpufreq:  Failed to set OPP level\n");
> > +       /* update armss clk frequency */
> > +       if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) {
> > +               pr_err("db8500-cpufreq: Failed to update armss clk\n");
> >                 return -EINVAL;
> >         }
> >
> > @@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
> >  static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
> >  {
> >         int i = 0;
> > -       /* request the prcm to get the current ARM opp */
> > -       int opp = prcmu_get_arm_opp();
> > +       unsigned long freq = clk_get_rate(armss_clk) / 1000;
> >
> >         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
> > -               if (opp == freq_table[i].index)
> > +               if (freq <= freq_table[i].frequency)
> >                         return freq_table[i].frequency;
> >                 i++;
> >         }
> >
> > -       /* We could not find a corresponding opp frequency. */
> > +       /* We could not find a corresponding frequency. */
> > +       pr_err("db8500-cpufreq: Failed to find cpufreq speed\n");
> >         return 0;
> >  }
> >
> > @@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
> >         int i = 0;
> >         int res;
> >
> > +       armss_clk = clk_get(NULL, "armss");
> > +       if (IS_ERR(armss_clk)) {
> > +               pr_err("db8500-cpufreq : Failed to get armss clk\n");
> > +               return PTR_ERR(armss_clk);
> > +       }
> > +
> >         pr_info("db8500-cpufreq : Available frequencies:\n");
> >         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
> >                 pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
> > @@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
> >                 cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
> >         else {
> >                 pr_err("db8500-cpufreq : Failed to read policy table\n");
> > +               clk_put(armss_clk);
> >                 return res;
> >         }
> >
> > --
> > 1.7.10
> >
> 
> Just a kind reminder on this Rafael; trying to collect acks, do you
> think we can advise Mike to merge this though his clk tree?

Yes, please.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency
@ 2012-10-26 11:20       ` Rafael J. Wysocki
  0 siblings, 0 replies; 47+ messages in thread
From: Rafael J. Wysocki @ 2012-10-26 11:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, October 26, 2012 10:10:40 AM Ulf Hansson wrote:
> On 10 October 2012 13:42, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
> > From: Ulf Hansson <ulf.hansson@linaro.org>
> >
> > Using the armss clk to update the frequency makes the driver no more
> > directly dependant on the prmcu API.
> >
> > Cc: Rafael J. Wysocki <rjw@sisk.pl>
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > ---
> >  drivers/cpufreq/db8500-cpufreq.c |   24 ++++++++++++++++--------
> >  1 file changed, 16 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/cpufreq/db8500-cpufreq.c b/drivers/cpufreq/db8500-cpufreq.c
> > index dea9a49..4f154bc 100644
> > --- a/drivers/cpufreq/db8500-cpufreq.c
> > +++ b/drivers/cpufreq/db8500-cpufreq.c
> > @@ -14,10 +14,11 @@
> >  #include <linux/delay.h>
> >  #include <linux/slab.h>
> >  #include <linux/platform_device.h>
> > -#include <linux/mfd/dbx500-prcmu.h>
> > +#include <linux/clk.h>
> >  #include <mach/id.h>
> >
> >  static struct cpufreq_frequency_table *freq_table;
> > +static struct clk *armss_clk;
> >
> >  static struct freq_attr *db8500_cpufreq_attr[] = {
> >         &cpufreq_freq_attr_scaling_available_freqs,
> > @@ -58,9 +59,9 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
> >         for_each_cpu(freqs.cpu, policy->cpus)
> >                 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
> >
> > -       /* request the PRCM unit for opp change */
> > -       if (prcmu_set_arm_opp(freq_table[idx].index)) {
> > -               pr_err("db8500-cpufreq:  Failed to set OPP level\n");
> > +       /* update armss clk frequency */
> > +       if (clk_set_rate(armss_clk, freq_table[idx].frequency * 1000)) {
> > +               pr_err("db8500-cpufreq: Failed to update armss clk\n");
> >                 return -EINVAL;
> >         }
> >
> > @@ -74,16 +75,16 @@ static int db8500_cpufreq_target(struct cpufreq_policy *policy,
> >  static unsigned int db8500_cpufreq_getspeed(unsigned int cpu)
> >  {
> >         int i = 0;
> > -       /* request the prcm to get the current ARM opp */
> > -       int opp = prcmu_get_arm_opp();
> > +       unsigned long freq = clk_get_rate(armss_clk) / 1000;
> >
> >         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
> > -               if (opp == freq_table[i].index)
> > +               if (freq <= freq_table[i].frequency)
> >                         return freq_table[i].frequency;
> >                 i++;
> >         }
> >
> > -       /* We could not find a corresponding opp frequency. */
> > +       /* We could not find a corresponding frequency. */
> > +       pr_err("db8500-cpufreq: Failed to find cpufreq speed\n");
> >         return 0;
> >  }
> >
> > @@ -92,6 +93,12 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
> >         int i = 0;
> >         int res;
> >
> > +       armss_clk = clk_get(NULL, "armss");
> > +       if (IS_ERR(armss_clk)) {
> > +               pr_err("db8500-cpufreq : Failed to get armss clk\n");
> > +               return PTR_ERR(armss_clk);
> > +       }
> > +
> >         pr_info("db8500-cpufreq : Available frequencies:\n");
> >         while (freq_table[i].frequency != CPUFREQ_TABLE_END) {
> >                 pr_info("  %d Mhz\n", freq_table[i].frequency/1000);
> > @@ -104,6 +111,7 @@ static int __cpuinit db8500_cpufreq_init(struct cpufreq_policy *policy)
> >                 cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
> >         else {
> >                 pr_err("db8500-cpufreq : Failed to read policy table\n");
> > +               clk_put(armss_clk);
> >                 return res;
> >         }
> >
> > --
> > 1.7.10
> >
> 
> Just a kind reminder on this Rafael; trying to collect acks, do you
> think we can advise Mike to merge this though his clk tree?

Yes, please.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-26  8:57           ` Linus Walleij
@ 2012-10-26 18:03             ` Mike Turquette
  -1 siblings, 0 replies; 47+ messages in thread
From: Mike Turquette @ 2012-10-26 18:03 UTC (permalink / raw)
  To: Linus Walleij, Ulf Hansson
  Cc: Samuel Ortiz, Ulf Hansson, linux-arm-kernel, Rafael J. Wysocki,
	cpufreq, linux-pm, Philippe Begnic, Rickard Andersson,
	Jonas Aberg, Vincent Guittot

Quoting Linus Walleij (2012-10-26 01:57:49)
> On Fri, Oct 26, 2012 at 10:19 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> 
> > Samuel, a kind reminder on this, trying to collect acks to be able to
> > advise Mike to take this series through his clk tree. There are two
> > mfd patches.
> > [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
> > [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
> 
> Two weeks of slack for review is good enough, involved
> subsystem maintainers have been Cc:ed.
> 
> Mike T, can you just apply the patches please.
> 

Would be better to get ACKs but enough time has passed.  I'll take these
into clk-next (which will get built while I fly to Copenhagen for LCE).

Expect to see a new clk-next on Monday.

Regards,
Mike

> Yours,
> Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-26 18:03             ` Mike Turquette
  0 siblings, 0 replies; 47+ messages in thread
From: Mike Turquette @ 2012-10-26 18:03 UTC (permalink / raw)
  To: linux-arm-kernel

Quoting Linus Walleij (2012-10-26 01:57:49)
> On Fri, Oct 26, 2012 at 10:19 AM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> 
> > Samuel, a kind reminder on this, trying to collect acks to be able to
> > advise Mike to take this series through his clk tree. There are two
> > mfd patches.
> > [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
> > [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
> 
> Two weeks of slack for review is good enough, involved
> subsystem maintainers have been Cc:ed.
> 
> Mike T, can you just apply the patches please.
> 

Would be better to get ACKs but enough time has passed.  I'll take these
into clk-next (which will get built while I fly to Copenhagen for LCE).

Expect to see a new clk-next on Monday.

Regards,
Mike

> Yours,
> Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-26 18:03             ` Mike Turquette
@ 2012-10-26 23:34               ` Linus Walleij
  -1 siblings, 0 replies; 47+ messages in thread
From: Linus Walleij @ 2012-10-26 23:34 UTC (permalink / raw)
  To: Mike Turquette
  Cc: Ulf Hansson, Samuel Ortiz, Ulf Hansson, linux-arm-kernel,
	Rafael J. Wysocki, cpufreq, linux-pm, Philippe Begnic,
	Rickard Andersson, Jonas Aberg, Vincent Guittot

On Fri, Oct 26, 2012 at 8:03 PM, Mike Turquette <mturquette@ti.com> wrote:

> Would be better to get ACKs but enough time has passed.  I'll take these
> into clk-next (which will get built while I fly to Copenhagen for LCE).

OK FWIW: Acked-by: Linus Walleij <linus.walleij@linaro.org>
for all.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-26 23:34               ` Linus Walleij
  0 siblings, 0 replies; 47+ messages in thread
From: Linus Walleij @ 2012-10-26 23:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Oct 26, 2012 at 8:03 PM, Mike Turquette <mturquette@ti.com> wrote:

> Would be better to get ACKs but enough time has passed.  I'll take these
> into clk-next (which will get built while I fly to Copenhagen for LCE).

OK FWIW: Acked-by: Linus Walleij <linus.walleij@linaro.org>
for all.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-26  8:19         ` Ulf Hansson
  (?)
@ 2012-10-28 22:59           ` Samuel Ortiz
  -1 siblings, 0 replies; 47+ messages in thread
From: Samuel Ortiz @ 2012-10-28 22:59 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Linus Walleij, Ulf Hansson, linux-arm-kernel, Mike Turquette,
	Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot

Hi Ulf,

On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote:
> On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
> > On Thu, 11 Oct 2012, Linus Walleij wrote:
> >
> >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
> >>
> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
> >> >
> >> > Hmm... I get:
> >> >
> >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
> >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
> >> > error: drivers/clk/ux500/clk.h: does not exist in index
> >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
> >> >
> >> > So when did drivers/clk/ux500/* arrive?
> >>
> >> Exactly here, 10 days ago on Torvalds' master branch:
> >
> > Ah I see. Basing patches on commits half way through the merge
> > window. Good move! ;)
> >
> > --
> > Lee Jones
> > Linaro ST-Ericsson Landing Team Lead
> > Linaro.org │ Open source software for ARM SoCs
> > Follow Linaro: Facebook | Twitter | Blog
> 
> Samuel, a kind reminder on this, trying to collect acks to be able to
> advise Mike to take this series through his clk tree. There are two
> mfd patches.
> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
Sorry for the delay:

Acked-by: Samuel Ortiz <sameo@linux.intel.com>

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-28 22:59           ` Samuel Ortiz
  0 siblings, 0 replies; 47+ messages in thread
From: Samuel Ortiz @ 2012-10-28 22:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Ulf,

On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote:
> On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
> > On Thu, 11 Oct 2012, Linus Walleij wrote:
> >
> >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
> >>
> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
> >> >
> >> > Hmm... I get:
> >> >
> >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
> >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
> >> > error: drivers/clk/ux500/clk.h: does not exist in index
> >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
> >> >
> >> > So when did drivers/clk/ux500/* arrive?
> >>
> >> Exactly here, 10 days ago on Torvalds' master branch:
> >
> > Ah I see. Basing patches on commits half way through the merge
> > window. Good move! ;)
> >
> > --
> > Lee Jones
> > Linaro ST-Ericsson Landing Team Lead
> > Linaro.org ? Open source software for ARM SoCs
> > Follow Linaro: Facebook | Twitter | Blog
> 
> Samuel, a kind reminder on this, trying to collect acks to be able to
> advise Mike to take this series through his clk tree. There are two
> mfd patches.
> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
Sorry for the delay:

Acked-by: Samuel Ortiz <sameo@linux.intel.com>

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-10-28 22:59           ` Samuel Ortiz
  0 siblings, 0 replies; 47+ messages in thread
From: Samuel Ortiz @ 2012-10-28 22:59 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Linus Walleij, Ulf Hansson, linux-arm-kernel, Mike Turquette,
	Mike Turquette, Rafael J. Wysocki, cpufreq, linux-pm,
	Philippe Begnic, Rickard Andersson, Jonas Aberg, Vincent Guittot

Hi Ulf,

On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote:
> On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
> > On Thu, 11 Oct 2012, Linus Walleij wrote:
> >
> >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
> >>
> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
> >> >
> >> > Hmm... I get:
> >> >
> >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
> >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
> >> > error: drivers/clk/ux500/clk.h: does not exist in index
> >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
> >> >
> >> > So when did drivers/clk/ux500/* arrive?
> >>
> >> Exactly here, 10 days ago on Torvalds' master branch:
> >
> > Ah I see. Basing patches on commits half way through the merge
> > window. Good move! ;)
> >
> > --
> > Lee Jones
> > Linaro ST-Ericsson Landing Team Lead
> > Linaro.org │ Open source software for ARM SoCs
> > Follow Linaro: Facebook | Twitter | Blog
> 
> Samuel, a kind reminder on this, trying to collect acks to be able to
> advise Mike to take this series through his clk tree. There are two
> mfd patches.
> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
Sorry for the delay:

Acked-by: Samuel Ortiz <sameo@linux.intel.com>

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
  2012-10-28 22:59           ` Samuel Ortiz
  (?)
@ 2012-11-05 12:33             ` Ulf Hansson
  -1 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-11-05 12:33 UTC (permalink / raw)
  To: Mike Turquette, Mike Turquette
  Cc: Philippe Begnic, Vincent Guittot, Samuel Ortiz, Jonas Aberg,
	linux-pm, Linus Walleij, cpufreq, Rickard Andersson,
	Rafael J. Wysocki, Ulf Hansson, linux-arm-kernel

On 28 October 2012 23:59, Samuel Ortiz <sameo@linux.intel.com> wrote:
> Hi Ulf,
>
> On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote:
>> On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
>> > On Thu, 11 Oct 2012, Linus Walleij wrote:
>> >
>> >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
>> >>
>> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>> >> >
>> >> > Hmm... I get:
>> >> >
>> >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
>> >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
>> >> > error: drivers/clk/ux500/clk.h: does not exist in index
>> >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>> >> >
>> >> > So when did drivers/clk/ux500/* arrive?
>> >>
>> >> Exactly here, 10 days ago on Torvalds' master branch:
>> >
>> > Ah I see. Basing patches on commits half way through the merge
>> > window. Good move! ;)
>> >
>> > --
>> > Lee Jones
>> > Linaro ST-Ericsson Landing Team Lead
>> > Linaro.org │ Open source software for ARM SoCs
>> > Follow Linaro: Facebook | Twitter | Blog
>>
>> Samuel, a kind reminder on this, trying to collect acks to be able to
>> advise Mike to take this series through his clk tree. There are two
>> mfd patches.
>> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
>> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
> Sorry for the delay:
>
> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
>
> Cheers,
> Samuel.
>
> --
> Intel Open Source Technology Centre
> http://oss.intel.com/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

A kind ping for this this series for you Mike. I believe all patches
has received acks now as well.

Kind regards
Ulf Hansson

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-11-05 12:33             ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-11-05 12:33 UTC (permalink / raw)
  To: linux-arm-kernel

On 28 October 2012 23:59, Samuel Ortiz <sameo@linux.intel.com> wrote:
> Hi Ulf,
>
> On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote:
>> On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
>> > On Thu, 11 Oct 2012, Linus Walleij wrote:
>> >
>> >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
>> >>
>> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>> >> >
>> >> > Hmm... I get:
>> >> >
>> >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
>> >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
>> >> > error: drivers/clk/ux500/clk.h: does not exist in index
>> >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>> >> >
>> >> > So when did drivers/clk/ux500/* arrive?
>> >>
>> >> Exactly here, 10 days ago on Torvalds' master branch:
>> >
>> > Ah I see. Basing patches on commits half way through the merge
>> > window. Good move! ;)
>> >
>> > --
>> > Lee Jones
>> > Linaro ST-Ericsson Landing Team Lead
>> > Linaro.org ? Open source software for ARM SoCs
>> > Follow Linaro: Facebook | Twitter | Blog
>>
>> Samuel, a kind reminder on this, trying to collect acks to be able to
>> advise Mike to take this series through his clk tree. There are two
>> mfd patches.
>> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
>> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
> Sorry for the delay:
>
> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
>
> Cheers,
> Samuel.
>
> --
> Intel Open Source Technology Centre
> http://oss.intel.com/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

A kind ping for this this series for you Mike. I believe all patches
has received acks now as well.

Kind regards
Ulf Hansson

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers
@ 2012-11-05 12:33             ` Ulf Hansson
  0 siblings, 0 replies; 47+ messages in thread
From: Ulf Hansson @ 2012-11-05 12:33 UTC (permalink / raw)
  To: Mike Turquette, Mike Turquette
  Cc: Philippe Begnic, Vincent Guittot, Samuel Ortiz, Jonas Aberg,
	linux-pm, Linus Walleij, cpufreq, Rickard Andersson,
	Rafael J. Wysocki, Ulf Hansson, linux-arm-kernel

On 28 October 2012 23:59, Samuel Ortiz <sameo@linux.intel.com> wrote:
> Hi Ulf,
>
> On Fri, Oct 26, 2012 at 10:19:24AM +0200, Ulf Hansson wrote:
>> On 11 October 2012 17:19, Lee Jones <lee.jones@linaro.org> wrote:
>> > On Thu, 11 Oct 2012, Linus Walleij wrote:
>> >
>> >> On Thu, Oct 11, 2012 at 3:44 PM, Lee Jones <lee.jones@linaro.org> wrote:
>> >>
>> >> >> Patches are based on Linus Torvalds tree with latest commit as of okt 10.
>> >> >
>> >> > Hmm... I get:
>> >> >
>> >> > Applying: clk: ux500: Support for prcmu_scalable_rate clock
>> >> > error: drivers/clk/ux500/clk-prcmu.c: does not exist in index
>> >> > error: drivers/clk/ux500/clk.h: does not exist in index
>> >> > Patch failed at 0001 clk: ux500: Support for prcmu_scalable_rate clock
>> >> >
>> >> > So when did drivers/clk/ux500/* arrive?
>> >>
>> >> Exactly here, 10 days ago on Torvalds' master branch:
>> >
>> > Ah I see. Basing patches on commits half way through the merge
>> > window. Good move! ;)
>> >
>> > --
>> > Lee Jones
>> > Linaro ST-Ericsson Landing Team Lead
>> > Linaro.org │ Open source software for ARM SoCs
>> > Follow Linaro: Facebook | Twitter | Blog
>>
>> Samuel, a kind reminder on this, trying to collect acks to be able to
>> advise Mike to take this series through his clk tree. There are two
>> mfd patches.
>> [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data
>> [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP
> Sorry for the delay:
>
> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
>
> Cheers,
> Samuel.
>
> --
> Intel Open Source Technology Centre
> http://oss.intel.com/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

A kind ping for this this series for you Mike. I believe all patches
has received acks now as well.

Kind regards
Ulf Hansson

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2012-11-05 12:33 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-10 11:42 [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers Ulf Hansson
2012-10-10 11:42 ` Ulf Hansson
2012-10-10 11:42 ` [PATCH 1/8] ARM: ux500: Remove cpufreq platform device Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-10 11:42 ` [PATCH 2/8] mfd: db8500: Provide cpufreq table as platform data Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-10 11:42 ` [PATCH 3/8] cpufreq: db8500: Register as a platform driver Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-10 11:42 ` [PATCH 4/8] cpufreq: db8500: Fetch cpufreq table from platform data Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-11 13:41   ` Lee Jones
2012-10-11 13:41     ` Lee Jones
2012-10-11 15:49     ` Lee Jones
2012-10-11 15:49       ` Lee Jones
2012-10-10 11:42 ` [PATCH 5/8] mfd: db8500: Connect ARMSS clk to ARM OPP Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-10 11:42 ` [PATCH 6/8] clk: ux500: Support for prcmu_scalable_rate clock Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-10 11:42 ` [PATCH 7/8] clk: ux500: Add armss clk and fixup smp_twd clk for u8500 Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-10 11:42 ` [PATCH 8/8] cpufreq: db8500: Use armss clk to update frequency Ulf Hansson
2012-10-10 11:42   ` Ulf Hansson
2012-10-26  8:10   ` Ulf Hansson
2012-10-26  8:10     ` Ulf Hansson
2012-10-26 11:20     ` Rafael J. Wysocki
2012-10-26 11:20       ` Rafael J. Wysocki
2012-10-11 13:44 ` [PATCH 0/8] clk: ux500: Fixup smp_twd clk for clk notifiers Lee Jones
2012-10-11 13:44   ` Lee Jones
2012-10-11 14:24   ` Linus Walleij
2012-10-11 14:24     ` Linus Walleij
2012-10-11 15:19     ` Lee Jones
2012-10-11 15:19       ` Lee Jones
2012-10-26  8:19       ` Ulf Hansson
2012-10-26  8:19         ` Ulf Hansson
2012-10-26  8:19         ` Ulf Hansson
2012-10-26  8:57         ` Linus Walleij
2012-10-26  8:57           ` Linus Walleij
2012-10-26 18:03           ` Mike Turquette
2012-10-26 18:03             ` Mike Turquette
2012-10-26 23:34             ` Linus Walleij
2012-10-26 23:34               ` Linus Walleij
2012-10-28 22:59         ` Samuel Ortiz
2012-10-28 22:59           ` Samuel Ortiz
2012-10-28 22:59           ` Samuel Ortiz
2012-11-05 12:33           ` Ulf Hansson
2012-11-05 12:33             ` Ulf Hansson
2012-11-05 12:33             ` Ulf Hansson

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.