• Home
  • Raw
  • Download

Lines Matching refs:ast

9 	struct ast_private *ast = dev->dev_private;  in ast_load_dp501_microcode()  local
12 err = request_firmware(&ast->dp501_fw, fw_name, dev->dev); in ast_load_dp501_microcode()
19 static void send_ack(struct ast_private *ast) in send_ack() argument
22 sendack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0xff); in send_ack()
24 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0x00, sendack); in send_ack()
27 static void send_nack(struct ast_private *ast) in send_nack() argument
30 sendack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0xff); in send_nack()
32 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0x00, sendack); in send_nack()
35 static bool wait_ack(struct ast_private *ast) in wait_ack() argument
40 waitack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd2, 0xff); in wait_ack()
51 static bool wait_nack(struct ast_private *ast) in wait_nack() argument
56 waitack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd2, 0xff); in wait_nack()
67 static void set_cmd_trigger(struct ast_private *ast) in set_cmd_trigger() argument
69 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, ~0x40, 0x40); in set_cmd_trigger()
72 static void clear_cmd_trigger(struct ast_private *ast) in clear_cmd_trigger() argument
74 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, ~0x40, 0x00); in clear_cmd_trigger()
78 static bool wait_fw_ready(struct ast_private *ast)
83 waitready = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd2, 0xff);
97 struct ast_private *ast = dev->dev_private; in ast_write_cmd() local
99 if (wait_nack(ast)) { in ast_write_cmd()
100 send_nack(ast); in ast_write_cmd()
101 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9a, 0x00, data); in ast_write_cmd()
102 send_ack(ast); in ast_write_cmd()
103 set_cmd_trigger(ast); in ast_write_cmd()
105 if (wait_ack(ast)) { in ast_write_cmd()
106 clear_cmd_trigger(ast); in ast_write_cmd()
107 send_nack(ast); in ast_write_cmd()
112 clear_cmd_trigger(ast); in ast_write_cmd()
113 send_nack(ast); in ast_write_cmd()
119 struct ast_private *ast = dev->dev_private; in ast_write_data() local
121 if (wait_nack(ast)) { in ast_write_data()
122 send_nack(ast); in ast_write_data()
123 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9a, 0x00, data); in ast_write_data()
124 send_ack(ast); in ast_write_data()
125 if (wait_ack(ast)) { in ast_write_data()
126 send_nack(ast); in ast_write_data()
130 send_nack(ast); in ast_write_data()
137 struct ast_private *ast = dev->dev_private;
142 if (wait_ack(ast) == false)
144 tmp = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd3, 0xff);
146 if (wait_nack(ast) == false) {
147 send_nack(ast);
150 send_nack(ast);
154 static void clear_cmd(struct ast_private *ast)
156 send_nack(ast);
157 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9a, 0x00, 0x00);
169 static u32 get_fw_base(struct ast_private *ast) in get_fw_base() argument
171 return ast_mindwm(ast, 0x1e6e2104) & 0x7fffffff; in get_fw_base()
176 struct ast_private *ast = dev->dev_private; in ast_backup_fw() local
180 data = ast_mindwm(ast, 0x1e6e2100) & 0x01; in ast_backup_fw()
182 boot_address = get_fw_base(ast); in ast_backup_fw()
184 *(u32 *)(addr + i) = ast_mindwm(ast, boot_address + i); in ast_backup_fw()
192 struct ast_private *ast = dev->dev_private; in ast_launch_m68k() local
198 data = ast_mindwm(ast, 0x1e6e2100) & 0x01; in ast_launch_m68k()
201 if (ast->dp501_fw_addr) { in ast_launch_m68k()
202 fw_addr = ast->dp501_fw_addr; in ast_launch_m68k()
204 } else if (ast->dp501_fw) { in ast_launch_m68k()
205 fw_addr = (u8 *)ast->dp501_fw->data; in ast_launch_m68k()
206 len = ast->dp501_fw->size; in ast_launch_m68k()
209 ast_moutdwm(ast, 0x1e6e2000, 0x1688a8a8); in ast_launch_m68k()
210 data = ast_mindwm(ast, 0x1e6e0004); in ast_launch_m68k()
231 ast_moutdwm(ast, boot_address + i, data); in ast_launch_m68k()
235 ast_moutdwm(ast, 0x1e6e2000, 0x1688a8a8); in ast_launch_m68k()
238 ast_moutdwm(ast, 0x1e6e2104, 0x80000000 + boot_address); in ast_launch_m68k()
239 ast_moutdwm(ast, 0x1e6e2100, 1); in ast_launch_m68k()
242 data = ast_mindwm(ast, 0x1e6e2040) & 0xfffff1ff; /* D[11:9] = 100b: UEFI handling */ in ast_launch_m68k()
244 ast_moutdwm(ast, 0x1e6e2040, data); in ast_launch_m68k()
246 …jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x99, 0xfc); /* D[1:0]: Reserved Video Buffer… in ast_launch_m68k()
248 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x99, jreg); in ast_launch_m68k()
255 struct ast_private *ast = dev->dev_private; in ast_get_dp501_max_clk() local
259 boot_address = get_fw_base(ast); in ast_get_dp501_max_clk()
263 data = ast_mindwm(ast, boot_address + offset); in ast_get_dp501_max_clk()
269 *(u32 *)linkcap = ast_mindwm(ast, boot_address + offset); in ast_get_dp501_max_clk()
283 struct ast_private *ast = dev->dev_private; in ast_dp501_read_edid() local
286 boot_address = get_fw_base(ast); in ast_dp501_read_edid()
290 data = ast_mindwm(ast, boot_address + offset); in ast_dp501_read_edid()
296 data = ast_mindwm(ast, boot_address + offset); in ast_dp501_read_edid()
303 data = ast_mindwm(ast, boot_address + offset + i); in ast_dp501_read_edid()
312 struct ast_private *ast = dev->dev_private; in ast_init_dvo() local
315 ast_write32(ast, 0xf004, 0x1e6e0000); in ast_init_dvo()
316 ast_write32(ast, 0xf000, 0x1); in ast_init_dvo()
317 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_dvo()
319 jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd0, 0xff); in ast_init_dvo()
322 data = ast_read32(ast, 0x12008); in ast_init_dvo()
326 ast_write32(ast, 0x12008, data); in ast_init_dvo()
328 if (ast->chip == AST2300) { in ast_init_dvo()
329 data = ast_read32(ast, 0x12084); in ast_init_dvo()
332 ast_write32(ast, 0x12084, data); in ast_init_dvo()
334 data = ast_read32(ast, 0x12088); in ast_init_dvo()
337 ast_write32(ast, 0x12088, data); in ast_init_dvo()
339 data = ast_read32(ast, 0x12090); in ast_init_dvo()
343 ast_write32(ast, 0x12090, data); in ast_init_dvo()
345 data = ast_read32(ast, 0x12088); in ast_init_dvo()
348 ast_write32(ast, 0x12088, data); in ast_init_dvo()
350 data = ast_read32(ast, 0x1208c); in ast_init_dvo()
353 ast_write32(ast, 0x1208c, data); in ast_init_dvo()
355 data = ast_read32(ast, 0x120a4); in ast_init_dvo()
358 ast_write32(ast, 0x120a4, data); in ast_init_dvo()
360 data = ast_read32(ast, 0x120a8); in ast_init_dvo()
363 ast_write32(ast, 0x120a8, data); in ast_init_dvo()
365 data = ast_read32(ast, 0x12094); in ast_init_dvo()
368 ast_write32(ast, 0x12094, data); in ast_init_dvo()
373 data = ast_read32(ast, 0x1202c); in ast_init_dvo()
375 ast_write32(ast, 0x1202c, data); in ast_init_dvo()
378 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xcf, 0x80); in ast_init_dvo()
385 struct ast_private *ast = dev->dev_private; in ast_init_analog() local
393 ast_write32(ast, 0xf004, 0x1e6e0000); in ast_init_analog()
394 ast_write32(ast, 0xf000, 0x1); in ast_init_analog()
397 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_analog()
398 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_analog()
399 ast_write32(ast, 0x12000, 0x1688a8a8); in ast_init_analog()
402 data = ast_read32(ast, 0x1202c); in ast_init_analog()
404 ast_write32(ast, 0, data); in ast_init_analog()
407 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xcf, 0x00); in ast_init_analog()
412 struct ast_private *ast = dev->dev_private; in ast_init_3rdtx() local
415 if (ast->chip == AST2300 || ast->chip == AST2400) { in ast_init_3rdtx()
416 jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff); in ast_init_3rdtx()
428 if (ast->tx_chip_type == AST_TX_SIL164) in ast_init_3rdtx()