[U-Boot] [PATCH 1/2] powerpc/85xx: Update timer-frequency prop in ptp_timer node of device tree

From: bhaskar upadhaya Bhaskar.Upadhaya@freescale.com
Fix up the device tree property associated with the IEEE 1588 timer source frequency. Currently we only support the IEEE 1588 timer source being the internal eTSEC system clock (for those SoCs with IEEE 1588 support). The eTSEC clock is ccb_clk/2.
Signed-off-by: Bhaskar Upadhaya Bhaskar.Upadhaya@freescale.com Signed-off-by: Kumar Gala galak@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/fdt.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 6ed0284..642f6c5 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -486,4 +486,13 @@ void ft_cpu_setup(void *blob, bd_t *bd) #ifdef CONFIG_SYS_SRIO ft_srio_setup(blob); #endif + + /* + * system-clock = CCB clock/2 + * Here gd->bus_clk = CCB clock + * We are using the system clock as 1588 Timer reference + * clock source select + */ + do_fixup_by_compat_u32(blob, "fsl,gianfar-ptp-timer", + "timer-frequency", gd->bus_clk/2, 1); }

From: Bhaskar Upadhaya Bhaskar.Upadhaya@freescale.com
Fix up the device tree property associated with the Flexcan clock frequency. This property is used to calculate the bit timing parameters for Flexcan.
Signed-off-by: Bhaskar Upadhaya Bhaskar.Upadhaya@freescale.com Signed-off-by: Kumar Gala galak@kernel.crashing.org --- arch/powerpc/cpu/mpc85xx/fdt.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index 642f6c5..f4d2f60 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -495,4 +495,7 @@ void ft_cpu_setup(void *blob, bd_t *bd) */ do_fixup_by_compat_u32(blob, "fsl,gianfar-ptp-timer", "timer-frequency", gd->bus_clk/2, 1); + + do_fixup_by_compat_u32(blob, "fsl,flexcan-v1.0", + "clock_freq", gd->bus_clk, 1); }

On Mar 6, 2011, at 10:17 PM, Kumar Gala wrote:
From: Bhaskar Upadhaya Bhaskar.Upadhaya@freescale.com
Fix up the device tree property associated with the Flexcan clock frequency. This property is used to calculate the bit timing parameters for Flexcan.
Signed-off-by: Bhaskar Upadhaya Bhaskar.Upadhaya@freescale.com Signed-off-by: Kumar Gala galak@kernel.crashing.org
arch/powerpc/cpu/mpc85xx/fdt.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
applied to 85xx
- k
participants (1)
-
Kumar Gala