Changeset 3e5a814 in mainline for uspace


Ignore:
Timestamp:
2009-02-25T21:32:18Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b1de7a
Parents:
f542825
Message:

Add simple userspace FHC driver.
Modify the z8530 userspace driver
to send BUS_CLEAR_INTERRUPT
notification to the FHC driver.

Location:
uspace
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/Makefile

    rf542825 r3e5a814  
    6363endif
    6464
     65ifeq ($(UARCH),sparc64)
     66        DIRS += srv/fhc
     67endif
     68
    6569BUILDS := $(addsuffix .build,$(DIRS))
    6670CLEANS := $(addsuffix .clean,$(DIRS))
  • uspace/app/init/init.c

    rf542825 r3e5a814  
    109109        spawn("/srv/kbd");
    110110        spawn("/srv/console");
     111        spawn("/srv/fhc");
    111112       
    112113        console_wait();
  • uspace/lib/libc/include/ipc/services.h

    rf542825 r3e5a814  
    4545        SERVICE_CONSOLE,
    4646        SERVICE_VFS,
    47         SERVICE_DEVMAP
     47        SERVICE_DEVMAP,
     48        SERVICE_FHC
    4849} services_t;
    4950
  • uspace/srv/kbd/generic/kbd.c

    rf542825 r3e5a814  
    3838#include <ipc/ipc.h>
    3939#include <ipc/services.h>
     40#include <sysinfo.h>
    4041#include <stdio.h>
    4142#include <unistd.h>
     
    6667/** Currently pressed lock keys. We track these to tackle autorepeat. */
    6768static unsigned lock_keys;
     69
     70int cir_service = 0;
     71int cir_phone = -1;
    6872
    6973void kbd_push_scancode(int scancode)
     
    173177        ipcarg_t phonead;
    174178       
     179        if (sysinfo_value("kbd.cir.fhc") == 1)
     180                cir_service = SERVICE_FHC;
     181       
     182        if (cir_service) {
     183                while (cir_phone < 0) {
     184                        cir_phone = ipc_connect_me_to(PHONE_NS, cir_service,
     185                            0, 0);
     186                }
     187        }
     188       
    175189        /* Initialize port driver. */
    176190        if (kbd_port_init())
  • uspace/srv/kbd/include/kbd.h

    rf542825 r3e5a814  
    4646#define KBD_MS_MOVE     1028
    4747
     48extern int cir_service;
     49extern int cir_phone;
     50
    4851extern void kbd_push_scancode(int);
    4952extern void kbd_push_ev(int, unsigned int);
  • uspace/srv/kbd/port/z8530.c

    rf542825 r3e5a814  
    3636
    3737#include <ipc/ipc.h>
     38#include <ipc/bus.h>
    3839#include <async.h>
    3940#include <sysinfo.h>
     
    8990            CHAN_A_DATA;
    9091        ipc_register_irq(sysinfo_value("kbd.inr"), sysinfo_value("kbd.devno"),
    91             0, &z8530_kbd);
     92            sysinfo_value("kbd.inr"), &z8530_kbd);
    9293        return 0;
    9394}
     
    9798        int scan_code = IPC_GET_ARG2(*call);
    9899        kbd_push_scancode(scan_code);
     100       
     101        if (cir_service)
     102                async_msg_1(cir_phone, BUS_CLEAR_INTERRUPT,
     103                    IPC_GET_METHOD(*call));
    99104}
    100105
Note: See TracChangeset for help on using the changeset viewer.