* [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros
@ 2014-03-14 1:19 Chen Gang
2014-03-17 12:19 ` [Consult] unicore32: Is unicore32 still alive? Chen Gang
2014-03-22 7:20 ` 回复: [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros 管雪涛
0 siblings, 2 replies; 5+ messages in thread
From: Chen Gang @ 2014-03-14 1:19 UTC (permalink / raw)
To: gxt; +Cc: linux-kernel
Add readl() and writel() for 'PM_' macros, just like another areas have
done within unicored32, or will cause compiling issue.
The related error (allmodconfig for unicored32):
CC arch/unicore32/kernel/clock.o
arch/unicore32/kernel/clock.c: In function ‘clk_set_rate’:
arch/unicore32/kernel/clock.c:182: warning: initialization makes integer from pointer without a cast
arch/unicore32/kernel/clock.c:204: error: lvalue required as left operand of assignment
arch/unicore32/kernel/clock.c:206: error: lvalue required as left operand of assignment
arch/unicore32/kernel/clock.c:207: error: invalid operands to binary & (have ‘void *’ and ‘long unsigned int’)
make[1]: *** [arch/unicore32/kernel/clock.o] Error 1
make: *** [arch/unicore32/kernel] Error 2
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
arch/unicore32/kernel/clock.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/unicore32/kernel/clock.c b/arch/unicore32/kernel/clock.c
index 18d4563..b1ca775 100644
--- a/arch/unicore32/kernel/clock.c
+++ b/arch/unicore32/kernel/clock.c
@@ -179,7 +179,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
}
#ifdef CONFIG_CPU_FREQ
if (clk == &clk_mclk_clk) {
- u32 pll_rate, divstatus = PM_DIVSTATUS;
+ u32 pll_rate, divstatus = readl(PM_DIVSTATUS);
int ret, i;
/* lookup mclk_clk_table */
@@ -201,10 +201,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
/ (((divstatus & 0x0000f000) >> 12) + 1);
/* set pll sys cfg reg. */
- PM_PLLSYSCFG = pll_rate;
+ writel(pll_rate, PM_PLLSYSCFG);
- PM_PMCR = PM_PMCR_CFBSYS;
- while ((PM_PLLDFCDONE & PM_PLLDFCDONE_SYSDFC)
+ writel(PM_PMCR_CFBSYS, PM_PMCR);
+ while ((readl(PM_PLLDFCDONE) & PM_PLLDFCDONE_SYSDFC)
!= PM_PLLDFCDONE_SYSDFC)
udelay(100);
/* about 1ms */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Consult] unicore32: Is unicore32 still alive?
2014-03-14 1:19 [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros Chen Gang
@ 2014-03-17 12:19 ` Chen Gang
2014-03-17 12:47 ` 回复: " 管雪涛
2014-03-22 7:20 ` 回复: [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros 管雪涛
1 sibling, 1 reply; 5+ messages in thread
From: Chen Gang @ 2014-03-17 12:19 UTC (permalink / raw)
To: gxt; +Cc: linux-kernel
Hello all:
As far as I know, unicore32 is still alive. If it will be obsoleted,
please let me know, so we can avoid the related spam about unicored32
(also can save my time resource).
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [Consult] unicore32: Is unicore32 still alive?
2014-03-17 12:19 ` [Consult] unicore32: Is unicore32 still alive? Chen Gang
@ 2014-03-17 12:47 ` 管雪涛
2014-03-17 13:29 ` Chen Gang
0 siblings, 1 reply; 5+ messages in thread
From: 管雪涛 @ 2014-03-17 12:47 UTC (permalink / raw)
To: Chen Gang; +Cc: gxt, linux-kernel
Sorry for replying so late.
I'd like to ack the patch after testing it.
Maybe before this weekend.
Thanks Chen.
Xuetao Guan
----- Chen Gang <gang.chen.5i5j@gmail.com> 写道:
> Hello all:
>
> As far as I know, unicore32 is still alive. If it will be obsoleted,
> please let me know, so we can avoid the related spam about unicored32
> (also can save my time resource).
>
>
> Thanks.
> --
> Chen Gang
>
> Open, share, and attitude like air, water, and life which God blessed
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: 回复: [Consult] unicore32: Is unicore32 still alive?
2014-03-17 12:47 ` 回复: " 管雪涛
@ 2014-03-17 13:29 ` Chen Gang
0 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2014-03-17 13:29 UTC (permalink / raw)
To: 管雪涛; +Cc: gxt, linux-kernel
On 03/17/2014 08:47 PM, 管雪涛 wrote:
> Sorry for replying so late.
> I'd like to ack the patch after testing it.
> Maybe before this weekend.
>
> Thanks Chen.
>
Thank you too.
Please help check these patches, when you have time.
> Xuetao Guan
>
> ----- Chen Gang <gang.chen.5i5j@gmail.com> 写道:
>> Hello all:
>>
>> As far as I know, unicore32 is still alive. If it will be obsoleted,
>> please let me know, so we can avoid the related spam about unicored32
>> (also can save my time resource).
>>
>>
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
^ permalink raw reply [flat|nested] 5+ messages in thread
* 回复: [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros
2014-03-14 1:19 [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros Chen Gang
2014-03-17 12:19 ` [Consult] unicore32: Is unicore32 still alive? Chen Gang
@ 2014-03-22 7:20 ` 管雪涛
1 sibling, 0 replies; 5+ messages in thread
From: 管雪涛 @ 2014-03-22 7:20 UTC (permalink / raw)
To: Chen Gang; +Cc: gxt, linux-kernel, sunzhichuang
Thanks Chen.
Cc: Zhichuang Sun <sunzhichuang@mprc.pku.edu.cn>
Tested-by: Zhichuang Sun <sunzhichuang@mprc.pku.edu.cn>
Acked-by: Xuetao Guan <gxt@pku.edu.cn>
----- Chen Gang <gang.chen.5i5j@gmail.com> 写道:
> Add readl() and writel() for 'PM_' macros, just like another areas have
> done within unicored32, or will cause compiling issue.
>
> The related error (allmodconfig for unicored32):
>
> CC arch/unicore32/kernel/clock.o
> arch/unicore32/kernel/clock.c: In function ‘clk_set_rate’:
> arch/unicore32/kernel/clock.c:182: warning: initialization makes integer from pointer without a cast
> arch/unicore32/kernel/clock.c:204: error: lvalue required as left operand of assignment
> arch/unicore32/kernel/clock.c:206: error: lvalue required as left operand of assignment
> arch/unicore32/kernel/clock.c:207: error: invalid operands to binary & (have ‘void *’ and ‘long unsigned int’)
> make[1]: *** [arch/unicore32/kernel/clock.o] Error 1
> make: *** [arch/unicore32/kernel] Error 2
>
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
> arch/unicore32/kernel/clock.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/unicore32/kernel/clock.c b/arch/unicore32/kernel/clock.c
> index 18d4563..b1ca775 100644
> --- a/arch/unicore32/kernel/clock.c
> +++ b/arch/unicore32/kernel/clock.c
> @@ -179,7 +179,7 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
> }
> #ifdef CONFIG_CPU_FREQ
> if (clk == &clk_mclk_clk) {
> - u32 pll_rate, divstatus = PM_DIVSTATUS;
> + u32 pll_rate, divstatus = readl(PM_DIVSTATUS);
> int ret, i;
>
> /* lookup mclk_clk_table */
> @@ -201,10 +201,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
> / (((divstatus & 0x0000f000) >> 12) + 1);
>
> /* set pll sys cfg reg. */
> - PM_PLLSYSCFG = pll_rate;
> + writel(pll_rate, PM_PLLSYSCFG);
>
> - PM_PMCR = PM_PMCR_CFBSYS;
> - while ((PM_PLLDFCDONE & PM_PLLDFCDONE_SYSDFC)
> + writel(PM_PMCR_CFBSYS, PM_PMCR);
> + while ((readl(PM_PLLDFCDONE) & PM_PLLDFCDONE_SYSDFC)
> != PM_PLLDFCDONE_SYSDFC)
> udelay(100);
> /* about 1ms */
> --
> 1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-22 7:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-14 1:19 [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros Chen Gang
2014-03-17 12:19 ` [Consult] unicore32: Is unicore32 still alive? Chen Gang
2014-03-17 12:47 ` 回复: " 管雪涛
2014-03-17 13:29 ` Chen Gang
2014-03-22 7:20 ` 回复: [PATCH] arch/unicore32/kernel/clock.c: add readl() and writel() for 'PM_' macros 管雪涛
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.