Changeset ab4bace in mainline


Ignore:
Timestamp:
2010-01-31T13:56:23Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2e07f62c
Parents:
89ee7ff (diff), b73c26d (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 ADB drivers. Brings userspace keyboard and mouse for qemu-system-ppc -M g3beige. (buggy in PearPC)

Files:
11 added
16 edited
7 moved

Legend:

Unmodified
Added
Removed
  • boot/arch/amd64/Makefile.inc

    r89ee7ff rab4bace  
    3333        $(USPACEDIR)/srv/hw/char/i8042/i8042 \
    3434        $(USPACEDIR)/srv/hw/bus/pci/pci \
    35         $(USPACEDIR)/srv/hid/c_mouse/c_mouse
     35        $(USPACEDIR)/srv/hid/char_mouse/char_ms
    3636
    3737MODULES := $(notdir $(COMPONENTS))
  • boot/arch/ia64/loader/Makefile.common

    r89ee7ff rab4bace  
    4949        RD_SRVS += \
    5050                $(USPACEDIR)/srv/hw/char/i8042/i8042 \
    51                 $(USPACEDIR)/srv/hid/c_mouse/c_mouse
     51                $(USPACEDIR)/srv/hid/char_mouse/char_ms
    5252endif
  • boot/arch/ppc32/loader/Makefile.common

    r89ee7ff rab4bace  
    4343KERNELDIR = ../../../../kernel
    4444USPACEDIR = ../../../../uspace
     45
     46RD_SRVS += \
     47        $(USPACEDIR)/srv/hid/adb_mouse/adb_ms \
     48        $(USPACEDIR)/srv/hw/bus/cuda_adb/cuda_adb
  • kernel/arch/abs32le/src/abs32le.c

    r89ee7ff rab4bace  
    102102}
    103103
     104void irq_initialize_arch(irq_t *irq)
     105{
     106        (void) irq;
     107}
     108
    104109/** @}
    105110 */
  • kernel/arch/amd64/src/amd64.c

    r89ee7ff rab4bace  
    278278}
    279279
     280void irq_initialize_arch(irq_t *irq)
     281{
     282        (void) irq;
     283}
     284
    280285/** @}
    281286 */
  • kernel/arch/arm32/src/arm32.c

    r89ee7ff rab4bace  
    179179}
    180180
     181void irq_initialize_arch(irq_t *irq)
     182{
     183        (void) irq;
     184}
     185
    181186/** @}
    182187 */
  • kernel/arch/ia32/src/ia32.c

    r89ee7ff rab4bace  
    234234}
    235235
     236void irq_initialize_arch(irq_t *irq)
     237{
     238        (void) irq;
     239}
     240
    236241/** @}
    237242 */
  • kernel/arch/ia64/src/ia64.c

    r89ee7ff rab4bace  
    4444#include <arch/stack.h>
    4545#include <arch/mm/page.h>
     46#include <interrupt.h>
    4647#include <mm/as.h>
    4748#include <config.h>
     
    280281}
    281282
     283void irq_initialize_arch(irq_t *irq)
     284{
     285        (void) irq;
     286}
     287
    282288/** @}
    283289 */
  • kernel/arch/mips32/src/mips32.c

    r89ee7ff rab4bace  
    4646#include <sysinfo/sysinfo.h>
    4747#include <arch/interrupt.h>
     48#include <interrupt.h>
    4849#include <console/chardev.h>
    4950#include <arch/barrier.h>
     
    257258}
    258259
     260void irq_initialize_arch(irq_t *irq)
     261{
     262        (void) irq;
     263}
     264
    259265/** @}
    260266 */
  • kernel/arch/ppc32/src/ppc32.c

    r89ee7ff rab4bace  
    3939#include <genarch/kbrd/kbrd.h>
    4040#include <arch/interrupt.h>
     41#include <interrupt.h>
    4142#include <genarch/fb/fb.h>
    4243#include <genarch/fb/visuals.h>
     
    4748#include <proc/uarg.h>
    4849#include <console/console.h>
     50#include <sysinfo/sysinfo.h>
    4951#include <ddi/irq.h>
    5052#include <arch/drivers/pic.h>
     
    5860
    5961bootinfo_t bootinfo;
     62
     63static cir_t pic_cir;
     64static void *pic_cir_arg;
    6065
    6166/** Performs ppc32-specific initialization before main_bsp() is called. */
     
    186191        if (assigned_address) {
    187192                /* Initialize PIC */
    188                 cir_t cir;
    189                 void *cir_arg;
    190                 pic_init(assigned_address[0].addr, PAGE_SIZE, &cir, &cir_arg);
    191                
     193                pic_init(assigned_address[0].addr, PAGE_SIZE, &pic_cir,
     194                    &pic_cir_arg);
     195
    192196#ifdef CONFIG_MAC_KBD
    193197                uintptr_t pa = assigned_address[0].addr + 0x16000;
     
    201205                /* Initialize I/O controller */
    202206                cuda_instance_t *cuda_instance =
    203                     cuda_init(cuda, IRQ_CUDA, cir, cir_arg);
     207                    cuda_init(cuda, IRQ_CUDA, pic_cir, pic_cir_arg);
    204208                if (cuda_instance) {
    205209                        kbrd_instance_t *kbrd_instance = kbrd_init();
     
    211215                        }
    212216                }
     217
     218                /*
     219                 * This is the necessary evil until the userspace driver is entirely
     220                 * self-sufficient.
     221                 */
     222                sysinfo_set_item_val("cuda", NULL, true);
     223                sysinfo_set_item_val("cuda.inr", NULL, IRQ_CUDA);
     224                sysinfo_set_item_val("cuda.address.physical", NULL, pa);
     225                sysinfo_set_item_val("cuda.address.kernel", NULL,
     226                    (uintptr_t) cuda);
    213227#endif
    214228        }
     
    216230        /* Consider only a single device for now */
    217231        return false;
     232}
     233
     234void irq_initialize_arch(irq_t *irq)
     235{
     236        irq->cir = pic_cir;
     237        irq->cir_arg = pic_cir_arg;
     238        irq->preack = true;
    218239}
    219240
  • kernel/arch/sparc64/src/sparc64.c

    r89ee7ff rab4bace  
    4444#include <arch/mm/page.h>
    4545#include <arch/stack.h>
     46#include <interrupt.h>
    4647#include <genarch/ofw/ofw_tree.h>
    4748#include <userspace.h>
     
    166167}
    167168
     169void irq_initialize_arch(irq_t *irq)
     170{
     171        (void) irq;
     172}
     173
    168174/** @}
    169175 */
  • kernel/generic/include/interrupt.h

    r89ee7ff rab4bace  
    5151void exc_init(void);
    5252
     53extern void irq_initialize_arch(irq_t *irq);
     54
    5355#endif
    5456
  • kernel/generic/src/ddi/irq.c

    r89ee7ff rab4bace  
    7474#include <synch/spinlock.h>
    7575#include <console/console.h>
     76#include <interrupt.h>
    7677#include <memstr.h>
    7778#include <arch.h>
     
    169170        irq->inr = -1;
    170171        irq->devno = -1;
     172
     173        irq_initialize_arch(irq);
    171174}
    172175
  • uspace/Makefile

    r89ee7ff rab4bace  
    5959        srv/fs/tmpfs \
    6060        srv/fs/devfs \
     61        srv/hid/adb_mouse \
    6162        srv/hid/console \
    62         srv/hid/c_mouse \
     63        srv/hid/char_mouse \
    6364        srv/hid/fb \
    6465        srv/hid/kbd \
     
    7172ifeq ($(UARCH),ia32)
    7273        DIRS += srv/hw/bus/pci
     74endif
     75
     76ifeq ($(UARCH),ppc32)
     77        DIRS += srv/hw/bus/cuda_adb
    7378endif
    7479
  • uspace/app/init/init.c

    r89ee7ff rab4bace  
    287287        spawn("/srv/fhc");
    288288        spawn("/srv/obio");
     289        srv_start("/srv/cuda_adb");
    289290        srv_start("/srv/i8042");
    290         srv_start("/srv/c_mouse");
     291        srv_start("/srv/adb_ms");
     292        srv_start("/srv/char_ms");
    291293
    292294        spawn("/srv/fb");
     
    320322        getterm("term/vc5", "/app/bdsh");
    321323        getterm("term/vc6", "/app/klog");
    322        
     324
    323325        return 0;
    324326}
  • uspace/srv/hid/char_mouse/Makefile

    r89ee7ff rab4bace  
    3232EXTRA_CFLAGS = -Iinclude
    3333
    34 OUTPUT = c_mouse
     34OUTPUT = char_ms
    3535
    3636SOURCES = \
    3737        proto/ps2.c \
    38         c_mouse.c \
     38        char_mouse.c \
    3939        chardev.c
    4040
  • uspace/srv/hid/char_mouse/char_mouse.c

    r89ee7ff rab4bace  
    4747#include <devmap.h>
    4848
    49 #include <c_mouse.h>
     49#include <char_mouse.h>
    5050#include <mouse_port.h>
    5151#include <mouse_proto.h>
  • uspace/srv/hid/char_mouse/chardev.c

    r89ee7ff rab4bace  
    4141#include <errno.h>
    4242
    43 #include <c_mouse.h>
     43#include <char_mouse.h>
    4444#include <mouse_port.h>
    4545
  • uspace/srv/hid/char_mouse/include/char_mouse.h

    r89ee7ff rab4bace  
    3434 */
    3535
    36 #ifndef C_MOUSE_H_
    37 #define C_MOUSE_H_
     36#ifndef CHAR_MOUSE_H_
     37#define CHAR_MOUSE_H_
    3838
    3939extern void mouse_handle_byte(int);
  • uspace/srv/hid/char_mouse/proto/ps2.c

    r89ee7ff rab4bace  
    3737#include <stdio.h>
    3838#include <mouse_proto.h>
    39 #include <c_mouse.h>
     39#include <char_mouse.h>
    4040
    4141#define BUFSIZE 3
  • uspace/srv/hid/kbd/Makefile.build

    r89ee7ff rab4bace  
    125125ifeq ($(UARCH),ppc32)
    126126        SOURCES += \
    127                 port/dummy.c \
    128                 ctl/stty.c
     127                port/adb.c \
     128                ctl/apple.c
    129129endif
    130130
Note: See TracChangeset for help on using the changeset viewer.