Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // read clock freq from qsd8x50
- unsigned get_freq(byte *pCsrBase, byte *pScpllBase)
- {
- unsigned freq, val, sel;
- sel = readl(SPSS_CLK_SEL_ADDR(pCsrBase));
- switch ((sel & 6) >> 1)
- {
- case 1:
- val = readl(SCPLL_FSM_CTL_EXT_ADDR(pScpllBase));
- val = (val >> 3) & 0x3f;
- freq = val * 38400;
- return freq;
- break;
- case 2:
- return 128000;
- break;
- default:
- return -1;
- }
- }
Add Comment
Please, Sign In to add comment