-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 160958 b: refs/heads/master c: c1cc3db h: refs/heads/master v: v3
- Loading branch information
Byungho Min
authored and
Ben Dooks
committed
Aug 16, 2009
1 parent
c790250
commit 2de09bd
Showing
4 changed files
with
1,599 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: c9b870e7e796eea515a261a314917317ebb1cb4a | ||
refs/heads/master: c1cc3db8e9fcf1c9d2db3f34552c73996d3d8a13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* arch/arm/plat-s5pc1xx/include/plat/pll.h | ||
* | ||
* Copyright 2009 Samsung Electronics Co. | ||
* Byungho Min <bhmin@samsung.com> | ||
* | ||
* S5PC1XX PLL code | ||
* | ||
* Based on plat-s3c64xx/include/plat/pll.h | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#define S5P_PLL_MDIV_MASK ((1 << (25-16+1)) - 1) | ||
#define S5P_PLL_PDIV_MASK ((1 << (13-8+1)) - 1) | ||
#define S5P_PLL_SDIV_MASK ((1 << (2-0+1)) - 1) | ||
#define S5P_PLL_MDIV_SHIFT (16) | ||
#define S5P_PLL_PDIV_SHIFT (8) | ||
#define S5P_PLL_SDIV_SHIFT (0) | ||
|
||
#include <asm/div64.h> | ||
|
||
static inline unsigned long s5pc1xx_get_pll(unsigned long baseclk, | ||
u32 pllcon) | ||
{ | ||
u32 mdiv, pdiv, sdiv; | ||
u64 fvco = baseclk; | ||
|
||
mdiv = (pllcon >> S5P_PLL_MDIV_SHIFT) & S5P_PLL_MDIV_MASK; | ||
pdiv = (pllcon >> S5P_PLL_PDIV_SHIFT) & S5P_PLL_PDIV_MASK; | ||
sdiv = (pllcon >> S5P_PLL_SDIV_SHIFT) & S5P_PLL_SDIV_MASK; | ||
|
||
fvco *= mdiv; | ||
do_div(fvco, (pdiv << sdiv)); | ||
|
||
return (unsigned long)fvco; | ||
} |
Oops, something went wrong.