Changes in uspace/srv/hw/irc/obio/obio.c [9a2eb14:df01d303] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/irc/obio/obio.c
r9a2eb14 rdf01d303 42 42 */ 43 43 44 #include <ipc/services.h> 44 45 #include <ipc/irc.h> 45 #include < loc.h>46 #include <ns.h> 46 47 #include <as.h> 47 48 #include <ddi.h> 48 49 #include <align.h> 49 #include <inttypes.h>50 50 #include <stdbool.h> 51 51 #include <errno.h> … … 54 54 #include <async.h> 55 55 #include <stdio.h> 56 #include <ipc/loc.h> 56 57 57 58 #define NAME "obio" 58 59 59 #define OBIO_SIZE 0x1898 60 #define OBIO_SIZE 0x1898 60 61 61 62 #define OBIO_IMR_BASE 0x200 … … 96 97 async_answer_0(callid, EOK); 97 98 break; 98 case IRC_DISABLE_INTERRUPT:99 /* XXX TODO */100 async_answer_0(callid, EOK);101 break;102 99 case IRC_CLEAR_INTERRUPT: 103 100 inr = IPC_GET_ARG1(call); … … 118 115 static bool obio_init(void) 119 116 { 120 category_id_t irc_cat;121 service_id_t svc_id;122 int rc;123 124 117 base_phys = (uintptr_t) 0x1fe00000000ULL; 125 118 … … 134 127 } 135 128 136 printf("%s: OBIO registers with base at 0x%" PRIun "\n", NAME, base_phys);129 printf("%s: OBIO registers with base at %lx\n", NAME, base_phys); 137 130 138 131 async_set_fallback_port_handler(obio_connection, NULL); 139 140 rc = loc_server_register(NAME); 141 if (rc != EOK) { 142 printf("%s: Failed registering server. (%d)\n", NAME, rc); 143 return false; 144 } 145 146 rc = loc_service_register("irc/" NAME, &svc_id); 147 if (rc != EOK) { 148 printf("%s: Failed registering service. (%d)\n", NAME, rc); 149 return false; 150 } 151 152 rc = loc_category_get_id("irc", &irc_cat, IPC_FLAG_BLOCKING); 153 if (rc != EOK) { 154 printf("%s: Failed resolving category 'iplink' (%d).\n", NAME, 155 rc); 156 return false; 157 } 158 159 rc = loc_service_add_to_cat(svc_id, irc_cat); 160 if (rc != EOK) { 161 printf("%s: Failed adding service to category (%d).\n", NAME, 162 rc); 163 return false; 164 } 132 service_register(SERVICE_IRC); 165 133 166 134 return true;
Note:
See TracChangeset
for help on using the changeset viewer.