Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/ast: Rename struct ast_private to struct ast_device

The data structure struct ast_private represents an AST device. Its
name comes from the time when it was allocated and stored separately
in struct drm_device.dev_private. The DRM device is now embedded, so
rename struct ast_private to struct ast_device.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230221155745.27484-4-tzimmermann@suse.de

+150 -150
+5 -5
drivers/gpu/drm/ast/ast_dp.c
··· 9 9 10 10 int ast_astdp_read_edid(struct drm_device *dev, u8 *ediddata) 11 11 { 12 - struct ast_private *ast = to_ast_private(dev); 12 + struct ast_device *ast = to_ast_private(dev); 13 13 u8 i = 0, j = 0; 14 14 15 15 /* ··· 125 125 u8 bDPTX = 0; 126 126 u8 bDPExecute = 1; 127 127 128 - struct ast_private *ast = to_ast_private(dev); 128 + struct ast_device *ast = to_ast_private(dev); 129 129 // S3 come back, need more time to wait BMC ready. 130 130 if (bPower) 131 131 WaitCount = 300; ··· 172 172 173 173 void ast_dp_power_on_off(struct drm_device *dev, bool on) 174 174 { 175 - struct ast_private *ast = to_ast_private(dev); 175 + struct ast_device *ast = to_ast_private(dev); 176 176 // Read and Turn off DP PHY sleep 177 177 u8 bE3 = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xE3, AST_DP_VIDEO_ENABLE); 178 178 ··· 188 188 189 189 void ast_dp_set_on_off(struct drm_device *dev, bool on) 190 190 { 191 - struct ast_private *ast = to_ast_private(dev); 191 + struct ast_device *ast = to_ast_private(dev); 192 192 u8 video_on_off = on; 193 193 194 194 // Video On/Off ··· 208 208 209 209 void ast_dp_set_mode(struct drm_crtc *crtc, struct ast_vbios_mode_info *vbios_mode) 210 210 { 211 - struct ast_private *ast = to_ast_private(crtc->dev); 211 + struct ast_device *ast = to_ast_private(crtc->dev); 212 212 213 213 u32 ulRefreshRateIndex; 214 214 u8 ModeIdx;
+20 -20
drivers/gpu/drm/ast/ast_dp501.c
··· 10 10 11 11 static void ast_release_firmware(void *data) 12 12 { 13 - struct ast_private *ast = data; 13 + struct ast_device *ast = data; 14 14 15 15 release_firmware(ast->dp501_fw); 16 16 ast->dp501_fw = NULL; ··· 18 18 19 19 static int ast_load_dp501_microcode(struct drm_device *dev) 20 20 { 21 - struct ast_private *ast = to_ast_private(dev); 21 + struct ast_device *ast = to_ast_private(dev); 22 22 int ret; 23 23 24 24 ret = request_firmware(&ast->dp501_fw, "ast_dp501_fw.bin", dev->dev); ··· 28 28 return devm_add_action_or_reset(dev->dev, ast_release_firmware, ast); 29 29 } 30 30 31 - static void send_ack(struct ast_private *ast) 31 + static void send_ack(struct ast_device *ast) 32 32 { 33 33 u8 sendack; 34 34 sendack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0xff); ··· 36 36 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0x00, sendack); 37 37 } 38 38 39 - static void send_nack(struct ast_private *ast) 39 + static void send_nack(struct ast_device *ast) 40 40 { 41 41 u8 sendack; 42 42 sendack = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0xff); ··· 44 44 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, 0x00, sendack); 45 45 } 46 46 47 - static bool wait_ack(struct ast_private *ast) 47 + static bool wait_ack(struct ast_device *ast) 48 48 { 49 49 u8 waitack; 50 50 u32 retry = 0; ··· 60 60 return false; 61 61 } 62 62 63 - static bool wait_nack(struct ast_private *ast) 63 + static bool wait_nack(struct ast_device *ast) 64 64 { 65 65 u8 waitack; 66 66 u32 retry = 0; ··· 76 76 return false; 77 77 } 78 78 79 - static void set_cmd_trigger(struct ast_private *ast) 79 + static void set_cmd_trigger(struct ast_device *ast) 80 80 { 81 81 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, ~0x40, 0x40); 82 82 } 83 83 84 - static void clear_cmd_trigger(struct ast_private *ast) 84 + static void clear_cmd_trigger(struct ast_device *ast) 85 85 { 86 86 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9b, ~0x40, 0x00); 87 87 } 88 88 89 89 #if 0 90 - static bool wait_fw_ready(struct ast_private *ast) 90 + static bool wait_fw_ready(struct ast_device *ast) 91 91 { 92 92 u8 waitready; 93 93 u32 retry = 0; ··· 106 106 107 107 static bool ast_write_cmd(struct drm_device *dev, u8 data) 108 108 { 109 - struct ast_private *ast = to_ast_private(dev); 109 + struct ast_device *ast = to_ast_private(dev); 110 110 int retry = 0; 111 111 if (wait_nack(ast)) { 112 112 send_nack(ast); ··· 128 128 129 129 static bool ast_write_data(struct drm_device *dev, u8 data) 130 130 { 131 - struct ast_private *ast = to_ast_private(dev); 131 + struct ast_device *ast = to_ast_private(dev); 132 132 133 133 if (wait_nack(ast)) { 134 134 send_nack(ast); ··· 146 146 #if 0 147 147 static bool ast_read_data(struct drm_device *dev, u8 *data) 148 148 { 149 - struct ast_private *ast = to_ast_private(dev); 149 + struct ast_device *ast = to_ast_private(dev); 150 150 u8 tmp; 151 151 152 152 *data = 0; ··· 163 163 return true; 164 164 } 165 165 166 - static void clear_cmd(struct ast_private *ast) 166 + static void clear_cmd(struct ast_device *ast) 167 167 { 168 168 send_nack(ast); 169 169 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x9a, 0x00, 0x00); ··· 178 178 msleep(10); 179 179 } 180 180 181 - static u32 get_fw_base(struct ast_private *ast) 181 + static u32 get_fw_base(struct ast_device *ast) 182 182 { 183 183 return ast_mindwm(ast, 0x1e6e2104) & 0x7fffffff; 184 184 } 185 185 186 186 bool ast_backup_fw(struct drm_device *dev, u8 *addr, u32 size) 187 187 { 188 - struct ast_private *ast = to_ast_private(dev); 188 + struct ast_device *ast = to_ast_private(dev); 189 189 u32 i, data; 190 190 u32 boot_address; 191 191 ··· 204 204 205 205 static bool ast_launch_m68k(struct drm_device *dev) 206 206 { 207 - struct ast_private *ast = to_ast_private(dev); 207 + struct ast_device *ast = to_ast_private(dev); 208 208 u32 i, data, len = 0; 209 209 u32 boot_address; 210 210 u8 *fw_addr = NULL; ··· 274 274 275 275 bool ast_dp501_read_edid(struct drm_device *dev, u8 *ediddata) 276 276 { 277 - struct ast_private *ast = to_ast_private(dev); 277 + struct ast_device *ast = to_ast_private(dev); 278 278 u32 i, boot_address, offset, data; 279 279 u32 *pEDIDidx; 280 280 ··· 334 334 335 335 static bool ast_init_dvo(struct drm_device *dev) 336 336 { 337 - struct ast_private *ast = to_ast_private(dev); 337 + struct ast_device *ast = to_ast_private(dev); 338 338 u8 jreg; 339 339 u32 data; 340 340 ast_write32(ast, 0xf004, 0x1e6e0000); ··· 407 407 408 408 static void ast_init_analog(struct drm_device *dev) 409 409 { 410 - struct ast_private *ast = to_ast_private(dev); 410 + struct ast_device *ast = to_ast_private(dev); 411 411 u32 data; 412 412 413 413 /* ··· 434 434 435 435 void ast_init_3rdtx(struct drm_device *dev) 436 436 { 437 - struct ast_private *ast = to_ast_private(dev); 437 + struct ast_device *ast = to_ast_private(dev); 438 438 u8 jreg; 439 439 440 440 if (ast->chip == AST2300 || ast->chip == AST2400) {
+1 -1
drivers/gpu/drm/ast/ast_drv.c
··· 105 105 106 106 static int ast_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 107 107 { 108 - struct ast_private *ast; 108 + struct ast_device *ast; 109 109 struct drm_device *dev; 110 110 int ret; 111 111
+20 -20
drivers/gpu/drm/ast/ast_drv.h
··· 157 157 * Device 158 158 */ 159 159 160 - struct ast_private { 160 + struct ast_device { 161 161 struct drm_device base; 162 162 163 163 struct mutex ioregs_lock; /* Protects access to I/O registers in ioregs */ ··· 210 210 const struct firmware *dp501_fw; /* dp501 fw */ 211 211 }; 212 212 213 - static inline struct ast_private *to_ast_private(struct drm_device *dev) 213 + static inline struct ast_device *to_ast_private(struct drm_device *dev) 214 214 { 215 - return container_of(dev, struct ast_private, base); 215 + return container_of(dev, struct ast_device, base); 216 216 } 217 217 218 - struct ast_private *ast_device_create(const struct drm_driver *drv, 219 - struct pci_dev *pdev, 220 - unsigned long flags); 218 + struct ast_device *ast_device_create(const struct drm_driver *drv, 219 + struct pci_dev *pdev, 220 + unsigned long flags); 221 221 222 222 #define AST_IO_AR_PORT_WRITE (0x40) 223 223 #define AST_IO_MISC_PORT_WRITE (0x42) ··· 238 238 #define AST_IO_VGACRCB_HWC_ENABLED BIT(1) 239 239 #define AST_IO_VGACRCB_HWC_16BPP BIT(0) /* set: ARGB4444, cleared: 2bpp palette */ 240 240 241 - static inline u32 ast_read32(struct ast_private *ast, u32 reg) 241 + static inline u32 ast_read32(struct ast_device *ast, u32 reg) 242 242 { 243 243 return ioread32(ast->regs + reg); 244 244 } 245 245 246 - static inline void ast_write32(struct ast_private *ast, u32 reg, u32 val) 246 + static inline void ast_write32(struct ast_device *ast, u32 reg, u32 val) 247 247 { 248 248 iowrite32(val, ast->regs + reg); 249 249 } 250 250 251 - static inline u8 ast_io_read8(struct ast_private *ast, u32 reg) 251 + static inline u8 ast_io_read8(struct ast_device *ast, u32 reg) 252 252 { 253 253 return ioread8(ast->ioregs + reg); 254 254 } 255 255 256 - static inline void ast_io_write8(struct ast_private *ast, u32 reg, u8 val) 256 + static inline void ast_io_write8(struct ast_device *ast, u32 reg, u8 val) 257 257 { 258 258 iowrite8(val, ast->ioregs + reg); 259 259 } 260 260 261 - static inline void ast_set_index_reg(struct ast_private *ast, 261 + static inline void ast_set_index_reg(struct ast_device *ast, 262 262 uint32_t base, uint8_t index, 263 263 uint8_t val) 264 264 { ··· 267 267 ast_io_write8(ast, base, val); 268 268 } 269 269 270 - void ast_set_index_reg_mask(struct ast_private *ast, 270 + void ast_set_index_reg_mask(struct ast_device *ast, 271 271 uint32_t base, uint8_t index, 272 272 uint8_t mask, uint8_t val); 273 - uint8_t ast_get_index_reg(struct ast_private *ast, 273 + uint8_t ast_get_index_reg(struct ast_device *ast, 274 274 uint32_t base, uint8_t index); 275 - uint8_t ast_get_index_reg_mask(struct ast_private *ast, 275 + uint8_t ast_get_index_reg_mask(struct ast_device *ast, 276 276 uint32_t base, uint8_t index, uint8_t mask); 277 277 278 - static inline void ast_open_key(struct ast_private *ast) 278 + static inline void ast_open_key(struct ast_device *ast) 279 279 { 280 280 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0x80, 0xA8); 281 281 } ··· 334 334 335 335 #define to_ast_crtc_state(state) container_of(state, struct ast_crtc_state, base) 336 336 337 - int ast_mode_config_init(struct ast_private *ast); 337 + int ast_mode_config_init(struct ast_device *ast); 338 338 339 339 #define AST_MM_ALIGN_SHIFT 4 340 340 #define AST_MM_ALIGN_MASK ((1 << AST_MM_ALIGN_SHIFT) - 1) ··· 458 458 #define ASTDP_1366x768_60 0x1E 459 459 #define ASTDP_1152x864_75 0x1F 460 460 461 - int ast_mm_init(struct ast_private *ast); 461 + int ast_mm_init(struct ast_device *ast); 462 462 463 463 /* ast post */ 464 464 void ast_enable_vga(struct drm_device *dev); 465 465 void ast_enable_mmio(struct drm_device *dev); 466 466 bool ast_is_vga_enabled(struct drm_device *dev); 467 467 void ast_post_gpu(struct drm_device *dev); 468 - u32 ast_mindwm(struct ast_private *ast, u32 r); 469 - void ast_moutdwm(struct ast_private *ast, u32 r, u32 v); 470 - void ast_patch_ahb_2500(struct ast_private *ast); 468 + u32 ast_mindwm(struct ast_device *ast, u32 r); 469 + void ast_moutdwm(struct ast_device *ast, u32 r, u32 v); 470 + void ast_patch_ahb_2500(struct ast_device *ast); 471 471 /* ast dp501 */ 472 472 void ast_set_dp501_video_output(struct drm_device *dev, u8 mode); 473 473 bool ast_backup_fw(struct drm_device *dev, u8 *addr, u32 size);
+4 -4
drivers/gpu/drm/ast/ast_i2c.c
··· 29 29 static void ast_i2c_setsda(void *i2c_priv, int data) 30 30 { 31 31 struct ast_i2c_chan *i2c = i2c_priv; 32 - struct ast_private *ast = to_ast_private(i2c->dev); 32 + struct ast_device *ast = to_ast_private(i2c->dev); 33 33 int i; 34 34 u8 ujcrb7, jtemp; 35 35 ··· 45 45 static void ast_i2c_setscl(void *i2c_priv, int clock) 46 46 { 47 47 struct ast_i2c_chan *i2c = i2c_priv; 48 - struct ast_private *ast = to_ast_private(i2c->dev); 48 + struct ast_device *ast = to_ast_private(i2c->dev); 49 49 int i; 50 50 u8 ujcrb7, jtemp; 51 51 ··· 61 61 static int ast_i2c_getsda(void *i2c_priv) 62 62 { 63 63 struct ast_i2c_chan *i2c = i2c_priv; 64 - struct ast_private *ast = to_ast_private(i2c->dev); 64 + struct ast_device *ast = to_ast_private(i2c->dev); 65 65 uint32_t val, val2, count, pass; 66 66 67 67 count = 0; ··· 83 83 static int ast_i2c_getscl(void *i2c_priv) 84 84 { 85 85 struct ast_i2c_chan *i2c = i2c_priv; 86 - struct ast_private *ast = to_ast_private(i2c->dev); 86 + struct ast_device *ast = to_ast_private(i2c->dev); 87 87 uint32_t val, val2, count, pass; 88 88 89 89 count = 0;
+12 -12
drivers/gpu/drm/ast/ast_main.c
··· 35 35 36 36 #include "ast_drv.h" 37 37 38 - void ast_set_index_reg_mask(struct ast_private *ast, 38 + void ast_set_index_reg_mask(struct ast_device *ast, 39 39 uint32_t base, uint8_t index, 40 40 uint8_t mask, uint8_t val) 41 41 { ··· 45 45 ast_set_index_reg(ast, base, index, tmp); 46 46 } 47 47 48 - uint8_t ast_get_index_reg(struct ast_private *ast, 48 + uint8_t ast_get_index_reg(struct ast_device *ast, 49 49 uint32_t base, uint8_t index) 50 50 { 51 51 uint8_t ret; ··· 54 54 return ret; 55 55 } 56 56 57 - uint8_t ast_get_index_reg_mask(struct ast_private *ast, 57 + uint8_t ast_get_index_reg_mask(struct ast_device *ast, 58 58 uint32_t base, uint8_t index, uint8_t mask) 59 59 { 60 60 uint8_t ret; ··· 66 66 static void ast_detect_config_mode(struct drm_device *dev, u32 *scu_rev) 67 67 { 68 68 struct device_node *np = dev->dev->of_node; 69 - struct ast_private *ast = to_ast_private(dev); 69 + struct ast_device *ast = to_ast_private(dev); 70 70 struct pci_dev *pdev = to_pci_dev(dev->dev); 71 71 uint32_t data, jregd0, jregd1; 72 72 ··· 122 122 123 123 static int ast_detect_chip(struct drm_device *dev, bool *need_post) 124 124 { 125 - struct ast_private *ast = to_ast_private(dev); 125 + struct ast_device *ast = to_ast_private(dev); 126 126 struct pci_dev *pdev = to_pci_dev(dev->dev); 127 127 uint32_t jreg, scu_rev; 128 128 ··· 271 271 static int ast_get_dram_info(struct drm_device *dev) 272 272 { 273 273 struct device_node *np = dev->dev->of_node; 274 - struct ast_private *ast = to_ast_private(dev); 274 + struct ast_device *ast = to_ast_private(dev); 275 275 uint32_t mcr_cfg, mcr_scu_mpll, mcr_scu_strap; 276 276 uint32_t denum, num, div, ref_pll, dsel; 277 277 ··· 394 394 */ 395 395 static void ast_device_release(void *data) 396 396 { 397 - struct ast_private *ast = data; 397 + struct ast_device *ast = data; 398 398 399 399 /* enable standard VGA decode */ 400 400 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa1, 0x04); 401 401 } 402 402 403 - struct ast_private *ast_device_create(const struct drm_driver *drv, 404 - struct pci_dev *pdev, 405 - unsigned long flags) 403 + struct ast_device *ast_device_create(const struct drm_driver *drv, 404 + struct pci_dev *pdev, 405 + unsigned long flags) 406 406 { 407 407 struct drm_device *dev; 408 - struct ast_private *ast; 408 + struct ast_device *ast; 409 409 bool need_post; 410 410 int ret = 0; 411 411 412 - ast = devm_drm_dev_alloc(&pdev->dev, drv, struct ast_private, base); 412 + ast = devm_drm_dev_alloc(&pdev->dev, drv, struct ast_device, base); 413 413 if (IS_ERR(ast)) 414 414 return ast; 415 415 dev = &ast->base;
+2 -2
drivers/gpu/drm/ast/ast_mm.c
··· 33 33 34 34 #include "ast_drv.h" 35 35 36 - static u32 ast_get_vram_size(struct ast_private *ast) 36 + static u32 ast_get_vram_size(struct ast_device *ast) 37 37 { 38 38 u8 jreg; 39 39 u32 vram_size; ··· 73 73 return vram_size; 74 74 } 75 75 76 - int ast_mm_init(struct ast_private *ast) 76 + int ast_mm_init(struct ast_device *ast) 77 77 { 78 78 struct drm_device *dev = &ast->base; 79 79 struct pci_dev *pdev = to_pci_dev(dev->dev);
+39 -39
drivers/gpu/drm/ast/ast_mode.c
··· 51 51 52 52 #define AST_LUT_SIZE 256 53 53 54 - static inline void ast_load_palette_index(struct ast_private *ast, 54 + static inline void ast_load_palette_index(struct ast_device *ast, 55 55 u8 index, u8 red, u8 green, 56 56 u8 blue) 57 57 { ··· 65 65 ast_io_read8(ast, AST_IO_SEQ_PORT); 66 66 } 67 67 68 - static void ast_crtc_set_gamma_linear(struct ast_private *ast, 68 + static void ast_crtc_set_gamma_linear(struct ast_device *ast, 69 69 const struct drm_format_info *format) 70 70 { 71 71 int i; ··· 84 84 } 85 85 } 86 86 87 - static void ast_crtc_set_gamma(struct ast_private *ast, 87 + static void ast_crtc_set_gamma(struct ast_device *ast, 88 88 const struct drm_format_info *format, 89 89 struct drm_color_lut *lut) 90 90 { ··· 232 232 return true; 233 233 } 234 234 235 - static void ast_set_vbios_color_reg(struct ast_private *ast, 235 + static void ast_set_vbios_color_reg(struct ast_device *ast, 236 236 const struct drm_format_info *format, 237 237 const struct ast_vbios_mode_info *vbios_mode) 238 238 { ··· 263 263 } 264 264 } 265 265 266 - static void ast_set_vbios_mode_reg(struct ast_private *ast, 266 + static void ast_set_vbios_mode_reg(struct ast_device *ast, 267 267 const struct drm_display_mode *adjusted_mode, 268 268 const struct ast_vbios_mode_info *vbios_mode) 269 269 { ··· 287 287 } 288 288 } 289 289 290 - static void ast_set_std_reg(struct ast_private *ast, 290 + static void ast_set_std_reg(struct ast_device *ast, 291 291 struct drm_display_mode *mode, 292 292 struct ast_vbios_mode_info *vbios_mode) 293 293 { ··· 335 335 ast_set_index_reg(ast, AST_IO_GR_PORT, i, stdtable->gr[i]); 336 336 } 337 337 338 - static void ast_set_crtc_reg(struct ast_private *ast, 338 + static void ast_set_crtc_reg(struct ast_device *ast, 339 339 struct drm_display_mode *mode, 340 340 struct ast_vbios_mode_info *vbios_mode) 341 341 { ··· 450 450 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0x11, 0x7f, 0x80); 451 451 } 452 452 453 - static void ast_set_offset_reg(struct ast_private *ast, 453 + static void ast_set_offset_reg(struct ast_device *ast, 454 454 struct drm_framebuffer *fb) 455 455 { 456 456 u16 offset; ··· 460 460 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xb0, (offset >> 8) & 0x3f); 461 461 } 462 462 463 - static void ast_set_dclk_reg(struct ast_private *ast, 463 + static void ast_set_dclk_reg(struct ast_device *ast, 464 464 struct drm_display_mode *mode, 465 465 struct ast_vbios_mode_info *vbios_mode) 466 466 { ··· 478 478 ((clk_info->param3 & 0x3) << 4)); 479 479 } 480 480 481 - static void ast_set_color_reg(struct ast_private *ast, 481 + static void ast_set_color_reg(struct ast_device *ast, 482 482 const struct drm_format_info *format) 483 483 { 484 484 u8 jregA0 = 0, jregA3 = 0, jregA8 = 0; ··· 507 507 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa8, 0xfd, jregA8); 508 508 } 509 509 510 - static void ast_set_crtthd_reg(struct ast_private *ast) 510 + static void ast_set_crtthd_reg(struct ast_device *ast) 511 511 { 512 512 /* Set Threshold */ 513 513 if (ast->chip == AST2600) { ··· 529 529 } 530 530 } 531 531 532 - static void ast_set_sync_reg(struct ast_private *ast, 532 + static void ast_set_sync_reg(struct ast_device *ast, 533 533 struct drm_display_mode *mode, 534 534 struct ast_vbios_mode_info *vbios_mode) 535 535 { ··· 544 544 ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, jreg); 545 545 } 546 546 547 - static void ast_set_start_address_crt1(struct ast_private *ast, 547 + static void ast_set_start_address_crt1(struct ast_device *ast, 548 548 unsigned int offset) 549 549 { 550 550 u32 addr; ··· 556 556 557 557 } 558 558 559 - static void ast_wait_for_vretrace(struct ast_private *ast) 559 + static void ast_wait_for_vretrace(struct ast_device *ast) 560 560 { 561 561 unsigned long timeout = jiffies + HZ; 562 562 u8 vgair1; ··· 645 645 struct drm_atomic_state *state) 646 646 { 647 647 struct drm_device *dev = plane->dev; 648 - struct ast_private *ast = to_ast_private(dev); 648 + struct ast_device *ast = to_ast_private(dev); 649 649 struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); 650 650 struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state); 651 651 struct drm_framebuffer *fb = plane_state->fb; ··· 683 683 static void ast_primary_plane_helper_atomic_enable(struct drm_plane *plane, 684 684 struct drm_atomic_state *state) 685 685 { 686 - struct ast_private *ast = to_ast_private(plane->dev); 686 + struct ast_device *ast = to_ast_private(plane->dev); 687 687 struct ast_plane *ast_plane = to_ast_plane(plane); 688 688 689 689 /* ··· 699 699 static void ast_primary_plane_helper_atomic_disable(struct drm_plane *plane, 700 700 struct drm_atomic_state *state) 701 701 { 702 - struct ast_private *ast = to_ast_private(plane->dev); 702 + struct ast_device *ast = to_ast_private(plane->dev); 703 703 704 704 ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT, 0x1, 0xdf, 0x20); 705 705 } ··· 719 719 DRM_GEM_SHADOW_PLANE_FUNCS, 720 720 }; 721 721 722 - static int ast_primary_plane_init(struct ast_private *ast) 722 + static int ast_primary_plane_init(struct ast_device *ast) 723 723 { 724 724 struct drm_device *dev = &ast->base; 725 725 struct ast_plane *ast_primary_plane = &ast->primary_plane; ··· 812 812 writel(0, dst + AST_HWC_SIGNATURE_HOTSPOTY); 813 813 } 814 814 815 - static void ast_set_cursor_base(struct ast_private *ast, u64 address) 815 + static void ast_set_cursor_base(struct ast_device *ast, u64 address) 816 816 { 817 817 u8 addr0 = (address >> 3) & 0xff; 818 818 u8 addr1 = (address >> 11) & 0xff; ··· 823 823 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xca, addr2); 824 824 } 825 825 826 - static void ast_set_cursor_location(struct ast_private *ast, u16 x, u16 y, 826 + static void ast_set_cursor_location(struct ast_device *ast, u16 x, u16 y, 827 827 u8 x_offset, u8 y_offset) 828 828 { 829 829 u8 x0 = (x & 0x00ff); ··· 839 839 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xc7, y1); 840 840 } 841 841 842 - static void ast_set_cursor_enabled(struct ast_private *ast, bool enabled) 842 + static void ast_set_cursor_enabled(struct ast_device *ast, bool enabled) 843 843 { 844 844 static const u8 mask = (u8)~(AST_IO_VGACRCB_HWC_16BPP | 845 845 AST_IO_VGACRCB_HWC_ENABLED); ··· 888 888 struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state); 889 889 struct drm_framebuffer *fb = plane_state->fb; 890 890 struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane); 891 - struct ast_private *ast = to_ast_private(plane->dev); 891 + struct ast_device *ast = to_ast_private(plane->dev); 892 892 struct iosys_map src_map = shadow_plane_state->data[0]; 893 893 struct drm_rect damage; 894 894 const u8 *src = src_map.vaddr; /* TODO: Use mapping abstraction properly */ ··· 943 943 static void ast_cursor_plane_helper_atomic_disable(struct drm_plane *plane, 944 944 struct drm_atomic_state *state) 945 945 { 946 - struct ast_private *ast = to_ast_private(plane->dev); 946 + struct ast_device *ast = to_ast_private(plane->dev); 947 947 948 948 ast_set_cursor_enabled(ast, false); 949 949 } ··· 962 962 DRM_GEM_SHADOW_PLANE_FUNCS, 963 963 }; 964 964 965 - static int ast_cursor_plane_init(struct ast_private *ast) 965 + static int ast_cursor_plane_init(struct ast_device *ast) 966 966 { 967 967 struct drm_device *dev = &ast->base; 968 968 struct ast_plane *ast_cursor_plane = &ast->cursor_plane; ··· 1007 1007 1008 1008 static void ast_crtc_dpms(struct drm_crtc *crtc, int mode) 1009 1009 { 1010 - struct ast_private *ast = to_ast_private(crtc->dev); 1010 + struct ast_device *ast = to_ast_private(crtc->dev); 1011 1011 u8 ch = AST_DPMS_VSYNC_OFF | AST_DPMS_HSYNC_OFF; 1012 1012 struct ast_crtc_state *ast_state; 1013 1013 const struct drm_format_info *format; ··· 1064 1064 static enum drm_mode_status 1065 1065 ast_crtc_helper_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode) 1066 1066 { 1067 - struct ast_private *ast = to_ast_private(crtc->dev); 1067 + struct ast_device *ast = to_ast_private(crtc->dev); 1068 1068 enum drm_mode_status status; 1069 1069 uint32_t jtemp; 1070 1070 ··· 1189 1189 struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, 1190 1190 crtc); 1191 1191 struct drm_device *dev = crtc->dev; 1192 - struct ast_private *ast = to_ast_private(dev); 1192 + struct ast_device *ast = to_ast_private(dev); 1193 1193 struct ast_crtc_state *ast_crtc_state = to_ast_crtc_state(crtc_state); 1194 1194 struct ast_vbios_mode_info *vbios_mode_info = &ast_crtc_state->vbios_mode_info; 1195 1195 ··· 1214 1214 static void ast_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *state) 1215 1215 { 1216 1216 struct drm_device *dev = crtc->dev; 1217 - struct ast_private *ast = to_ast_private(dev); 1217 + struct ast_device *ast = to_ast_private(dev); 1218 1218 struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); 1219 1219 struct ast_crtc_state *ast_crtc_state = to_ast_crtc_state(crtc_state); 1220 1220 struct ast_vbios_mode_info *vbios_mode_info = ··· 1236 1236 { 1237 1237 struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state, crtc); 1238 1238 struct drm_device *dev = crtc->dev; 1239 - struct ast_private *ast = to_ast_private(dev); 1239 + struct ast_device *ast = to_ast_private(dev); 1240 1240 1241 1241 ast_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); 1242 1242 ··· 1324 1324 1325 1325 static int ast_crtc_init(struct drm_device *dev) 1326 1326 { 1327 - struct ast_private *ast = to_ast_private(dev); 1327 + struct ast_device *ast = to_ast_private(dev); 1328 1328 struct drm_crtc *crtc = &ast->crtc; 1329 1329 int ret; 1330 1330 ··· 1350 1350 { 1351 1351 struct ast_vga_connector *ast_vga_connector = to_ast_vga_connector(connector); 1352 1352 struct drm_device *dev = connector->dev; 1353 - struct ast_private *ast = to_ast_private(dev); 1353 + struct ast_device *ast = to_ast_private(dev); 1354 1354 struct edid *edid; 1355 1355 int count; 1356 1356 ··· 1423 1423 return 0; 1424 1424 } 1425 1425 1426 - static int ast_vga_output_init(struct ast_private *ast) 1426 + static int ast_vga_output_init(struct ast_device *ast) 1427 1427 { 1428 1428 struct drm_device *dev = &ast->base; 1429 1429 struct drm_crtc *crtc = &ast->crtc; ··· 1456 1456 { 1457 1457 struct ast_sil164_connector *ast_sil164_connector = to_ast_sil164_connector(connector); 1458 1458 struct drm_device *dev = connector->dev; 1459 - struct ast_private *ast = to_ast_private(dev); 1459 + struct ast_device *ast = to_ast_private(dev); 1460 1460 struct edid *edid; 1461 1461 int count; 1462 1462 ··· 1529 1529 return 0; 1530 1530 } 1531 1531 1532 - static int ast_sil164_output_init(struct ast_private *ast) 1532 + static int ast_sil164_output_init(struct ast_device *ast) 1533 1533 { 1534 1534 struct drm_device *dev = &ast->base; 1535 1535 struct drm_crtc *crtc = &ast->crtc; ··· 1616 1616 return 0; 1617 1617 } 1618 1618 1619 - static int ast_dp501_output_init(struct ast_private *ast) 1619 + static int ast_dp501_output_init(struct ast_device *ast) 1620 1620 { 1621 1621 struct drm_device *dev = &ast->base; 1622 1622 struct drm_crtc *crtc = &ast->crtc; ··· 1703 1703 return 0; 1704 1704 } 1705 1705 1706 - static int ast_astdp_output_init(struct ast_private *ast) 1706 + static int ast_astdp_output_init(struct ast_device *ast) 1707 1707 { 1708 1708 struct drm_device *dev = &ast->base; 1709 1709 struct drm_crtc *crtc = &ast->crtc; ··· 1733 1733 1734 1734 static void ast_mode_config_helper_atomic_commit_tail(struct drm_atomic_state *state) 1735 1735 { 1736 - struct ast_private *ast = to_ast_private(state->dev); 1736 + struct ast_device *ast = to_ast_private(state->dev); 1737 1737 1738 1738 /* 1739 1739 * Concurrent operations could possibly trigger a call to ··· 1754 1754 const struct drm_display_mode *mode) 1755 1755 { 1756 1756 static const unsigned long max_bpp = 4; /* DRM_FORMAT_XRGB8888 */ 1757 - struct ast_private *ast = to_ast_private(dev); 1757 + struct ast_device *ast = to_ast_private(dev); 1758 1758 unsigned long fbsize, fbpages, max_fbpages; 1759 1759 1760 1760 max_fbpages = (ast->vram_fb_available) >> PAGE_SHIFT; ··· 1775 1775 .atomic_commit = drm_atomic_helper_commit, 1776 1776 }; 1777 1777 1778 - int ast_mode_config_init(struct ast_private *ast) 1778 + int ast_mode_config_init(struct ast_device *ast) 1779 1779 { 1780 1780 struct drm_device *dev = &ast->base; 1781 1781 int ret;
+47 -47
drivers/gpu/drm/ast/ast_post.c
··· 39 39 40 40 void ast_enable_vga(struct drm_device *dev) 41 41 { 42 - struct ast_private *ast = to_ast_private(dev); 42 + struct ast_device *ast = to_ast_private(dev); 43 43 44 44 ast_io_write8(ast, AST_IO_VGA_ENABLE_PORT, 0x01); 45 45 ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, 0x01); ··· 47 47 48 48 void ast_enable_mmio(struct drm_device *dev) 49 49 { 50 - struct ast_private *ast = to_ast_private(dev); 50 + struct ast_device *ast = to_ast_private(dev); 51 51 52 52 ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa1, 0x06); 53 53 } ··· 55 55 56 56 bool ast_is_vga_enabled(struct drm_device *dev) 57 57 { 58 - struct ast_private *ast = to_ast_private(dev); 58 + struct ast_device *ast = to_ast_private(dev); 59 59 u8 ch; 60 60 61 61 ch = ast_io_read8(ast, AST_IO_VGA_ENABLE_PORT); ··· 70 70 static void 71 71 ast_set_def_ext_reg(struct drm_device *dev) 72 72 { 73 - struct ast_private *ast = to_ast_private(dev); 73 + struct ast_device *ast = to_ast_private(dev); 74 74 struct pci_dev *pdev = to_pci_dev(dev->dev); 75 75 u8 i, index, reg; 76 76 const u8 *ext_reg_info; ··· 110 110 ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xff, reg); 111 111 } 112 112 113 - u32 ast_mindwm(struct ast_private *ast, u32 r) 113 + u32 ast_mindwm(struct ast_device *ast, u32 r) 114 114 { 115 115 uint32_t data; 116 116 ··· 123 123 return ast_read32(ast, 0x10000 + (r & 0x0000ffff)); 124 124 } 125 125 126 - void ast_moutdwm(struct ast_private *ast, u32 r, u32 v) 126 + void ast_moutdwm(struct ast_device *ast, u32 r, u32 v) 127 127 { 128 128 uint32_t data; 129 129 ast_write32(ast, 0xf004, r & 0xffff0000); ··· 162 162 0x20F050E0 163 163 }; 164 164 165 - static u32 mmctestburst2_ast2150(struct ast_private *ast, u32 datagen) 165 + static u32 mmctestburst2_ast2150(struct ast_device *ast, u32 datagen) 166 166 { 167 167 u32 data, timeout; 168 168 ··· 192 192 } 193 193 194 194 #if 0 /* unused in DDX driver - here for completeness */ 195 - static u32 mmctestsingle2_ast2150(struct ast_private *ast, u32 datagen) 195 + static u32 mmctestsingle2_ast2150(struct ast_device *ast, u32 datagen) 196 196 { 197 197 u32 data, timeout; 198 198 ··· 212 212 } 213 213 #endif 214 214 215 - static int cbrtest_ast2150(struct ast_private *ast) 215 + static int cbrtest_ast2150(struct ast_device *ast) 216 216 { 217 217 int i; 218 218 ··· 222 222 return 1; 223 223 } 224 224 225 - static int cbrscan_ast2150(struct ast_private *ast, int busw) 225 + static int cbrscan_ast2150(struct ast_device *ast, int busw) 226 226 { 227 227 u32 patcnt, loop; 228 228 ··· 239 239 } 240 240 241 241 242 - static void cbrdlli_ast2150(struct ast_private *ast, int busw) 242 + static void cbrdlli_ast2150(struct ast_device *ast, int busw) 243 243 { 244 244 u32 dll_min[4], dll_max[4], dlli, data, passcnt; 245 245 ··· 273 273 274 274 static void ast_init_dram_reg(struct drm_device *dev) 275 275 { 276 - struct ast_private *ast = to_ast_private(dev); 276 + struct ast_device *ast = to_ast_private(dev); 277 277 u8 j; 278 278 u32 data, temp, i; 279 279 const struct ast_dramstruct *dram_reg_info; ··· 366 366 367 367 void ast_post_gpu(struct drm_device *dev) 368 368 { 369 - struct ast_private *ast = to_ast_private(dev); 369 + struct ast_device *ast = to_ast_private(dev); 370 370 struct pci_dev *pdev = to_pci_dev(dev->dev); 371 371 u32 reg; 372 372 ··· 449 449 0x7C61D253 450 450 }; 451 451 452 - static bool mmc_test(struct ast_private *ast, u32 datagen, u8 test_ctl) 452 + static bool mmc_test(struct ast_device *ast, u32 datagen, u8 test_ctl) 453 453 { 454 454 u32 data, timeout; 455 455 ··· 469 469 return true; 470 470 } 471 471 472 - static u32 mmc_test2(struct ast_private *ast, u32 datagen, u8 test_ctl) 472 + static u32 mmc_test2(struct ast_device *ast, u32 datagen, u8 test_ctl) 473 473 { 474 474 u32 data, timeout; 475 475 ··· 490 490 } 491 491 492 492 493 - static bool mmc_test_burst(struct ast_private *ast, u32 datagen) 493 + static bool mmc_test_burst(struct ast_device *ast, u32 datagen) 494 494 { 495 495 return mmc_test(ast, datagen, 0xc1); 496 496 } 497 497 498 - static u32 mmc_test_burst2(struct ast_private *ast, u32 datagen) 498 + static u32 mmc_test_burst2(struct ast_device *ast, u32 datagen) 499 499 { 500 500 return mmc_test2(ast, datagen, 0x41); 501 501 } 502 502 503 - static bool mmc_test_single(struct ast_private *ast, u32 datagen) 503 + static bool mmc_test_single(struct ast_device *ast, u32 datagen) 504 504 { 505 505 return mmc_test(ast, datagen, 0xc5); 506 506 } 507 507 508 - static u32 mmc_test_single2(struct ast_private *ast, u32 datagen) 508 + static u32 mmc_test_single2(struct ast_device *ast, u32 datagen) 509 509 { 510 510 return mmc_test2(ast, datagen, 0x05); 511 511 } 512 512 513 - static bool mmc_test_single_2500(struct ast_private *ast, u32 datagen) 513 + static bool mmc_test_single_2500(struct ast_device *ast, u32 datagen) 514 514 { 515 515 return mmc_test(ast, datagen, 0x85); 516 516 } 517 517 518 - static int cbr_test(struct ast_private *ast) 518 + static int cbr_test(struct ast_device *ast) 519 519 { 520 520 u32 data; 521 521 int i; ··· 534 534 return 1; 535 535 } 536 536 537 - static int cbr_scan(struct ast_private *ast) 537 + static int cbr_scan(struct ast_device *ast) 538 538 { 539 539 u32 data, data2, patcnt, loop; 540 540 ··· 555 555 return data2; 556 556 } 557 557 558 - static u32 cbr_test2(struct ast_private *ast) 558 + static u32 cbr_test2(struct ast_device *ast) 559 559 { 560 560 u32 data; 561 561 ··· 569 569 return ~data & 0xffff; 570 570 } 571 571 572 - static u32 cbr_scan2(struct ast_private *ast) 572 + static u32 cbr_scan2(struct ast_device *ast) 573 573 { 574 574 u32 data, data2, patcnt, loop; 575 575 ··· 590 590 return data2; 591 591 } 592 592 593 - static bool cbr_test3(struct ast_private *ast) 593 + static bool cbr_test3(struct ast_device *ast) 594 594 { 595 595 if (!mmc_test_burst(ast, 0)) 596 596 return false; ··· 599 599 return true; 600 600 } 601 601 602 - static bool cbr_scan3(struct ast_private *ast) 602 + static bool cbr_scan3(struct ast_device *ast) 603 603 { 604 604 u32 patcnt, loop; 605 605 ··· 615 615 return true; 616 616 } 617 617 618 - static bool finetuneDQI_L(struct ast_private *ast, struct ast2300_dram_param *param) 618 + static bool finetuneDQI_L(struct ast_device *ast, struct ast2300_dram_param *param) 619 619 { 620 620 u32 gold_sadj[2], dllmin[16], dllmax[16], dlli, data, cnt, mask, passcnt, retry = 0; 621 621 bool status = false; ··· 714 714 return status; 715 715 } /* finetuneDQI_L */ 716 716 717 - static void finetuneDQSI(struct ast_private *ast) 717 + static void finetuneDQSI(struct ast_device *ast) 718 718 { 719 719 u32 dlli, dqsip, dqidly; 720 720 u32 reg_mcr18, reg_mcr0c, passcnt[2], diff; ··· 804 804 ast_moutdwm(ast, 0x1E6E0018, reg_mcr18); 805 805 806 806 } 807 - static bool cbr_dll2(struct ast_private *ast, struct ast2300_dram_param *param) 807 + static bool cbr_dll2(struct ast_device *ast, struct ast2300_dram_param *param) 808 808 { 809 809 u32 dllmin[2], dllmax[2], dlli, data, passcnt, retry = 0; 810 810 bool status = false; ··· 860 860 return status; 861 861 } /* CBRDLL2 */ 862 862 863 - static void get_ddr3_info(struct ast_private *ast, struct ast2300_dram_param *param) 863 + static void get_ddr3_info(struct ast_device *ast, struct ast2300_dram_param *param) 864 864 { 865 865 u32 trap, trap_AC2, trap_MRS; 866 866 ··· 1102 1102 1103 1103 } 1104 1104 1105 - static void ddr3_init(struct ast_private *ast, struct ast2300_dram_param *param) 1105 + static void ddr3_init(struct ast_device *ast, struct ast2300_dram_param *param) 1106 1106 { 1107 1107 u32 data, data2, retry = 0; 1108 1108 ··· 1225 1225 1226 1226 } 1227 1227 1228 - static void get_ddr2_info(struct ast_private *ast, struct ast2300_dram_param *param) 1228 + static void get_ddr2_info(struct ast_device *ast, struct ast2300_dram_param *param) 1229 1229 { 1230 1230 u32 trap, trap_AC2, trap_MRS; 1231 1231 ··· 1472 1472 } 1473 1473 } 1474 1474 1475 - static void ddr2_init(struct ast_private *ast, struct ast2300_dram_param *param) 1475 + static void ddr2_init(struct ast_device *ast, struct ast2300_dram_param *param) 1476 1476 { 1477 1477 u32 data, data2, retry = 0; 1478 1478 ··· 1600 1600 1601 1601 static void ast_post_chip_2300(struct drm_device *dev) 1602 1602 { 1603 - struct ast_private *ast = to_ast_private(dev); 1603 + struct ast_device *ast = to_ast_private(dev); 1604 1604 struct ast2300_dram_param param; 1605 1605 u32 temp; 1606 1606 u8 reg; ··· 1681 1681 } while ((reg & 0x40) == 0); 1682 1682 } 1683 1683 1684 - static bool cbr_test_2500(struct ast_private *ast) 1684 + static bool cbr_test_2500(struct ast_device *ast) 1685 1685 { 1686 1686 ast_moutdwm(ast, 0x1E6E0074, 0x0000FFFF); 1687 1687 ast_moutdwm(ast, 0x1E6E007C, 0xFF00FF00); ··· 1692 1692 return true; 1693 1693 } 1694 1694 1695 - static bool ddr_test_2500(struct ast_private *ast) 1695 + static bool ddr_test_2500(struct ast_device *ast) 1696 1696 { 1697 1697 ast_moutdwm(ast, 0x1E6E0074, 0x0000FFFF); 1698 1698 ast_moutdwm(ast, 0x1E6E007C, 0xFF00FF00); ··· 1709 1709 return true; 1710 1710 } 1711 1711 1712 - static void ddr_init_common_2500(struct ast_private *ast) 1712 + static void ddr_init_common_2500(struct ast_device *ast) 1713 1713 { 1714 1714 ast_moutdwm(ast, 0x1E6E0034, 0x00020080); 1715 1715 ast_moutdwm(ast, 0x1E6E0008, 0x2003000F); ··· 1732 1732 ast_moutdwm(ast, 0x1E6E024C, 0x80808080); 1733 1733 } 1734 1734 1735 - static void ddr_phy_init_2500(struct ast_private *ast) 1735 + static void ddr_phy_init_2500(struct ast_device *ast) 1736 1736 { 1737 1737 u32 data, pass, timecnt; 1738 1738 ··· 1766 1766 * 4Gb : 0x80000000 ~ 0x9FFFFFFF 1767 1767 * 8Gb : 0x80000000 ~ 0xBFFFFFFF 1768 1768 */ 1769 - static void check_dram_size_2500(struct ast_private *ast, u32 tRFC) 1769 + static void check_dram_size_2500(struct ast_device *ast, u32 tRFC) 1770 1770 { 1771 1771 u32 reg_04, reg_14; 1772 1772 ··· 1797 1797 ast_moutdwm(ast, 0x1E6E0014, reg_14); 1798 1798 } 1799 1799 1800 - static void enable_cache_2500(struct ast_private *ast) 1800 + static void enable_cache_2500(struct ast_device *ast) 1801 1801 { 1802 1802 u32 reg_04, data; 1803 1803 ··· 1810 1810 ast_moutdwm(ast, 0x1E6E0004, reg_04 | 0x400); 1811 1811 } 1812 1812 1813 - static void set_mpll_2500(struct ast_private *ast) 1813 + static void set_mpll_2500(struct ast_device *ast) 1814 1814 { 1815 1815 u32 addr, data, param; 1816 1816 ··· 1837 1837 udelay(100); 1838 1838 } 1839 1839 1840 - static void reset_mmc_2500(struct ast_private *ast) 1840 + static void reset_mmc_2500(struct ast_device *ast) 1841 1841 { 1842 1842 ast_moutdwm(ast, 0x1E78505C, 0x00000004); 1843 1843 ast_moutdwm(ast, 0x1E785044, 0x00000001); ··· 1848 1848 ast_moutdwm(ast, 0x1E6E0000, 0xFC600309); 1849 1849 } 1850 1850 1851 - static void ddr3_init_2500(struct ast_private *ast, const u32 *ddr_table) 1851 + static void ddr3_init_2500(struct ast_device *ast, const u32 *ddr_table) 1852 1852 { 1853 1853 1854 1854 ast_moutdwm(ast, 0x1E6E0004, 0x00000303); ··· 1892 1892 ast_moutdwm(ast, 0x1E6E0038, 0xFFFFFF00); 1893 1893 } 1894 1894 1895 - static void ddr4_init_2500(struct ast_private *ast, const u32 *ddr_table) 1895 + static void ddr4_init_2500(struct ast_device *ast, const u32 *ddr_table) 1896 1896 { 1897 1897 u32 data, data2, pass, retrycnt; 1898 1898 u32 ddr_vref, phy_vref; ··· 2002 2002 ast_moutdwm(ast, 0x1E6E0038, 0xFFFFFF00); 2003 2003 } 2004 2004 2005 - static bool ast_dram_init_2500(struct ast_private *ast) 2005 + static bool ast_dram_init_2500(struct ast_device *ast) 2006 2006 { 2007 2007 u32 data; 2008 2008 u32 max_tries = 5; ··· 2030 2030 return true; 2031 2031 } 2032 2032 2033 - void ast_patch_ahb_2500(struct ast_private *ast) 2033 + void ast_patch_ahb_2500(struct ast_device *ast) 2034 2034 { 2035 2035 u32 data; 2036 2036 ··· 2066 2066 2067 2067 void ast_post_chip_2500(struct drm_device *dev) 2068 2068 { 2069 - struct ast_private *ast = to_ast_private(dev); 2069 + struct ast_device *ast = to_ast_private(dev); 2070 2070 u32 temp; 2071 2071 u8 reg; 2072 2072