* Re: [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile.
@ 2012-08-23 10:44 MyungJoo Ham
0 siblings, 0 replies; 4+ messages in thread
From: MyungJoo Ham @ 2012-08-23 10:44 UTC (permalink / raw)
To: 이종화, linux-kernel, linux-pm
Cc: 박경민,
Mike Turquette, Rafael J. Wysocki, Xiaoguang Chen
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 2189 bytes --]
> This patch initializes freq_table and max_state of devfreq's profile.
> They will be used for creating transition table.
>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> ---
> drivers/devfreq/exynos4_bus.c | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
> index 88ddc77..9c08855 100644
> --- a/drivers/devfreq/exynos4_bus.c
> +++ b/drivers/devfreq/exynos4_bus.c
> @@ -985,7 +985,8 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
> struct busfreq_data *data;
> struct opp *opp;
> struct device *dev = &pdev->dev;
> - int err = 0;
> + int err = 0, i;
> + unsigned int *freq_table;
>
> data = kzalloc(sizeof(struct busfreq_data), GFP_KERNEL);
> if (data == NULL) {
> @@ -1042,6 +1043,33 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, data);
>
> + switch (data->type) {
> + case TYPE_BUSF_EXYNOS4210:
> + freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4210_LV_NUM,
> + GFP_KERNEL);
> +
> + for (i = 0; i < EX4210_LV_NUM; i++)
> + freq_table[i] = exynos4210_busclk_table[i].clk;
> +
> + exynos4_devfreq_profile.max_state = EX4210_LV_NUM;
> + break;
> + case TYPE_BUSF_EXYNOS4x12:
> + freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4x12_LV_NUM,
> + GFP_KERNEL);
> +
> + for (i = 0; i < EX4x12_LV_NUM; i++)
> + freq_table[i] = exynos4x12_mifclk_table[i].clk;
> +
> + exynos4_devfreq_profile.max_state = EX4x12_LV_NUM;
> + break;
> + default:
> + dev_err(dev, "Cannot determine the device id %d\n", data->type);
> + err = -EINVAL;
> + goto err_opp_add;
> + }
> +
> + exynos4_devfreq_profile.freq_table = freq_table;
> +
> busfreq_mon_reset(data);
>
> data->devfreq = devfreq_add_device(dev, &exynos4_devfreq_profile,
> --
> 1.7.4.1
>
>
>
>
>
>
>
>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile.
2012-08-23 22:22 ` Rafael J. Wysocki
@ 2012-08-24 1:28 ` jonghwa3.lee
0 siblings, 0 replies; 4+ messages in thread
From: jonghwa3.lee @ 2012-08-24 1:28 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Jonghwa Lee, linux-kernel, linux-pm, Kyungmin Park, MyungJoo Ham,
Mike Turquette, Xiaoguang Chen
On 2012년 08월 24일 07:22, Rafael J. Wysocki wrote:
> On Thursday, August 16, 2012, Jonghwa Lee wrote:
>> This patch initializes freq_table and max_state of devfreq's profile.
>> They will be used for creating transition table.
>>
>> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Does that depend on [1/2]?
>
> Rafael
Not exactly, but it shows that required procedure for using function
included in patch[1/2].
Thanks.
>
>> ---
>> drivers/devfreq/exynos4_bus.c | 30 +++++++++++++++++++++++++++++-
>> 1 files changed, 29 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
>> index 88ddc77..9c08855 100644
>> --- a/drivers/devfreq/exynos4_bus.c
>> +++ b/drivers/devfreq/exynos4_bus.c
>> @@ -985,7 +985,8 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
>> struct busfreq_data *data;
>> struct opp *opp;
>> struct device *dev = &pdev->dev;
>> - int err = 0;
>> + int err = 0, i;
>> + unsigned int *freq_table;
>>
>> data = kzalloc(sizeof(struct busfreq_data), GFP_KERNEL);
>> if (data == NULL) {
>> @@ -1042,6 +1043,33 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
>>
>> platform_set_drvdata(pdev, data);
>>
>> + switch (data->type) {
>> + case TYPE_BUSF_EXYNOS4210:
>> + freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4210_LV_NUM,
>> + GFP_KERNEL);
>> +
>> + for (i = 0; i < EX4210_LV_NUM; i++)
>> + freq_table[i] = exynos4210_busclk_table[i].clk;
>> +
>> + exynos4_devfreq_profile.max_state = EX4210_LV_NUM;
>> + break;
>> + case TYPE_BUSF_EXYNOS4x12:
>> + freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4x12_LV_NUM,
>> + GFP_KERNEL);
>> +
>> + for (i = 0; i < EX4x12_LV_NUM; i++)
>> + freq_table[i] = exynos4x12_mifclk_table[i].clk;
>> +
>> + exynos4_devfreq_profile.max_state = EX4x12_LV_NUM;
>> + break;
>> + default:
>> + dev_err(dev, "Cannot determine the device id %d\n", data->type);
>> + err = -EINVAL;
>> + goto err_opp_add;
>> + }
>> +
>> + exynos4_devfreq_profile.freq_table = freq_table;
>> +
>> busfreq_mon_reset(data);
>>
>> data->devfreq = devfreq_add_device(dev, &exynos4_devfreq_profile,
>>
> --
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile.
2012-08-16 6:49 ` [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile Jonghwa Lee
@ 2012-08-23 22:22 ` Rafael J. Wysocki
2012-08-24 1:28 ` jonghwa3.lee
0 siblings, 1 reply; 4+ messages in thread
From: Rafael J. Wysocki @ 2012-08-23 22:22 UTC (permalink / raw)
To: Jonghwa Lee
Cc: linux-kernel, linux-pm, Kyungmin Park, MyungJoo Ham,
Mike Turquette, Xiaoguang Chen
On Thursday, August 16, 2012, Jonghwa Lee wrote:
> This patch initializes freq_table and max_state of devfreq's profile.
> They will be used for creating transition table.
>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Does that depend on [1/2]?
Rafael
> ---
> drivers/devfreq/exynos4_bus.c | 30 +++++++++++++++++++++++++++++-
> 1 files changed, 29 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
> index 88ddc77..9c08855 100644
> --- a/drivers/devfreq/exynos4_bus.c
> +++ b/drivers/devfreq/exynos4_bus.c
> @@ -985,7 +985,8 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
> struct busfreq_data *data;
> struct opp *opp;
> struct device *dev = &pdev->dev;
> - int err = 0;
> + int err = 0, i;
> + unsigned int *freq_table;
>
> data = kzalloc(sizeof(struct busfreq_data), GFP_KERNEL);
> if (data == NULL) {
> @@ -1042,6 +1043,33 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, data);
>
> + switch (data->type) {
> + case TYPE_BUSF_EXYNOS4210:
> + freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4210_LV_NUM,
> + GFP_KERNEL);
> +
> + for (i = 0; i < EX4210_LV_NUM; i++)
> + freq_table[i] = exynos4210_busclk_table[i].clk;
> +
> + exynos4_devfreq_profile.max_state = EX4210_LV_NUM;
> + break;
> + case TYPE_BUSF_EXYNOS4x12:
> + freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4x12_LV_NUM,
> + GFP_KERNEL);
> +
> + for (i = 0; i < EX4x12_LV_NUM; i++)
> + freq_table[i] = exynos4x12_mifclk_table[i].clk;
> +
> + exynos4_devfreq_profile.max_state = EX4x12_LV_NUM;
> + break;
> + default:
> + dev_err(dev, "Cannot determine the device id %d\n", data->type);
> + err = -EINVAL;
> + goto err_opp_add;
> + }
> +
> + exynos4_devfreq_profile.freq_table = freq_table;
> +
> busfreq_mon_reset(data);
>
> data->devfreq = devfreq_add_device(dev, &exynos4_devfreq_profile,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile.
2012-08-16 6:49 [PATCH 0/2] devfreq: Add sysfs node for representing frequency transition information Jonghwa Lee
@ 2012-08-16 6:49 ` Jonghwa Lee
2012-08-23 22:22 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Jonghwa Lee @ 2012-08-16 6:49 UTC (permalink / raw)
To: linux-kernel, linux-pm
Cc: Kyungmin Park, MyungJoo Ham, Mike Turquette, Rafael J. Wysocki,
Xiaoguang Chen, Jonghwa Lee
This patch initializes freq_table and max_state of devfreq's profile.
They will be used for creating transition table.
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
---
drivers/devfreq/exynos4_bus.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
index 88ddc77..9c08855 100644
--- a/drivers/devfreq/exynos4_bus.c
+++ b/drivers/devfreq/exynos4_bus.c
@@ -985,7 +985,8 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
struct busfreq_data *data;
struct opp *opp;
struct device *dev = &pdev->dev;
- int err = 0;
+ int err = 0, i;
+ unsigned int *freq_table;
data = kzalloc(sizeof(struct busfreq_data), GFP_KERNEL);
if (data == NULL) {
@@ -1042,6 +1043,33 @@ static __devinit int exynos4_busfreq_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, data);
+ switch (data->type) {
+ case TYPE_BUSF_EXYNOS4210:
+ freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4210_LV_NUM,
+ GFP_KERNEL);
+
+ for (i = 0; i < EX4210_LV_NUM; i++)
+ freq_table[i] = exynos4210_busclk_table[i].clk;
+
+ exynos4_devfreq_profile.max_state = EX4210_LV_NUM;
+ break;
+ case TYPE_BUSF_EXYNOS4x12:
+ freq_table = devm_kzalloc(&pdev->dev, sizeof(unsigned int) * EX4x12_LV_NUM,
+ GFP_KERNEL);
+
+ for (i = 0; i < EX4x12_LV_NUM; i++)
+ freq_table[i] = exynos4x12_mifclk_table[i].clk;
+
+ exynos4_devfreq_profile.max_state = EX4x12_LV_NUM;
+ break;
+ default:
+ dev_err(dev, "Cannot determine the device id %d\n", data->type);
+ err = -EINVAL;
+ goto err_opp_add;
+ }
+
+ exynos4_devfreq_profile.freq_table = freq_table;
+
busfreq_mon_reset(data);
data->devfreq = devfreq_add_device(dev, &exynos4_devfreq_profile,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-24 1:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-23 10:44 [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile MyungJoo Ham
-- strict thread matches above, loose matches on Subject: below --
2012-08-16 6:49 [PATCH 0/2] devfreq: Add sysfs node for representing frequency transition information Jonghwa Lee
2012-08-16 6:49 ` [PATCH 2/2] devfreq: exynos4: Support initialization of freq_table and max_state of devfreq's profile Jonghwa Lee
2012-08-23 22:22 ` Rafael J. Wysocki
2012-08-24 1:28 ` jonghwa3.lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).