Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1624 → Rev 1625

/kernel/trunk/generic/include/ipc/irq.h
49,6 → 49,7
CMD_PORT_READ_1,
CMD_PORT_WRITE_1,
CMD_IA64_GETCHAR,
CMD_PPC32_GETCHAR,
CMD_LAST
} irq_cmd_type;
 
/kernel/trunk/generic/src/ipc/irq.c
109,6 → 109,11
IPC_SET_ARG2(call->data, _getc(&ski_uconsole));
break;
#endif
#if defined(ppc32)
case CMD_PPC32_GETCHAR:
IPC_SET_ARG2(call->data, _getc(&kbrd));
break;
#endif
default:
break;
}
/kernel/trunk/arch/ppc32/include/arch.h
29,4 → 29,6
#ifndef __ppc32_ARCH_H__
#define __ppc32_ARCH_H__
 
#include <arch/drivers/cuda.h>
 
#endif
/kernel/trunk/arch/ppc32/include/drivers/cuda.h
30,10 → 30,13
#define __CUDA_H__
 
#include <arch/types.h>
#include <console/chardev.h>
#include <typedefs.h>
 
#define CUDA_IRQ 10
 
chardev_t kbrd;
 
extern void cuda_init(__address base, size_t size);
 
#endif
/kernel/trunk/arch/ppc32/src/drivers/pic.c
46,7 → 46,7
if (intnum < 32) {
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] | (1 << intnum);
} else {
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum-32));
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum - 32));
}
}
56,7 → 56,7
if (intnum < 32) {
pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] & (~(1 << intnum));
} else {
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum-32)));
pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum - 32)));
}
}
 
65,7 → 65,7
if (intnum < 32)
pic[PIC_ACK_LOW] = 1 << intnum;
else
pic[PIC_ACK_HIGH] = 1 << (intnum-32);
pic[PIC_ACK_HIGH] = 1 << (intnum - 32);
}
 
/** Return number of pending interrupt */
/kernel/trunk/arch/ppc32/src/drivers/cuda.c
28,9 → 28,9
 
#include <arch/drivers/cuda.h>
#include <arch/asm.h>
#include <console/chardev.h>
#include <console/console.h>
#include <arch/drivers/pic.h>
#include <sysinfo/sysinfo.h>
#include <interrupt.h>
#include <stdarg.h>
 
129,7 → 129,7
}
 
 
static chardev_t kbrd;
chardev_t kbrd;
static chardev_operations_t ops = {
.suspend = cuda_suspend,
.resume = cuda_resume,
162,6 → 162,9
chardev_initialize("cuda_kbd", &kbrd, &ops);
stdin = &kbrd;
sysinfo_set_item_val("cuda", NULL, true);
sysinfo_set_item_val("cuda.irq", NULL, CUDA_IRQ);
}