Changeset 7919cd5 in mainline


Ignore:
Timestamp:
2009-02-21T21:15:33Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d063365
Parents:
e78136a
Message:

Unbreak ppc32 candidate.

Location:
kernel/arch/ppc32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/include/drivers/cuda.h

    re78136a r7919cd5  
    4141extern void cuda_init(devno_t devno, uintptr_t base, size_t size);
    4242extern int cuda_get_scancode(void);
    43 extern void cuda_grab(void);
    44 extern void cuda_release(void);
    4543
    4644#endif
  • kernel/arch/ppc32/src/drivers/cuda.c

    re78136a r7919cd5  
    3434
    3535#include <arch/drivers/cuda.h>
    36 #include <ipc/irq.h>
    3736#include <arch/asm.h>
    3837#include <console/console.h>
     
    252251static void cuda_irq_handler(irq_t *irq)
    253252{
    254         if ((irq->notif_cfg.notify) && (irq->notif_cfg.answerbox))
    255                 ipc_irq_send_notif(irq);
    256         else {
    257                 int scan_code = cuda_get_scancode();
     253        int scan_code = cuda_get_scancode();
    258254               
    259                 if (scan_code != -1) {
    260                         uint8_t scancode = (uint8_t) scan_code;
    261                         if ((scancode & 0x80) != 0x80)
    262                                 chardev_push_character(&kbrd, lchars[scancode & 0x7f]);
    263                 }
     255        if (scan_code != -1) {
     256                uint8_t scancode = (uint8_t) scan_code;
     257                if ((scancode & 0x80) != 0x80)
     258                        chardev_push_character(&kbrd, lchars[scancode & 0x7f]);
    264259        }
    265260}
     
    269264        return IRQ_ACCEPT;
    270265}
    271 
    272 
    273 /** Initialize keyboard and service interrupts using kernel routine */
    274 void cuda_grab(void)
    275 {
    276         if (cuda) {
    277                 ipl_t ipl = interrupts_disable();
    278                 spinlock_lock(&cuda_irq.lock);
    279                 cuda_irq.notif_cfg.notify = false;
    280                 spinlock_unlock(&cuda_irq.lock);
    281                 interrupts_restore(ipl);
    282         }
    283 }
    284 
    285 
    286 /** Resume the former interrupt vector */
    287 void cuda_release(void)
    288 {
    289         if (cuda) {
    290                 ipl_t ipl = interrupts_disable();
    291                 spinlock_lock(&cuda_irq.lock);
    292                 if (cuda_irq.notif_cfg.answerbox)
    293                         cuda_irq.notif_cfg.notify = true;
    294                 spinlock_unlock(&cuda_irq.unlock);
    295                 interrupts_restore(ipl);
    296         }
    297 }
    298 
    299266
    300267void cuda_init(devno_t devno, uintptr_t base, size_t size)
  • kernel/arch/ppc32/src/ppc32.c

    re78136a r7919cd5  
    157157{
    158158        fb_redraw();
    159         cuda_grab();
    160159}
    161160
     
    165164void arch_release_console(void)
    166165{
    167         cuda_release();
    168166}
    169167
Note: See TracChangeset for help on using the changeset viewer.