diff options
-rw-r--r-- | arch/arm/mach-imx/include/mach/imxfb.h | 5 | ||||
-rw-r--r-- | drivers/video/imxfb.c | 68 |
2 files changed, 37 insertions, 36 deletions
diff --git a/arch/arm/mach-imx/include/mach/imxfb.h b/arch/arm/mach-imx/include/mach/imxfb.h index 3f24f741e906..870d0d939616 100644 --- a/arch/arm/mach-imx/include/mach/imxfb.h +++ b/arch/arm/mach-imx/include/mach/imxfb.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #define DMACR_HM(x) (((x) & 0xf) << 16) | 46 | #define DMACR_HM(x) (((x) & 0xf) << 16) |
47 | #define DMACR_TM(x) ((x) & 0xf) | 47 | #define DMACR_TM(x) ((x) & 0xf) |
48 | 48 | ||
49 | struct imxfb_mach_info { | 49 | struct imx_fb_platform_data { |
50 | u_long pixclock; | 50 | u_long pixclock; |
51 | 51 | ||
52 | u_short xres; | 52 | u_short xres; |
@@ -79,4 +79,5 @@ struct imxfb_mach_info { | |||
79 | void (*lcd_power)(int); | 79 | void (*lcd_power)(int); |
80 | void (*backlight_power)(int); | 80 | void (*backlight_power)(int); |
81 | }; | 81 | }; |
82 | void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info); | 82 | |
83 | void set_imx_fb_info(struct imx_fb_platform_data *); | ||
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index 25323ea33a54..3d1db003f995 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -513,7 +513,7 @@ static int imxfb_resume(struct platform_device *dev) | |||
513 | 513 | ||
514 | static int __init imxfb_init_fbinfo(struct platform_device *pdev) | 514 | static int __init imxfb_init_fbinfo(struct platform_device *pdev) |
515 | { | 515 | { |
516 | struct imxfb_mach_info *inf = pdev->dev.platform_data; | 516 | struct imx_fb_platform_data *pdata = pdev->dev.platform_data; |
517 | struct fb_info *info = dev_get_drvdata(&pdev->dev); | 517 | struct fb_info *info = dev_get_drvdata(&pdev->dev); |
518 | struct imxfb_info *fbi = info->par; | 518 | struct imxfb_info *fbi = info->par; |
519 | 519 | ||
@@ -548,32 +548,32 @@ static int __init imxfb_init_fbinfo(struct platform_device *pdev) | |||
548 | fbi->rgb[RGB_16] = &def_rgb_16; | 548 | fbi->rgb[RGB_16] = &def_rgb_16; |
549 | fbi->rgb[RGB_8] = &def_rgb_8; | 549 | fbi->rgb[RGB_8] = &def_rgb_8; |
550 | 550 | ||
551 | fbi->max_xres = inf->xres; | 551 | fbi->max_xres = pdata->xres; |
552 | info->var.xres = inf->xres; | 552 | info->var.xres = pdata->xres; |
553 | info->var.xres_virtual = inf->xres; | 553 | info->var.xres_virtual = pdata->xres; |
554 | fbi->max_yres = inf->yres; | 554 | fbi->max_yres = pdata->yres; |
555 | info->var.yres = inf->yres; | 555 | info->var.yres = pdata->yres; |
556 | info->var.yres_virtual = inf->yres; | 556 | info->var.yres_virtual = pdata->yres; |
557 | fbi->max_bpp = inf->bpp; | 557 | fbi->max_bpp = pdata->bpp; |
558 | info->var.bits_per_pixel = inf->bpp; | 558 | info->var.bits_per_pixel = pdata->bpp; |
559 | info->var.nonstd = inf->nonstd; | 559 | info->var.nonstd = pdata->nonstd; |
560 | info->var.pixclock = inf->pixclock; | 560 | info->var.pixclock = pdata->pixclock; |
561 | info->var.hsync_len = inf->hsync_len; | 561 | info->var.hsync_len = pdata->hsync_len; |
562 | info->var.left_margin = inf->left_margin; | 562 | info->var.left_margin = pdata->left_margin; |
563 | info->var.right_margin = inf->right_margin; | 563 | info->var.right_margin = pdata->right_margin; |
564 | info->var.vsync_len = inf->vsync_len; | 564 | info->var.vsync_len = pdata->vsync_len; |
565 | info->var.upper_margin = inf->upper_margin; | 565 | info->var.upper_margin = pdata->upper_margin; |
566 | info->var.lower_margin = inf->lower_margin; | 566 | info->var.lower_margin = pdata->lower_margin; |
567 | info->var.sync = inf->sync; | 567 | info->var.sync = pdata->sync; |
568 | info->var.grayscale = inf->cmap_greyscale; | 568 | info->var.grayscale = pdata->cmap_greyscale; |
569 | fbi->cmap_inverse = inf->cmap_inverse; | 569 | fbi->cmap_inverse = pdata->cmap_inverse; |
570 | fbi->cmap_static = inf->cmap_static; | 570 | fbi->cmap_static = pdata->cmap_static; |
571 | fbi->pcr = inf->pcr; | 571 | fbi->pcr = pdata->pcr; |
572 | fbi->lscr1 = inf->lscr1; | 572 | fbi->lscr1 = pdata->lscr1; |
573 | fbi->dmacr = inf->dmacr; | 573 | fbi->dmacr = pdata->dmacr; |
574 | fbi->pwmr = inf->pwmr; | 574 | fbi->pwmr = pdata->pwmr; |
575 | fbi->lcd_power = inf->lcd_power; | 575 | fbi->lcd_power = pdata->lcd_power; |
576 | fbi->backlight_power = inf->backlight_power; | 576 | fbi->backlight_power = pdata->backlight_power; |
577 | info->fix.smem_len = fbi->max_xres * fbi->max_yres * | 577 | info->fix.smem_len = fbi->max_xres * fbi->max_yres * |
578 | fbi->max_bpp / 8; | 578 | fbi->max_bpp / 8; |
579 | 579 | ||
@@ -584,7 +584,7 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
584 | { | 584 | { |
585 | struct imxfb_info *fbi; | 585 | struct imxfb_info *fbi; |
586 | struct fb_info *info; | 586 | struct fb_info *info; |
587 | struct imxfb_mach_info *inf; | 587 | struct imx_fb_platform_data *pdata; |
588 | struct resource *res; | 588 | struct resource *res; |
589 | int ret; | 589 | int ret; |
590 | 590 | ||
@@ -594,8 +594,8 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
594 | if (!res) | 594 | if (!res) |
595 | return -ENODEV; | 595 | return -ENODEV; |
596 | 596 | ||
597 | inf = pdev->dev.platform_data; | 597 | pdata = pdev->dev.platform_data; |
598 | if (!inf) { | 598 | if (!pdata) { |
599 | dev_err(&pdev->dev,"No platform_data available\n"); | 599 | dev_err(&pdev->dev,"No platform_data available\n"); |
600 | return -ENOMEM; | 600 | return -ENOMEM; |
601 | } | 601 | } |
@@ -625,7 +625,7 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
625 | goto failed_ioremap; | 625 | goto failed_ioremap; |
626 | } | 626 | } |
627 | 627 | ||
628 | if (!inf->fixed_screen_cpu) { | 628 | if (!pdata->fixed_screen_cpu) { |
629 | fbi->map_size = PAGE_ALIGN(info->fix.smem_len); | 629 | fbi->map_size = PAGE_ALIGN(info->fix.smem_len); |
630 | fbi->map_cpu = dma_alloc_writecombine(&pdev->dev, | 630 | fbi->map_cpu = dma_alloc_writecombine(&pdev->dev, |
631 | fbi->map_size, &fbi->map_dma, GFP_KERNEL); | 631 | fbi->map_size, &fbi->map_dma, GFP_KERNEL); |
@@ -642,8 +642,8 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
642 | info->fix.smem_start = fbi->screen_dma; | 642 | info->fix.smem_start = fbi->screen_dma; |
643 | } else { | 643 | } else { |
644 | /* Fixed framebuffer mapping enables location of the screen in eSRAM */ | 644 | /* Fixed framebuffer mapping enables location of the screen in eSRAM */ |
645 | fbi->map_cpu = inf->fixed_screen_cpu; | 645 | fbi->map_cpu = pdata->fixed_screen_cpu; |
646 | fbi->map_dma = inf->fixed_screen_dma; | 646 | fbi->map_dma = pdata->fixed_screen_dma; |
647 | info->screen_base = fbi->map_cpu; | 647 | info->screen_base = fbi->map_cpu; |
648 | fbi->screen_cpu = fbi->map_cpu; | 648 | fbi->screen_cpu = fbi->map_cpu; |
649 | fbi->screen_dma = fbi->map_dma; | 649 | fbi->screen_dma = fbi->map_dma; |
@@ -674,7 +674,7 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
674 | failed_register: | 674 | failed_register: |
675 | fb_dealloc_cmap(&info->cmap); | 675 | fb_dealloc_cmap(&info->cmap); |
676 | failed_cmap: | 676 | failed_cmap: |
677 | if (!inf->fixed_screen_cpu) | 677 | if (!pdata->fixed_screen_cpu) |
678 | dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu, | 678 | dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu, |
679 | fbi->map_dma); | 679 | fbi->map_dma); |
680 | failed_map: | 680 | failed_map: |