public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
To: Helge Deller <deller@gmx.de>
Cc: Chen Ni <nichen@iscas.ac.cn>,
	linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH v4 4/7] fbdev: au1100fb: Make driver compilable on non-mips platforms
Date: Sun, 15 Feb 2026 14:58:31 +0100	[thread overview]
Message-ID: <27c0747aa4a85e0b4f2dd7c0778784989522599c.1771163316.git.u.kleine-koenig@baylibre.com> (raw)
In-Reply-To: <cover.1771163316.git.u.kleine-koenig@baylibre.com>

The header asm/mach-au1x00/au1000.h is unused apart from pulling in
<linux/delay.h> (for mdelay()) and <linux/io.h> (for KSEG1ADDR()). Then
the only platform specific part in the driver is the usage of the KSEG1ADDR
macro, which for the non-mips case can be stubbed.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
 drivers/video/fbdev/Kconfig    |  3 ++-
 drivers/video/fbdev/au1100fb.c | 12 ++++++++++--
 drivers/video/fbdev/au1100fb.h |  2 --
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 45733522ff48..ac9ac4287c6a 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1345,7 +1345,8 @@ endchoice
 
 config FB_AU1100
 	bool "Au1100 LCD Driver"
-	depends on (FB = y) && MIPS_ALCHEMY
+	depends on FB = y
+	depends on MIPS_ALCHEMY || COMPILE_TEST
 	select FB_IOMEM_HELPERS
 	help
 	  This is the framebuffer driver for the AMD Au1100 SOC.  It can drive
diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index e43687ac74a1..782f70c3a98f 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -42,6 +42,8 @@
  *  675 Mass Ave, Cambridge, MA 02139, USA.
  */
 #include <linux/clk.h>
+#include <linux/delay.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
@@ -55,12 +57,15 @@
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
-#include <asm/mach-au1x00/au1000.h>
-
 #define DEBUG 0
 
 #include "au1100fb.h"
 
+#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
+/* This is only defined to be able to compile this driver on non-mips platforms */
+#define KSEG1ADDR(x) (x)
+#endif
+
 #define DRIVER_NAME "au1100fb"
 #define DRIVER_DESC "LCD controller driver for AU1100 processors"
 
@@ -331,7 +336,10 @@ static int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
 
 	vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
 
+#ifndef CONFIG_S390
+	/* On s390 pgprot_val() is a function and thus not a lvalue */
 	pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6
+#endif
 
 	return dma_mmap_coherent(fbdev->dev, vma, fbdev->fb_mem, fbdev->fb_phys,
 			fbdev->fb_len);
diff --git a/drivers/video/fbdev/au1100fb.h b/drivers/video/fbdev/au1100fb.h
index dc53d063fcc3..998328cd16a2 100644
--- a/drivers/video/fbdev/au1100fb.h
+++ b/drivers/video/fbdev/au1100fb.h
@@ -30,8 +30,6 @@
 #ifndef _AU1100LCD_H
 #define _AU1100LCD_H
 
-#include <asm/mach-au1x00/au1000.h>
-
 #define print_err(f, arg...) printk(KERN_ERR DRIVER_NAME ": " f "\n", ## arg)
 #define print_warn(f, arg...) printk(KERN_WARNING DRIVER_NAME ": " f "\n", ## arg)
 #define print_info(f, arg...) printk(KERN_INFO DRIVER_NAME ": " f "\n", ## arg)
-- 
2.47.3


  parent reply	other threads:[~2026-02-15 13:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-15 13:58 [PATCH v4 0/7] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support and other cleanups Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 1/7] fbdev: au1100fb: Don't store device specific data in global variables Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 2/7] fbdev: au1100fb: Mark several local functions as static Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 3/7] fbdev: au1100fb: Use proper conversion specifiers in printk formats Uwe Kleine-König
2026-02-15 13:58 ` Uwe Kleine-König [this message]
2026-02-15 13:58 ` [PATCH v4 5/7] fbdev: au1100fb: Replace custom printk wrappers by pr_* Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 6/7] fbdev: au1100fb: Fold au1100fb.h into its only user Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 7/7] fbdev: au1100fb: Replace license boilerplate by SPDX header Uwe Kleine-König
2026-02-15 20:45 ` Claude review: fbdev: au1100fb: support COMPILE_TEST and fix multi-device support and other cleanups Claude Code Review Bot
2026-02-16  1:56 ` Claude review: fbdev: au1100fb: Use proper conversion specifiers in printk formats Claude Code Review Bot
2026-02-16  1:56 ` Claude review: fbdev: au1100fb: Don't store device specific data in global variables Claude Code Review Bot
2026-02-16  1:56 ` Claude review: fbdev: au1100fb: Mark several local functions as static Claude Code Review Bot
2026-02-16  1:57 ` Claude review: fbdev: au1100fb: Replace license boilerplate by SPDX header Claude Code Review Bot
2026-02-16  1:57 ` Claude review: fbdev: au1100fb: Make driver compilable on non-mips platforms Claude Code Review Bot
2026-02-16  1:57 ` Claude review: fbdev: au1100fb: Fold au1100fb.h into its only user Claude Code Review Bot
2026-02-16  1:57 ` Claude review: fbdev: au1100fb: Replace custom printk wrappers by pr_* Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=27c0747aa4a85e0b4f2dd7c0778784989522599c.1771163316.git.u.kleine-koenig@baylibre.com \
    --to=u.kleine-koenig@baylibre.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=nichen@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox