Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116110
b: refs/heads/master
c: cf204fa
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Sep 8, 2008
1 parent cdc162b commit 5756c1d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4eb5845d6cbdb9bf03f563c22f3a54115121858f
refs/heads/master: cf204fa797cf968de8043491cd469ad0321d0940
3 changes: 2 additions & 1 deletion trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ config SUPERH32

config SUPERH64
def_bool y if CPU_SH5
select GENERIC_CALIBRATE_DELAY

config ARCH_DEFCONFIG
string
Expand Down Expand Up @@ -57,7 +58,7 @@ config GENERIC_IRQ_PROBE
def_bool y

config GENERIC_CALIBRATE_DELAY
def_bool y
bool

config GENERIC_IOMAP
bool
Expand Down
20 changes: 20 additions & 0 deletions trunk/arch/sh/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <linux/debugfs.h>
#include <linux/crash_dump.h>
#include <linux/mmzone.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/page.h>
Expand Down Expand Up @@ -180,6 +182,24 @@ static inline void __init reserve_crashkernel(void)
{}
#endif

#ifndef CONFIG_GENERIC_CALIBRATE_DELAY
void __cpuinit calibrate_delay(void)
{
struct clk *clk = clk_get(NULL, "cpu_clk");

if (IS_ERR(clk))
panic("Need a sane CPU clock definition!");

loops_per_jiffy = (clk_get_rate(clk) >> 1) / HZ;

printk(KERN_INFO "Calibrating delay loop (skipped)... "
"%lu.%02lu BogoMIPS PRESET (lpj=%lu)\n",
loops_per_jiffy/(500000/HZ),
(loops_per_jiffy/(5000/HZ)) % 100,
loops_per_jiffy);
}
#endif

void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
unsigned long end_pfn)
{
Expand Down

0 comments on commit 5756c1d

Please sign in to comment.