Changes in uspace/drv/pciintel/pci.c [dc75234:40a5d40] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/pciintel/pci.c
rdc75234 r40a5d40 127 127 } 128 128 129 static int pci_config_space_write_16(ddf_fun_t *fun, uint32_t address, uint16_t data) 129 static int pci_config_space_write_32( 130 ddf_fun_t *fun, uint32_t address, uint32_t data) 131 { 132 if (address > 252) 133 return EINVAL; 134 pci_conf_write_32(PCI_FUN(fun), address, data); 135 return EOK; 136 } 137 138 static int pci_config_space_write_16( 139 ddf_fun_t *fun, uint32_t address, uint16_t data) 130 140 { 131 141 if (address > 254) … … 135 145 } 136 146 147 static int pci_config_space_write_8( 148 ddf_fun_t *fun, uint32_t address, uint8_t data) 149 { 150 if (address > 255) 151 return EINVAL; 152 pci_conf_write_8(PCI_FUN(fun), address, data); 153 return EOK; 154 } 155 156 static int pci_config_space_read_32( 157 ddf_fun_t *fun, uint32_t address, uint32_t *data) 158 { 159 if (address > 252) 160 return EINVAL; 161 *data = pci_conf_read_32(PCI_FUN(fun), address); 162 return EOK; 163 } 164 165 static int pci_config_space_read_16( 166 ddf_fun_t *fun, uint32_t address, uint16_t *data) 167 { 168 if (address > 254) 169 return EINVAL; 170 *data = pci_conf_read_16(PCI_FUN(fun), address); 171 return EOK; 172 } 173 174 static int pci_config_space_read_8( 175 ddf_fun_t *fun, uint32_t address, uint8_t *data) 176 { 177 if (address > 255) 178 return EINVAL; 179 *data = pci_conf_read_8(PCI_FUN(fun), address); 180 return EOK; 181 } 137 182 138 183 static hw_res_ops_t pciintel_hw_res_ops = { … … 142 187 143 188 static pci_dev_iface_t pci_dev_ops = { 144 .config_space_read_8 = NULL,145 .config_space_read_16 = NULL,146 .config_space_read_32 = NULL,147 .config_space_write_8 = NULL,189 .config_space_read_8 = &pci_config_space_read_8, 190 .config_space_read_16 = &pci_config_space_read_16, 191 .config_space_read_32 = &pci_config_space_read_32, 192 .config_space_write_8 = &pci_config_space_write_8, 148 193 .config_space_write_16 = &pci_config_space_write_16, 149 .config_space_write_32 = NULL194 .config_space_write_32 = &pci_config_space_write_32 150 195 }; 151 196
Note:
See TracChangeset
for help on using the changeset viewer.