Patchwork [U-Boot,24/31] powerpc/mpc85xx: add setting of clock-frequency for mpic node

login
register
mail settings
Submitter York Sun
Date March 22, 2013, 5:29 p.m.
Message ID <1363973369-26110-24-git-send-email-yorksun@freescale.com>
Download mbox | patch
Permalink /patch/230197/
State Superseded
Headers show

Comments

York Sun - March 22, 2013, 5:29 p.m.
From: Wang Dongsheng <dongsheng.wang@freescale.com>

Set the device tree property associated with the mpic source
frequency. The frequency is used for mpic timer.
the mpic timer use CCB/2 frequency on freescale corenet platform,
other freescale platform use CCB frequency.

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
---
 arch/powerpc/cpu/mpc85xx/fdt.c |    5 +++++
 1 file changed, 5 insertions(+)
Wolfgang Denk - March 22, 2013, 9:03 p.m.
Dear York Sun,

In message <1363973369-26110-24-git-send-email-yorksun@freescale.com> you wrote:
> From: Wang Dongsheng <dongsheng.wang@freescale.com>
> 
> Set the device tree property associated with the mpic source
> frequency. The frequency is used for mpic timer.
> the mpic timer use CCB/2 frequency on freescale corenet platform,
> other freescale platform use CCB frequency.
> 
> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
> ---
>  arch/powerpc/cpu/mpc85xx/fdt.c |    5 +++++
>  1 file changed, 5 insertions(+)

CHECK: Alignment should match open parenthesis
#128: FILE: arch/powerpc/cpu/mpc85xx/fdt.c:669:
+       do_fixup_by_compat_u32(blob, "fsl,mpic",
+               "clock-frequency", get_bus_freq(0)/2, 1);

CHECK: Alignment should match open parenthesis
#131: FILE: arch/powerpc/cpu/mpc85xx/fdt.c:672:
+       do_fixup_by_compat_u32(blob, "fsl,mpic",
+               "clock-frequency", get_bus_freq(0), 1);


Best regards,

Wolfgang Denk

Patch

diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index cda6ad6..288f7b2 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -665,6 +665,11 @@  void ft_cpu_setup(void *blob, bd_t *bd)
 		"clock-frequency", CONFIG_SYS_CLK_FREQ, 1);
 	do_fixup_by_compat_u32(blob, "fsl,qoriq-clockgen-2",
 		"clock-frequency", CONFIG_SYS_CLK_FREQ, 1);
+	do_fixup_by_compat_u32(blob, "fsl,mpic",
+		"clock-frequency", get_bus_freq(0)/2, 1);
+#else
+	do_fixup_by_compat_u32(blob, "fsl,mpic",
+		"clock-frequency", get_bus_freq(0), 1);
 #endif
 
 	fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);