Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71949
b: refs/heads/master
c: 2f6cf7b
h: refs/heads/master
i:
  71947: 10abb28
v: v3
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Oct 21, 2007
1 parent 62e5012 commit 5322dfd
Show file tree
Hide file tree
Showing 3 changed files with 16 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: b0a68dc07ec395d44849ce98eb417713ca333410
refs/heads/master: 2f6cf7bfc64c44d760d53caf4b547e7729392e78
14 changes: 13 additions & 1 deletion trunk/arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ static u_long get_vco(void)
return vco;
}

/*Get the Core clock*/
/* Get the Core clock */
u_long get_cclk(void)
{
u_long csel, ssel;
Expand Down Expand Up @@ -493,6 +493,18 @@ u_long get_sclk(void)
}
EXPORT_SYMBOL(get_sclk);

unsigned long sclk_to_usecs(unsigned long sclk)
{
return (USEC_PER_SEC * (u64)sclk) / get_sclk();
}
EXPORT_SYMBOL(sclk_to_usecs);

unsigned long usecs_to_sclk(unsigned long usecs)
{
return get_sclk() / (USEC_PER_SEC * (u64)usecs);
}
EXPORT_SYMBOL(usecs_to_sclk);

/*
* Get CPU information for use by the procfs.
*/
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-blackfin/bfin-global.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@

extern unsigned long get_cclk(void);
extern unsigned long get_sclk(void);
extern unsigned long sclk_to_usecs(unsigned long sclk);
extern unsigned long usecs_to_sclk(unsigned long usecs);

extern void dump_thread(struct pt_regs *regs, struct user *dump);
extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr);
Expand Down

0 comments on commit 5322dfd

Please sign in to comment.