Changeset 1a11a16 in mainline
- Timestamp:
- 2011-10-21T14:36:34Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 01aef43
- Parents:
- e0f9950
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/isa/isa.c
re0f9950 r1a11a16 52 52 #include <fcntl.h> 53 53 #include <sys/stat.h> 54 #include <ipc/irc.h> 55 #include <ipc/services.h> 56 #include <sysinfo.h> 57 #include <ns.h> 54 58 55 59 #include <ddf/driver.h> … … 96 100 static bool isa_enable_fun_interrupt(ddf_fun_t *fnode) 97 101 { 98 /* TODO */ 99 100 return false; 102 /* This is an old ugly way, copied from pci driver */ 103 assert(fnode); 104 isa_fun_t *isa_fun = fnode->driver_data; 105 106 sysarg_t apic; 107 sysarg_t i8259; 108 109 async_sess_t *irc_sess = NULL; 110 111 if (((sysinfo_get_value("apic", &apic) == EOK) && (apic)) 112 || ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259))) { 113 irc_sess = service_connect_blocking(EXCHANGE_SERIALIZE, 114 SERVICE_IRC, 0, 0); 115 } 116 117 if (!irc_sess) 118 return false; 119 120 assert(isa_fun); 121 hw_resource_list_t *res = &isa_fun->hw_resources; 122 assert(res); 123 for (size_t i = 0; i < res->count; i++) { 124 if (res->resources[i].type == INTERRUPT) { 125 const int irq = res->resources[i].res.interrupt.irq; 126 127 async_exch_t *exch = async_exchange_begin(irc_sess); 128 const int rc = 129 async_req_1_0(exch, IRC_ENABLE_INTERRUPT, irq); 130 async_exchange_end(exch); 131 132 if (rc != EOK) { 133 async_hangup(irc_sess); 134 return false; 135 } 136 } 137 } 138 139 async_hangup(irc_sess); 140 return true; 101 141 } 102 142 … … 590 630 591 631 592 static void isa_init() 632 static void isa_init() 593 633 { 594 634 ddf_log_init(NAME, LVL_ERROR);
Note:
See TracChangeset
for help on using the changeset viewer.