/trunk/kernel/arch/sparc64/src/console.c |
---|
62,29 → 62,34 |
static void standard_console_init(ofw_tree_node_t *aliases) |
{ |
#ifdef CONFIG_FB |
ofw_tree_property_t *prop_scr = ofw_tree_getprop(aliases, "screen"); |
if (!prop_scr) |
ofw_tree_property_t *prop; |
ofw_tree_node_t *screen; |
ofw_tree_node_t *keyboard; |
prop = ofw_tree_getprop(aliases, "screen"); |
if (!prop) |
panic("Cannot find property 'screen'."); |
if (!prop_scr->value) |
if (!prop->value) |
panic("Cannot find screen alias."); |
ofw_tree_node_t *screen = ofw_tree_lookup(prop_scr->value); |
screen = ofw_tree_lookup(prop->value); |
if (!screen) |
panic("Cannot find %s.", prop_scr->value); |
panic("Cannot find %s.", prop->value); |
scr_init(screen); |
#endif |
#ifdef CONFIG_SUN_KBD |
ofw_tree_property_t *prop_kbd = ofw_tree_getprop(aliases, "keyboard"); |
if (!prop_kbd) |
prop = ofw_tree_getprop(aliases, "keyboard"); |
if (!prop) |
panic("Cannot find property 'keyboard'."); |
if (!prop_kbd->value) |
if (!prop->value) |
panic("Cannot find keyboard alias."); |
ofw_tree_node_t *keyboard = ofw_tree_lookup(prop_kbd->value); |
keyboard = ofw_tree_lookup(prop->value); |
if (!keyboard) |
panic("Cannot find %s.", prop_kbd->value); |
panic("Cannot find %s.", prop->value); |
kbd_init(keyboard); |
#else |
panic("Standard console requires FB, " |
"but the kernel is not compiled with FB support."); |
#endif |
} |
/trunk/kernel/arch/sparc64/src/drivers/kbd.c |
---|
57,7 → 57,7 |
kbd_type_t kbd_type = KBD_UNKNOWN; |
#ifdef CONFIG_SUN_KBD |
#if defined (CONFIG_Z8530) || defined (CONFIG_NS16550) |
/** Initialize keyboard. |
* |
168,9 → 168,9 |
z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) + |
offset; |
indev_t *kbrdin_z8530 = z8530_init(z8530, devno, inr, cir, cir_arg); |
if (kbrdin_z8530) |
kbrd_init(kbrdin_z8530); |
indev_t *kbrdin = z8530_init(z8530, devno, inr, cir, cir_arg); |
if (kbrdin) |
kbrd_init(kbrdin); |
/* |
* This is the necessary evil until the userspace drivers are |
191,9 → 191,9 |
ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) + |
offset; |
indev_t *kbrdin_ns16550 = ns16550_init(ns16550, devno, inr, cir, cir_arg); |
if (kbrdin_ns16550) |
kbrd_init(kbrdin_ns16550); |
indev_t *kbrdin = ns16550_init(ns16550, devno, inr, cir, cir_arg); |
if (kbrdin) |
kbrd_init(kbrdin); |
/* |
* This is the necessary evil until the userspace driver is |
214,7 → 214,6 |
} |
} |
#endif |
#endif |
/** @} |
*/ |
/trunk/kernel/arch/sparc64/Makefile.inc |
---|
76,8 → 76,7 |
arch/$(KARCH)/src/drivers/tick.c \ |
arch/$(KARCH)/src/drivers/kbd.c \ |
arch/$(KARCH)/src/drivers/sgcn.c \ |
arch/$(KARCH)/src/drivers/pci.c \ |
arch/$(KARCH)/src/drivers/fhc.c |
arch/$(KARCH)/src/drivers/pci.c |
ifeq ($(CONFIG_FB),y) |
ARCH_SOURCES += \ |
94,3 → 93,8 |
ARCH_SOURCES += \ |
arch/$(KARCH)/src/mm/tsb.c |
endif |
ifdef CONFIG_Z8530 |
ARCH_SOURCES += \ |
arch/$(KARCH)/src/drivers/fhc.c |
endif |