diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-04-18 05:45:17 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-04-22 14:16:50 -0400 |
commit | 5c3f968712cec168fa9775e8af0c0d6650e4bd47 (patch) | |
tree | eeda9280328af4dbe23d81ec77ee51c58ebe3519 | |
parent | f5db9c6a3dd94033a113a6bd9ccce9f8c28c70b1 (diff) |
m68k/video: Create <asm/vga.h>
For now, it just contains the hack for cirrusfb on Amiga, which is moved
out of <video/vga.h> with some slight modifications (use raw_*() instead of
z_*(), which are defined on all m68k platforms).
This makes it safe to include <video/vga.h> in all contexts. Before it
could fail to compile with
include/video/vga.h: In function ‘vga_mm_r’:
include/video/vga.h:242: error: implicit declaration of function ‘z_readb’
include/video/vga.h: In function ‘vga_mm_w’:
include/video/vga.h:247: error: implicit declaration of function ‘z_writeb’
include/video/vga.h: In function ‘vga_mm_w_fast’:
include/video/vga.h:253: error: implicit declaration of function ‘z_writew’
or
include/video/vga.h:23:21: error: asm/vga.h: No such file or directory
depending on the value of CONFIG_AMIGA.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
-rw-r--r-- | arch/m68k/include/asm/vga.h | 27 | ||||
-rw-r--r-- | include/video/vga.h | 22 |
2 files changed, 27 insertions, 22 deletions
diff --git a/arch/m68k/include/asm/vga.h b/arch/m68k/include/asm/vga.h new file mode 100644 index 000000000000..d3aa1401e7aa --- /dev/null +++ b/arch/m68k/include/asm/vga.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _ASM_M68K_VGA_H | ||
2 | #define _ASM_M68K_VGA_H | ||
3 | |||
4 | #include <asm/raw_io.h> | ||
5 | |||
6 | /* | ||
7 | * FIXME | ||
8 | * Ugh, we don't have PCI space, so map readb() and friends to use raw I/O | ||
9 | * accessors, which are identical to the z_*() Zorro bus accessors. | ||
10 | * This should make cirrusfb work again on Amiga | ||
11 | */ | ||
12 | #undef inb_p | ||
13 | #undef inw_p | ||
14 | #undef outb_p | ||
15 | #undef outw | ||
16 | #undef readb | ||
17 | #undef writeb | ||
18 | #undef writew | ||
19 | #define inb_p(port) 0 | ||
20 | #define inw_p(port) 0 | ||
21 | #define outb_p(port, val) do { } while (0) | ||
22 | #define outw(port, val) do { } while (0) | ||
23 | #define readb raw_inb | ||
24 | #define writeb raw_outb | ||
25 | #define writew raw_outw | ||
26 | |||
27 | #endif /* _ASM_M68K_VGA_H */ | ||
diff --git a/include/video/vga.h b/include/video/vga.h index 2b8691f7d256..cac567f22e62 100644 --- a/include/video/vga.h +++ b/include/video/vga.h | |||
@@ -19,29 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/types.h> | 20 | #include <linux/types.h> |
21 | #include <asm/io.h> | 21 | #include <asm/io.h> |
22 | #ifndef CONFIG_AMIGA | ||
23 | #include <asm/vga.h> | 22 | #include <asm/vga.h> |
24 | #else | ||
25 | /* | ||
26 | * FIXME | ||
27 | * Ugh, we don't have PCI space, so map readb() and friends to use Zorro space | ||
28 | * for MMIO accesses. This should make cirrusfb work again on Amiga | ||
29 | */ | ||
30 | #undef inb_p | ||
31 | #undef inw_p | ||
32 | #undef outb_p | ||
33 | #undef outw | ||
34 | #undef readb | ||
35 | #undef writeb | ||
36 | #undef writew | ||
37 | #define inb_p(port) 0 | ||
38 | #define inw_p(port) 0 | ||
39 | #define outb_p(port, val) do { } while (0) | ||
40 | #define outw(port, val) do { } while (0) | ||
41 | #define readb z_readb | ||
42 | #define writeb z_writeb | ||
43 | #define writew z_writew | ||
44 | #endif | ||
45 | #include <asm/byteorder.h> | 23 | #include <asm/byteorder.h> |
46 | 24 | ||
47 | 25 | ||