Commit 7164f4c5 authored by Roy Spliet's avatar Roy Spliet Committed by Ben Skeggs

drm/nouveau/bios/rammap: Pull DLLoff bit out of version 0x10 struct

In preparation of NV50 reclocking, where there is no version
Signed-off-by: default avatarRoy Spliet <rspliet@eclipso.eu>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 4a68ccc8
...@@ -32,6 +32,7 @@ struct nvbios_ramcfg { ...@@ -32,6 +32,7 @@ struct nvbios_ramcfg {
unsigned ramcfg_ver; unsigned ramcfg_ver;
unsigned ramcfg_hdr; unsigned ramcfg_hdr;
unsigned ramcfg_timing; unsigned ramcfg_timing;
unsigned ramcfg_DLLoff;
union { union {
struct { struct {
unsigned ramcfg_10_02_01:1; unsigned ramcfg_10_02_01:1;
...@@ -40,7 +41,6 @@ struct nvbios_ramcfg { ...@@ -40,7 +41,6 @@ struct nvbios_ramcfg {
unsigned ramcfg_10_02_08:1; unsigned ramcfg_10_02_08:1;
unsigned ramcfg_10_02_10:1; unsigned ramcfg_10_02_10:1;
unsigned ramcfg_10_02_20:1; unsigned ramcfg_10_02_20:1;
unsigned ramcfg_10_DLLoff:1;
unsigned ramcfg_10_03_0f:4; unsigned ramcfg_10_03_0f:4;
unsigned ramcfg_10_04_01:1; unsigned ramcfg_10_04_01:1;
unsigned ramcfg_10_05:8; unsigned ramcfg_10_05:8;
......
...@@ -157,7 +157,7 @@ nvbios_rammapSp(struct nvkm_bios *bios, u32 data, ...@@ -157,7 +157,7 @@ nvbios_rammapSp(struct nvkm_bios *bios, u32 data,
p->ramcfg_10_02_08 = (nv_ro08(bios, data + 0x02) & 0x08) >> 3; p->ramcfg_10_02_08 = (nv_ro08(bios, data + 0x02) & 0x08) >> 3;
p->ramcfg_10_02_10 = (nv_ro08(bios, data + 0x02) & 0x10) >> 4; p->ramcfg_10_02_10 = (nv_ro08(bios, data + 0x02) & 0x10) >> 4;
p->ramcfg_10_02_20 = (nv_ro08(bios, data + 0x02) & 0x20) >> 5; p->ramcfg_10_02_20 = (nv_ro08(bios, data + 0x02) & 0x20) >> 5;
p->ramcfg_10_DLLoff = (nv_ro08(bios, data + 0x02) & 0x40) >> 6; p->ramcfg_DLLoff = (nv_ro08(bios, data + 0x02) & 0x40) >> 6;
p->ramcfg_10_03_0f = (nv_ro08(bios, data + 0x03) & 0x0f) >> 0; p->ramcfg_10_03_0f = (nv_ro08(bios, data + 0x03) & 0x0f) >> 0;
p->ramcfg_10_04_01 = (nv_ro08(bios, data + 0x04) & 0x01) >> 0; p->ramcfg_10_04_01 = (nv_ro08(bios, data + 0x04) & 0x01) >> 0;
p->ramcfg_10_05 = (nv_ro08(bios, data + 0x05) & 0xff) >> 0; p->ramcfg_10_05 = (nv_ro08(bios, data + 0x05) & 0xff) >> 0;
......
...@@ -77,7 +77,7 @@ nvkm_gddr3_calc(struct nvkm_ram *ram) ...@@ -77,7 +77,7 @@ nvkm_gddr3_calc(struct nvkm_ram *ram)
CWL = ram->next->bios.timing_10_CWL; CWL = ram->next->bios.timing_10_CWL;
CL = ram->next->bios.timing_10_CL; CL = ram->next->bios.timing_10_CL;
WR = ram->next->bios.timing_10_WR; WR = ram->next->bios.timing_10_WR;
DLL = !ram->next->bios.ramcfg_10_DLLoff; DLL = !ram->next->bios.ramcfg_DLLoff;
ODT = ram->next->bios.timing_10_ODT; ODT = ram->next->bios.timing_10_ODT;
break; break;
case 0x20: case 0x20:
......
...@@ -590,7 +590,7 @@ gt215_ram_calc(struct nvkm_fb *pfb, u32 freq) ...@@ -590,7 +590,7 @@ gt215_ram_calc(struct nvkm_fb *pfb, u32 freq)
r100da0 = 0x00000000; r100da0 = 0x00000000;
} }
if (!next->bios.ramcfg_10_DLLoff) if (!next->bios.ramcfg_DLLoff)
r004018 |= 0x00004000; r004018 |= 0x00004000;
/* pll2pll requires to switch to a safe clock first */ /* pll2pll requires to switch to a safe clock first */
...@@ -630,7 +630,7 @@ gt215_ram_calc(struct nvkm_fb *pfb, u32 freq) ...@@ -630,7 +630,7 @@ gt215_ram_calc(struct nvkm_fb *pfb, u32 freq)
} }
/* If we're disabling the DLL, do it now */ /* If we're disabling the DLL, do it now */
switch (next->bios.ramcfg_10_DLLoff * ram->base.type) { switch (next->bios.ramcfg_DLLoff * ram->base.type) {
case NV_MEM_TYPE_DDR3: case NV_MEM_TYPE_DDR3:
nvkm_sddr3_dll_disable(fuc, ram->base.mr); nvkm_sddr3_dll_disable(fuc, ram->base.mr);
break; break;
...@@ -810,7 +810,7 @@ gt215_ram_calc(struct nvkm_fb *pfb, u32 freq) ...@@ -810,7 +810,7 @@ gt215_ram_calc(struct nvkm_fb *pfb, u32 freq)
gt215_ram_fbvref(fuc, 1); gt215_ram_fbvref(fuc, 1);
/* Reset DLL */ /* Reset DLL */
if (!next->bios.ramcfg_10_DLLoff) if (!next->bios.ramcfg_DLLoff)
nvkm_sddr2_dll_reset(fuc); nvkm_sddr2_dll_reset(fuc);
if (ram->base.type == NV_MEM_TYPE_GDDR3) { if (ram->base.type == NV_MEM_TYPE_GDDR3) {
......
...@@ -65,7 +65,7 @@ nvkm_sddr2_calc(struct nvkm_ram *ram) ...@@ -65,7 +65,7 @@ nvkm_sddr2_calc(struct nvkm_ram *ram)
case 0x10: case 0x10:
CL = ram->next->bios.timing_10_CL; CL = ram->next->bios.timing_10_CL;
WR = ram->next->bios.timing_10_WR; WR = ram->next->bios.timing_10_WR;
DLL = !ram->next->bios.ramcfg_10_DLLoff; DLL = !ram->next->bios.ramcfg_DLLoff;
ODT = ram->next->bios.timing_10_ODT & 3; ODT = ram->next->bios.timing_10_ODT & 3;
break; break;
case 0x20: case 0x20:
......
...@@ -79,7 +79,7 @@ nvkm_sddr3_calc(struct nvkm_ram *ram) ...@@ -79,7 +79,7 @@ nvkm_sddr3_calc(struct nvkm_ram *ram)
CWL = ram->next->bios.timing_10_CWL; CWL = ram->next->bios.timing_10_CWL;
CL = ram->next->bios.timing_10_CL; CL = ram->next->bios.timing_10_CL;
WR = ram->next->bios.timing_10_WR; WR = ram->next->bios.timing_10_WR;
DLL = !ram->next->bios.ramcfg_10_DLLoff; DLL = !ram->next->bios.ramcfg_DLLoff;
ODT = ram->next->bios.timing_10_ODT; ODT = ram->next->bios.timing_10_ODT;
break; break;
case 0x20: case 0x20:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment