]> err.no Git - linux-2.6/commitdiff
[POWERPC] bootwrapper: Set timebase_period_ns from dt_fixup_cpu_clocks
authorScott Wood <scottwood@freescale.com>
Mon, 20 Aug 2007 17:39:45 +0000 (03:39 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 22 Aug 2007 05:21:47 +0000 (15:21 +1000)
This lets udelay() work properly on platforms which use dt_fixup_cpu_clocks.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/devtree.c
arch/powerpc/boot/ops.h

index c9951550ed2c48ce26c1ef9e8028196be2cb4eb3..ae8b886f5a1d0440a1e3bd82dfa6204e9ce6e450 100644 (file)
@@ -74,6 +74,8 @@ void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus)
                if (bus > 0)
                        setprop_val(devp, "bus-frequency", bus);
        }
+
+       timebase_period_ns = 1000000000 / tb;
 }
 
 void dt_fixup_clock(const char *path, u32 freq)
index 86077066cd7cae1a8c42f0f679f44431ebd241a7..aebd6edc9a9017d63348be1d07ba81b0546e0367 100644 (file)
@@ -191,4 +191,6 @@ static inline void exit(void)
        static char _bss_stack[size]; \
        void *_platform_stack_top = _bss_stack + sizeof(_bss_stack);
 
+extern unsigned long timebase_period_ns;
+
 #endif /* _PPC_BOOT_OPS_H_ */