Changeset b7fd2a0 in mainline for uspace/drv/intctl
- 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/intctl
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/intctl/apic/apic.c
r36f0738 rb7fd2a0 140 140 } 141 141 142 static int apic_enable_irq(apic_t *apic, sysarg_t irq)142 static errno_t apic_enable_irq(apic_t *apic, sysarg_t irq) 143 143 { 144 144 io_redirection_reg_t reg; … … 207 207 208 208 /** Add APIC device. */ 209 int apic_add(apic_t *apic, apic_res_t *res)209 errno_t apic_add(apic_t *apic, apic_res_t *res) 210 210 { 211 211 sysarg_t have_apic; 212 212 ddf_fun_t *fun_a = NULL; 213 213 void *regs; 214 int rc;214 errno_t rc; 215 215 216 216 if ((sysinfo_get_value("apic", &have_apic) != EOK) || (!have_apic)) { … … 254 254 255 255 /** Remove APIC device */ 256 int apic_remove(apic_t *apic)256 errno_t apic_remove(apic_t *apic) 257 257 { 258 258 return ENOTSUP; … … 260 260 261 261 /** APIC device gone */ 262 int apic_gone(apic_t *apic)262 errno_t apic_gone(apic_t *apic) 263 263 { 264 264 return ENOTSUP; -
uspace/drv/intctl/apic/apic.h
r36f0738 rb7fd2a0 52 52 } apic_t; 53 53 54 extern int apic_add(apic_t *, apic_res_t *);55 extern int apic_remove(apic_t *);56 extern int apic_gone(apic_t *);54 extern errno_t apic_add(apic_t *, apic_res_t *); 55 extern errno_t apic_remove(apic_t *); 56 extern errno_t apic_gone(apic_t *); 57 57 58 58 #endif -
uspace/drv/intctl/apic/main.c
r36f0738 rb7fd2a0 43 43 #define NAME "apic" 44 44 45 static int apic_dev_add(ddf_dev_t *dev);46 static int apic_dev_remove(ddf_dev_t *dev);47 static int apic_dev_gone(ddf_dev_t *dev);48 static int apic_fun_online(ddf_fun_t *fun);49 static int apic_fun_offline(ddf_fun_t *fun);45 static errno_t apic_dev_add(ddf_dev_t *dev); 46 static errno_t apic_dev_remove(ddf_dev_t *dev); 47 static errno_t apic_dev_gone(ddf_dev_t *dev); 48 static errno_t apic_fun_online(ddf_fun_t *fun); 49 static errno_t apic_fun_offline(ddf_fun_t *fun); 50 50 51 51 static driver_ops_t driver_ops = { … … 62 62 }; 63 63 64 static int apic_get_res(ddf_dev_t *dev, apic_res_t *res)64 static errno_t apic_get_res(ddf_dev_t *dev, apic_res_t *res) 65 65 { 66 66 async_sess_t *parent_sess; 67 67 hw_res_list_parsed_t hw_res; 68 int rc;68 errno_t rc; 69 69 70 70 parent_sess = ddf_dev_parent_sess_get(dev); … … 90 90 } 91 91 92 static int apic_dev_add(ddf_dev_t *dev)92 static errno_t apic_dev_add(ddf_dev_t *dev) 93 93 { 94 94 apic_t *apic; 95 95 apic_res_t apic_res; 96 int rc;96 errno_t rc; 97 97 98 98 ddf_msg(LVL_DEBUG, "apic_dev_add(%p)", dev); … … 114 114 } 115 115 116 static int apic_dev_remove(ddf_dev_t *dev)116 static errno_t apic_dev_remove(ddf_dev_t *dev) 117 117 { 118 118 apic_t *apic = (apic_t *)ddf_dev_data_get(dev); … … 123 123 } 124 124 125 static int apic_dev_gone(ddf_dev_t *dev)125 static errno_t apic_dev_gone(ddf_dev_t *dev) 126 126 { 127 127 apic_t *apic = (apic_t *)ddf_dev_data_get(dev); … … 132 132 } 133 133 134 static int apic_fun_online(ddf_fun_t *fun)134 static errno_t apic_fun_online(ddf_fun_t *fun) 135 135 { 136 136 ddf_msg(LVL_DEBUG, "apic_fun_online()"); … … 138 138 } 139 139 140 static int apic_fun_offline(ddf_fun_t *fun)140 static errno_t apic_fun_offline(ddf_fun_t *fun) 141 141 { 142 142 ddf_msg(LVL_DEBUG, "apic_fun_offline()"); -
uspace/drv/intctl/i8259/i8259.c
r36f0738 rb7fd2a0 64 64 #define PIC_MAX_IRQ 15 65 65 66 static int pic_enable_irq(i8259_t *i8259, sysarg_t irq)66 static errno_t pic_enable_irq(i8259_t *i8259, sysarg_t irq) 67 67 { 68 68 if (irq > PIC_MAX_IRQ) … … 136 136 137 137 /** Add i8259 device. */ 138 int i8259_add(i8259_t *i8259, i8259_res_t *res)138 errno_t i8259_add(i8259_t *i8259, i8259_res_t *res) 139 139 { 140 140 sysarg_t have_i8259; … … 142 142 ioport8_t *regs1; 143 143 ddf_fun_t *fun_a = NULL; 144 int rc;144 errno_t rc; 145 145 146 146 if ((sysinfo_get_value("i8259", &have_i8259) != EOK) || (!have_i8259)) { … … 187 187 188 188 /** Remove i8259 device */ 189 int i8259_remove(i8259_t *i8259)189 errno_t i8259_remove(i8259_t *i8259) 190 190 { 191 191 return ENOTSUP; … … 193 193 194 194 /** i8259 device gone */ 195 int i8259_gone(i8259_t *i8259)195 errno_t i8259_gone(i8259_t *i8259) 196 196 { 197 197 return ENOTSUP; -
uspace/drv/intctl/i8259/i8259.h
r36f0738 rb7fd2a0 52 52 } i8259_t; 53 53 54 extern int i8259_add(i8259_t *, i8259_res_t *);55 extern int i8259_remove(i8259_t *);56 extern int i8259_gone(i8259_t *);54 extern errno_t i8259_add(i8259_t *, i8259_res_t *); 55 extern errno_t i8259_remove(i8259_t *); 56 extern errno_t i8259_gone(i8259_t *); 57 57 58 58 #endif -
uspace/drv/intctl/i8259/main.c
r36f0738 rb7fd2a0 43 43 #define NAME "i8259" 44 44 45 static int i8259_dev_add(ddf_dev_t *dev);46 static int i8259_dev_remove(ddf_dev_t *dev);47 static int i8259_dev_gone(ddf_dev_t *dev);48 static int i8259_fun_online(ddf_fun_t *fun);49 static int i8259_fun_offline(ddf_fun_t *fun);45 static errno_t i8259_dev_add(ddf_dev_t *dev); 46 static errno_t i8259_dev_remove(ddf_dev_t *dev); 47 static errno_t i8259_dev_gone(ddf_dev_t *dev); 48 static errno_t i8259_fun_online(ddf_fun_t *fun); 49 static errno_t i8259_fun_offline(ddf_fun_t *fun); 50 50 51 51 static driver_ops_t driver_ops = { … … 62 62 }; 63 63 64 static int i8259_get_res(ddf_dev_t *dev, i8259_res_t *res)64 static errno_t i8259_get_res(ddf_dev_t *dev, i8259_res_t *res) 65 65 { 66 66 async_sess_t *parent_sess; 67 67 hw_res_list_parsed_t hw_res; 68 int rc;68 errno_t rc; 69 69 70 70 parent_sess = ddf_dev_parent_sess_get(dev); … … 91 91 } 92 92 93 static int i8259_dev_add(ddf_dev_t *dev)93 static errno_t i8259_dev_add(ddf_dev_t *dev) 94 94 { 95 95 i8259_t *i8259; 96 96 i8259_res_t i8259_res; 97 int rc;97 errno_t rc; 98 98 99 99 ddf_msg(LVL_DEBUG, "i8259_dev_add(%p)", dev); … … 115 115 } 116 116 117 static int i8259_dev_remove(ddf_dev_t *dev)117 static errno_t i8259_dev_remove(ddf_dev_t *dev) 118 118 { 119 119 i8259_t *i8259 = (i8259_t *)ddf_dev_data_get(dev); … … 124 124 } 125 125 126 static int i8259_dev_gone(ddf_dev_t *dev)126 static errno_t i8259_dev_gone(ddf_dev_t *dev) 127 127 { 128 128 i8259_t *i8259 = (i8259_t *)ddf_dev_data_get(dev); … … 133 133 } 134 134 135 static int i8259_fun_online(ddf_fun_t *fun)135 static errno_t i8259_fun_online(ddf_fun_t *fun) 136 136 { 137 137 ddf_msg(LVL_DEBUG, "i8259_fun_online()"); … … 139 139 } 140 140 141 static int i8259_fun_offline(ddf_fun_t *fun)141 static errno_t i8259_fun_offline(ddf_fun_t *fun) 142 142 { 143 143 ddf_msg(LVL_DEBUG, "i8259_fun_offline()"); -
uspace/drv/intctl/icp-ic/icp-ic.c
r36f0738 rb7fd2a0 52 52 }; 53 53 54 static int icpic_enable_irq(icpic_t *icpic, sysarg_t irq)54 static errno_t icpic_enable_irq(icpic_t *icpic, sysarg_t irq) 55 55 { 56 56 if (irq > icpic_max_irq) … … 112 112 113 113 /** Add icp-ic device. */ 114 int icpic_add(icpic_t *icpic, icpic_res_t *res)114 errno_t icpic_add(icpic_t *icpic, icpic_res_t *res) 115 115 { 116 116 ddf_fun_t *fun_a = NULL; 117 117 void *regs; 118 int rc;118 errno_t rc; 119 119 120 120 rc = pio_enable((void *)res->base, sizeof(icpic_regs_t), ®s); … … 153 153 154 154 /** Remove icp-ic device */ 155 int icpic_remove(icpic_t *icpic)155 errno_t icpic_remove(icpic_t *icpic) 156 156 { 157 157 return ENOTSUP; … … 159 159 160 160 /** icp-ic device gone */ 161 int icpic_gone(icpic_t *icpic)161 errno_t icpic_gone(icpic_t *icpic) 162 162 { 163 163 return ENOTSUP; -
uspace/drv/intctl/icp-ic/icp-ic.h
r36f0738 rb7fd2a0 53 53 } icpic_t; 54 54 55 extern int icpic_add(icpic_t *, icpic_res_t *);56 extern int icpic_remove(icpic_t *);57 extern int icpic_gone(icpic_t *);55 extern errno_t icpic_add(icpic_t *, icpic_res_t *); 56 extern errno_t icpic_remove(icpic_t *); 57 extern errno_t icpic_gone(icpic_t *); 58 58 59 59 #endif -
uspace/drv/intctl/icp-ic/main.c
r36f0738 rb7fd2a0 43 43 #define NAME "icp-ic" 44 44 45 static int icpic_dev_add(ddf_dev_t *dev);46 static int icpic_dev_remove(ddf_dev_t *dev);47 static int icpic_dev_gone(ddf_dev_t *dev);48 static int icpic_fun_online(ddf_fun_t *fun);49 static int icpic_fun_offline(ddf_fun_t *fun);45 static errno_t icpic_dev_add(ddf_dev_t *dev); 46 static errno_t icpic_dev_remove(ddf_dev_t *dev); 47 static errno_t icpic_dev_gone(ddf_dev_t *dev); 48 static errno_t icpic_fun_online(ddf_fun_t *fun); 49 static errno_t icpic_fun_offline(ddf_fun_t *fun); 50 50 51 51 static driver_ops_t driver_ops = { … … 62 62 }; 63 63 64 static int icpic_get_res(ddf_dev_t *dev, icpic_res_t *res)64 static errno_t icpic_get_res(ddf_dev_t *dev, icpic_res_t *res) 65 65 { 66 66 async_sess_t *parent_sess; 67 67 hw_res_list_parsed_t hw_res; 68 int rc;68 errno_t rc; 69 69 70 70 parent_sess = ddf_dev_parent_sess_get(dev); … … 90 90 } 91 91 92 static int icpic_dev_add(ddf_dev_t *dev)92 static errno_t icpic_dev_add(ddf_dev_t *dev) 93 93 { 94 94 icpic_t *icpic; 95 95 icpic_res_t icpic_res; 96 int rc;96 errno_t rc; 97 97 98 98 ddf_msg(LVL_DEBUG, "icpic_dev_add(%p)", dev); … … 114 114 } 115 115 116 static int icpic_dev_remove(ddf_dev_t *dev)116 static errno_t icpic_dev_remove(ddf_dev_t *dev) 117 117 { 118 118 icpic_t *icpic = (icpic_t *)ddf_dev_data_get(dev); … … 123 123 } 124 124 125 static int icpic_dev_gone(ddf_dev_t *dev)125 static errno_t icpic_dev_gone(ddf_dev_t *dev) 126 126 { 127 127 icpic_t *icpic = (icpic_t *)ddf_dev_data_get(dev); … … 132 132 } 133 133 134 static int icpic_fun_online(ddf_fun_t *fun)134 static errno_t icpic_fun_online(ddf_fun_t *fun) 135 135 { 136 136 ddf_msg(LVL_DEBUG, "icpic_fun_online()"); … … 138 138 } 139 139 140 static int icpic_fun_offline(ddf_fun_t *fun)140 static errno_t icpic_fun_offline(ddf_fun_t *fun) 141 141 { 142 142 ddf_msg(LVL_DEBUG, "icpic_fun_offline()"); -
uspace/drv/intctl/obio/main.c
r36f0738 rb7fd2a0 43 43 #define NAME "obio" 44 44 45 static int obio_dev_add(ddf_dev_t *dev);46 static int obio_dev_remove(ddf_dev_t *dev);47 static int obio_dev_gone(ddf_dev_t *dev);48 static int obio_fun_online(ddf_fun_t *fun);49 static int obio_fun_offline(ddf_fun_t *fun);45 static errno_t obio_dev_add(ddf_dev_t *dev); 46 static errno_t obio_dev_remove(ddf_dev_t *dev); 47 static errno_t obio_dev_gone(ddf_dev_t *dev); 48 static errno_t obio_fun_online(ddf_fun_t *fun); 49 static errno_t obio_fun_offline(ddf_fun_t *fun); 50 50 51 51 static driver_ops_t driver_ops = { … … 62 62 }; 63 63 64 static int obio_get_res(ddf_dev_t *dev, obio_res_t *res)64 static errno_t obio_get_res(ddf_dev_t *dev, obio_res_t *res) 65 65 { 66 66 async_sess_t *parent_sess; 67 67 hw_res_list_parsed_t hw_res; 68 int rc;68 errno_t rc; 69 69 70 70 parent_sess = ddf_dev_parent_sess_get(dev); … … 90 90 } 91 91 92 static int obio_dev_add(ddf_dev_t *dev)92 static errno_t obio_dev_add(ddf_dev_t *dev) 93 93 { 94 94 obio_t *obio; 95 95 obio_res_t obio_res; 96 int rc;96 errno_t rc; 97 97 98 98 ddf_msg(LVL_DEBUG, "obio_dev_add(%p)", dev); … … 114 114 } 115 115 116 static int obio_dev_remove(ddf_dev_t *dev)116 static errno_t obio_dev_remove(ddf_dev_t *dev) 117 117 { 118 118 obio_t *obio = (obio_t *)ddf_dev_data_get(dev); … … 123 123 } 124 124 125 static int obio_dev_gone(ddf_dev_t *dev)125 static errno_t obio_dev_gone(ddf_dev_t *dev) 126 126 { 127 127 obio_t *obio = (obio_t *)ddf_dev_data_get(dev); … … 132 132 } 133 133 134 static int obio_fun_online(ddf_fun_t *fun)134 static errno_t obio_fun_online(ddf_fun_t *fun) 135 135 { 136 136 ddf_msg(LVL_DEBUG, "obio_fun_online()"); … … 138 138 } 139 139 140 static int obio_fun_offline(ddf_fun_t *fun)140 static errno_t obio_fun_offline(ddf_fun_t *fun) 141 141 { 142 142 ddf_msg(LVL_DEBUG, "obio_fun_offline()"); -
uspace/drv/intctl/obio/obio.c
r36f0738 rb7fd2a0 114 114 115 115 /** Add OBIO device. */ 116 int obio_add(obio_t *obio, obio_res_t *res)116 errno_t obio_add(obio_t *obio, obio_res_t *res) 117 117 { 118 118 ddf_fun_t *fun_a = NULL; 119 int rc;119 errno_t rc; 120 120 121 121 rc = pio_enable((void *)res->base, OBIO_SIZE, (void **) &obio->regs); … … 155 155 156 156 /** Remove OBIO device */ 157 int obio_remove(obio_t *obio)157 errno_t obio_remove(obio_t *obio) 158 158 { 159 159 return ENOTSUP; … … 161 161 162 162 /** OBIO device gone */ 163 int obio_gone(obio_t *obio)163 errno_t obio_gone(obio_t *obio) 164 164 { 165 165 return ENOTSUP; -
uspace/drv/intctl/obio/obio.h
r36f0738 rb7fd2a0 52 52 } obio_t; 53 53 54 extern int obio_add(obio_t *, obio_res_t *);55 extern int obio_remove(obio_t *);56 extern int obio_gone(obio_t *);54 extern errno_t obio_add(obio_t *, obio_res_t *); 55 extern errno_t obio_remove(obio_t *); 56 extern errno_t obio_gone(obio_t *); 57 57 58 58 #endif
Note:
See TracChangeset
for help on using the changeset viewer.