Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4345 → Rev 4346

/branches/dynload/kernel/arch/sparc64/src/console.c
37,16 → 37,8
 
#include <arch/drivers/scr.h>
#include <arch/drivers/kbd.h>
 
#include <arch/drivers/sgcn.h>
 
#ifdef CONFIG_Z8530
#include <genarch/kbd/z8530.h>
#endif
#ifdef CONFIG_NS16550
#include <genarch/kbd/ns16550.h>
#endif
 
#include <genarch/srln/srln.h>
#include <console/chardev.h>
#include <console/console.h>
#include <arch/asm.h>
70,36 → 62,29
static void standard_console_init(ofw_tree_node_t *aliases)
{
#ifdef CONFIG_FB
stdin = NULL;
 
ofw_tree_property_t *prop;
ofw_tree_node_t *screen;
ofw_tree_node_t *keyboard;
prop = ofw_tree_getprop(aliases, "screen");
if (!prop)
ofw_tree_property_t *prop_scr = ofw_tree_getprop(aliases, "screen");
if (!prop_scr)
panic("Cannot find property 'screen'.");
if (!prop->value)
if (!prop_scr->value)
panic("Cannot find screen alias.");
screen = ofw_tree_lookup(prop->value);
ofw_tree_node_t *screen = ofw_tree_lookup(prop_scr->value);
if (!screen)
panic("Cannot find %s.", prop->value);
 
panic("Cannot find %s.", prop_scr->value);
scr_init(screen);
#endif
 
prop = ofw_tree_getprop(aliases, "keyboard");
if (!prop)
#ifdef CONFIG_SUN_KBD
ofw_tree_property_t *prop_kbd = ofw_tree_getprop(aliases, "keyboard");
if (!prop_kbd)
panic("Cannot find property 'keyboard'.");
if (!prop->value)
if (!prop_kbd->value)
panic("Cannot find keyboard alias.");
keyboard = ofw_tree_lookup(prop->value);
ofw_tree_node_t *keyboard = ofw_tree_lookup(prop_kbd->value);
if (!keyboard)
panic("Cannot find %s.", prop->value);
 
panic("Cannot find %s.", prop_kbd->value);
kbd_init(keyboard);
#else
panic("Standard console requires FB, "
"but the kernel is not compiled with FB support.");
#endif
}
 
106,7 → 91,15
/** Initilize I/O on the Serengeti machine. */
static void serengeti_init(void)
{
sgcn_init();
#ifdef CONFIG_SGCN_KBD
indev_t *kbrdin;
kbrdin = sgcnin_init();
if (kbrdin)
srlnin_init(kbrdin);
#endif
#ifdef CONFIG_SGCN_PRN
sgcnout_init();
#endif
}
 
/**
133,26 → 126,6
}
 
 
/** Kernel thread for polling keyboard.
*
* @param arg Ignored.
*/
void kkbdpoll(void *arg)
{
thread_detach(THREAD);
 
if (kbd_type != KBD_SGCN)
return;
 
while (1) {
#ifdef CONFIG_SGCN
if (kbd_type == KBD_SGCN)
sgcn_poll();
#endif
thread_usleep(KEYBOARD_POLL_PAUSE);
}
}
 
/** Acquire console back for kernel
*
*/