diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-04-11 19:25:12 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2019-04-11 19:25:12 +0200 |
commit | a6fdbd551573d9e303823c93075c0f0edff8d98e (patch) | |
tree | f1267f4b3b3f27e713f88fe49977d8199fe7195b /drivers/video/fbdev/amba-clcd.c | |
parent | fbdev: sm712fb: fix memory frequency by avoiding a switch/case fallthrough (diff) | |
download | linux-a6fdbd551573d9e303823c93075c0f0edff8d98e.tar.xz linux-a6fdbd551573d9e303823c93075c0f0edff8d98e.zip |
video: amba-clcd: Decomission Versatile and Nomadik
These board families are now handled in the DRM subsystem
where we can have reusable panel drivers and some other
stuff. The PL111 there is now the driver used in the
defconfig for Versatile and Nomadik so no need to keep
this code around.
There are a few minor machines in arch/arm/ such as
mach-netx still using the old driver, so we need to keep
the core fbdev driver around for some time.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video/fbdev/amba-clcd.c')
-rw-r--r-- | drivers/video/fbdev/amba-clcd.c | 98 |
1 files changed, 2 insertions, 96 deletions
diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 38c1f324ce15..89324e42a033 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -30,9 +30,6 @@ #include <video/of_display_timing.h> #include <video/videomode.h> -#include "amba-clcd-nomadik.h" -#include "amba-clcd-versatile.h" - #define to_clcd(info) container_of(info, struct clcd_fb, fb) /* This is limited to 16 characters when displayed by X startup */ @@ -223,15 +220,6 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) var->blue.length = 4; } break; - case 24: - if (fb->vendor->packed_24_bit_pixels) { - var->red.length = 8; - var->green.length = 8; - var->blue.length = 8; - } else { - ret = -EINVAL; - } - break; case 32: /* If we can't do 888, reject */ caps &= CLCD_CAP_888; @@ -318,12 +306,6 @@ static int clcdfb_set_par(struct fb_info *info) clcdfb_disable(fb); - /* Some variants must be clocked here */ - if (fb->vendor->clock_timregs && !fb->clk_enabled) { - fb->clk_enabled = true; - clk_enable(fb->clk); - } - writel(regs.tim0, fb->regs + CLCD_TIM0); writel(regs.tim1, fb->regs + CLCD_TIM1); writel(regs.tim2, fb->regs + CLCD_TIM2); @@ -465,14 +447,8 @@ static int clcdfb_register(struct clcd_fb *fb) fb->off_ienb = CLCD_PL111_IENB; fb->off_cntl = CLCD_PL111_CNTL; } else { - if (of_machine_is_compatible("arm,versatile-ab") || - of_machine_is_compatible("arm,versatile-pb")) { - fb->off_ienb = CLCD_PL111_IENB; - fb->off_cntl = CLCD_PL111_CNTL; - } else { - fb->off_ienb = CLCD_PL110_IENB; - fb->off_cntl = CLCD_PL110_CNTL; - } + fb->off_ienb = CLCD_PL110_IENB; + fb->off_cntl = CLCD_PL110_CNTL; } fb->clk = clk_get(&fb->dev->dev, NULL); @@ -713,42 +689,6 @@ static int clcdfb_of_init_tft_panel(struct clcd_fb *fb, u32 r0, u32 g0, u32 b0) if (r0 != 0 && b0 == 0) fb->panel->bgr_connection = true; - if (fb->panel->caps && fb->vendor->st_bitmux_control) { - /* - * Set up the special bits for the Nomadik control register - * (other platforms tend to do this through an external - * register). - */ - - /* Offset of the highest used color */ - int maxoff = max3(r0, g0, b0); - /* Most significant bit out, highest used bit */ - int msb = 0; - - if (fb->panel->caps & CLCD_CAP_888) { - msb = maxoff + 8 - 1; - } else if (fb->panel->caps & CLCD_CAP_565) { - msb = maxoff + 5 - 1; - fb->panel->cntl |= CNTL_ST_1XBPP_565; - } else if (fb->panel->caps & CLCD_CAP_5551) { - msb = maxoff + 5 - 1; - fb->panel->cntl |= CNTL_ST_1XBPP_5551; - } else if (fb->panel->caps & CLCD_CAP_444) { - msb = maxoff + 4 - 1; - fb->panel->cntl |= CNTL_ST_1XBPP_444; - } - - /* Send out as many bits as we need */ - if (msb > 17) - fb->panel->cntl |= CNTL_ST_CDWID_24; - else if (msb > 15) - fb->panel->cntl |= CNTL_ST_CDWID_18; - else if (msb > 11) - fb->panel->cntl |= CNTL_ST_CDWID_16; - else - fb->panel->cntl |= CNTL_ST_CDWID_12; - } - return fb->panel->caps ? 0 : -EINVAL; } @@ -775,12 +715,6 @@ static int clcdfb_of_init_display(struct clcd_fb *fb) if (!panel) return -ENODEV; - if (fb->vendor->init_panel) { - err = fb->vendor->init_panel(fb, panel); - if (err) - return err; - } - err = clcdfb_of_get_backlight(panel, fb->panel); if (err) return err; @@ -941,7 +875,6 @@ static struct clcd_board *clcdfb_of_get_board(struct amba_device *dev) static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) { struct clcd_board *board = dev_get_platdata(&dev->dev); - struct clcd_vendor_data *vendor = id->data; struct clcd_fb *fb; int ret; @@ -951,12 +884,6 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) if (!board) return -EINVAL; - if (vendor->init_board) { - ret = vendor->init_board(dev, board); - if (ret) - return ret; - } - ret = dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32)); if (ret) goto out; @@ -974,7 +901,6 @@ static int clcdfb_probe(struct amba_device *dev, const struct amba_id *id) } fb->dev = dev; - fb->vendor = vendor; fb->board = board; dev_info(&fb->dev->dev, "PL%03x designer %02x rev%u at 0x%08llx\n", @@ -1021,30 +947,10 @@ static int clcdfb_remove(struct amba_device *dev) return 0; } -static struct clcd_vendor_data vendor_arm = { - /* Sets up the versatile board displays */ - .init_panel = versatile_clcd_init_panel, -}; - -static struct clcd_vendor_data vendor_nomadik = { - .clock_timregs = true, - .packed_24_bit_pixels = true, - .st_bitmux_control = true, - .init_board = nomadik_clcd_init_board, - .init_panel = nomadik_clcd_init_panel, -}; - static const struct amba_id clcdfb_id_table[] = { { .id = 0x00041110, .mask = 0x000ffffe, - .data = &vendor_arm, - }, - /* ST Electronics Nomadik variant */ - { - .id = 0x00180110, - .mask = 0x00fffffe, - .data = &vendor_nomadik, }, { 0, 0 }, }; |