Skip to content

Commit 6f366e8

Browse files
ukleinekhdeller
authored andcommitted
fbdev: au1100fb: Make driver compilable on non-mips platforms
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>
1 parent 13c89a3 commit 6f366e8

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

drivers/video/fbdev/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,8 @@ endchoice
13451345

13461346
config FB_AU1100
13471347
bool "Au1100 LCD Driver"
1348-
depends on (FB = y) && MIPS_ALCHEMY
1348+
depends on FB = y
1349+
depends on MIPS_ALCHEMY || COMPILE_TEST
13491350
select FB_IOMEM_HELPERS
13501351
help
13511352
This is the framebuffer driver for the AMD Au1100 SOC. It can drive

drivers/video/fbdev/au1100fb.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
* 675 Mass Ave, Cambridge, MA 02139, USA.
4343
*/
4444
#include <linux/clk.h>
45+
#include <linux/delay.h>
46+
#include <linux/io.h>
4547
#include <linux/module.h>
4648
#include <linux/kernel.h>
4749
#include <linux/errno.h>
@@ -55,12 +57,15 @@
5557
#include <linux/platform_device.h>
5658
#include <linux/slab.h>
5759

58-
#include <asm/mach-au1x00/au1000.h>
59-
6060
#define DEBUG 0
6161

6262
#include "au1100fb.h"
6363

64+
#if defined(CONFIG_COMPILE_TEST) && !defined(CONFIG_MIPS)
65+
/* This is only defined to be able to compile this driver on non-mips platforms */
66+
#define KSEG1ADDR(x) (x)
67+
#endif
68+
6469
#define DRIVER_NAME "au1100fb"
6570
#define DRIVER_DESC "LCD controller driver for AU1100 processors"
6671

@@ -332,7 +337,10 @@ static int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
332337

333338
vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot);
334339

340+
#ifndef CONFIG_S390
341+
/* On s390 pgprot_val() is a function and thus not a lvalue */
335342
pgprot_val(vma->vm_page_prot) |= (6 << 9); //CCA=6
343+
#endif
336344

337345
return dma_mmap_coherent(fbdev->dev, vma, fbdev->fb_mem, fbdev->fb_phys,
338346
fbdev->fb_len);

drivers/video/fbdev/au1100fb.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
#ifndef _AU1100LCD_H
3131
#define _AU1100LCD_H
3232

33-
#include <asm/mach-au1x00/au1000.h>
34-
3533
#define print_err(f, arg...) printk(KERN_ERR DRIVER_NAME ": " f "\n", ## arg)
3634
#define print_warn(f, arg...) printk(KERN_WARNING DRIVER_NAME ": " f "\n", ## arg)
3735
#define print_info(f, arg...) printk(KERN_INFO DRIVER_NAME ": " f "\n", ## arg)

0 commit comments

Comments
 (0)