diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-03-14 01:21:56 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-04 09:22:42 -0400 |
commit | c8b5cfc8797203d5e952592be00a5acacf5cef6a (patch) | |
tree | 8261c32a7dbba35d5c42b46ef9e2dd0617919a03 /drivers | |
parent | 0d9f8217db159cdef7d90f89c9b101550d0fe3aa (diff) |
video: mxsfb: remove mxsfb_platform_data
None of mxsfb users uses mxsfb_platform_data now. Let's remove it
from mxsfb driver.
As the result, include/linux/mxsfb.h gets deleted with a few macros
moved into mxsfb.c. Along with the change, the typo "FAILING" in macro
name is fixed to be "FALLING".
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/mxsfb.c | 41 |
1 files changed, 17 insertions, 24 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index e5ceba54d22f..eac7c1ace7a5 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #include <linux/dma-mapping.h> | 49 | #include <linux/dma-mapping.h> |
50 | #include <linux/io.h> | 50 | #include <linux/io.h> |
51 | #include <linux/pinctrl/consumer.h> | 51 | #include <linux/pinctrl/consumer.h> |
52 | #include <linux/mxsfb.h> | 52 | #include <linux/fb.h> |
53 | #include <video/videomode.h> | 53 | #include <video/videomode.h> |
54 | 54 | ||
55 | #define REG_SET 4 | 55 | #define REG_SET 4 |
@@ -109,7 +109,7 @@ | |||
109 | #define VDCTRL0_ENABLE_PRESENT (1 << 28) | 109 | #define VDCTRL0_ENABLE_PRESENT (1 << 28) |
110 | #define VDCTRL0_VSYNC_ACT_HIGH (1 << 27) | 110 | #define VDCTRL0_VSYNC_ACT_HIGH (1 << 27) |
111 | #define VDCTRL0_HSYNC_ACT_HIGH (1 << 26) | 111 | #define VDCTRL0_HSYNC_ACT_HIGH (1 << 26) |
112 | #define VDCTRL0_DOTCLK_ACT_FAILING (1 << 25) | 112 | #define VDCTRL0_DOTCLK_ACT_FALLING (1 << 25) |
113 | #define VDCTRL0_ENABLE_ACT_HIGH (1 << 24) | 113 | #define VDCTRL0_ENABLE_ACT_HIGH (1 << 24) |
114 | #define VDCTRL0_VSYNC_PERIOD_UNIT (1 << 21) | 114 | #define VDCTRL0_VSYNC_PERIOD_UNIT (1 << 21) |
115 | #define VDCTRL0_VSYNC_PULSE_WIDTH_UNIT (1 << 20) | 115 | #define VDCTRL0_VSYNC_PULSE_WIDTH_UNIT (1 << 20) |
@@ -144,6 +144,14 @@ | |||
144 | #define BLUE 2 | 144 | #define BLUE 2 |
145 | #define TRANSP 3 | 145 | #define TRANSP 3 |
146 | 146 | ||
147 | #define STMLCDIF_8BIT 1 /** pixel data bus to the display is of 8 bit width */ | ||
148 | #define STMLCDIF_16BIT 0 /** pixel data bus to the display is of 16 bit width */ | ||
149 | #define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */ | ||
150 | #define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */ | ||
151 | |||
152 | #define MXSFB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6) | ||
153 | #define MXSFB_SYNC_DOTCLK_FALLING_ACT (1 << 7) /* negtive edge sampling */ | ||
154 | |||
147 | enum mxsfb_devtype { | 155 | enum mxsfb_devtype { |
148 | MXSFB_V3, | 156 | MXSFB_V3, |
149 | MXSFB_V4, | 157 | MXSFB_V4, |
@@ -460,8 +468,8 @@ static int mxsfb_set_par(struct fb_info *fb_info) | |||
460 | vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH; | 468 | vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH; |
461 | if (host->sync & MXSFB_SYNC_DATA_ENABLE_HIGH_ACT) | 469 | if (host->sync & MXSFB_SYNC_DATA_ENABLE_HIGH_ACT) |
462 | vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH; | 470 | vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH; |
463 | if (host->sync & MXSFB_SYNC_DOTCLK_FAILING_ACT) | 471 | if (host->sync & MXSFB_SYNC_DOTCLK_FALLING_ACT) |
464 | vdctrl0 |= VDCTRL0_DOTCLK_ACT_FAILING; | 472 | vdctrl0 |= VDCTRL0_DOTCLK_ACT_FALLING; |
465 | 473 | ||
466 | writel(vdctrl0, host->base + LCDC_VDCTRL0); | 474 | writel(vdctrl0, host->base + LCDC_VDCTRL0); |
467 | 475 | ||
@@ -760,7 +768,7 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host) | |||
760 | if (vm.data_flags & DISPLAY_FLAGS_DE_HIGH) | 768 | if (vm.data_flags & DISPLAY_FLAGS_DE_HIGH) |
761 | host->sync |= MXSFB_SYNC_DATA_ENABLE_HIGH_ACT; | 769 | host->sync |= MXSFB_SYNC_DATA_ENABLE_HIGH_ACT; |
762 | if (vm.data_flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) | 770 | if (vm.data_flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) |
763 | host->sync |= MXSFB_SYNC_DOTCLK_FAILING_ACT; | 771 | host->sync |= MXSFB_SYNC_DOTCLK_FALLING_ACT; |
764 | fb_add_videomode(&fb_vm, &fb_info->modelist); | 772 | fb_add_videomode(&fb_vm, &fb_info->modelist); |
765 | } | 773 | } |
766 | 774 | ||
@@ -775,7 +783,6 @@ static int mxsfb_init_fbinfo(struct mxsfb_info *host) | |||
775 | { | 783 | { |
776 | struct fb_info *fb_info = &host->fb_info; | 784 | struct fb_info *fb_info = &host->fb_info; |
777 | struct fb_var_screeninfo *var = &fb_info->var; | 785 | struct fb_var_screeninfo *var = &fb_info->var; |
778 | struct mxsfb_platform_data *pdata = host->pdev->dev.platform_data; | ||
779 | dma_addr_t fb_phys; | 786 | dma_addr_t fb_phys; |
780 | void *fb_virt; | 787 | void *fb_virt; |
781 | unsigned fb_size; | 788 | unsigned fb_size; |
@@ -789,15 +796,9 @@ static int mxsfb_init_fbinfo(struct mxsfb_info *host) | |||
789 | fb_info->fix.visual = FB_VISUAL_TRUECOLOR, | 796 | fb_info->fix.visual = FB_VISUAL_TRUECOLOR, |
790 | fb_info->fix.accel = FB_ACCEL_NONE; | 797 | fb_info->fix.accel = FB_ACCEL_NONE; |
791 | 798 | ||
792 | if (pdata) { | 799 | ret = mxsfb_init_fbinfo_dt(host); |
793 | host->ld_intf_width = pdata->ld_intf_width; | 800 | if (ret) |
794 | var->bits_per_pixel = | 801 | return ret; |
795 | pdata->default_bpp ? pdata->default_bpp : 16; | ||
796 | } else { | ||
797 | ret = mxsfb_init_fbinfo_dt(host); | ||
798 | if (ret) | ||
799 | return ret; | ||
800 | } | ||
801 | 802 | ||
802 | var->nonstd = 0; | 803 | var->nonstd = 0; |
803 | var->activate = FB_ACTIVATE_NOW; | 804 | var->activate = FB_ACTIVATE_NOW; |
@@ -853,7 +854,6 @@ static int mxsfb_probe(struct platform_device *pdev) | |||
853 | { | 854 | { |
854 | const struct of_device_id *of_id = | 855 | const struct of_device_id *of_id = |
855 | of_match_device(mxsfb_dt_ids, &pdev->dev); | 856 | of_match_device(mxsfb_dt_ids, &pdev->dev); |
856 | struct mxsfb_platform_data *pdata = pdev->dev.platform_data; | ||
857 | struct resource *res; | 857 | struct resource *res; |
858 | struct mxsfb_info *host; | 858 | struct mxsfb_info *host; |
859 | struct fb_info *fb_info; | 859 | struct fb_info *fb_info; |
@@ -861,7 +861,7 @@ static int mxsfb_probe(struct platform_device *pdev) | |||
861 | struct pinctrl *pinctrl; | 861 | struct pinctrl *pinctrl; |
862 | int panel_enable; | 862 | int panel_enable; |
863 | enum of_gpio_flags flags; | 863 | enum of_gpio_flags flags; |
864 | int i, ret; | 864 | int ret; |
865 | 865 | ||
866 | if (of_id) | 866 | if (of_id) |
867 | pdev->id_entry = of_id->data; | 867 | pdev->id_entry = of_id->data; |
@@ -933,13 +933,6 @@ static int mxsfb_probe(struct platform_device *pdev) | |||
933 | if (ret != 0) | 933 | if (ret != 0) |
934 | goto fb_release; | 934 | goto fb_release; |
935 | 935 | ||
936 | if (pdata) { | ||
937 | host->sync = pdata->sync; | ||
938 | for (i = 0; i < pdata->mode_count; i++) | ||
939 | fb_add_videomode(&pdata->mode_list[i], | ||
940 | &fb_info->modelist); | ||
941 | } | ||
942 | |||
943 | modelist = list_first_entry(&fb_info->modelist, | 936 | modelist = list_first_entry(&fb_info->modelist, |
944 | struct fb_modelist, list); | 937 | struct fb_modelist, list); |
945 | fb_videomode_to_var(&fb_info->var, &modelist->mode); | 938 | fb_videomode_to_var(&fb_info->var, &modelist->mode); |