Lines Matching +full:0 +full:x80000100
43 u32 ctrl = nvkm_rd32(device, reg + 0x00); in read_pll_1()
44 int P = (ctrl & 0x00070000) >> 16; in read_pll_1()
45 int N = (ctrl & 0x0000ff00) >> 8; in read_pll_1()
46 int M = (ctrl & 0x000000ff) >> 0; in read_pll_1()
47 u32 ref = 27000, khz = 0; in read_pll_1()
49 if (ctrl & 0x80000000) in read_pll_1()
59 u32 ctrl = nvkm_rd32(device, reg + 0x00); in read_pll_2()
60 u32 coef = nvkm_rd32(device, reg + 0x04); in read_pll_2()
61 int N2 = (coef & 0xff000000) >> 24; in read_pll_2()
62 int M2 = (coef & 0x00ff0000) >> 16; in read_pll_2()
63 int N1 = (coef & 0x0000ff00) >> 8; in read_pll_2()
64 int M1 = (coef & 0x000000ff) >> 0; in read_pll_2()
65 int P = (ctrl & 0x00070000) >> 16; in read_pll_2()
66 u32 ref = 27000, khz = 0; in read_pll_2()
68 if ((ctrl & 0x80000000) && M1) { in read_pll_2()
70 if ((ctrl & 0x40000100) == 0x40000000) { in read_pll_2()
74 khz = 0; in read_pll_2()
86 return read_pll_2(clk, 0x004000); in read_clk()
88 return read_pll_1(clk, 0x004008); in read_clk()
93 return 0; in read_clk()
102 u32 mast = nvkm_rd32(device, 0x00c040); in nv40_clk_read()
110 return read_clk(clk, (mast & 0x00000003) >> 0); in nv40_clk_read()
112 return read_clk(clk, (mast & 0x00000030) >> 4); in nv40_clk_read()
114 return read_pll_2(clk, 0x4020); in nv40_clk_read()
136 pll.vco2.max_freq = 0; in nv40_clk_calc_pll()
139 if (ret == 0) in nv40_clk_calc_pll()
155 ret = nv40_clk_calc_pll(clk, 0x004000, gclk, in nv40_clk_calc()
157 if (ret < 0) in nv40_clk_calc()
161 clk->npll_ctrl = 0x80000100 | (log2P << 16); in nv40_clk_calc()
164 clk->npll_ctrl = 0xc0000000 | (log2P << 16); in nv40_clk_calc()
170 ret = nv40_clk_calc_pll(clk, 0x004008, sclk, in nv40_clk_calc()
172 if (ret < 0) in nv40_clk_calc()
175 clk->spll = 0xc0000000 | (log2P << 16) | (N1 << 8) | M1; in nv40_clk_calc()
176 clk->ctrl = 0x00000223; in nv40_clk_calc()
178 clk->spll = 0x00000000; in nv40_clk_calc()
179 clk->ctrl = 0x00000333; in nv40_clk_calc()
182 return 0; in nv40_clk_calc()
190 nvkm_mask(device, 0x00c040, 0x00000333, 0x00000000); in nv40_clk_prog()
191 nvkm_wr32(device, 0x004004, clk->npll_coef); in nv40_clk_prog()
192 nvkm_mask(device, 0x004000, 0xc0070100, clk->npll_ctrl); in nv40_clk_prog()
193 nvkm_mask(device, 0x004008, 0xc007ffff, clk->spll); in nv40_clk_prog()
195 nvkm_mask(device, 0x00c040, 0x00000333, clk->ctrl); in nv40_clk_prog()
196 return 0; in nv40_clk_prog()
211 { nv_clk_src_crystal, 0xff },
212 { nv_clk_src_href , 0xff },
213 { nv_clk_src_core , 0xff, 0, "core", 1000 },
214 { nv_clk_src_shader , 0xff, 0, "shader", 1000 },
215 { nv_clk_src_mem , 0xff, 0, "memory", 1000 },