Changes in uspace/drv/bus/isa/isa.c [443695e:3d0fd0d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
r443695e r3d0fd0d 1 1 /* 2 * Copyright (c) 20 24Jiri Svoboda2 * Copyright (c) 2018 Jiri Svoboda 3 3 * Copyright (c) 2010 Lenka Trochtova 4 4 * Copyright (c) 2011 Jan Vesely … … 72 72 #define EBUS_CHILD_FUN_CONF_PATH "/drv/isa/ebus.dev" 73 73 74 #define ISA_MAX_HW_RES 674 #define ISA_MAX_HW_RES 5 75 75 76 76 typedef struct { 77 77 fibril_mutex_t mutex; 78 bool pci_isa_bridge;79 78 uint16_t pci_vendor_id; 80 79 uint16_t pci_device_id; … … 93 92 hw_resource_list_t hw_resources; 94 93 link_t bus_link; 95 isa_bus_t *bus;96 94 } isa_fun_t; 97 95 … … 206 204 } 207 205 208 static errno_t isa_fun_get_flags(ddf_fun_t *fnode, hw_res_flags_t *rflags)209 {210 isa_fun_t *fun = isa_fun(fnode);211 hw_res_flags_t flags;212 213 flags = 0;214 if (fun->bus->pci_isa_bridge)215 flags |= hwf_isa_bridge;216 217 ddf_msg(LVL_NOTE, "isa_fun_get_flags: returning 0x%x", flags);218 *rflags = flags;219 return EOK;220 }221 222 206 static hw_res_ops_t isa_fun_hw_res_ops = { 223 207 .get_resource_list = isa_fun_get_resources, … … 227 211 .dma_channel_setup = isa_fun_setup_dma, 228 212 .dma_channel_remain = isa_fun_remain_dma, 229 .get_flags = isa_fun_get_flags230 213 }; 231 214 … … 281 264 fibril_mutex_initialize(&fun->mutex); 282 265 fun->hw_resources.resources = fun->resources; 283 fun->bus = isa;284 266 285 267 fun->fnode = fnode; … … 761 743 if (rc != EOK) { 762 744 ddf_msg(LVL_NOTE, "Cannot read PCI config. Assuming ISA classic."); 763 isa->pci_isa_bridge = false;764 745 isa->pci_vendor_id = 0; 765 746 isa->pci_device_id = 0; 766 747 isa->pci_class = BASE_CLASS_BRIDGE; 767 748 isa->pci_subclass = SUB_CLASS_BRIDGE_ISA; 768 } else {769 ddf_msg(LVL_NOTE, "ISA Bridge");770 isa->pci_isa_bridge = true;771 749 } 772 750
Note:
See TracChangeset
for help on using the changeset viewer.