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

Configure Feed

Select the types of activity you want to include in your feed.

video: fbdev: atmel_lcdfb: drop AVR and platform_data support

Make the driver OF only as since AVR32 has been removed from the kernel,
there are only OF enabled platform using it.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Alexandre Belloni and committed by
Bartlomiej Zolnierkiewicz
546f98c1 787a7923

+7 -113
+3 -3
drivers/video/fbdev/Kconfig
··· 866 866 <http://vdc.epson.com/> 867 867 868 868 config FB_ATMEL 869 - tristate "AT91/AT32 LCD Controller support" 870 - depends on FB && HAVE_FB_ATMEL 869 + tristate "AT91 LCD Controller support" 870 + depends on FB && OF && HAVE_FB_ATMEL 871 871 select FB_BACKLIGHT 872 872 select FB_CFB_FILLRECT 873 873 select FB_CFB_COPYAREA ··· 875 875 select FB_MODE_HELPERS 876 876 select VIDEOMODE_HELPERS 877 877 help 878 - This enables support for the AT91/AT32 LCD Controller. 878 + This enables support for the AT91 LCD Controller. 879 879 880 880 config FB_NVIDIA 881 881 tristate "nVidia Framebuffer Support"
+4 -110
drivers/video/fbdev/atmel_lcdfb.c
··· 1 1 /* 2 - * Driver for AT91/AT32 LCD Controller 2 + * Driver for AT91 LCD Controller 3 3 * 4 4 * Copyright (C) 2007 Atmel Corporation 5 5 * ··· 98 98 static struct atmel_lcdfb_config at91sam9rl_config = { 99 99 .have_intensity_bit = true, 100 100 }; 101 - 102 - static struct atmel_lcdfb_config at32ap_config = { 103 - .have_hozval = true, 104 - }; 105 - 106 - static const struct platform_device_id atmel_lcdfb_devtypes[] = { 107 - { 108 - .name = "at91sam9261-lcdfb", 109 - .driver_data = (unsigned long)&at91sam9261_config, 110 - }, { 111 - .name = "at91sam9263-lcdfb", 112 - .driver_data = (unsigned long)&at91sam9263_config, 113 - }, { 114 - .name = "at91sam9g10-lcdfb", 115 - .driver_data = (unsigned long)&at91sam9g10_config, 116 - }, { 117 - .name = "at91sam9g45-lcdfb", 118 - .driver_data = (unsigned long)&at91sam9g45_config, 119 - }, { 120 - .name = "at91sam9g45es-lcdfb", 121 - .driver_data = (unsigned long)&at91sam9g45es_config, 122 - }, { 123 - .name = "at91sam9rl-lcdfb", 124 - .driver_data = (unsigned long)&at91sam9rl_config, 125 - }, { 126 - .name = "at32ap-lcdfb", 127 - .driver_data = (unsigned long)&at32ap_config, 128 - }, { 129 - /* terminator */ 130 - } 131 - }; 132 - MODULE_DEVICE_TABLE(platform, atmel_lcdfb_devtypes); 133 - 134 - static struct atmel_lcdfb_config * 135 - atmel_lcdfb_get_config(struct platform_device *pdev) 136 - { 137 - unsigned long data; 138 - 139 - data = platform_get_device_id(pdev)->driver_data; 140 - 141 - return (struct atmel_lcdfb_config *)data; 142 - } 143 - 144 - #if defined(CONFIG_ARCH_AT91) 145 - #define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \ 146 - | FBINFO_PARTIAL_PAN_OK \ 147 - | FBINFO_HWACCEL_YPAN) 148 - 149 - static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo, 150 - struct fb_var_screeninfo *var, 151 - struct fb_info *info) 152 - { 153 - 154 - } 155 - #elif defined(CONFIG_AVR32) 156 - #define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \ 157 - | FBINFO_PARTIAL_PAN_OK \ 158 - | FBINFO_HWACCEL_XPAN \ 159 - | FBINFO_HWACCEL_YPAN) 160 - 161 - static void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo, 162 - struct fb_var_screeninfo *var, 163 - struct fb_info *info) 164 - { 165 - u32 dma2dcfg; 166 - u32 pixeloff; 167 - 168 - pixeloff = (var->xoffset * info->var.bits_per_pixel) & 0x1f; 169 - 170 - dma2dcfg = (info->var.xres_virtual - info->var.xres) 171 - * info->var.bits_per_pixel / 8; 172 - dma2dcfg |= pixeloff << ATMEL_LCDC_PIXELOFF_OFFSET; 173 - lcdc_writel(sinfo, ATMEL_LCDC_DMA2DCFG, dma2dcfg); 174 - 175 - /* Update configuration */ 176 - lcdc_writel(sinfo, ATMEL_LCDC_DMACON, 177 - lcdc_readl(sinfo, ATMEL_LCDC_DMACON) 178 - | ATMEL_LCDC_DMAUPDT); 179 - } 180 - #endif 181 101 182 102 static u32 contrast_ctr = ATMEL_LCDC_PS_DIV8 183 103 | ATMEL_LCDC_POL_POSITIVE ··· 324 404 325 405 /* Set framebuffer DMA base address and pixel offset */ 326 406 lcdc_writel(sinfo, ATMEL_LCDC_DMABADDR1, dma_addr); 327 - 328 - atmel_lcdfb_update_dma2d(sinfo, var, info); 329 407 } 330 408 331 409 static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo) ··· 896 978 clk_disable_unprepare(sinfo->lcdc_clk); 897 979 } 898 980 899 - #ifdef CONFIG_OF 900 981 static const struct of_device_id atmel_lcdfb_dt_ids[] = { 901 982 { .compatible = "atmel,at91sam9261-lcdc" , .data = &at91sam9261_config, }, 902 983 { .compatible = "atmel,at91sam9263-lcdc" , .data = &at91sam9263_config, }, ··· 903 986 { .compatible = "atmel,at91sam9g45-lcdc" , .data = &at91sam9g45_config, }, 904 987 { .compatible = "atmel,at91sam9g45es-lcdc" , .data = &at91sam9g45es_config, }, 905 988 { .compatible = "atmel,at91sam9rl-lcdc" , .data = &at91sam9rl_config, }, 906 - { .compatible = "atmel,at32ap-lcdc" , .data = &at32ap_config, }, 907 989 { /* sentinel */ } 908 990 }; 909 991 ··· 1038 1122 of_node_put(display_np); 1039 1123 return ret; 1040 1124 } 1041 - #else 1042 - static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo) 1043 - { 1044 - return 0; 1045 - } 1046 - #endif 1047 1125 1048 1126 static int __init atmel_lcdfb_probe(struct platform_device *pdev) 1049 1127 { 1050 1128 struct device *dev = &pdev->dev; 1051 1129 struct fb_info *info; 1052 1130 struct atmel_lcdfb_info *sinfo; 1053 - struct atmel_lcdfb_pdata *pdata = NULL; 1054 1131 struct resource *regs = NULL; 1055 1132 struct resource *map = NULL; 1056 1133 struct fb_modelist *modelist; ··· 1068 1159 ret = atmel_lcdfb_of_init(sinfo); 1069 1160 if (ret) 1070 1161 goto free_info; 1071 - } else if (dev_get_platdata(dev)) { 1072 - struct fb_monspecs *monspecs; 1073 - int i; 1074 - 1075 - pdata = dev_get_platdata(dev); 1076 - monspecs = pdata->default_monspecs; 1077 - sinfo->pdata = *pdata; 1078 - 1079 - for (i = 0; i < monspecs->modedb_len; i++) 1080 - fb_add_videomode(&monspecs->modedb[i], &info->modelist); 1081 - 1082 - sinfo->config = atmel_lcdfb_get_config(pdev); 1083 - 1084 - info->var.bits_per_pixel = pdata->default_bpp ? pdata->default_bpp : 16; 1085 - memcpy(&info->monspecs, pdata->default_monspecs, sizeof(info->monspecs)); 1086 1162 } else { 1087 1163 dev_err(dev, "cannot get default configuration\n"); 1088 1164 goto free_info; ··· 1080 1186 if (IS_ERR(sinfo->reg_lcd)) 1081 1187 sinfo->reg_lcd = NULL; 1082 1188 1083 - info->flags = ATMEL_LCDFB_FBINFO_DEFAULT; 1189 + info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK | 1190 + FBINFO_HWACCEL_YPAN; 1084 1191 info->pseudo_palette = sinfo->pseudo_palette; 1085 1192 info->fbops = &atmel_lcdfb_ops; 1086 1193 ··· 1330 1435 .remove = __exit_p(atmel_lcdfb_remove), 1331 1436 .suspend = atmel_lcdfb_suspend, 1332 1437 .resume = atmel_lcdfb_resume, 1333 - .id_table = atmel_lcdfb_devtypes, 1334 1438 .driver = { 1335 1439 .name = "atmel_lcdfb", 1336 1440 .of_match_table = of_match_ptr(atmel_lcdfb_dt_ids), ··· 1338 1444 1339 1445 module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe); 1340 1446 1341 - MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver"); 1447 + MODULE_DESCRIPTION("AT91 LCD Controller framebuffer driver"); 1342 1448 MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>"); 1343 1449 MODULE_LICENSE("GPL");