Changes in uspace/srv/hw/irc/obio/obio.c [df01d303:9a2eb14] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hw/irc/obio/obio.c
rdf01d303 r9a2eb14 42 42 */ 43 43 44 #include <ipc/services.h>45 44 #include <ipc/irc.h> 46 #include < ns.h>45 #include <loc.h> 47 46 #include <as.h> 48 47 #include <ddi.h> 49 48 #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>57 56 58 57 #define NAME "obio" 59 58 60 #define OBIO_SIZE 0x1898 59 #define OBIO_SIZE 0x1898 61 60 62 61 #define OBIO_IMR_BASE 0x200 … … 97 96 async_answer_0(callid, EOK); 98 97 break; 98 case IRC_DISABLE_INTERRUPT: 99 /* XXX TODO */ 100 async_answer_0(callid, EOK); 101 break; 99 102 case IRC_CLEAR_INTERRUPT: 100 103 inr = IPC_GET_ARG1(call); … … 115 118 static bool obio_init(void) 116 119 { 120 category_id_t irc_cat; 121 service_id_t svc_id; 122 int rc; 123 117 124 base_phys = (uintptr_t) 0x1fe00000000ULL; 118 125 … … 127 134 } 128 135 129 printf("%s: OBIO registers with base at %lx\n", NAME, base_phys);136 printf("%s: OBIO registers with base at 0x%" PRIun "\n", NAME, base_phys); 130 137 131 138 async_set_fallback_port_handler(obio_connection, NULL); 132 service_register(SERVICE_IRC); 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 } 133 165 134 166 return true;
Note:
See TracChangeset
for help on using the changeset viewer.