]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fbdev: au1100fb: Make driver compilable on non-mips platforms
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Sun, 15 Feb 2026 23:33:20 +0000 (00:33 +0100)
committerHelge Deller <deller@gmx.de>
Thu, 19 Feb 2026 16:38:17 +0000 (17:38 +0100)
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>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/Kconfig
drivers/video/fbdev/au1100fb.c
drivers/video/fbdev/au1100fb.h

index 45733522ff480491931f0506806612730070c81a..ac9ac4287c6a1167e1200590e66d7c6d6351d4ac 100644 (file)
@@ -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
index 398375793f57d4646fd8dba21c7065e889515cdb..7611dad0d68d42863abdc894553d00217e4baad4 100644 (file)
@@ -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>
 #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"
 
@@ -332,7 +337,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);
index b7bf6e0055726a0a7316df8056c0becb54a73fcd..63aef2f5214196904709c2808d7a3e8e2590d57d 100644 (file)
@@ -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)