Skip to contentSkip to conversation

video: fbdev: atmel_lcdfb: add COMPILE_TEST support

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 3 messages May 30, 2019 – Jun 7, 2019 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20190530123016eucas1p2e18747b8ac1d156657232eab52876a61@eucas1p2.samsung.com

#1 lore raw

PATCH v3 1/1 video: fbdev: atmel_lcdfb: add COMPILE_TEST support

Add COMPILE_TEST support to atmel_lcdfb driver for better compile testing coverage.

While at it fix improper use of UL (to silence build warnings on x86_64).

Cc Alexandre Belloni <[email protected]>
Cc Ludovic Desroches <[email protected]>

---
v3: fix build warnings on x86_64

v2: add missing HAVE_CLK && HAS IOMEM dependencies

 drivers/video/fbdev/Kconfig       |    3 ++-
 drivers/video/fbdev/atmel_lcdfb.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/video/fbdev/Kconfig +2 -1
Index: b/drivers/video/fbdev/Kconfig
===================================================================
@@ -855,7 +855,8 @@ config FB_S1D13XXX
 
 config FB_ATMEL
 	tristate "AT91 LCD Controller support"
-	depends on FB && OF && HAVE_FB_ATMEL
+	depends on FB && OF && HAVE_CLK && HAS_IOMEM
+	depends on HAVE_FB_ATMEL || COMPILE_TEST
 	select FB_BACKLIGHT
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
drivers/video/fbdev/atmel_lcdfb.c +2 -2
Index: b/drivers/video/fbdev/atmel_lcdfb.c
===================================================================
@@ -673,7 +673,7 @@ static int atmel_lcdfb_set_par(struct fb
 	lcdc_writel(sinfo, ATMEL_LCDC_MVAL, 0);
 
 	/* Disable all interrupts */
-	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
 	/* Enable FIFO & DMA errors */
 	lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI | ATMEL_LCDC_OWRI | ATMEL_LCDC_MERI);
 
@@ -1291,7 +1291,7 @@ static int atmel_lcdfb_suspend(struct pl
 	 * We don't want to handle interrupts while the clock is
 	 * stopped. It may take forever.
 	 */
-	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
 
 	sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
 	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
maintainer Acked-by on v3 1/1
#2 lore raw
Quoted 7 lines · Bartlomiej Zolnierkiewicz

Add COMPILE_TEST support to atmel_lcdfb driver for better compile testing coverage.

While at it fix improper use of UL (to silence build warnings on x86_64).

Cc Alexandre Belloni <[email protected]>
Quoted 4 lines

---
v3: fix build warnings on x86_64

Hopefully, no building errors anymore ;)

Quoted 43 lines

v2: add missing HAVE_CLK && HAS IOMEM dependencies

 drivers/video/fbdev/Kconfig       |    3 ++-
 drivers/video/fbdev/atmel_lcdfb.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

Index: b/drivers/video/fbdev/Kconfig
===================================================================

drivers/video/fbdev/Kconfig +2 -1
@@ -855,7 +855,8 @@ config FB_S1D13XXX
 
 config FB_ATMEL
 	tristate "AT91 LCD Controller support"
-	depends on FB && OF && HAVE_FB_ATMEL
+	depends on FB && OF && HAVE_CLK && HAS_IOMEM
+	depends on HAVE_FB_ATMEL || COMPILE_TEST
 	select FB_BACKLIGHT
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA

Index: b/drivers/video/fbdev/atmel_lcdfb.c
===================================================================

drivers/video/fbdev/atmel_lcdfb.c +2 -2
@@ -673,7 +673,7 @@ static int atmel_lcdfb_set_par(struct fb
 	lcdc_writel(sinfo, ATMEL_LCDC_MVAL, 0);
 
 	/* Disable all interrupts */
-	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
 	/* Enable FIFO & DMA errors */
 	lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI | ATMEL_LCDC_OWRI | ATMEL_LCDC_MERI);
 
@@ -1291,7 +1291,7 @@ static int atmel_lcdfb_suspend(struct pl
 	 * We don't want to handle interrupts while the clock is
 	 * stopped. It may take forever.
 	 */
-	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+	lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
 
 	sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
 	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);
Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw
Quoted 9 lines · Alexandre Belloni
Quoted 7 lines · Bartlomiej Zolnierkiewicz

Add COMPILE_TEST support to atmel_lcdfb driver for better compile testing coverage.

While at it fix improper use of UL (to silence build warnings on x86_64).

Cc Alexandre Belloni <[email protected]>

Thanks, I queued the patch for v5.3.

Quoted 6 lines
Quoted 4 lines

---
v3: fix build warnings on x86_64

Hopefully, no building errors anymore ;)

I hope so. :)

Quoted 5 lines
Quoted 5 lines

v2: add missing HAVE_CLK && HAS IOMEM dependencies

 drivers/video/fbdev/Kconfig       |    3 ++-
 drivers/video/fbdev/atmel_lcdfb.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

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