Changeset 253f35a1 in mainline for kernel/genarch/src/kbd/z8530.c


Ignore:
Timestamp:
2006-09-07T19:56:44Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ab1ae2d9
Parents:
801579fe
Message:

sparc64 work.

  • Changes to enable userspace keyboard drivers.
  • Fix z8530 initialization (i.e. clear any pending Tx interrupts).
  • Experimental support for framebuffers with inverted colors.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/kbd/z8530.c

    r801579fe r253f35a1  
    4242#include <arch/drivers/z8530.h>
    4343#include <arch/interrupt.h>
     44#include <arch/drivers/kbd.h>
    4445#include <cpu.h>
    4546#include <arch/asm.h>
     
    4950#include <console/console.h>
    5051#include <interrupt.h>
     52#include <sysinfo/sysinfo.h>
     53#include <print.h>
    5154
    5255/*
     
    5457 */
    5558#define IGNORE_CODE     0x7f            /* all keys up */
     59
     60bool z8530_belongs_to_kernel = true;
    5661
    5762static void z8530_suspend(chardev_t *);
     
    7075void z8530_grab(void)
    7176{
     77        z8530_belongs_to_kernel = true;
    7278}
    7379
     
    7581void z8530_release(void)
    7682{
     83        z8530_belongs_to_kernel = false;
    7784}
    7885
     
    8390        stdin = &kbrd;
    8491
     92        sysinfo_set_item_val("kbd", NULL, true);
     93        sysinfo_set_item_val("kbd.irq", NULL, 0);
     94        sysinfo_set_item_val("kbd.address.virtual", NULL, (uintptr_t) kbd_virt_address);
     95
    8596        (void) z8530_read_a(RR8);
    8697
    87         z8530_write_a(WR1, WR1_IARCSC); /* interrupt on all characters */
     98        /*
     99         * Clear any pending TX interrupts or we never manage
     100         * to set FHC UART interrupt state to idle.
     101         */
     102        z8530_write_a(WR0, WR0_TX_IP_RST);
     103
     104        z8530_write_a(WR1, WR1_IARCSC);         /* interrupt on all characters */
    88105
    89106        /* 8 bits per character and enable receiver */
    90107        z8530_write_a(WR3, WR3_RX8BITSCH | WR3_RX_ENABLE);
    91108       
    92         z8530_write_a(WR9, WR9_MIE);    /* Master Interrupt Enable. */
     109        z8530_write_a(WR9, WR9_MIE);            /* Master Interrupt Enable. */
    93110       
    94111        /*
Note: See TracChangeset for help on using the changeset viewer.