Commit 643d3c13 authored by Scott Wood's avatar Scott Wood Committed by Paul Mackerras

[POWERPC] bootwrapper: Set timebase_period_ns from dt_fixup_cpu_clocks

This lets udelay() work properly on platforms which use dt_fixup_cpu_clocks.
Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
Acked-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 44d06ba7
...@@ -74,6 +74,8 @@ void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus) ...@@ -74,6 +74,8 @@ void dt_fixup_cpu_clocks(u32 cpu, u32 tb, u32 bus)
if (bus > 0) if (bus > 0)
setprop_val(devp, "bus-frequency", bus); setprop_val(devp, "bus-frequency", bus);
} }
timebase_period_ns = 1000000000 / tb;
} }
void dt_fixup_clock(const char *path, u32 freq) void dt_fixup_clock(const char *path, u32 freq)
......
...@@ -191,4 +191,6 @@ static inline void exit(void) ...@@ -191,4 +191,6 @@ static inline void exit(void)
static char _bss_stack[size]; \ static char _bss_stack[size]; \
void *_platform_stack_top = _bss_stack + sizeof(_bss_stack); void *_platform_stack_top = _bss_stack + sizeof(_bss_stack);
extern unsigned long timebase_period_ns;
#endif /* _PPC_BOOT_OPS_H_ */ #endif /* _PPC_BOOT_OPS_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment