aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia/nv_hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/nvidia/nv_hw.c')
-rw-r--r--drivers/video/nvidia/nv_hw.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/video/nvidia/nv_hw.c b/drivers/video/nvidia/nv_hw.c
index 9ed640d35728..ea426115c6f9 100644
--- a/drivers/video/nvidia/nv_hw.c
+++ b/drivers/video/nvidia/nv_hw.c
@@ -145,12 +145,18 @@ static void nvGetClocks(struct nvidia_par *par, unsigned int *MClk,
145 145
146 if (par->Architecture >= NV_ARCH_40) { 146 if (par->Architecture >= NV_ARCH_40) {
147 pll = NV_RD32(par->PMC, 0x4020); 147 pll = NV_RD32(par->PMC, 0x4020);
148 P = (pll >> 16) & 0x03; 148 P = (pll >> 16) & 0x07;
149 pll = NV_RD32(par->PMC, 0x4024); 149 pll = NV_RD32(par->PMC, 0x4024);
150 M = pll & 0xFF; 150 M = pll & 0xFF;
151 N = (pll >> 8) & 0xFF; 151 N = (pll >> 8) & 0xFF;
152 MB = (pll >> 16) & 0xFF; 152 if (((par->Chipset & 0xfff0) == 0x0290) ||
153 NB = (pll >> 24) & 0xFF; 153 ((par->Chipset & 0xfff0) == 0x0390)) {
154 MB = 1;
155 NB = 1;
156 } else {
157 MB = (pll >> 16) & 0xFF;
158 NB = (pll >> 24) & 0xFF;
159 }
154 *MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P; 160 *MClk = ((N * NB * par->CrystalFreqKHz) / (M * MB)) >> P;
155 161
156 pll = NV_RD32(par->PMC, 0x4000); 162 pll = NV_RD32(par->PMC, 0x4000);