diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-03-14 13:21:56 +0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-04 21:22:42 +0800 |
commit | c8b5cfc8797203d5e952592be00a5acacf5cef6a (patch) | |
tree | 8261c32a7dbba35d5c42b46ef9e2dd0617919a03 /drivers/video | |
parent | 0d9f8217db159cdef7d90f89c9b101550d0fe3aa (diff) | |
download | linux-c8b5cfc8797203d5e952592be00a5acacf5cef6a.tar.gz linux-c8b5cfc8797203d5e952592be00a5acacf5cef6a.tar.bz2 linux-c8b5cfc8797203d5e952592be00a5acacf5cef6a.zip |
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/video')
-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 @@ #include <linux/dma-mapping.h> #include <linux/io.h> #include <linux/pinctrl/consumer.h> -#include <linux/mxsfb.h> +#include <linux/fb.h> #include <video/videomode.h> #define REG_SET 4 @@ -109,7 +109,7 @@ #define VDCTRL0_ENABLE_PRESENT (1 << 28) #define VDCTRL0_VSYNC_ACT_HIGH (1 << 27) #define VDCTRL0_HSYNC_ACT_HIGH (1 << 26) -#define VDCTRL0_DOTCLK_ACT_FAILING (1 << 25) +#define VDCTRL0_DOTCLK_ACT_FALLING (1 << 25) #define VDCTRL0_ENABLE_ACT_HIGH (1 << 24) #define VDCTRL0_VSYNC_PERIOD_UNIT (1 << 21) #define VDCTRL0_VSYNC_PULSE_WIDTH_UNIT (1 << 20) @@ -144,6 +144,14 @@ #define BLUE 2 #define TRANSP 3 +#define STMLCDIF_8BIT 1 /** pixel data bus to the display is of 8 bit width */ +#define STMLCDIF_16BIT 0 /** pixel data bus to the display is of 16 bit width */ +#define STMLCDIF_18BIT 2 /** pixel data bus to the display is of 18 bit width */ +#define STMLCDIF_24BIT 3 /** pixel data bus to the display is of 24 bit width */ + +#define MXSFB_SYNC_DATA_ENABLE_HIGH_ACT (1 << 6) +#define MXSFB_SYNC_DOTCLK_FALLING_ACT (1 << 7) /* negtive edge sampling */ + enum mxsfb_devtype { MXSFB_V3, MXSFB_V4, @@ -460,8 +468,8 @@ static int mxsfb_set_par(struct fb_info *fb_info) vdctrl0 |= VDCTRL0_VSYNC_ACT_HIGH; if (host->sync & MXSFB_SYNC_DATA_ENABLE_HIGH_ACT) vdctrl0 |= VDCTRL0_ENABLE_ACT_HIGH; - if (host->sync & MXSFB_SYNC_DOTCLK_FAILING_ACT) - vdctrl0 |= VDCTRL0_DOTCLK_ACT_FAILING; + if (host->sync & MXSFB_SYNC_DOTCLK_FALLING_ACT) + vdctrl0 |= VDCTRL0_DOTCLK_ACT_FALLING; writel(vdctrl0, host->base + LCDC_VDCTRL0); @@ -760,7 +768,7 @@ static int mxsfb_init_fbinfo_dt(struct mxsfb_info *host) if (vm.data_flags & DISPLAY_FLAGS_DE_HIGH) host->sync |= MXSFB_SYNC_DATA_ENABLE_HIGH_ACT; if (vm.data_flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) - host->sync |= MXSFB_SYNC_DOTCLK_FAILING_ACT; + host->sync |= MXSFB_SYNC_DOTCLK_FALLING_ACT; fb_add_videomode(&fb_vm, &fb_info->modelist); } @@ -775,7 +783,6 @@ static int mxsfb_init_fbinfo(struct mxsfb_info *host) { struct fb_info *fb_info = &host->fb_info; struct fb_var_screeninfo *var = &fb_info->var; - struct mxsfb_platform_data *pdata = host->pdev->dev.platform_data; dma_addr_t fb_phys; void *fb_virt; unsigned fb_size; @@ -789,15 +796,9 @@ static int mxsfb_init_fbinfo(struct mxsfb_info *host) fb_info->fix.visual = FB_VISUAL_TRUECOLOR, fb_info->fix.accel = FB_ACCEL_NONE; - if (pdata) { - host->ld_intf_width = pdata->ld_intf_width; - var->bits_per_pixel = - pdata->default_bpp ? pdata->default_bpp : 16; - } else { - ret = mxsfb_init_fbinfo_dt(host); - if (ret) - return ret; - } + ret = mxsfb_init_fbinfo_dt(host); + if (ret) + return ret; var->nonstd = 0; var->activate = FB_ACTIVATE_NOW; @@ -853,7 +854,6 @@ static int mxsfb_probe(struct platform_device *pdev) { const struct of_device_id *of_id = of_match_device(mxsfb_dt_ids, &pdev->dev); - struct mxsfb_platform_data *pdata = pdev->dev.platform_data; struct resource *res; struct mxsfb_info *host; struct fb_info *fb_info; @@ -861,7 +861,7 @@ static int mxsfb_probe(struct platform_device *pdev) struct pinctrl *pinctrl; int panel_enable; enum of_gpio_flags flags; - int i, ret; + int ret; if (of_id) pdev->id_entry = of_id->data; @@ -933,13 +933,6 @@ static int mxsfb_probe(struct platform_device *pdev) if (ret != 0) goto fb_release; - if (pdata) { - host->sync = pdata->sync; - for (i = 0; i < pdata->mode_count; i++) - fb_add_videomode(&pdata->mode_list[i], - &fb_info->modelist); - } - modelist = list_first_entry(&fb_info->modelist, struct fb_modelist, list); fb_videomode_to_var(&fb_info->var, &modelist->mode); |