parisc: KittyHawk LCD fix

K class aka KittyHawk don't have LED support on their LCD. Installing
HP-UX confirmed this. The current led_wq fills the LCD with black
characters each time it runs.

The patch prevents the led_wq workqueue and its proc entry to be
created for KittyHawk machines.

It also increase min_cmd_delay as currently, one character out of two
is lost when a string is sent to the LCD.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: Kyle McMartin <kyle@mcmartin.c>

authored by Guy Martin and committed by Kyle McMartin 79a04296 51890613

+13 -4
+13 -4
drivers/parisc/led.c
··· 64 64 static unsigned int led_lanrxtx __read_mostly = 1; 65 65 static char lcd_text[32] __read_mostly; 66 66 static char lcd_text_default[32] __read_mostly; 67 + static int lcd_no_led_support __read_mostly = 0; /* KittyHawk doesn't support LED on its LCD */ 67 68 68 69 69 70 static struct workqueue_struct *led_wq; ··· 116 115 .lcd_width = 16, 117 116 .lcd_cmd_reg_addr = KITTYHAWK_LCD_CMD, 118 117 .lcd_data_reg_addr = KITTYHAWK_LCD_DATA, 119 - .min_cmd_delay = 40, 118 + .min_cmd_delay = 80, 120 119 .reset_cmd1 = 0x80, 121 120 .reset_cmd2 = 0xc0, 122 121 }; ··· 135 134 { 136 135 /* Display the default text now */ 137 136 if (led_type == LED_HASLCD) lcd_print( lcd_text_default ); 137 + 138 + /* KittyHawk has no LED support on its LCD */ 139 + if (lcd_no_led_support) return 0; 138 140 139 141 /* Create the work queue and queue the LED task */ 140 142 led_wq = create_singlethread_workqueue("led_wq"); ··· 252 248 253 249 proc_pdc_root = proc_mkdir("pdc", 0); 254 250 if (!proc_pdc_root) return -1; 255 - ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root, 256 - &led_proc_fops, (void *)LED_NOLCD); /* LED */ 257 - if (!ent) return -1; 251 + 252 + if (!lcd_no_led_support) 253 + { 254 + ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root, 255 + &led_proc_fops, (void *)LED_NOLCD); /* LED */ 256 + if (!ent) return -1; 257 + } 258 258 259 259 if (led_type == LED_HASLCD) 260 260 { ··· 700 692 case 0x58B: /* KittyHawk DC2 100 (K200) */ 701 693 printk(KERN_INFO "%s: KittyHawk-Machine (hversion 0x%x) found, " 702 694 "LED detection skipped.\n", __FILE__, CPU_HVERSION); 695 + lcd_no_led_support = 1; 703 696 goto found; /* use the preinitialized values of lcd_info */ 704 697 } 705 698