Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1910 → Rev 1911

/trunk/kernel/genarch/src/kbd/ns16550.c
90,6 → 90,11
sysinfo_set_item_val("kbd", NULL, true);
sysinfo_set_item_val("kbd.irq", NULL, 0);
sysinfo_set_item_val("kbd.address.virtual", NULL, (uintptr_t) kbd_virt_address);
ns16550_ier_write(IER_ERBFI); /* enable receiver interrupt */
while (ns16550_lsr_read() & LSR_DATA_READY)
(void) ns16550_rbr_read();
}
 
/** Process ns16550 interrupt.
144,7 → 149,7
{
uint8_t x;
 
while (((x = ns16550_lsr_read() & LSR_DATA_READY))) {
while (ns16550_lsr_read() & LSR_DATA_READY) {
x = ns16550_rbr_read();
if (x != IGNORE_CODE) {
if (x & KEY_RELEASE)
/trunk/kernel/genarch/src/ofw/ebus.c
36,12 → 36,15
*/
 
#include <genarch/ofw/ofw_tree.h>
#include <arch/drivers/pci.h>
#include <arch/memstr.h>
#include <arch/trap/interrupt.h>
#include <func.h>
#include <panic.h>
#include <debug.h>
#include <macros.h>
 
/** Apply EBUS ranges to EBUS register. */
bool ofw_ebus_apply_ranges(ofw_tree_node_t *node, ofw_ebus_reg_t *reg, uintptr_t *pa)
{
ofw_tree_property_t *prop;
112,11 → 115,34
/*
* We found the device that functions as an interrupt controller
* for the interrupt. We also found mapping from interrupt to INR.
* What needs to be done now is to verify that this indeed is a PCI
* node.
*/
 
controller = ofw_tree_find_node_by_handle(ofw_tree_lookup("/"), intr_map[i].controller_handle);
if (!controller)
return false;
if (strcmp(ofw_tree_node_name(controller), "pci") != 0) {
/*
* This is not a PCI node.
*/
return false;
}
 
pci_t *pci = controller->device;
if (!pci) {
pci = pci_init(controller);
if (!pci)
return false;
controller->device = pci;
}
pci_enable_interrupt(pci, intr_map[i].controller_inr);
 
*inr = intr_map[i].controller_inr;
*inr |= 0x1f << IGN_SHIFT; /* 0x1f is hardwired IGN */
*inr = intr_map[i].controller_inr;
return true;
}
 
/trunk/kernel/genarch/src/ofw/upa.c
45,7 → 45,7
bool ofw_upa_apply_ranges(ofw_tree_node_t *node, ofw_upa_reg_t *reg, uintptr_t *pa)
{
*pa = reg->addr;
return false;
return true;
}
 
/** @}