Changeset 30ab05f in mainline for arch/sparc64/src/console.c


Ignore:
Timestamp:
2006-02-27T20:33:36Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d87c3f3
Parents:
02f441c0
Message:

sparc64 work.
Very raw and fragile preliminary standalone keyboard support - polling mode only.
Because of a workaround in Simics, the scan codes are the same as on ia32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/src/console.c

    r02f441c0 r30ab05f  
    3232#include <genarch/fb/fb.h>
    3333#include <arch/drivers/fb.h>
    34 #include <arch/drivers/keyboard.h>
     34#include <arch/drivers/i8042.h>
     35#include <genarch/i8042/i8042.h>
    3536#include <genarch/ofw/ofw.h>
    3637#include <console/chardev.h>
     
    4041#include <proc/thread.h>
    4142#include <synch/mutex.h>
     43
     44#define KEYBOARD_POLL_PAUSE     50000   /* 50ms */
    4245
    4346static void ofw_sparc64_putchar(chardev_t *d, const char ch);
     
    7477        stdin = NULL;
    7578        fb_init(FB_VIRT_ADDRESS, FB_X_RES, FB_Y_RES, FB_COLOR_DEPTH/8);
     79        i8042_init();
    7680}
    7781
     
    156160                        chardev_push_character(&ofw_sparc64_console, ch);
    157161                }
    158                 thread_usleep(25000);
     162                thread_usleep(KEYBOARD_POLL_PAUSE);
    159163        }
    160164}
     165
     166/** Kernel thread for polling keyboard.
     167 *
     168 * @param arg Ignored.
     169 */
     170void kkbdpoll(void *arg)
     171{
     172        while (1) {
     173                i8042_poll();           
     174                thread_usleep(KEYBOARD_POLL_PAUSE);
     175        }
     176}
Note: See TracChangeset for help on using the changeset viewer.