Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/irc/obio/obio.c

    r9a2eb14 rdf01d303  
    4242 */
    4343
     44#include <ipc/services.h>
    4445#include <ipc/irc.h>
    45 #include <loc.h>
     46#include <ns.h>
    4647#include <as.h>
    4748#include <ddi.h>
    4849#include <align.h>
    49 #include <inttypes.h>
    5050#include <stdbool.h>
    5151#include <errno.h>
     
    5454#include <async.h>
    5555#include <stdio.h>
     56#include <ipc/loc.h>
    5657
    5758#define NAME "obio"
    5859
    59 #define OBIO_SIZE       0x1898
     60#define OBIO_SIZE       0x1898 
    6061
    6162#define OBIO_IMR_BASE   0x200
     
    9697                        async_answer_0(callid, EOK);
    9798                        break;
    98                 case IRC_DISABLE_INTERRUPT:
    99                         /* XXX TODO */
    100                         async_answer_0(callid, EOK);
    101                         break;
    10299                case IRC_CLEAR_INTERRUPT:
    103100                        inr = IPC_GET_ARG1(call);
     
    118115static bool obio_init(void)
    119116{
    120         category_id_t irc_cat;
    121         service_id_t svc_id;
    122         int rc;
    123        
    124117        base_phys = (uintptr_t) 0x1fe00000000ULL;
    125118       
     
    134127        }
    135128       
    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);
    137130       
    138131        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);
    165133       
    166134        return true;
Note: See TracChangeset for help on using the changeset viewer.