Changeset 26bc0fd1 in mainline
- Timestamp:
- 2013-09-11T17:36:31Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5759975a
- Parents:
- 0a428943
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/infrastructure/rootpc/rootpc.c
r0a428943 r26bc0fd1 51 51 #include <ops/hw_res.h> 52 52 #include <device/hw_res.h> 53 #include <ops/pio_window.h> 54 #include <device/pio_window.h> 53 55 54 56 #define NAME "rootpc" … … 56 58 typedef struct rootpc_fun { 57 59 hw_resource_list_t hw_resources; 60 pio_window_t pio_window; 58 61 } rootpc_fun_t; 59 62 … … 93 96 static rootpc_fun_t pci_data = { 94 97 .hw_resources = { 95 sizeof(pci_conf_regs) /sizeof(pci_conf_regs[0]),98 sizeof(pci_conf_regs) / sizeof(pci_conf_regs[0]), 96 99 pci_conf_regs 100 }, 101 .pio_window = { 102 .mem = { 103 .base = UINT32_C(0), 104 .size = UINT32_C(0xffffffff) /* practical maximum */ 105 }, 106 .io = { 107 .base = UINT32_C(0), 108 .size = UINT32_C(0x10000) 109 } 97 110 } 98 111 }; … … 117 130 118 131 return false; 132 } 133 134 static pio_window_t *rootpc_get_pio_window(ddf_fun_t *fnode) 135 { 136 rootpc_fun_t *fun = rootpc_fun(fnode); 137 138 assert(fun != NULL); 139 return &fun->pio_window; 119 140 } 120 141 … … 122 143 .get_resource_list = &rootpc_get_resources, 123 144 .enable_interrupt = &rootpc_enable_interrupt, 145 }; 146 147 static pio_window_ops_t fun_pio_window_ops = { 148 .get_pio_window = &rootpc_get_pio_window 124 149 }; 125 150 … … 197 222 ddf_log_init(NAME); 198 223 rootpc_fun_ops.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops; 224 rootpc_fun_ops.interfaces[PIO_WINDOW_DEV_IFACE] = &fun_pio_window_ops; 199 225 } 200 226
Note:
See TracChangeset
for help on using the changeset viewer.