提交 79a04296 编写于 作者: G Guy Martin 提交者: Kyle McMartin

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: NGuy Martin <gmsoft@tuxicoman.be>
Signed-off-by: NKyle McMartin <kyle@mcmartin.c>
上级 51890613
...@@ -64,6 +64,7 @@ static unsigned int led_diskio __read_mostly = 1; ...@@ -64,6 +64,7 @@ static unsigned int led_diskio __read_mostly = 1;
static unsigned int led_lanrxtx __read_mostly = 1; static unsigned int led_lanrxtx __read_mostly = 1;
static char lcd_text[32] __read_mostly; static char lcd_text[32] __read_mostly;
static char lcd_text_default[32] __read_mostly; static char lcd_text_default[32] __read_mostly;
static int lcd_no_led_support __read_mostly = 0; /* KittyHawk doesn't support LED on its LCD */
static struct workqueue_struct *led_wq; static struct workqueue_struct *led_wq;
...@@ -115,7 +116,7 @@ lcd_info __attribute__((aligned(8))) __read_mostly = ...@@ -115,7 +116,7 @@ lcd_info __attribute__((aligned(8))) __read_mostly =
.lcd_width = 16, .lcd_width = 16,
.lcd_cmd_reg_addr = KITTYHAWK_LCD_CMD, .lcd_cmd_reg_addr = KITTYHAWK_LCD_CMD,
.lcd_data_reg_addr = KITTYHAWK_LCD_DATA, .lcd_data_reg_addr = KITTYHAWK_LCD_DATA,
.min_cmd_delay = 40, .min_cmd_delay = 80,
.reset_cmd1 = 0x80, .reset_cmd1 = 0x80,
.reset_cmd2 = 0xc0, .reset_cmd2 = 0xc0,
}; };
...@@ -135,6 +136,9 @@ static int start_task(void) ...@@ -135,6 +136,9 @@ static int start_task(void)
/* Display the default text now */ /* Display the default text now */
if (led_type == LED_HASLCD) lcd_print( lcd_text_default ); if (led_type == LED_HASLCD) lcd_print( lcd_text_default );
/* KittyHawk has no LED support on its LCD */
if (lcd_no_led_support) return 0;
/* Create the work queue and queue the LED task */ /* Create the work queue and queue the LED task */
led_wq = create_singlethread_workqueue("led_wq"); led_wq = create_singlethread_workqueue("led_wq");
queue_delayed_work(led_wq, &led_task, 0); queue_delayed_work(led_wq, &led_task, 0);
...@@ -248,9 +252,13 @@ static int __init led_create_procfs(void) ...@@ -248,9 +252,13 @@ static int __init led_create_procfs(void)
proc_pdc_root = proc_mkdir("pdc", 0); proc_pdc_root = proc_mkdir("pdc", 0);
if (!proc_pdc_root) return -1; if (!proc_pdc_root) return -1;
ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root,
&led_proc_fops, (void *)LED_NOLCD); /* LED */ if (!lcd_no_led_support)
if (!ent) return -1; {
ent = proc_create_data("led", S_IRUGO|S_IWUSR, proc_pdc_root,
&led_proc_fops, (void *)LED_NOLCD); /* LED */
if (!ent) return -1;
}
if (led_type == LED_HASLCD) if (led_type == LED_HASLCD)
{ {
...@@ -692,6 +700,7 @@ int __init led_init(void) ...@@ -692,6 +700,7 @@ int __init led_init(void)
case 0x58B: /* KittyHawk DC2 100 (K200) */ case 0x58B: /* KittyHawk DC2 100 (K200) */
printk(KERN_INFO "%s: KittyHawk-Machine (hversion 0x%x) found, " printk(KERN_INFO "%s: KittyHawk-Machine (hversion 0x%x) found, "
"LED detection skipped.\n", __FILE__, CPU_HVERSION); "LED detection skipped.\n", __FILE__, CPU_HVERSION);
lcd_no_led_support = 1;
goto found; /* use the preinitialized values of lcd_info */ goto found; /* use the preinitialized values of lcd_info */
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册