diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2008-11-18 14:45:23 -0500 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2008-12-28 14:00:06 -0500 |
commit | 79f0c9a0479060e3a8607d93bc8d81ff962acc87 (patch) | |
tree | 439a99a7cd202e3edfdac60557bc1dca87ffbe47 /drivers/video/console | |
parent | 646819e86222cc06b85ed2a8dafbbb361a05ea2d (diff) |
fbcon: remove broken mac vbl handler
Remove the Mac VBL interrupt code as it doesn't work properly and
doesn't bring any benefit when fixed. Also remove unused
DEFAULT_CURSOR_BLINK_RATE macro and irqres variable.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/video/console')
-rw-r--r-- | drivers/video/console/fbcon.c | 75 |
1 files changed, 3 insertions, 72 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 0b2adefe9e3d..e99bb7c51798 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -81,9 +81,6 @@ | |||
81 | #ifdef CONFIG_ATARI | 81 | #ifdef CONFIG_ATARI |
82 | #include <asm/atariints.h> | 82 | #include <asm/atariints.h> |
83 | #endif | 83 | #endif |
84 | #ifdef CONFIG_MAC | ||
85 | #include <asm/macints.h> | ||
86 | #endif | ||
87 | #if defined(__mc68000__) | 84 | #if defined(__mc68000__) |
88 | #include <asm/machdep.h> | 85 | #include <asm/machdep.h> |
89 | #include <asm/setup.h> | 86 | #include <asm/setup.h> |
@@ -160,8 +157,6 @@ static int fbcon_set_origin(struct vc_data *); | |||
160 | 157 | ||
161 | /* # VBL ints between cursor state changes */ | 158 | /* # VBL ints between cursor state changes */ |
162 | #define ATARI_CURSOR_BLINK_RATE (42) | 159 | #define ATARI_CURSOR_BLINK_RATE (42) |
163 | #define MAC_CURSOR_BLINK_RATE (32) | ||
164 | #define DEFAULT_CURSOR_BLINK_RATE (20) | ||
165 | 160 | ||
166 | static int vbl_cursor_cnt; | 161 | static int vbl_cursor_cnt; |
167 | static int fbcon_cursor_noblink; | 162 | static int fbcon_cursor_noblink; |
@@ -210,19 +205,6 @@ static void fbcon_start(void); | |||
210 | static void fbcon_exit(void); | 205 | static void fbcon_exit(void); |
211 | static struct device *fbcon_device; | 206 | static struct device *fbcon_device; |
212 | 207 | ||
213 | #ifdef CONFIG_MAC | ||
214 | /* | ||
215 | * On the Macintoy, there may or may not be a working VBL int. We need to probe | ||
216 | */ | ||
217 | static int vbl_detected; | ||
218 | |||
219 | static irqreturn_t fb_vbl_detect(int irq, void *dummy) | ||
220 | { | ||
221 | vbl_detected++; | ||
222 | return IRQ_HANDLED; | ||
223 | } | ||
224 | #endif | ||
225 | |||
226 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION | 208 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_ROTATION |
227 | static inline void fbcon_set_rotation(struct fb_info *info) | 209 | static inline void fbcon_set_rotation(struct fb_info *info) |
228 | { | 210 | { |
@@ -421,7 +403,7 @@ static void fb_flashcursor(struct work_struct *work) | |||
421 | release_console_sem(); | 403 | release_console_sem(); |
422 | } | 404 | } |
423 | 405 | ||
424 | #if defined(CONFIG_ATARI) || defined(CONFIG_MAC) | 406 | #ifdef CONFIG_ATARI |
425 | static int cursor_blink_rate; | 407 | static int cursor_blink_rate; |
426 | static irqreturn_t fb_vbl_handler(int irq, void *dev_id) | 408 | static irqreturn_t fb_vbl_handler(int irq, void *dev_id) |
427 | { | 409 | { |
@@ -949,9 +931,7 @@ static const char *fbcon_startup(void) | |||
949 | struct fb_info *info = NULL; | 931 | struct fb_info *info = NULL; |
950 | struct fbcon_ops *ops; | 932 | struct fbcon_ops *ops; |
951 | int rows, cols; | 933 | int rows, cols; |
952 | int irqres; | ||
953 | 934 | ||
954 | irqres = 1; | ||
955 | /* | 935 | /* |
956 | * If num_registered_fb is zero, this is a call for the dummy part. | 936 | * If num_registered_fb is zero, this is a call for the dummy part. |
957 | * The frame buffer devices weren't initialized yet. | 937 | * The frame buffer devices weren't initialized yet. |
@@ -1040,56 +1020,11 @@ static const char *fbcon_startup(void) | |||
1040 | #ifdef CONFIG_ATARI | 1020 | #ifdef CONFIG_ATARI |
1041 | if (MACH_IS_ATARI) { | 1021 | if (MACH_IS_ATARI) { |
1042 | cursor_blink_rate = ATARI_CURSOR_BLINK_RATE; | 1022 | cursor_blink_rate = ATARI_CURSOR_BLINK_RATE; |
1043 | irqres = | 1023 | (void)request_irq(IRQ_AUTO_4, fb_vbl_handler, |
1044 | request_irq(IRQ_AUTO_4, fb_vbl_handler, | ||
1045 | IRQ_TYPE_PRIO, "framebuffer vbl", | 1024 | IRQ_TYPE_PRIO, "framebuffer vbl", |
1046 | info); | 1025 | info); |
1047 | } | 1026 | } |
1048 | #endif /* CONFIG_ATARI */ | 1027 | #endif /* CONFIG_ATARI */ |
1049 | |||
1050 | #ifdef CONFIG_MAC | ||
1051 | /* | ||
1052 | * On a Macintoy, the VBL interrupt may or may not be active. | ||
1053 | * As interrupt based cursor is more reliable and race free, we | ||
1054 | * probe for VBL interrupts. | ||
1055 | */ | ||
1056 | if (MACH_IS_MAC) { | ||
1057 | int ct = 0; | ||
1058 | /* | ||
1059 | * Probe for VBL: set temp. handler ... | ||
1060 | */ | ||
1061 | irqres = request_irq(IRQ_MAC_VBL, fb_vbl_detect, 0, | ||
1062 | "framebuffer vbl", info); | ||
1063 | vbl_detected = 0; | ||
1064 | |||
1065 | /* | ||
1066 | * ... and spin for 20 ms ... | ||
1067 | */ | ||
1068 | while (!vbl_detected && ++ct < 1000) | ||
1069 | udelay(20); | ||
1070 | |||
1071 | if (ct == 1000) | ||
1072 | printk | ||
1073 | ("fbcon_startup: No VBL detected, using timer based cursor.\n"); | ||
1074 | |||
1075 | free_irq(IRQ_MAC_VBL, fb_vbl_detect); | ||
1076 | |||
1077 | if (vbl_detected) { | ||
1078 | /* | ||
1079 | * interrupt based cursor ok | ||
1080 | */ | ||
1081 | cursor_blink_rate = MAC_CURSOR_BLINK_RATE; | ||
1082 | irqres = | ||
1083 | request_irq(IRQ_MAC_VBL, fb_vbl_handler, 0, | ||
1084 | "framebuffer vbl", info); | ||
1085 | } else { | ||
1086 | /* | ||
1087 | * VBL not detected: fall through, use timer based cursor | ||
1088 | */ | ||
1089 | irqres = 1; | ||
1090 | } | ||
1091 | } | ||
1092 | #endif /* CONFIG_MAC */ | ||
1093 | 1028 | ||
1094 | fbcon_add_cursor_timer(info); | 1029 | fbcon_add_cursor_timer(info); |
1095 | fbcon_has_exited = 0; | 1030 | fbcon_has_exited = 0; |
@@ -3522,10 +3457,6 @@ static void fbcon_exit(void) | |||
3522 | #ifdef CONFIG_ATARI | 3457 | #ifdef CONFIG_ATARI |
3523 | free_irq(IRQ_AUTO_4, fb_vbl_handler); | 3458 | free_irq(IRQ_AUTO_4, fb_vbl_handler); |
3524 | #endif | 3459 | #endif |
3525 | #ifdef CONFIG_MAC | ||
3526 | if (MACH_IS_MAC && vbl_detected) | ||
3527 | free_irq(IRQ_MAC_VBL, fb_vbl_handler); | ||
3528 | #endif | ||
3529 | 3460 | ||
3530 | kfree((void *)softback_buf); | 3461 | kfree((void *)softback_buf); |
3531 | softback_buf = 0UL; | 3462 | softback_buf = 0UL; |