Changes in uspace/drv/platform/sun4v/sun4v.c [f4cfd271:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/platform/sun4v/sun4v.c
rf4cfd271 rb7fd2a0 41 41 #include <ddf/log.h> 42 42 #include <errno.h> 43 #include <str_error.h> 43 44 #include <ops/hw_res.h> 44 45 #include <ops/pio_window.h> … … 54 55 } sun4v_fun_t; 55 56 56 static int sun4v_dev_add(ddf_dev_t *dev);57 static errno_t sun4v_dev_add(ddf_dev_t *dev); 57 58 58 59 static driver_ops_t sun4v_ops = { … … 113 114 } 114 115 115 static int sun4v_enable_interrupt(ddf_fun_t *fun, int irq)116 { 117 return true;116 static errno_t sun4v_enable_interrupt(ddf_fun_t *fun, int irq) 117 { 118 return EOK; 118 119 } 119 120 … … 137 138 static ddf_dev_ops_t sun4v_fun_ops; 138 139 139 static int sun4v_add_fun(ddf_dev_t *dev, const char *name,140 static errno_t sun4v_add_fun(ddf_dev_t *dev, const char *name, 140 141 const char *str_match_id, sun4v_fun_t *fun_proto) 141 142 { … … 143 144 144 145 ddf_fun_t *fnode = NULL; 145 int rc;146 errno_t rc; 146 147 147 148 /* Create new device. */ … … 187 188 } 188 189 189 static int sun4v_add_functions(ddf_dev_t *dev)190 { 191 int rc;190 static errno_t sun4v_add_functions(ddf_dev_t *dev) 191 { 192 errno_t rc; 192 193 193 194 rc = sun4v_add_fun(dev, "console", "sun4v/console", &console_data); … … 199 200 200 201 /** Add device. */ 201 static int sun4v_dev_add(ddf_dev_t *dev)202 static errno_t sun4v_dev_add(ddf_dev_t *dev) 202 203 { 203 204 ddf_msg(LVL_DEBUG, "sun4v_dev_add, device handle = %d", … … 212 213 } 213 214 214 static int sun4v_init(void)215 { 216 int rc;215 static errno_t sun4v_init(void) 216 { 217 errno_t rc; 217 218 sysarg_t paddr; 218 219 … … 228 229 rc = sysinfo_get_value("niagara.inbuf.address", &paddr); 229 230 if (rc != EOK) { 230 ddf_msg(LVL_ERROR, "niagara.inbuf.address not set (%d)", rc);231 ddf_msg(LVL_ERROR, "niagara.inbuf.address not set: %s", str_error(rc)); 231 232 return rc; 232 233 } … … 236 237 rc = sysinfo_get_value("niagara.outbuf.address", &paddr); 237 238 if (rc != EOK) { 238 ddf_msg(LVL_ERROR, "niagara.outbuf.address not set (%d)", rc);239 ddf_msg(LVL_ERROR, "niagara.outbuf.address not set: %s", str_error(rc)); 239 240 return rc; 240 241 } … … 246 247 int main(int argc, char *argv[]) 247 248 { 248 int rc;249 errno_t rc; 249 250 250 251 printf(NAME ": Sun4v platform driver\n");
Note:
See TracChangeset
for help on using the changeset viewer.