Changeset b7fd2a0 in mainline for uspace/drv/char/sun4v-con
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/drv/char/sun4v-con
- Files:
-
- 3 edited
-
main.c (modified) (7 diffs)
-
sun4v-con.c (modified) (6 diffs)
-
sun4v-con.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/char/sun4v-con/main.c
r36f0738 rb7fd2a0 40 40 #define NAME "sun4v-con" 41 41 42 static int sun4v_con_dev_add(ddf_dev_t *dev);43 static int sun4v_con_dev_remove(ddf_dev_t *dev);44 static int sun4v_con_dev_gone(ddf_dev_t *dev);45 static int sun4v_con_fun_online(ddf_fun_t *fun);46 static int sun4v_con_fun_offline(ddf_fun_t *fun);42 static errno_t sun4v_con_dev_add(ddf_dev_t *dev); 43 static errno_t sun4v_con_dev_remove(ddf_dev_t *dev); 44 static errno_t sun4v_con_dev_gone(ddf_dev_t *dev); 45 static errno_t sun4v_con_fun_online(ddf_fun_t *fun); 46 static errno_t sun4v_con_fun_offline(ddf_fun_t *fun); 47 47 48 48 static driver_ops_t driver_ops = { … … 59 59 }; 60 60 61 static int sun4v_con_get_res(ddf_dev_t *dev, sun4v_con_res_t *res)61 static errno_t sun4v_con_get_res(ddf_dev_t *dev, sun4v_con_res_t *res) 62 62 { 63 63 async_sess_t *parent_sess; 64 64 hw_res_list_parsed_t hw_res; 65 int rc;65 errno_t rc; 66 66 67 67 parent_sess = ddf_dev_parent_sess_get(dev); … … 88 88 89 89 90 static int sun4v_con_dev_add(ddf_dev_t *dev)90 static errno_t sun4v_con_dev_add(ddf_dev_t *dev) 91 91 { 92 92 sun4v_con_t *sun4v_con; 93 93 sun4v_con_res_t res; 94 int rc;94 errno_t rc; 95 95 96 96 ddf_msg(LVL_DEBUG, "sun4v_con_dev_add(%p)", dev); … … 112 112 } 113 113 114 static int sun4v_con_dev_remove(ddf_dev_t *dev)114 static errno_t sun4v_con_dev_remove(ddf_dev_t *dev) 115 115 { 116 116 sun4v_con_t *sun4v_con = (sun4v_con_t *)ddf_dev_data_get(dev); … … 121 121 } 122 122 123 static int sun4v_con_dev_gone(ddf_dev_t *dev)123 static errno_t sun4v_con_dev_gone(ddf_dev_t *dev) 124 124 { 125 125 sun4v_con_t *sun4v_con = (sun4v_con_t *)ddf_dev_data_get(dev); … … 130 130 } 131 131 132 static int sun4v_con_fun_online(ddf_fun_t *fun)132 static errno_t sun4v_con_fun_online(ddf_fun_t *fun) 133 133 { 134 134 ddf_msg(LVL_DEBUG, "sun4v_con_fun_online()"); … … 136 136 } 137 137 138 static int sun4v_con_fun_offline(ddf_fun_t *fun)138 static errno_t sun4v_con_fun_offline(ddf_fun_t *fun) 139 139 { 140 140 ddf_msg(LVL_DEBUG, "sun4v_con_fun_offline()"); -
uspace/drv/char/sun4v-con/sun4v-con.c
r36f0738 rb7fd2a0 46 46 #define POLL_INTERVAL 10000 47 47 48 static int sun4v_con_read(chardev_srv_t *, void *, size_t, size_t *);49 static int sun4v_con_write(chardev_srv_t *, const void *, size_t, size_t *);48 static errno_t sun4v_con_read(chardev_srv_t *, void *, size_t, size_t *); 49 static errno_t sun4v_con_write(chardev_srv_t *, const void *, size_t, size_t *); 50 50 51 51 static chardev_ops_t sun4v_con_chardev_ops = { … … 69 69 70 70 /** Add sun4v console device. */ 71 int sun4v_con_add(sun4v_con_t *con, sun4v_con_res_t *res)71 errno_t sun4v_con_add(sun4v_con_t *con, sun4v_con_res_t *res) 72 72 { 73 73 ddf_fun_t *fun = NULL; 74 int rc;74 errno_t rc; 75 75 76 76 con->res = *res; … … 129 129 130 130 /** Remove sun4v console device */ 131 int sun4v_con_remove(sun4v_con_t *con)131 errno_t sun4v_con_remove(sun4v_con_t *con) 132 132 { 133 133 return ENOTSUP; … … 135 135 136 136 /** Msim console device gone */ 137 int sun4v_con_gone(sun4v_con_t *con)137 errno_t sun4v_con_gone(sun4v_con_t *con) 138 138 { 139 139 return ENOTSUP; … … 141 141 142 142 /** Read from Sun4v console device */ 143 static int sun4v_con_read(chardev_srv_t *srv, void *buf, size_t size,143 static errno_t sun4v_con_read(chardev_srv_t *srv, void *buf, size_t size, 144 144 size_t *nread) 145 145 { … … 165 165 166 166 /** Write to Sun4v console device */ 167 static int sun4v_con_write(chardev_srv_t *srv, const void *data, size_t size,167 static errno_t sun4v_con_write(chardev_srv_t *srv, const void *data, size_t size, 168 168 size_t *nwr) 169 169 { -
uspace/drv/char/sun4v-con/sun4v-con.h
r36f0738 rb7fd2a0 62 62 } sun4v_con_t; 63 63 64 extern int sun4v_con_add(sun4v_con_t *, sun4v_con_res_t *);65 extern int sun4v_con_remove(sun4v_con_t *);66 extern int sun4v_con_gone(sun4v_con_t *);64 extern errno_t sun4v_con_add(sun4v_con_t *, sun4v_con_res_t *); 65 extern errno_t sun4v_con_remove(sun4v_con_t *); 66 extern errno_t sun4v_con_gone(sun4v_con_t *); 67 67 68 68 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
