Changeset af6b5157 in mainline
- Timestamp:
- 2011-02-15T20:09:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2a770a35
- Parents:
- 83a2f43
- Location:
- uspace
- Files:
-
- 15 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/isa/isa.c
r83a2f43 raf6b5157 52 52 #include <sys/stat.h> 53 53 54 #include <d river.h>54 #include <ddf/driver.h> 55 55 #include <ops/hw_res.h> 56 56 -
uspace/drv/ns8250/ns8250.c
r83a2f43 raf6b5157 53 53 #include <libarch/ddi.h> 54 54 55 #include <driver.h> 55 #include <ddf/driver.h> 56 #include <ddf/interrupt.h> 56 57 #include <ops/char_dev.h> 57 58 -
uspace/drv/pciintel/pci.c
r83a2f43 raf6b5157 47 47 #include <str_error.h> 48 48 49 #include <d river.h>49 #include <ddf/driver.h> 50 50 #include <devman.h> 51 51 #include <ipc/devman.h> -
uspace/drv/pciintel/pci.h
r83a2f43 raf6b5157 37 37 #define PCI_H_ 38 38 39 #include <stdlib.h> 40 #include <driver.h> 41 #include <malloc.h> 42 39 #include <ddf/driver.h> 43 40 #include "pci_regs.h" 44 41 -
uspace/drv/root/root.c
r83a2f43 raf6b5157 51 51 #include <sysinfo.h> 52 52 53 #include <d river.h>53 #include <ddf/driver.h> 54 54 #include <devman.h> 55 55 #include <ipc/devman.h> -
uspace/drv/rootpc/rootpc.c
r83a2f43 raf6b5157 46 46 #include <macros.h> 47 47 48 #include <d river.h>48 #include <ddf/driver.h> 49 49 #include <devman.h> 50 50 #include <ipc/devman.h> -
uspace/drv/rootvirt/rootvirt.c
r83a2f43 raf6b5157 39 39 #include <errno.h> 40 40 #include <str_error.h> 41 #include <d river.h>41 #include <ddf/driver.h> 42 42 43 43 #define NAME "rootvirt" -
uspace/drv/test1/test1.c
r83a2f43 raf6b5157 34 34 #include <errno.h> 35 35 #include <str_error.h> 36 #include <ddf/driver.h> 37 36 38 #include "test1.h" 37 39 -
uspace/drv/test1/test1.h
r83a2f43 raf6b5157 32 32 #define DRV_TEST1_TEST1_H_ 33 33 34 #include <d river.h>34 #include <ddf/driver.h> 35 35 36 36 #define NAME "test1" -
uspace/drv/test2/test2.c
r83a2f43 raf6b5157 31 31 32 32 #include <assert.h> 33 #include <async.h> 33 34 #include <stdio.h> 34 35 #include <errno.h> 35 36 #include <str_error.h> 36 #include <d river.h>37 #include <ddf/driver.h> 37 38 38 39 #define NAME "test2" -
uspace/lib/drv/generic/driver.c
r83a2f43 raf6b5157 50 50 #include <errno.h> 51 51 #include <inttypes.h> 52 #include <devman.h> 52 53 53 54 #include <ipc/driver.h> 54 55 55 56 #include "dev_iface.h" 56 #include "driver.h" 57 #include "ddf/driver.h" 58 #include "ddf/interrupt.h" 57 59 58 60 /** Driver structure */ … … 79 81 static ddf_dev_t *create_device(void); 80 82 static void delete_device(ddf_dev_t *); 83 static remote_handler_t *function_get_default_handler(ddf_fun_t *); 84 static void *function_get_ops(ddf_fun_t *, dev_inferface_idx_t); 81 85 82 86 static void driver_irq_handler(ipc_callid_t iid, ipc_call_t *icall) … … 570 574 } 571 575 572 void *function_get_ops(ddf_fun_t *fun, dev_inferface_idx_t idx)576 static void *function_get_ops(ddf_fun_t *fun, dev_inferface_idx_t idx) 573 577 { 574 578 assert(is_valid_iface_idx(idx)); … … 638 642 639 643 /** Get default handler for client requests */ 640 remote_handler_t *function_get_default_handler(ddf_fun_t *fun)644 static remote_handler_t *function_get_default_handler(ddf_fun_t *fun) 641 645 { 642 646 if (fun->ops == NULL) -
uspace/lib/drv/generic/remote_char_dev.c
r83a2f43 raf6b5157 37 37 38 38 #include "ops/char_dev.h" 39 #include "d river.h"39 #include "ddf/driver.h" 40 40 41 41 #define MAX_CHAR_RW_COUNT 256 -
uspace/lib/drv/generic/remote_hw_res.c
r83a2f43 raf6b5157 37 37 38 38 #include "ops/hw_res.h" 39 #include "d river.h"39 #include "ddf/driver.h" 40 40 41 41 static void remote_hw_res_get_resource_list(ddf_fun_t *, void *, ipc_callid_t, -
uspace/lib/drv/include/ddf/driver.h
r83a2f43 raf6b5157 1 1 /* 2 2 * Copyright (c) 2010 Lenka Trochtova 3 * Copyright (c) 2011 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 33 34 */ 34 35 35 #ifndef LIBDRV_DRIVER_H_36 #define LIBDRV_DRIVER_H_36 #ifndef DDF_DRIVER_H_ 37 #define DDF_DRIVER_H_ 37 38 38 #include <kernel/ddi/irq.h>39 #include <adt/list.h>40 #include <devman.h>41 39 #include <ipc/devman.h> 42 40 #include <ipc/dev_iface.h> 43 #include <assert.h>44 #include <ddi.h>45 #include <libarch/ddi.h>46 #include <fibril_synch.h>47 #include <malloc.h>48 41 49 #include " dev_iface.h"42 #include "../dev_iface.h" 50 43 51 44 typedef struct ddf_dev ddf_dev_t; … … 53 46 54 47 /* 55 * Device class48 * Device 56 49 */ 57 50 … … 80 73 remote_handler_t *default_handler; 81 74 } ddf_dev_ops_t; 82 83 /*84 * Device85 */86 75 87 76 /** Device structure */ … … 160 149 extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int); 161 150 162 extern void *function_get_ops(ddf_fun_t *, dev_inferface_idx_t);163 164 /*165 * Interrupts166 */167 168 typedef void interrupt_handler_t(ddf_dev_t *, ipc_callid_t, ipc_call_t *);169 170 typedef struct interrupt_context {171 int id;172 ddf_dev_t *dev;173 int irq;174 interrupt_handler_t *handler;175 link_t link;176 } interrupt_context_t;177 178 typedef struct interrupt_context_list {179 int curr_id;180 link_t contexts;181 fibril_mutex_t mutex;182 } interrupt_context_list_t;183 184 extern interrupt_context_t *create_interrupt_context(void);185 extern void delete_interrupt_context(interrupt_context_t *);186 extern void init_interrupt_context_list(interrupt_context_list_t *);187 extern void add_interrupt_context(interrupt_context_list_t *,188 interrupt_context_t *);189 extern void remove_interrupt_context(interrupt_context_list_t *,190 interrupt_context_t *);191 extern interrupt_context_t *find_interrupt_context_by_id(192 interrupt_context_list_t *, int);193 extern interrupt_context_t *find_interrupt_context(194 interrupt_context_list_t *, ddf_dev_t *, int);195 196 extern int register_interrupt_handler(ddf_dev_t *, int, interrupt_handler_t *,197 irq_code_t *);198 extern int unregister_interrupt_handler(ddf_dev_t *, int);199 200 extern remote_handler_t *function_get_default_handler(ddf_fun_t *);201 151 extern int ddf_fun_add_to_class(ddf_fun_t *fun, const char *class_name); 202 152 -
uspace/lib/drv/include/ops/char_dev.h
r83a2f43 raf6b5157 36 36 #define LIBDRV_OPS_CHAR_DEV_H_ 37 37 38 #include "../d river.h"38 #include "../ddf/driver.h" 39 39 40 40 typedef struct { -
uspace/lib/drv/include/ops/hw_res.h
r83a2f43 raf6b5157 39 39 #include <sys/types.h> 40 40 41 #include "../d river.h"41 #include "../ddf/driver.h" 42 42 43 43 typedef struct {
Note:
See TracChangeset
for help on using the changeset viewer.