Changes in uspace/drv/intctl/obio/obio.c [d0cbfd3:c1694b6b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/intctl/obio/obio.c
rd0cbfd3 rc1694b6b 42 42 */ 43 43 44 #include <align.h>45 #include <as.h>46 44 #include <async.h> 47 45 #include <ddf/driver.h> … … 49 47 #include <ddi.h> 50 48 #include <errno.h> 49 #include <str_error.h> 51 50 #include <inttypes.h> 52 51 #include <ipc/irc.h> … … 118 117 { 119 118 ddf_fun_t *fun_a = NULL; 120 int flags;121 int retval;122 119 int rc; 123 120 124 flags = AS_AREA_READ | AS_AREA_WRITE; 125 obio->regs = (ioport64_t *)AS_AREA_ANY; 126 retval = physmem_map(res->base, 127 ALIGN_UP(OBIO_SIZE, PAGE_SIZE) >> PAGE_WIDTH, flags, 128 (void *) &obio->regs); 129 130 if (retval < 0) { 121 rc = pio_enable((void *)res->base, OBIO_SIZE, (void **) &obio->regs); 122 if (rc != EOK) { 131 123 ddf_msg(LVL_ERROR, "Error mapping OBIO registers"); 132 124 rc = EIO; … … 134 126 } 135 127 136 ddf_msg(LVL_NOTE, "OBIO registers with base at 0x%" PRI un, res->base);128 ddf_msg(LVL_NOTE, "OBIO registers with base at 0x%" PRIxn, res->base); 137 129 138 130 fun_a = ddf_fun_create(obio->dev, fun_exposed, "a"); … … 147 139 rc = ddf_fun_bind(fun_a); 148 140 if (rc != EOK) { 149 ddf_msg(LVL_ERROR, "Failed binding function 'a' . (%d)", rc);141 ddf_msg(LVL_ERROR, "Failed binding function 'a': %s", str_error(rc)); 150 142 goto error; 151 143 }
Note:
See TracChangeset
for help on using the changeset viewer.