diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-04-17 15:44:51 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2010-05-07 19:16:03 -0400 |
commit | c389874805a6849e3e347fc0e13fa170d80840c1 (patch) | |
tree | 11508f50085603a0a9f9f14b10046f9940775f55 /drivers/video/via/hw.h | |
parent | 7e0de022680f7899d33141f3ab5724a704f5669a (diff) |
viafb: package often used basic io functions
This patch puts redesigned versions of the basic io functions that
are used overall the driver in an extra header. It is prefixed with
via_ as no framebuffer dependend stuff is in there. They were inlined
as they are really simple which reduced the module size about 2.5%.
The parameter order of read and write was fixed as it really doesn't
make sense to change the order as they are parts of the same address
and not source and destination.
Wrapper which use the new functions were added to hw.h to replicate
the old interface and avoid changing all old code.
[jc: added one comment]
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/hw.h')
-rw-r--r-- | drivers/video/via/hw.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h index d248f4dc12ec..23c319010913 100644 --- a/drivers/video/via/hw.h +++ b/drivers/video/via/hw.h | |||
@@ -24,6 +24,11 @@ | |||
24 | 24 | ||
25 | #include "viamode.h" | 25 | #include "viamode.h" |
26 | #include "global.h" | 26 | #include "global.h" |
27 | #include "via_io.h" | ||
28 | |||
29 | #define viafb_read_reg(p, i) via_read_reg(p, i) | ||
30 | #define viafb_write_reg(i, p, d) via_write_reg(p, i, d) | ||
31 | #define viafb_write_reg_mask(i, p, d, m) via_write_reg_mask(p, i, d, m) | ||
27 | 32 | ||
28 | /*************************************************** | 33 | /*************************************************** |
29 | * Definition IGA1 Design Method of CRTC Registers * | 34 | * Definition IGA1 Design Method of CRTC Registers * |
@@ -870,7 +875,6 @@ extern int viafb_LCD_ON; | |||
870 | extern int viafb_DVI_ON; | 875 | extern int viafb_DVI_ON; |
871 | extern int viafb_hotplug; | 876 | extern int viafb_hotplug; |
872 | 877 | ||
873 | void viafb_write_reg_mask(u8 index, int io_port, u8 data, u8 mask); | ||
874 | void viafb_set_output_path(int device, int set_iga, | 878 | void viafb_set_output_path(int device, int set_iga, |
875 | int output_interface); | 879 | int output_interface); |
876 | 880 | ||
@@ -885,8 +889,6 @@ void viafb_crt_disable(void); | |||
885 | void viafb_crt_enable(void); | 889 | void viafb_crt_enable(void); |
886 | void init_ad9389(void); | 890 | void init_ad9389(void); |
887 | /* Access I/O Function */ | 891 | /* Access I/O Function */ |
888 | void viafb_write_reg(u8 index, u16 io_port, u8 data); | ||
889 | u8 viafb_read_reg(int io_port, u8 index); | ||
890 | void viafb_lock_crt(void); | 892 | void viafb_lock_crt(void); |
891 | void viafb_unlock_crt(void); | 893 | void viafb_unlock_crt(void); |
892 | void viafb_load_fetch_count_reg(int h_addr, int bpp_byte, int set_iga); | 894 | void viafb_load_fetch_count_reg(int h_addr, int bpp_byte, int set_iga); |