Changeset 832cbe7 in mainline for uspace/lib/drv/generic/remote_hw_res.c
- Timestamp:
- 2025-02-05T12:30:20Z (9 days ago)
- Branches:
- master
- Children:
- accdf882
- Parents:
- 0dab4850
- git-author:
- Jiri Svoboda <jiri@…> (2025-02-04 21:30:06)
- git-committer:
- Jiri Svoboda <jiri@…> (2025-02-05 12:30:20)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_hw_res.c
r0dab4850 r832cbe7 1 1 /* 2 * Copyright (c) 202 4Jiri Svoboda2 * Copyright (c) 2025 Jiri Svoboda 3 3 * Copyright (c) 2010 Lenka Trochtova 4 4 * Copyright (c) 2011 Jan Vesely … … 48 48 static void remote_hw_res_dma_channel_setup(ddf_fun_t *, void *, ipc_call_t *); 49 49 static void remote_hw_res_dma_channel_remain(ddf_fun_t *, void *, ipc_call_t *); 50 static void remote_hw_res_get_flags(ddf_fun_t *, void *, ipc_call_t *); 50 static void remote_hw_res_query_legacy_io(ddf_fun_t *, void *, ipc_call_t *); 51 static void remote_hw_res_claim_legacy_io(ddf_fun_t *, void *, ipc_call_t *); 51 52 52 53 static const remote_iface_func_ptr_t remote_hw_res_iface_ops [] = { … … 57 58 [HW_RES_DMA_CHANNEL_SETUP] = &remote_hw_res_dma_channel_setup, 58 59 [HW_RES_DMA_CHANNEL_REMAIN] = &remote_hw_res_dma_channel_remain, 59 [HW_RES_GET_FLAGS] = &remote_hw_res_get_flags 60 [HW_RES_QUERY_LEGACY_IO] = &remote_hw_res_query_legacy_io, 61 [HW_RES_CLAIM_LEGACY_IO] = &remote_hw_res_claim_legacy_io 60 62 }; 61 63 … … 174 176 } 175 177 176 static void remote_hw_res_get_flags(ddf_fun_t *fun, void *ops, 177 ipc_call_t *call) 178 { 179 hw_res_ops_t *hw_res_ops = ops; 180 181 if (hw_res_ops->get_flags == NULL) { 182 async_answer_0(call, ENOTSUP); 183 return; 184 } 185 186 hw_res_flags_t flags = 0; 187 const errno_t ret = hw_res_ops->get_flags(fun, &flags); 188 async_answer_1(call, ret, flags); 178 static void remote_hw_res_query_legacy_io(ddf_fun_t *fun, void *ops, 179 ipc_call_t *call) 180 { 181 hw_res_ops_t *hw_res_ops = ops; 182 183 if (hw_res_ops->query_legacy_io == NULL) { 184 async_answer_0(call, ENOTSUP); 185 return; 186 } 187 188 hw_res_claims_t claims = 0; 189 const errno_t ret = hw_res_ops->query_legacy_io(fun, &claims); 190 async_answer_1(call, ret, claims); 191 } 192 193 static void remote_hw_res_claim_legacy_io(ddf_fun_t *fun, void *ops, 194 ipc_call_t *call) 195 { 196 hw_res_ops_t *hw_res_ops = ops; 197 hw_res_claims_t claims; 198 199 if (hw_res_ops->claim_legacy_io == NULL) { 200 async_answer_0(call, ENOTSUP); 201 return; 202 } 203 204 claims = DEV_IPC_GET_ARG1(*call); 205 206 const errno_t ret = hw_res_ops->claim_legacy_io(fun, claims); 207 async_answer_0(call, ret); 189 208 } 190 209
Note:
See TracChangeset
for help on using the changeset viewer.