|
34 | 34 | #include "ast_dram_tables.h" |
35 | 35 | #include "ast_drv.h" |
36 | 36 |
|
37 | | -static void ast_post_chip_2300(struct drm_device *dev); |
38 | | -static void ast_post_chip_2500(struct drm_device *dev); |
| 37 | +static void ast_post_chip_2300(struct ast_device *ast); |
| 38 | +static void ast_post_chip_2500(struct ast_device *ast); |
39 | 39 |
|
40 | 40 | static const u8 extreginfo[] = { 0x0f, 0x04, 0x1c, 0xff }; |
41 | 41 | static const u8 extreginfo_ast2300[] = { 0x0f, 0x04, 0x1f, 0xff }; |
42 | 42 |
|
43 | | -static void |
44 | | -ast_set_def_ext_reg(struct drm_device *dev) |
| 43 | +static void ast_set_def_ext_reg(struct ast_device *ast) |
45 | 44 | { |
46 | | - struct ast_device *ast = to_ast_device(dev); |
47 | 45 | u8 i, index, reg; |
48 | 46 | const u8 *ext_reg_info; |
49 | 47 |
|
@@ -252,9 +250,8 @@ static void cbrdlli_ast2150(struct ast_device *ast, int busw) |
252 | 250 |
|
253 | 251 |
|
254 | 252 |
|
255 | | -static void ast_init_dram_reg(struct drm_device *dev) |
| 253 | +static void ast_init_dram_reg(struct ast_device *ast) |
256 | 254 | { |
257 | | - struct ast_device *ast = to_ast_device(dev); |
258 | 255 | u8 j; |
259 | 256 | u32 data, temp, i; |
260 | 257 | const struct ast_dramstruct *dram_reg_info; |
@@ -343,22 +340,20 @@ static void ast_init_dram_reg(struct drm_device *dev) |
343 | 340 | } while ((j & 0x40) == 0); |
344 | 341 | } |
345 | 342 |
|
346 | | -void ast_post_gpu(struct drm_device *dev) |
| 343 | +void ast_post_gpu(struct ast_device *ast) |
347 | 344 | { |
348 | | - struct ast_device *ast = to_ast_device(dev); |
349 | | - |
350 | | - ast_set_def_ext_reg(dev); |
| 345 | + ast_set_def_ext_reg(ast); |
351 | 346 |
|
352 | 347 | if (IS_AST_GEN7(ast)) { |
353 | 348 | if (ast->tx_chip == AST_TX_ASTDP) |
354 | 349 | ast_dp_launch(ast); |
355 | 350 | } else if (ast->config_mode == ast_use_p2a) { |
356 | 351 | if (IS_AST_GEN6(ast)) |
357 | | - ast_post_chip_2500(dev); |
| 352 | + ast_post_chip_2500(ast); |
358 | 353 | else if (IS_AST_GEN5(ast) || IS_AST_GEN4(ast)) |
359 | | - ast_post_chip_2300(dev); |
| 354 | + ast_post_chip_2300(ast); |
360 | 355 | else |
361 | | - ast_init_dram_reg(dev); |
| 356 | + ast_init_dram_reg(ast); |
362 | 357 |
|
363 | 358 | ast_init_3rdtx(ast); |
364 | 359 | } else { |
@@ -1569,9 +1564,8 @@ static void ddr2_init(struct ast_device *ast, struct ast2300_dram_param *param) |
1569 | 1564 |
|
1570 | 1565 | } |
1571 | 1566 |
|
1572 | | -static void ast_post_chip_2300(struct drm_device *dev) |
| 1567 | +static void ast_post_chip_2300(struct ast_device *ast) |
1573 | 1568 | { |
1574 | | - struct ast_device *ast = to_ast_device(dev); |
1575 | 1569 | struct ast2300_dram_param param; |
1576 | 1570 | u32 temp; |
1577 | 1571 | u8 reg; |
@@ -2038,9 +2032,9 @@ void ast_patch_ahb_2500(void __iomem *regs) |
2038 | 2032 | __ast_moutdwm(regs, 0x1e6e207c, 0x08000000); /* clear fast reset */ |
2039 | 2033 | } |
2040 | 2034 |
|
2041 | | -void ast_post_chip_2500(struct drm_device *dev) |
| 2035 | +void ast_post_chip_2500(struct ast_device *ast) |
2042 | 2036 | { |
2043 | | - struct ast_device *ast = to_ast_device(dev); |
| 2037 | + struct drm_device *dev = &ast->base; |
2044 | 2038 | u32 temp; |
2045 | 2039 | u8 reg; |
2046 | 2040 |
|
|
0 commit comments