* [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support
@ 2019-02-25 21:25 ` Alexandre Belloni
2019-02-26 15:35 ` Nicolas.Ferre
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-02-25 21:25 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz
Cc: linux-fbdev, Alexandre Belloni, dri-devel, linux-kernel,
Sam Ravnborg, linux-arm-kernel
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>
---
drivers/video/fbdev/Kconfig | 6 +-
drivers/video/fbdev/atmel_lcdfb.c | 114 ++----------------------------
2 files changed, 7 insertions(+), 113 deletions(-)
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index ae7712c9687a..f0f07d02af88 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -866,8 +866,8 @@ config FB_S1D13XXX
<http://vdc.epson.com/>
config FB_ATMEL
- tristate "AT91/AT32 LCD Controller support"
- depends on FB && HAVE_FB_ATMEL
+ tristate "AT91 LCD Controller support"
+ depends on FB && OF && HAVE_FB_ATMEL
select FB_BACKLIGHT
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
@@ -875,7 +875,7 @@ config FB_ATMEL
select FB_MODE_HELPERS
select VIDEOMODE_HELPERS
help
- This enables support for the AT91/AT32 LCD Controller.
+ This enables support for the AT91 LCD Controller.
config FB_NVIDIA
tristate "nVidia Framebuffer Support"
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index 4ed55e6bbb84..b8786ff62b87 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -1,5 +1,5 @@
/*
- * Driver for AT91/AT32 LCD Controller
+ * Driver for AT91 LCD Controller
*
* Copyright (C) 2007 Atmel Corporation
*
@@ -99,86 +99,6 @@ static struct atmel_lcdfb_config at91sam9rl_config = {
.have_intensity_bit = true,
};
-static struct atmel_lcdfb_config at32ap_config = {
- .have_hozval = true,
-};
-
-static const struct platform_device_id atmel_lcdfb_devtypes[] = {
- {
- .name = "at91sam9261-lcdfb",
- .driver_data = (unsigned long)&at91sam9261_config,
- }, {
- .name = "at91sam9263-lcdfb",
- .driver_data = (unsigned long)&at91sam9263_config,
- }, {
- .name = "at91sam9g10-lcdfb",
- .driver_data = (unsigned long)&at91sam9g10_config,
- }, {
- .name = "at91sam9g45-lcdfb",
- .driver_data = (unsigned long)&at91sam9g45_config,
- }, {
- .name = "at91sam9g45es-lcdfb",
- .driver_data = (unsigned long)&at91sam9g45es_config,
- }, {
- .name = "at91sam9rl-lcdfb",
- .driver_data = (unsigned long)&at91sam9rl_config,
- }, {
- .name = "at32ap-lcdfb",
- .driver_data = (unsigned long)&at32ap_config,
- }, {
- /* terminator */
- }
-};
-MODULE_DEVICE_TABLE(platform, atmel_lcdfb_devtypes);
-
-static struct atmel_lcdfb_config *
-atmel_lcdfb_get_config(struct platform_device *pdev)
-{
- unsigned long data;
-
- data = platform_get_device_id(pdev)->driver_data;
-
- return (struct atmel_lcdfb_config *)data;
-}
-
-#if defined(CONFIG_ARCH_AT91)
-#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
- | FBINFO_PARTIAL_PAN_OK \
- | FBINFO_HWACCEL_YPAN)
-
-static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
- struct fb_var_screeninfo *var,
- struct fb_info *info)
-{
-
-}
-#elif defined(CONFIG_AVR32)
-#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
- | FBINFO_PARTIAL_PAN_OK \
- | FBINFO_HWACCEL_XPAN \
- | FBINFO_HWACCEL_YPAN)
-
-static void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
- struct fb_var_screeninfo *var,
- struct fb_info *info)
-{
- u32 dma2dcfg;
- u32 pixeloff;
-
- pixeloff = (var->xoffset * info->var.bits_per_pixel) & 0x1f;
-
- dma2dcfg = (info->var.xres_virtual - info->var.xres)
- * info->var.bits_per_pixel / 8;
- dma2dcfg |= pixeloff << ATMEL_LCDC_PIXELOFF_OFFSET;
- lcdc_writel(sinfo, ATMEL_LCDC_DMA2DCFG, dma2dcfg);
-
- /* Update configuration */
- lcdc_writel(sinfo, ATMEL_LCDC_DMACON,
- lcdc_readl(sinfo, ATMEL_LCDC_DMACON)
- | ATMEL_LCDC_DMAUPDT);
-}
-#endif
-
static u32 contrast_ctr = ATMEL_LCDC_PS_DIV8
| ATMEL_LCDC_POL_POSITIVE
| ATMEL_LCDC_ENA_PWMENABLE;
@@ -404,8 +324,6 @@ static void atmel_lcdfb_update_dma(struct fb_info *info,
/* Set framebuffer DMA base address and pixel offset */
lcdc_writel(sinfo, ATMEL_LCDC_DMABADDR1, dma_addr);
-
- atmel_lcdfb_update_dma2d(sinfo, var, info);
}
static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo)
@@ -978,7 +896,6 @@ static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo)
clk_disable_unprepare(sinfo->lcdc_clk);
}
-#ifdef CONFIG_OF
static const struct of_device_id atmel_lcdfb_dt_ids[] = {
{ .compatible = "atmel,at91sam9261-lcdc" , .data = &at91sam9261_config, },
{ .compatible = "atmel,at91sam9263-lcdc" , .data = &at91sam9263_config, },
@@ -986,7 +903,6 @@ static const struct of_device_id atmel_lcdfb_dt_ids[] = {
{ .compatible = "atmel,at91sam9g45-lcdc" , .data = &at91sam9g45_config, },
{ .compatible = "atmel,at91sam9g45es-lcdc" , .data = &at91sam9g45es_config, },
{ .compatible = "atmel,at91sam9rl-lcdc" , .data = &at91sam9rl_config, },
- { .compatible = "atmel,at32ap-lcdc" , .data = &at32ap_config, },
{ /* sentinel */ }
};
@@ -1122,19 +1038,12 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
of_node_put(display_np);
return ret;
}
-#else
-static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
-{
- return 0;
-}
-#endif
static int __init atmel_lcdfb_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct fb_info *info;
struct atmel_lcdfb_info *sinfo;
- struct atmel_lcdfb_pdata *pdata = NULL;
struct resource *regs = NULL;
struct resource *map = NULL;
struct fb_modelist *modelist;
@@ -1159,21 +1068,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
ret = atmel_lcdfb_of_init(sinfo);
if (ret)
goto free_info;
- } else if (dev_get_platdata(dev)) {
- struct fb_monspecs *monspecs;
- int i;
-
- pdata = dev_get_platdata(dev);
- monspecs = pdata->default_monspecs;
- sinfo->pdata = *pdata;
-
- for (i = 0; i < monspecs->modedb_len; i++)
- fb_add_videomode(&monspecs->modedb[i], &info->modelist);
-
- sinfo->config = atmel_lcdfb_get_config(pdev);
-
- info->var.bits_per_pixel = pdata->default_bpp ? pdata->default_bpp : 16;
- memcpy(&info->monspecs, pdata->default_monspecs, sizeof(info->monspecs));
} else {
dev_err(dev, "cannot get default configuration\n");
goto free_info;
@@ -1186,7 +1080,8 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
if (IS_ERR(sinfo->reg_lcd))
sinfo->reg_lcd = NULL;
- info->flags = ATMEL_LCDFB_FBINFO_DEFAULT;
+ info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK |
+ FBINFO_HWACCEL_YPAN;
info->pseudo_palette = sinfo->pseudo_palette;
info->fbops = &atmel_lcdfb_ops;
@@ -1435,7 +1330,6 @@ static struct platform_driver atmel_lcdfb_driver = {
.remove = __exit_p(atmel_lcdfb_remove),
.suspend = atmel_lcdfb_suspend,
.resume = atmel_lcdfb_resume,
- .id_table = atmel_lcdfb_devtypes,
.driver = {
.name = "atmel_lcdfb",
.of_match_table = of_match_ptr(atmel_lcdfb_dt_ids),
@@ -1444,6 +1338,6 @@ static struct platform_driver atmel_lcdfb_driver = {
module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe);
-MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver");
+MODULE_DESCRIPTION("AT91 LCD Controller framebuffer driver");
MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
MODULE_LICENSE("GPL");
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support
2019-02-25 21:25 ` [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support Alexandre Belloni
@ 2019-02-26 15:35 ` Nicolas.Ferre
2019-02-27 20:14 ` Sam Ravnborg
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Nicolas.Ferre @ 2019-02-26 15:35 UTC (permalink / raw)
To: alexandre.belloni, b.zolnierkie
Cc: linux-arm-kernel, linux-fbdev, sam, linux-kernel, dri-devel
On 25/02/2019 at 22:25, Alexandre Belloni wrote:
> 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>
It looks good to me:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks Alexandre.
Best regards,
Nicolas
> ---
> drivers/video/fbdev/Kconfig | 6 +-
> drivers/video/fbdev/atmel_lcdfb.c | 114 ++----------------------------
> 2 files changed, 7 insertions(+), 113 deletions(-)
>
> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> index ae7712c9687a..f0f07d02af88 100644
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -866,8 +866,8 @@ config FB_S1D13XXX
> <http://vdc.epson.com/>
>
> config FB_ATMEL
> - tristate "AT91/AT32 LCD Controller support"
> - depends on FB && HAVE_FB_ATMEL
> + tristate "AT91 LCD Controller support"
> + depends on FB && OF && HAVE_FB_ATMEL
> select FB_BACKLIGHT
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> @@ -875,7 +875,7 @@ config FB_ATMEL
> select FB_MODE_HELPERS
> select VIDEOMODE_HELPERS
> help
> - This enables support for the AT91/AT32 LCD Controller.
> + This enables support for the AT91 LCD Controller.
>
> config FB_NVIDIA
> tristate "nVidia Framebuffer Support"
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index 4ed55e6bbb84..b8786ff62b87 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1,5 +1,5 @@
> /*
> - * Driver for AT91/AT32 LCD Controller
> + * Driver for AT91 LCD Controller
> *
> * Copyright (C) 2007 Atmel Corporation
> *
> @@ -99,86 +99,6 @@ static struct atmel_lcdfb_config at91sam9rl_config = {
> .have_intensity_bit = true,
> };
>
> -static struct atmel_lcdfb_config at32ap_config = {
> - .have_hozval = true,
> -};
> -
> -static const struct platform_device_id atmel_lcdfb_devtypes[] = {
> - {
> - .name = "at91sam9261-lcdfb",
> - .driver_data = (unsigned long)&at91sam9261_config,
> - }, {
> - .name = "at91sam9263-lcdfb",
> - .driver_data = (unsigned long)&at91sam9263_config,
> - }, {
> - .name = "at91sam9g10-lcdfb",
> - .driver_data = (unsigned long)&at91sam9g10_config,
> - }, {
> - .name = "at91sam9g45-lcdfb",
> - .driver_data = (unsigned long)&at91sam9g45_config,
> - }, {
> - .name = "at91sam9g45es-lcdfb",
> - .driver_data = (unsigned long)&at91sam9g45es_config,
> - }, {
> - .name = "at91sam9rl-lcdfb",
> - .driver_data = (unsigned long)&at91sam9rl_config,
> - }, {
> - .name = "at32ap-lcdfb",
> - .driver_data = (unsigned long)&at32ap_config,
> - }, {
> - /* terminator */
> - }
> -};
> -MODULE_DEVICE_TABLE(platform, atmel_lcdfb_devtypes);
> -
> -static struct atmel_lcdfb_config *
> -atmel_lcdfb_get_config(struct platform_device *pdev)
> -{
> - unsigned long data;
> -
> - data = platform_get_device_id(pdev)->driver_data;
> -
> - return (struct atmel_lcdfb_config *)data;
> -}
> -
> -#if defined(CONFIG_ARCH_AT91)
> -#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
> - | FBINFO_PARTIAL_PAN_OK \
> - | FBINFO_HWACCEL_YPAN)
> -
> -static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
> - struct fb_var_screeninfo *var,
> - struct fb_info *info)
> -{
> -
> -}
> -#elif defined(CONFIG_AVR32)
> -#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
> - | FBINFO_PARTIAL_PAN_OK \
> - | FBINFO_HWACCEL_XPAN \
> - | FBINFO_HWACCEL_YPAN)
> -
> -static void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
> - struct fb_var_screeninfo *var,
> - struct fb_info *info)
> -{
> - u32 dma2dcfg;
> - u32 pixeloff;
> -
> - pixeloff = (var->xoffset * info->var.bits_per_pixel) & 0x1f;
> -
> - dma2dcfg = (info->var.xres_virtual - info->var.xres)
> - * info->var.bits_per_pixel / 8;
> - dma2dcfg |= pixeloff << ATMEL_LCDC_PIXELOFF_OFFSET;
> - lcdc_writel(sinfo, ATMEL_LCDC_DMA2DCFG, dma2dcfg);
> -
> - /* Update configuration */
> - lcdc_writel(sinfo, ATMEL_LCDC_DMACON,
> - lcdc_readl(sinfo, ATMEL_LCDC_DMACON)
> - | ATMEL_LCDC_DMAUPDT);
> -}
> -#endif
> -
> static u32 contrast_ctr = ATMEL_LCDC_PS_DIV8
> | ATMEL_LCDC_POL_POSITIVE
> | ATMEL_LCDC_ENA_PWMENABLE;
> @@ -404,8 +324,6 @@ static void atmel_lcdfb_update_dma(struct fb_info *info,
>
> /* Set framebuffer DMA base address and pixel offset */
> lcdc_writel(sinfo, ATMEL_LCDC_DMABADDR1, dma_addr);
> -
> - atmel_lcdfb_update_dma2d(sinfo, var, info);
> }
>
> static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo)
> @@ -978,7 +896,6 @@ static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo)
> clk_disable_unprepare(sinfo->lcdc_clk);
> }
>
> -#ifdef CONFIG_OF
> static const struct of_device_id atmel_lcdfb_dt_ids[] = {
> { .compatible = "atmel,at91sam9261-lcdc" , .data = &at91sam9261_config, },
> { .compatible = "atmel,at91sam9263-lcdc" , .data = &at91sam9263_config, },
> @@ -986,7 +903,6 @@ static const struct of_device_id atmel_lcdfb_dt_ids[] = {
> { .compatible = "atmel,at91sam9g45-lcdc" , .data = &at91sam9g45_config, },
> { .compatible = "atmel,at91sam9g45es-lcdc" , .data = &at91sam9g45es_config, },
> { .compatible = "atmel,at91sam9rl-lcdc" , .data = &at91sam9rl_config, },
> - { .compatible = "atmel,at32ap-lcdc" , .data = &at32ap_config, },
> { /* sentinel */ }
> };
>
> @@ -1122,19 +1038,12 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> of_node_put(display_np);
> return ret;
> }
> -#else
> -static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> -{
> - return 0;
> -}
> -#endif
>
> static int __init atmel_lcdfb_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct fb_info *info;
> struct atmel_lcdfb_info *sinfo;
> - struct atmel_lcdfb_pdata *pdata = NULL;
> struct resource *regs = NULL;
> struct resource *map = NULL;
> struct fb_modelist *modelist;
> @@ -1159,21 +1068,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
> ret = atmel_lcdfb_of_init(sinfo);
> if (ret)
> goto free_info;
> - } else if (dev_get_platdata(dev)) {
> - struct fb_monspecs *monspecs;
> - int i;
> -
> - pdata = dev_get_platdata(dev);
> - monspecs = pdata->default_monspecs;
> - sinfo->pdata = *pdata;
> -
> - for (i = 0; i < monspecs->modedb_len; i++)
> - fb_add_videomode(&monspecs->modedb[i], &info->modelist);
> -
> - sinfo->config = atmel_lcdfb_get_config(pdev);
> -
> - info->var.bits_per_pixel = pdata->default_bpp ? pdata->default_bpp : 16;
> - memcpy(&info->monspecs, pdata->default_monspecs, sizeof(info->monspecs));
> } else {
> dev_err(dev, "cannot get default configuration\n");
> goto free_info;
> @@ -1186,7 +1080,8 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
> if (IS_ERR(sinfo->reg_lcd))
> sinfo->reg_lcd = NULL;
>
> - info->flags = ATMEL_LCDFB_FBINFO_DEFAULT;
> + info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK |
> + FBINFO_HWACCEL_YPAN;
> info->pseudo_palette = sinfo->pseudo_palette;
> info->fbops = &atmel_lcdfb_ops;
>
> @@ -1435,7 +1330,6 @@ static struct platform_driver atmel_lcdfb_driver = {
> .remove = __exit_p(atmel_lcdfb_remove),
> .suspend = atmel_lcdfb_suspend,
> .resume = atmel_lcdfb_resume,
> - .id_table = atmel_lcdfb_devtypes,
> .driver = {
> .name = "atmel_lcdfb",
> .of_match_table = of_match_ptr(atmel_lcdfb_dt_ids),
> @@ -1444,6 +1338,6 @@ static struct platform_driver atmel_lcdfb_driver = {
>
> module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe);
>
> -MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver");
> +MODULE_DESCRIPTION("AT91 LCD Controller framebuffer driver");
> MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
> MODULE_LICENSE("GPL");
>
--
Nicolas Ferre
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support
2019-02-25 21:25 ` [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support Alexandre Belloni
2019-02-26 15:35 ` Nicolas.Ferre
@ 2019-02-27 20:14 ` Sam Ravnborg
2019-03-18 10:38 ` Nicolas.Ferre
2019-04-01 12:12 ` Bartlomiej Zolnierkiewicz
3 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2019-02-27 20:14 UTC (permalink / raw)
To: Alexandre Belloni
Cc: linux-fbdev, Bartlomiej Zolnierkiewicz, linux-kernel, dri-devel,
linux-arm-kernel
Hi Alexandre.
Nice patch, good to clean out unused code.
On Mon, Feb 25, 2019 at 10:25:33PM +0100, Alexandre Belloni wrote:
> 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>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support
2019-02-25 21:25 ` [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support Alexandre Belloni
2019-02-26 15:35 ` Nicolas.Ferre
2019-02-27 20:14 ` Sam Ravnborg
@ 2019-03-18 10:38 ` Nicolas.Ferre
2019-04-01 12:12 ` Bartlomiej Zolnierkiewicz
3 siblings, 0 replies; 5+ messages in thread
From: Nicolas.Ferre @ 2019-03-18 10:38 UTC (permalink / raw)
To: alexandre.belloni, b.zolnierkie
Cc: linux-arm-kernel, linux-fbdev, sam, linux-kernel, dri-devel
On 25/02/2019 at 22:25, Alexandre Belloni wrote:
> 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>
In case it's needed:
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
> drivers/video/fbdev/Kconfig | 6 +-
> drivers/video/fbdev/atmel_lcdfb.c | 114 ++----------------------------
> 2 files changed, 7 insertions(+), 113 deletions(-)
>
> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> index ae7712c9687a..f0f07d02af88 100644
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -866,8 +866,8 @@ config FB_S1D13XXX
> <http://vdc.epson.com/>
>
> config FB_ATMEL
> - tristate "AT91/AT32 LCD Controller support"
> - depends on FB && HAVE_FB_ATMEL
> + tristate "AT91 LCD Controller support"
> + depends on FB && OF && HAVE_FB_ATMEL
> select FB_BACKLIGHT
> select FB_CFB_FILLRECT
> select FB_CFB_COPYAREA
> @@ -875,7 +875,7 @@ config FB_ATMEL
> select FB_MODE_HELPERS
> select VIDEOMODE_HELPERS
> help
> - This enables support for the AT91/AT32 LCD Controller.
> + This enables support for the AT91 LCD Controller.
>
> config FB_NVIDIA
> tristate "nVidia Framebuffer Support"
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index 4ed55e6bbb84..b8786ff62b87 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -1,5 +1,5 @@
> /*
> - * Driver for AT91/AT32 LCD Controller
> + * Driver for AT91 LCD Controller
> *
> * Copyright (C) 2007 Atmel Corporation
> *
> @@ -99,86 +99,6 @@ static struct atmel_lcdfb_config at91sam9rl_config = {
> .have_intensity_bit = true,
> };
>
> -static struct atmel_lcdfb_config at32ap_config = {
> - .have_hozval = true,
> -};
> -
> -static const struct platform_device_id atmel_lcdfb_devtypes[] = {
> - {
> - .name = "at91sam9261-lcdfb",
> - .driver_data = (unsigned long)&at91sam9261_config,
> - }, {
> - .name = "at91sam9263-lcdfb",
> - .driver_data = (unsigned long)&at91sam9263_config,
> - }, {
> - .name = "at91sam9g10-lcdfb",
> - .driver_data = (unsigned long)&at91sam9g10_config,
> - }, {
> - .name = "at91sam9g45-lcdfb",
> - .driver_data = (unsigned long)&at91sam9g45_config,
> - }, {
> - .name = "at91sam9g45es-lcdfb",
> - .driver_data = (unsigned long)&at91sam9g45es_config,
> - }, {
> - .name = "at91sam9rl-lcdfb",
> - .driver_data = (unsigned long)&at91sam9rl_config,
> - }, {
> - .name = "at32ap-lcdfb",
> - .driver_data = (unsigned long)&at32ap_config,
> - }, {
> - /* terminator */
> - }
> -};
> -MODULE_DEVICE_TABLE(platform, atmel_lcdfb_devtypes);
> -
> -static struct atmel_lcdfb_config *
> -atmel_lcdfb_get_config(struct platform_device *pdev)
> -{
> - unsigned long data;
> -
> - data = platform_get_device_id(pdev)->driver_data;
> -
> - return (struct atmel_lcdfb_config *)data;
> -}
> -
> -#if defined(CONFIG_ARCH_AT91)
> -#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
> - | FBINFO_PARTIAL_PAN_OK \
> - | FBINFO_HWACCEL_YPAN)
> -
> -static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
> - struct fb_var_screeninfo *var,
> - struct fb_info *info)
> -{
> -
> -}
> -#elif defined(CONFIG_AVR32)
> -#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \
> - | FBINFO_PARTIAL_PAN_OK \
> - | FBINFO_HWACCEL_XPAN \
> - | FBINFO_HWACCEL_YPAN)
> -
> -static void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo,
> - struct fb_var_screeninfo *var,
> - struct fb_info *info)
> -{
> - u32 dma2dcfg;
> - u32 pixeloff;
> -
> - pixeloff = (var->xoffset * info->var.bits_per_pixel) & 0x1f;
> -
> - dma2dcfg = (info->var.xres_virtual - info->var.xres)
> - * info->var.bits_per_pixel / 8;
> - dma2dcfg |= pixeloff << ATMEL_LCDC_PIXELOFF_OFFSET;
> - lcdc_writel(sinfo, ATMEL_LCDC_DMA2DCFG, dma2dcfg);
> -
> - /* Update configuration */
> - lcdc_writel(sinfo, ATMEL_LCDC_DMACON,
> - lcdc_readl(sinfo, ATMEL_LCDC_DMACON)
> - | ATMEL_LCDC_DMAUPDT);
> -}
> -#endif
> -
> static u32 contrast_ctr = ATMEL_LCDC_PS_DIV8
> | ATMEL_LCDC_POL_POSITIVE
> | ATMEL_LCDC_ENA_PWMENABLE;
> @@ -404,8 +324,6 @@ static void atmel_lcdfb_update_dma(struct fb_info *info,
>
> /* Set framebuffer DMA base address and pixel offset */
> lcdc_writel(sinfo, ATMEL_LCDC_DMABADDR1, dma_addr);
> -
> - atmel_lcdfb_update_dma2d(sinfo, var, info);
> }
>
> static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo)
> @@ -978,7 +896,6 @@ static void atmel_lcdfb_stop_clock(struct atmel_lcdfb_info *sinfo)
> clk_disable_unprepare(sinfo->lcdc_clk);
> }
>
> -#ifdef CONFIG_OF
> static const struct of_device_id atmel_lcdfb_dt_ids[] = {
> { .compatible = "atmel,at91sam9261-lcdc" , .data = &at91sam9261_config, },
> { .compatible = "atmel,at91sam9263-lcdc" , .data = &at91sam9263_config, },
> @@ -986,7 +903,6 @@ static const struct of_device_id atmel_lcdfb_dt_ids[] = {
> { .compatible = "atmel,at91sam9g45-lcdc" , .data = &at91sam9g45_config, },
> { .compatible = "atmel,at91sam9g45es-lcdc" , .data = &at91sam9g45es_config, },
> { .compatible = "atmel,at91sam9rl-lcdc" , .data = &at91sam9rl_config, },
> - { .compatible = "atmel,at32ap-lcdc" , .data = &at32ap_config, },
> { /* sentinel */ }
> };
>
> @@ -1122,19 +1038,12 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> of_node_put(display_np);
> return ret;
> }
> -#else
> -static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
> -{
> - return 0;
> -}
> -#endif
>
> static int __init atmel_lcdfb_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct fb_info *info;
> struct atmel_lcdfb_info *sinfo;
> - struct atmel_lcdfb_pdata *pdata = NULL;
> struct resource *regs = NULL;
> struct resource *map = NULL;
> struct fb_modelist *modelist;
> @@ -1159,21 +1068,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
> ret = atmel_lcdfb_of_init(sinfo);
> if (ret)
> goto free_info;
> - } else if (dev_get_platdata(dev)) {
> - struct fb_monspecs *monspecs;
> - int i;
> -
> - pdata = dev_get_platdata(dev);
> - monspecs = pdata->default_monspecs;
> - sinfo->pdata = *pdata;
> -
> - for (i = 0; i < monspecs->modedb_len; i++)
> - fb_add_videomode(&monspecs->modedb[i], &info->modelist);
> -
> - sinfo->config = atmel_lcdfb_get_config(pdev);
> -
> - info->var.bits_per_pixel = pdata->default_bpp ? pdata->default_bpp : 16;
> - memcpy(&info->monspecs, pdata->default_monspecs, sizeof(info->monspecs));
> } else {
> dev_err(dev, "cannot get default configuration\n");
> goto free_info;
> @@ -1186,7 +1080,8 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev)
> if (IS_ERR(sinfo->reg_lcd))
> sinfo->reg_lcd = NULL;
>
> - info->flags = ATMEL_LCDFB_FBINFO_DEFAULT;
> + info->flags = FBINFO_DEFAULT | FBINFO_PARTIAL_PAN_OK |
> + FBINFO_HWACCEL_YPAN;
> info->pseudo_palette = sinfo->pseudo_palette;
> info->fbops = &atmel_lcdfb_ops;
>
> @@ -1435,7 +1330,6 @@ static struct platform_driver atmel_lcdfb_driver = {
> .remove = __exit_p(atmel_lcdfb_remove),
> .suspend = atmel_lcdfb_suspend,
> .resume = atmel_lcdfb_resume,
> - .id_table = atmel_lcdfb_devtypes,
> .driver = {
> .name = "atmel_lcdfb",
> .of_match_table = of_match_ptr(atmel_lcdfb_dt_ids),
> @@ -1444,6 +1338,6 @@ static struct platform_driver atmel_lcdfb_driver = {
>
> module_platform_driver_probe(atmel_lcdfb_driver, atmel_lcdfb_probe);
>
> -MODULE_DESCRIPTION("AT91/AT32 LCD Controller framebuffer driver");
> +MODULE_DESCRIPTION("AT91 LCD Controller framebuffer driver");
> MODULE_AUTHOR("Nicolas Ferre <nicolas.ferre@atmel.com>");
> MODULE_LICENSE("GPL");
>
--
Nicolas Ferre
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support
2019-02-25 21:25 ` [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support Alexandre Belloni
` (2 preceding siblings ...)
2019-03-18 10:38 ` Nicolas.Ferre
@ 2019-04-01 12:12 ` Bartlomiej Zolnierkiewicz
3 siblings, 0 replies; 5+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2019-04-01 12:12 UTC (permalink / raw)
To: Alexandre Belloni
Cc: linux-fbdev, dri-devel, linux-kernel, Sam Ravnborg, linux-arm-kernel
On 02/25/2019 10:25 PM, Alexandre Belloni wrote:
> 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>
Patch queued for v5.2, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-04-01 12:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190225212603epcas3p42bd9d7e113c48af1fcb229ecccde2ebc@epcas3p4.samsung.com>
2019-02-25 21:25 ` [PATCH] video: fbdev: atmel_lcdfb: drop AVR and platform_data support Alexandre Belloni
2019-02-26 15:35 ` Nicolas.Ferre
2019-02-27 20:14 ` Sam Ravnborg
2019-03-18 10:38 ` Nicolas.Ferre
2019-04-01 12:12 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).