summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-01-20 23:12:12 +0000
committerwdenk <wdenk>2004-01-20 23:12:12 +0000
commitc837dcb1a316745092567bfe4fb266d0941884ff (patch)
tree8b275e8c982d1b0a411ff33c08c86cd3d343eed6 /drivers
parentb0aef11c9f1f98d018adaa484f1e048fa626801e (diff)
* The PS/2 mux on the BMS2003 board needs 450 ms after power on
before we can access it; add delay in case we are faster (with no CF card inserted) * Cleanup of some init functions * Make sure SCC Ethernet is always stopped by the time we boot Linux to avoid Linux crashes by early packets coming in. * Accelerate flash accesses on LWMON board by using buffered writes
Diffstat (limited to 'drivers')
-rw-r--r--drivers/keyboard.c6
-rw-r--r--drivers/ps2mult.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/keyboard.c b/drivers/keyboard.c
index 7ba87be6855..738ff9f15ba 100644
--- a/drivers/keyboard.c
+++ b/drivers/keyboard.c
@@ -194,8 +194,14 @@ void handle_scancode(unsigned char scancode)
case 0xBA: /* caps lock released */
return; /* just swallow */
}
+#if 0
if((scancode&0x80)==0x80) /* key released */
return;
+#else
+ if((scancode&0x80)==0x00) /* key pressed */
+ return;
+ scancode &= ~0x80;
+#endif
/* now, decide which table we need */
if(scancode > (sizeof(kbd_plain_xlate)/sizeof(kbd_plain_xlate[0]))) { /* scancode not in list */
PRINTF("unkown scancode %X\n",scancode);
diff --git a/drivers/ps2mult.c b/drivers/ps2mult.c
index c0457b8c499..9515a0fbf54 100644
--- a/drivers/ps2mult.c
+++ b/drivers/ps2mult.c
@@ -42,6 +42,7 @@
#endif
+static ulong start_time;
static int init_done = 0;
static int received_escape = 0;
@@ -63,6 +64,13 @@ static int ps2mult_buf_out_idx;
static u_char ps2mult_buf_status [PS2BUF_SIZE];
+#ifndef CONFIG_BOARD_EARLY_INIT_R
+#error #define CONFIG_BOARD_EARLY_INIT_R and call ps2mult_early_init() in board_early_init_r()
+#endif
+void ps2mult_early_init (void)
+{
+ start_time = get_timer(0);
+}
static void ps2mult_send_byte(u_char byte, u_char sel)
{
@@ -360,6 +368,8 @@ int ps2mult_init (void)
int kbd_found = 0;
int mouse_found = 0;
+ while (get_timer(start_time) < CONFIG_PS2MULT_DELAY);
+
ps2ser_init();
ps2ser_putc(PS2MULT_SESSION_START);