-
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.
- Loading branch information
Ben Dooks
committed
Dec 15, 2008
1 parent
1b51550
commit be0e1e5
Showing
8 changed files
with
50 additions
and
42 deletions.
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: 93bc6b6371b6b7303ffdae0d69dcdc443b8b0d8a | ||
refs/heads/master: e24b864ab3e1a5916c87e13cfdc94c1d02f0578b |
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
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
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
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
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
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,37 @@ | ||
/* linux/arch/arm/plat-s3c24xx/include/plat/pll.h | ||
* | ||
* Copyright 2008 Simtec Electronics | ||
* Ben Dooks <ben@simtec.co.uk> | ||
* http://armlinux.simtec.co.uk/ | ||
* | ||
* S3C24xx - common pll registers and code | ||
*/ | ||
|
||
#define S3C24XX_PLLCON_MDIVSHIFT 12 | ||
#define S3C24XX_PLLCON_PDIVSHIFT 4 | ||
#define S3C24XX_PLLCON_SDIVSHIFT 0 | ||
#define S3C24XX_PLLCON_MDIVMASK ((1<<(1+(19-12)))-1) | ||
#define S3C24XX_PLLCON_PDIVMASK ((1<<5)-1) | ||
#define S3C24XX_PLLCON_SDIVMASK 3 | ||
|
||
#include <asm/div64.h> | ||
|
||
static inline unsigned int | ||
s3c24xx_get_pll(unsigned int pllval, unsigned int baseclk) | ||
{ | ||
unsigned int mdiv, pdiv, sdiv; | ||
uint64_t fvco; | ||
|
||
mdiv = pllval >> S3C24XX_PLLCON_MDIVSHIFT; | ||
pdiv = pllval >> S3C24XX_PLLCON_PDIVSHIFT; | ||
sdiv = pllval >> S3C24XX_PLLCON_SDIVSHIFT; | ||
|
||
mdiv &= S3C24XX_PLLCON_MDIVMASK; | ||
pdiv &= S3C24XX_PLLCON_PDIVMASK; | ||
sdiv &= S3C24XX_PLLCON_SDIVMASK; | ||
|
||
fvco = (uint64_t)baseclk * (mdiv + 8); | ||
do_div(fvco, (pdiv + 2) << sdiv); | ||
|
||
return (unsigned int)fvco; | ||
} |
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