Changes in uspace/drv/infrastructure/rootpc/rootpc.c [3e6a98c5:9e470c0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/infrastructure/rootpc/rootpc.c
r3e6a98c5 r9e470c0 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 … … 78 81 .address = 0xCF8, 79 82 .size = 4, 83 .relative = false, 80 84 .endianness = LITTLE_ENDIAN 81 85 } … … 86 90 .address = 0xCFC, 87 91 .size = 4, 92 .relative = false, 88 93 .endianness = LITTLE_ENDIAN 89 94 } … … 93 98 static rootpc_fun_t pci_data = { 94 99 .hw_resources = { 95 sizeof(pci_conf_regs) /sizeof(pci_conf_regs[0]),100 sizeof(pci_conf_regs) / sizeof(pci_conf_regs[0]), 96 101 pci_conf_regs 102 }, 103 .pio_window = { 104 .mem = { 105 .base = UINT32_C(0), 106 .size = UINT32_C(0xffffffff) /* practical maximum */ 107 }, 108 .io = { 109 .base = UINT32_C(0), 110 .size = UINT32_C(0x10000) 111 } 97 112 } 98 113 }; … … 117 132 118 133 return false; 134 } 135 136 static pio_window_t *rootpc_get_pio_window(ddf_fun_t *fnode) 137 { 138 rootpc_fun_t *fun = rootpc_fun(fnode); 139 140 assert(fun != NULL); 141 return &fun->pio_window; 119 142 } 120 143 … … 122 145 .get_resource_list = &rootpc_get_resources, 123 146 .enable_interrupt = &rootpc_enable_interrupt, 147 }; 148 149 static pio_window_ops_t fun_pio_window_ops = { 150 .get_pio_window = &rootpc_get_pio_window 124 151 }; 125 152 … … 197 224 ddf_log_init(NAME); 198 225 rootpc_fun_ops.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops; 226 rootpc_fun_ops.interfaces[PIO_WINDOW_DEV_IFACE] = &fun_pio_window_ops; 199 227 } 200 228
Note:
See TracChangeset
for help on using the changeset viewer.