Changeset 732fd3c in mainline


Ignore:
Timestamp:
2006-06-06T23:03:42Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ceaef4
Parents:
a175a67
Message:

ppc32 uspace keyboard support

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/include/arch.h

    ra175a67 r732fd3c  
    3030#define __ppc32_ARCH_H__
    3131
     32#include <arch/drivers/cuda.h>
     33
    3234#endif
  • arch/ppc32/include/drivers/cuda.h

    ra175a67 r732fd3c  
    3131
    3232#include <arch/types.h>
     33#include <console/chardev.h>
    3334#include <typedefs.h>
    3435
    3536#define CUDA_IRQ 10
    3637
     38chardev_t kbrd;
     39
    3740extern void cuda_init(__address base, size_t size);
    3841
  • arch/ppc32/src/drivers/cuda.c

    ra175a67 r732fd3c  
    2929#include <arch/drivers/cuda.h>
    3030#include <arch/asm.h>
    31 #include <console/chardev.h>
    3231#include <console/console.h>
    3332#include <arch/drivers/pic.h>
     33#include <sysinfo/sysinfo.h>
    3434#include <interrupt.h>
    3535#include <stdarg.h>
     
    130130
    131131
    132 static chardev_t kbrd;
     132chardev_t kbrd;
    133133static chardev_operations_t ops = {
    134134        .suspend = cuda_suspend,
     
    163163        chardev_initialize("cuda_kbd", &kbrd, &ops);
    164164        stdin = &kbrd;
     165       
     166        sysinfo_set_item_val("cuda", NULL, true);
     167        sysinfo_set_item_val("cuda.irq", NULL, CUDA_IRQ);
    165168}
    166169
  • arch/ppc32/src/drivers/pic.c

    ra175a67 r732fd3c  
    4747                pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] | (1 << intnum);
    4848        } else {
    49                 pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum-32));
     49                pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] | (1 << (intnum - 32));
    5050        }
    5151       
     
    5757                pic[PIC_MASK_LOW] = pic[PIC_MASK_LOW] & (~(1 << intnum));
    5858        } else {
    59                 pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum-32)));
     59                pic[PIC_MASK_HIGH] = pic[PIC_MASK_HIGH] & (~(1 << (intnum - 32)));
    6060        }
    6161}
     
    6666                pic[PIC_ACK_LOW] = 1 << intnum;
    6767        else
    68                 pic[PIC_ACK_HIGH] = 1 << (intnum-32);
     68                pic[PIC_ACK_HIGH] = 1 << (intnum - 32);
    6969}
    7070
  • generic/include/ipc/irq.h

    ra175a67 r732fd3c  
    5050        CMD_PORT_WRITE_1,
    5151        CMD_IA64_GETCHAR,
     52        CMD_PPC32_GETCHAR,
    5253        CMD_LAST
    5354} irq_cmd_type;
  • generic/src/ipc/irq.c

    ra175a67 r732fd3c  
    108108                case CMD_IA64_GETCHAR:
    109109                        IPC_SET_ARG2(call->data, _getc(&ski_uconsole));
     110                        break;
     111#endif
     112#if defined(ppc32)
     113                case CMD_PPC32_GETCHAR:
     114                        IPC_SET_ARG2(call->data, _getc(&kbrd));
    110115                        break;
    111116#endif
Note: See TracChangeset for help on using the changeset viewer.