Re: [PATCH 09/16] fbdev: remove w90x900/nuc900 platform drivers

2019-08-13 Thread Arnd Bergmann
On Tue, Aug 13, 2019 at 3:30 PM Bartlomiej Zolnierkiewicz
 wrote:
>
>
> On 8/9/19 10:27 PM, Arnd Bergmann wrote:
> > The ARM w90x900 platform is getting removed, so this driver is obsolete.
> >
> > Signed-off-by: Arnd Bergmann 
>
> Acked-by: Bartlomiej Zolnierkiewicz 
>
> BTW there is a very minor issue with internal bisectability of
> this patch series (non-issue in reality because it affects only
> configs with ARCH_W90X900=y and such are now gone, just FYI):
>
> arch/arm/mach-w90x900/dev.c (which stays in tree until patch #16
> ("ARM: remove w90x900 platform") uses include/linux/platform_data/
> files removed in patches #7 (spi), #9 (fbdev) and #10 (keyboard).

Ah right, I actually planned to change that originally but forgot.
As you say, it's not a huge issue except for building randconfig or
nuc900_defconfig.

   Arnd


Re: [PATCH 09/16] fbdev: remove w90x900/nuc900 platform drivers

2019-08-13 Thread Bartlomiej Zolnierkiewicz

On 8/9/19 10:27 PM, Arnd Bergmann wrote:
> The ARM w90x900 platform is getting removed, so this driver is obsolete.
> 
> Signed-off-by: Arnd Bergmann 

Acked-by: Bartlomiej Zolnierkiewicz 

BTW there is a very minor issue with internal bisectability of
this patch series (non-issue in reality because it affects only
configs with ARCH_W90X900=y and such are now gone, just FYI):

arch/arm/mach-w90x900/dev.c (which stays in tree until patch #16
("ARM: remove w90x900 platform") uses include/linux/platform_data/
files removed in patches #7 (spi), #9 (fbdev) and #10 (keyboard).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R Institute Poland
Samsung Electronics

>  drivers/video/fbdev/Kconfig  |  14 -
>  drivers/video/fbdev/Makefile |   1 -
>  drivers/video/fbdev/nuc900fb.c   | 760 ---
>  drivers/video/fbdev/nuc900fb.h   |  51 --
>  include/Kbuild   |   1 -
>  include/linux/platform_data/video-nuc900fb.h |  79 --
>  6 files changed, 906 deletions(-)
>  delete mode 100644 drivers/video/fbdev/nuc900fb.c
>  delete mode 100644 drivers/video/fbdev/nuc900fb.h
>  delete mode 100644 include/linux/platform_data/video-nuc900fb.h
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 09/16] fbdev: remove w90x900/nuc900 platform drivers

2019-08-09 Thread Arnd Bergmann
The ARM w90x900 platform is getting removed, so this driver is obsolete.

Signed-off-by: Arnd Bergmann 
---
 drivers/video/fbdev/Kconfig  |  14 -
 drivers/video/fbdev/Makefile |   1 -
 drivers/video/fbdev/nuc900fb.c   | 760 ---
 drivers/video/fbdev/nuc900fb.h   |  51 --
 include/Kbuild   |   1 -
 include/linux/platform_data/video-nuc900fb.h |  79 --
 6 files changed, 906 deletions(-)
 delete mode 100644 drivers/video/fbdev/nuc900fb.c
 delete mode 100644 drivers/video/fbdev/nuc900fb.h
 delete mode 100644 include/linux/platform_data/video-nuc900fb.h

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 6b2de93bd302..5f83cd715387 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1924,20 +1924,6 @@ config FB_S3C2410_DEBUG
  Turn on debugging messages. Note that you can set/unset at run time
  through sysfs
 
-config FB_NUC900
-   tristate "NUC900 LCD framebuffer support"
-   depends on FB && ARCH_W90X900
-   select FB_CFB_FILLRECT
-   select FB_CFB_COPYAREA
-   select FB_CFB_IMAGEBLIT
-   ---help---
- Frame buffer driver for the built-in LCD controller in the Nuvoton
- NUC900 processor
-
-config GPM1040A0_320X240
-   bool "Giantplus Technology GPM1040A0 320x240 Color TFT LCD"
-   depends on FB_NUC900
-
 config FB_SM501
tristate "Silicon Motion SM501 framebuffer support"
depends on FB && MFD_SM501
diff --git a/drivers/video/fbdev/Makefile b/drivers/video/fbdev/Makefile
index 7dc4861a93e6..aab7155884ea 100644
--- a/drivers/video/fbdev/Makefile
+++ b/drivers/video/fbdev/Makefile
@@ -116,7 +116,6 @@ obj-y += omap2/
 obj-$(CONFIG_XEN_FBDEV_FRONTEND)  += xen-fbfront.o
 obj-$(CONFIG_FB_CARMINE)  += carminefb.o
 obj-$(CONFIG_FB_MB862XX) += mb862xx/
-obj-$(CONFIG_FB_NUC900)   += nuc900fb.o
 obj-$(CONFIG_FB_JZ4740)  += jz4740_fb.o
 obj-$(CONFIG_FB_PUV3_UNIGFX)  += fb-puv3.o
 obj-$(CONFIG_FB_HYPERV)  += hyperv_fb.o
diff --git a/drivers/video/fbdev/nuc900fb.c b/drivers/video/fbdev/nuc900fb.c
deleted file mode 100644
index 4fd851598584..
--- a/drivers/video/fbdev/nuc900fb.c
+++ /dev/null
@@ -1,760 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
-/*
- *
- * Copyright (c) 2009 Nuvoton technology corporation
- * All rights reserved.
- *
- *  Description:
- *Nuvoton LCD Controller Driver
- *  Author:
- *Wang Qiang (rurality.li...@gmail.com) 2009/12/11
- */
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-
-#include "nuc900fb.h"
-
-
-/*
- *  Initialize the nuc900 video (dual) buffer address
- */
-static void nuc900fb_set_lcdaddr(struct fb_info *info)
-{
-   struct nuc900fb_info *fbi = info->par;
-   void __iomem *regs = fbi->io;
-   unsigned long vbaddr1, vbaddr2;
-
-   vbaddr1  = info->fix.smem_start;
-   vbaddr2  = info->fix.smem_start;
-   vbaddr2 += info->fix.line_length * info->var.yres;
-
-   /* set frambuffer start phy addr*/
-   writel(vbaddr1, regs + REG_LCM_VA_BADDR0);
-   writel(vbaddr2, regs + REG_LCM_VA_BADDR1);
-
-   writel(fbi->regs.lcd_va_fbctrl, regs + REG_LCM_VA_FBCTRL);
-   writel(fbi->regs.lcd_va_scale, regs + REG_LCM_VA_SCALE);
-}
-
-/*
- * calculate divider for lcd div
- */
-static unsigned int nuc900fb_calc_pixclk(struct nuc900fb_info *fbi,
-unsigned long pixclk)
-{
-   unsigned long clk = fbi->clk_rate;
-   unsigned long long div;
-
-   /* pixclk is in picseconds. our clock is in Hz*/
-   /* div = (clk * pixclk)/10^12 */
-   div = (unsigned long long)clk * pixclk;
-   div >>= 12;
-   do_div(div, 625 * 625UL * 625);
-
-   dev_dbg(fbi->dev, "pixclk %ld, divisor is %lld\n", pixclk, div);
-
-   return div;
-}
-
-/*
- * Check the video params of 'var'.
- */
-static int nuc900fb_check_var(struct fb_var_screeninfo *var,
-  struct fb_info *info)
-{
-   struct nuc900fb_info *fbi = info->par;
-   struct nuc900fb_mach_info *mach_info = dev_get_platdata(fbi->dev);
-   struct nuc900fb_display *display = NULL;
-   struct nuc900fb_display *default_display = mach_info->displays +
-  mach_info->default_display;
-   int i;
-
-   dev_dbg(fbi->dev, "check_var(var=%p, info=%p)\n", var, info);
-
-   /* validate x/y resolution */
-   /* choose default mode if possible */
-   if (var->xres == default_display->xres &&
-   var->yres == default_display->yres &&
-   var->bits_per_pixel == default_display->bpp)
-