Changeset 411b6a6 in mainline for kernel/arch/sparc64/src


Ignore:
Timestamp:
2009-03-07T16:08:40Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4c84368e
Parents:
e06da7e
Message:

Complete emancipation of kernel serial controller drivers (i8042, ns16550 and
z8530). Provide a common keyboard module for PC and Sun keyboards. The serial
line module is still to follow.

Location:
kernel/arch/sparc64/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/console.c

    re06da7e r411b6a6  
    4141#include <arch/drivers/sgcn.h>
    4242
    43 #ifdef CONFIG_Z8530
    44 #include <genarch/kbd/z8530.h>
    45 #endif
    46 #ifdef CONFIG_NS16550
    47 #include <genarch/kbd/ns16550.h>
    48 #endif
    49 
    5043#include <console/chardev.h>
    5144#include <console/console.h>
     
    7164{
    7265#ifdef CONFIG_FB
    73         stdin = NULL;
    74 
    7566        ofw_tree_property_t *prop;
    7667        ofw_tree_node_t *screen;
  • kernel/arch/sparc64/src/drivers/kbd.c

    re06da7e r411b6a6  
    3535#include <arch/drivers/kbd.h>
    3636#include <genarch/ofw/ofw_tree.h>
     37
     38#ifdef CONFIG_SUN_KBD
     39#include <genarch/kbrd/kbrd.h>
     40#endif
    3741#ifdef CONFIG_Z8530
    38 #include <genarch/kbd/z8530.h>
     42#include <genarch/drivers/z8530/z8530.h>
    3943#endif
    4044#ifdef CONFIG_NS16550
    41 #include <genarch/kbd/ns16550.h>
    42 #endif
     45#include <genarch/drivers/ns16550/ns16550.h>
     46#endif
     47
     48#include <console/console.h>
    4349#include <ddi/device.h>
    4450#include <ddi/irq.h>
     
    160166                z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) +
    161167                    offset;
    162                 (void) z8530_init(z8530, devno, inr, cir, cir_arg);
     168                kbrd_init(stdin);
     169                (void) z8530_init(z8530, devno, inr, cir, cir_arg, &kbrdin);
    163170               
    164171                /*
     
    180187                ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) +
    181188                    offset;
    182                 (void) ns16550_init(ns16550, devno, inr, cir, cir_arg);
     189                kbrd_init(stdin);
     190                (void) ns16550_init(ns16550, devno, inr, cir, cir_arg, &kbrdin);
    183191               
    184192                /*
  • kernel/arch/sparc64/src/sparc64.c

    re06da7e r411b6a6  
    9090                 */
    9191                irq_init(1 << 11, 128);
    92 
    93                 standalone_sparc64_console_init();
    9492        }
    9593}
     
    105103void arch_post_smp_init(void)
    106104{
    107         static thread_t *t = NULL;
     105        if (config.cpu_active == 1) {
     106                standalone_sparc64_console_init();
    108107
    109         if (!t) {
    110                 /*
    111                  * Create thread that polls keyboard.
    112                  */
    113                 t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll", true);
     108                /* Create thread that polls keyboard.
     109                 * XXX: this is only used by sgcn now
     110                 */
     111                thread_t *t = thread_create(kkbdpoll, NULL, TASK, 0, "kkbdpoll",
     112                    true);
    114113                if (!t)
    115114                        panic("Cannot create kkbdpoll.");
Note: See TracChangeset for help on using the changeset viewer.