17 #include <asm/delay.h>
33 #define POSTDIV3 ((u32)MSR_GLCP_SYS_RSTPLL_DOTPOSTDIV3)
34 #define PREMULT2 ((u32)MSR_GLCP_SYS_RSTPLL_DOTPREMULT2)
35 #define PREDIV2 ((u32)MSR_GLCP_SYS_RSTPLL_DOTPOSTDIV3)
37 static const struct gx_pll_entry gx_pll_table_48MHz[] = {
39 { 39721, 0, 0x00000037 },
45 { 22271, 0, 0x00000063 },
46 { 20202, 0, 0x0000054B },
47 { 20000, 0, 0x0000026E },
50 { 17777, 0, 0x00000577 },
51 { 17733, 0, 0x000007F7 },
52 { 17653, 0, 0x0000057B },
60 { 13333, 0, 0x00000052 },
61 { 12698, 0, 0x00000056 },
64 { 10582, 0, 0x000002D2 },
67 { 9259, 0, 0x000007E2 },
68 { 8888, 0, 0x000007F6 },
71 { 6349, 0, 0x00000055 },
72 { 6172, 0, 0x000009C1 },
74 { 5698, 0, 0x000002C1 },
75 { 5291, 0, 0x000002D1 },
76 { 4938, 0, 0x00000551 },
77 { 4357, 0, 0x0000057D },
80 static const struct gx_pll_entry gx_pll_table_14MHz[] = {
81 { 39721, 0, 0x00000037 },
82 { 35308, 0, 0x00000B7B },
83 { 31746, 0, 0x000004D3 },
84 { 27777, 0, 0x00000BE3 },
85 { 26666, 0, 0x0000074F },
86 { 25000, 0, 0x0000050B },
87 { 22271, 0, 0x00000063 },
88 { 20202, 0, 0x0000054B },
89 { 20000, 0, 0x0000026E },
90 { 19860, 0, 0x000007C3 },
91 { 18518, 0, 0x000007E3 },
92 { 17777, 0, 0x00000577 },
93 { 17733, 0, 0x000002FB },
94 { 17653, 0, 0x0000057B },
95 { 16949, 0, 0x0000058B },
96 { 15873, 0, 0x0000095E },
97 { 15384, 0, 0x0000096A },
98 { 14814, 0, 0x00000BC2 },
99 { 14124, 0, 0x0000098A },
100 { 13888, 0, 0x00000BE2 },
101 { 13333, 0, 0x00000052 },
102 { 12698, 0, 0x00000056 },
103 { 12500, 0, 0x0000050A },
104 { 11135, 0, 0x0000078E },
105 { 10582, 0, 0x000002D2 },
106 { 10101, 0, 0x000011F6 },
107 { 10000, 0, 0x0000054E },
108 { 9259, 0, 0x000007E2 },
109 { 8888, 0, 0x000002FA },
110 { 7692, 0, 0x00000BB1 },
111 { 7407, 0, 0x00000975 },
112 { 6349, 0, 0x00000055 },
113 { 6172, 0, 0x000009C1 },
114 { 5698, 0, 0x000002C1 },
115 { 5291, 0, 0x00000539 },
116 { 4938, 0, 0x00000551 },
117 { 4357, 0, 0x0000057D },
126 u64 dotpll, sys_rstpll;
131 pll_table = gx_pll_table_14MHz;
132 pll_table_len =
ARRAY_SIZE(gx_pll_table_14MHz);
134 pll_table = gx_pll_table_48MHz;
135 pll_table_len =
ARRAY_SIZE(gx_pll_table_48MHz);
141 for (i = 1; i < pll_table_len; i++) {
153 dotpll &= 0x00000000ffffffffull;
194 fp = read_fp(par,
FP_PM);
196 write_fp(par,
FP_PM, fp);
200 fp = read_fp(par,
FP_PT1);
203 write_fp(par,
FP_PT1, fp);
218 write_fp(par,
FP_PT2, fp);
231 fp = read_fp(par,
FP_PM);
233 write_fp(par,
FP_PM, fp);
295 gx_configure_tft(info);
305 switch (blank_mode) {
307 blank = 0; hsync = 1; vsync = 1; crt = 1;
310 blank = 1; hsync = 1; vsync = 1; crt = 1;
313 blank = 1; hsync = 1; vsync = 0; crt = 1;
316 blank = 1; hsync = 0; vsync = 1; crt = 1;
319 blank = 1; hsync = 0; vsync = 0; crt = 0;
340 fp_pm = read_fp(par,
FP_PM);
345 write_fp(par,
FP_PM, fp_pm);