Lines Matching refs:ast
13 struct ast_private *ast = dev->dev_private; in ast_load_dp501_microcode() local
15 return request_firmware(&ast->dp501_fw, "ast_dp501_fw.bin", dev->dev); in ast_load_dp501_microcode()
18 static void send_ack(struct ast_private *ast) in send_ack() argument
21 sendack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0xff); in send_ack()
23 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0x00, sendack); in send_ack()
26 static void send_nack(struct ast_private *ast) in send_nack() argument
29 sendack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0xff); in send_nack()
31 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0x00, sendack); in send_nack()
34 static bool wait_ack(struct ast_private *ast) in wait_ack() argument
39 waitack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd2, 0xff); in wait_ack()
50 static bool wait_nack(struct ast_private *ast) in wait_nack() argument
55 waitack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd2, 0xff); in wait_nack()
66 static void set_cmd_trigger(struct ast_private *ast) in set_cmd_trigger() argument
68 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, ~0x40, 0x40); in set_cmd_trigger()
71 static void clear_cmd_trigger(struct ast_private *ast) in clear_cmd_trigger() argument
73 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, ~0x40, 0x00); in clear_cmd_trigger()
77 static bool wait_fw_ready(struct ast_private *ast)
82 waitready = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd2, 0xff);
96 struct ast_private *ast = dev->dev_private; in ast_write_cmd() local
98 if (wait_nack(ast)) { in ast_write_cmd()
99 send_nack(ast); in ast_write_cmd()
100 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9a, 0x00, data); in ast_write_cmd()
101 send_ack(ast); in ast_write_cmd()
102 set_cmd_trigger(ast); in ast_write_cmd()
104 if (wait_ack(ast)) { in ast_write_cmd()
105 clear_cmd_trigger(ast); in ast_write_cmd()
106 send_nack(ast); in ast_write_cmd()
111 clear_cmd_trigger(ast); in ast_write_cmd()
112 send_nack(ast); in ast_write_cmd()
118 struct ast_private *ast = dev->dev_private; in ast_write_data() local
120 if (wait_nack(ast)) { in ast_write_data()
121 send_nack(ast); in ast_write_data()
122 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9a, 0x00, data); in ast_write_data()
123 send_ack(ast); in ast_write_data()
124 if (wait_ack(ast)) { in ast_write_data()
125 send_nack(ast); in ast_write_data()
129 send_nack(ast); in ast_write_data()
136 struct ast_private *ast = dev->dev_private;
141 if (wait_ack(ast) == false)
143 tmp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd3, 0xff);
145 if (wait_nack(ast) == false) {
146 send_nack(ast);
149 send_nack(ast);
153 static void clear_cmd(struct ast_private *ast)
155 send_nack(ast);
156 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9a, 0x00, 0x00);
168 static u32 get_fw_base(struct ast_private *ast) in get_fw_base() argument
170 return ast_mindwm(ast, 0x1e6e2104) & 0x7fffffff; in get_fw_base()
175 struct ast_private *ast = dev->dev_private; in ast_backup_fw() local
179 data = ast_mindwm(ast, 0x1e6e2100) & 0x01; in ast_backup_fw()
181 boot_address = get_fw_base(ast); in ast_backup_fw()
183 *(u32 *)(addr + i) = ast_mindwm(ast, boot_address + i); in ast_backup_fw()
191 struct ast_private *ast = dev->dev_private; in ast_launch_m68k() local
197 data = ast_mindwm(ast, 0x1e6e2100) & 0x01; in ast_launch_m68k()
200 if (ast->dp501_fw_addr) { in ast_launch_m68k()
201 fw_addr = ast->dp501_fw_addr; in ast_launch_m68k()
204 if (!ast->dp501_fw && in ast_launch_m68k()
208 fw_addr = (u8 *)ast->dp501_fw->data; in ast_launch_m68k()
209 len = ast->dp501_fw->size; in ast_launch_m68k()
212 ast_moutdwm(ast, 0x1e6e2000, 0x1688a8a8); in ast_launch_m68k()
213 data = ast_mindwm(ast, 0x1e6e0004); in ast_launch_m68k()
234 ast_moutdwm(ast, boot_address + i, data); in ast_launch_m68k()
238 ast_moutdwm(ast, 0x1e6e2000, 0x1688a8a8); in ast_launch_m68k()
241 ast_moutdwm(ast, 0x1e6e2104, 0x80000000 + boot_address); in ast_launch_m68k()
242 ast_moutdwm(ast, 0x1e6e2100, 1); in ast_launch_m68k()
245 data = ast_mindwm(ast, 0x1e6e2040) & 0xfffff1ff; /* D[11:9] = 100b: UEFI handling */ in ast_launch_m68k()
247 ast_moutdwm(ast, 0x1e6e2040, data); in ast_launch_m68k()
249 …jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x99, 0xfc); /* D[1:0]: Reserved Video Buffer… in ast_launch_m68k()
251 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x99, jreg); in ast_launch_m68k()
258 struct ast_private *ast = dev->dev_private; in ast_get_dp501_max_clk() local
262 boot_address = get_fw_base(ast); in ast_get_dp501_max_clk()
266 data = ast_mindwm(ast, boot_address + offset); in ast_get_dp501_max_clk()
272 *(u32 *)linkcap = ast_mindwm(ast, boot_address + offset); in ast_get_dp501_max_clk()
286 struct ast_private *ast = dev->dev_private; in ast_dp501_read_edid() local
289 boot_address = get_fw_base(ast); in ast_dp501_read_edid()
293 data = ast_mindwm(ast, boot_address + offset); in ast_dp501_read_edid()
299 data = ast_mindwm(ast, boot_address + offset); in ast_dp501_read_edid()
306 data = ast_mindwm(ast, boot_address + offset + i); in ast_dp501_read_edid()
315 struct ast_private *ast = dev->dev_private; in ast_init_dvo() local
318 ast_write32(ast, 0xf004, 0x1e6e0000); in ast_init_dvo()
319 ast_write32(ast, 0xf000, 0x1); in ast_init_dvo()
320 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_dvo()
322 jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd0, 0xff); in ast_init_dvo()
325 data = ast_read32(ast, 0x12008); in ast_init_dvo()
329 ast_write32(ast, 0x12008, data); in ast_init_dvo()
331 if (ast->chip == AST2300) { in ast_init_dvo()
332 data = ast_read32(ast, 0x12084); in ast_init_dvo()
335 ast_write32(ast, 0x12084, data); in ast_init_dvo()
337 data = ast_read32(ast, 0x12088); in ast_init_dvo()
340 ast_write32(ast, 0x12088, data); in ast_init_dvo()
342 data = ast_read32(ast, 0x12090); in ast_init_dvo()
346 ast_write32(ast, 0x12090, data); in ast_init_dvo()
348 data = ast_read32(ast, 0x12088); in ast_init_dvo()
351 ast_write32(ast, 0x12088, data); in ast_init_dvo()
353 data = ast_read32(ast, 0x1208c); in ast_init_dvo()
356 ast_write32(ast, 0x1208c, data); in ast_init_dvo()
358 data = ast_read32(ast, 0x120a4); in ast_init_dvo()
361 ast_write32(ast, 0x120a4, data); in ast_init_dvo()
363 data = ast_read32(ast, 0x120a8); in ast_init_dvo()
366 ast_write32(ast, 0x120a8, data); in ast_init_dvo()
368 data = ast_read32(ast, 0x12094); in ast_init_dvo()
371 ast_write32(ast, 0x12094, data); in ast_init_dvo()
376 data = ast_read32(ast, 0x1202c); in ast_init_dvo()
378 ast_write32(ast, 0x1202c, data); in ast_init_dvo()
381 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xcf, 0x80); in ast_init_dvo()
388 struct ast_private *ast = dev->dev_private; in ast_init_analog() local
396 ast_write32(ast, 0xf004, 0x1e6e0000); in ast_init_analog()
397 ast_write32(ast, 0xf000, 0x1); in ast_init_analog()
400 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_analog()
401 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_analog()
402 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_analog()
405 data = ast_read32(ast, 0x1202c); in ast_init_analog()
407 ast_write32(ast, 0, data); in ast_init_analog()
410 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xcf, 0x00); in ast_init_analog()
415 struct ast_private *ast = dev->dev_private; in ast_init_3rdtx() local
418 if (ast->chip == AST2300 || ast->chip == AST2400) { in ast_init_3rdtx()
419 jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff); in ast_init_3rdtx()
431 if (ast->tx_chip_type == AST_TX_SIL164) in ast_init_3rdtx()
441 struct ast_private *ast = dev->dev_private; in ast_release_firmware() local
443 release_firmware(ast->dp501_fw); in ast_release_firmware()
444 ast->dp501_fw = NULL; in ast_release_firmware()