Changeset 04803bf in mainline for uspace/srv/hid/kbd/port/pl050.c


Ignore:
Timestamp:
2011-03-21T22:00:17Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
143932e3
Parents:
b50b5af2 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes (needs fixes).

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/kbd/port/pl050.c

    rb50b5af2 r04803bf  
    3737#include <ddi.h>
    3838#include <libarch/ddi.h>
    39 #include <ipc/ipc.h>
    4039#include <async.h>
    4140#include <unistd.h>
     
    4544#include <ddi.h>
    4645#include <stdio.h>
     46#include <errno.h>
    4747
    48 #define PL050_STAT_RXFULL (1 << 4)
     48#define PL050_STAT_RXFULL  (1 << 4)
     49
    4950static irq_cmd_t pl050_cmds[] = {
    5051        {
     
    6667        {
    6768                .cmd = CMD_PIO_READ_8,
    68                 .addr = NULL,   /* will be patched in run-time */
     69                .addr = NULL,  /* Will be patched in run-time */
    6970                .dstarg = 2
    7071        },
     
    8384int kbd_port_init(void)
    8485{
    85 
    86         pl050_kbd.cmds[0].addr = (void *) sysinfo_value("kbd.address.status");
    87         pl050_kbd.cmds[3].addr = (void *) sysinfo_value("kbd.address.data");
    88 
     86        sysarg_t addr;
     87        if (sysinfo_get_value("kbd.address.status", &addr) != EOK)
     88                return -1;
     89       
     90        pl050_kbd.cmds[0].addr = (void *) addr;
     91       
     92        if (sysinfo_get_value("kbd.address.data", &addr) != EOK)
     93                return -1;
     94       
     95        pl050_kbd.cmds[3].addr = (void *) addr;
     96       
     97        sysarg_t inr;
     98        if (sysinfo_get_value("kbd.inr", &inr) != EOK)
     99                return -1;
     100       
    89101        async_set_interrupt_received(pl050_irq_handler);
    90 
    91         ipc_register_irq(sysinfo_value("kbd.inr"), device_assign_devno(), 0, &pl050_kbd);
    92 
     102        register_irq(inr, device_assign_devno(), 0, &pl050_kbd);
     103       
    93104        return 0;
    94105}
Note: See TracChangeset for help on using the changeset viewer.