Ignore:
Timestamp:
2009-03-18T10:53:12Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e749794
Parents:
8015eeec
Message:

as kernel little brother drivers are not needed anymore, the device numbers do not have to be correlated between kernel and uspace in any way
introduce new syscall sys_device_assign_devno() for generating system-wide unique device numbers for uspace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/kbd.c

    r8015eeec r84afc7b  
    4747
    4848#include <console/console.h>
    49 #include <ddi/device.h>
    5049#include <ddi/irq.h>
    5150#include <arch/mm/page.h>
     
    7574        cir_t cir;
    7675        void *cir_arg;
    77 
     76       
    7877#ifdef CONFIG_NS16550
    7978        ns16550_t *ns16550;
     
    116115        uintptr_t pa;
    117116        size_t size;
    118         devno_t devno;
    119117        inr_t inr;
    120118       
     
    165163#ifdef CONFIG_Z8530
    166164        case KBD_Z8530:
    167                 devno = device_assign_devno();
    168165                z8530 = (z8530_t *) hw_map(aligned_addr, offset + size) +
    169166                    offset;
    170167               
    171                 indev_t *kbrdin_z8530 = z8530_init(z8530, devno, inr, cir, cir_arg);
     168                indev_t *kbrdin_z8530 = z8530_init(z8530, inr, cir, cir_arg);
    172169                if (kbrdin_z8530)
    173170                        kbrd_init(kbrdin_z8530);
     
    179176                sysinfo_set_item_val("kbd", NULL, true);
    180177                sysinfo_set_item_val("kbd.type", NULL, KBD_Z8530);
    181                 sysinfo_set_item_val("kbd.devno", NULL, devno);
    182178                sysinfo_set_item_val("kbd.inr", NULL, inr);
    183179                sysinfo_set_item_val("kbd.address.kernel", NULL,
     
    188184#ifdef CONFIG_NS16550
    189185        case KBD_NS16550:
    190                 devno = device_assign_devno();
    191186                ns16550 = (ns16550_t *) hw_map(aligned_addr, offset + size) +
    192187                    offset;
    193188               
    194                 indev_t *kbrdin_ns16550 = ns16550_init(ns16550, devno, inr, cir, cir_arg);
     189                indev_t *kbrdin_ns16550 = ns16550_init(ns16550, inr, cir, cir_arg);
    195190                if (kbrdin_ns16550)
    196191                        kbrd_init(kbrdin_ns16550);
     
    202197                sysinfo_set_item_val("kbd", NULL, true);
    203198                sysinfo_set_item_val("kbd.type", NULL, KBD_NS16550);
    204                 sysinfo_set_item_val("kbd.devno", NULL, devno);
    205199                sysinfo_set_item_val("kbd.inr", NULL, inr);
    206200                sysinfo_set_item_val("kbd.address.kernel", NULL,
Note: See TracChangeset for help on using the changeset viewer.