* @brief Get clock from ofw with acquiring a spin lock * * @param np point to ofw node * @param index index of clock in ofw * @param name connection identifier for the clock * * @return struct rt_clk* point to the newly created clock object, or an error pointer */
| 1254 | * @return struct rt_clk* point to the newly created clock object, or an error pointer |
| 1255 | */ |
| 1256 | static struct rt_clk *ofw_get_clk(struct rt_ofw_node *np, int index, const char *name) |
| 1257 | { |
| 1258 | struct rt_clk *clk; |
| 1259 | |
| 1260 | rt_hw_spin_lock(&_clk_lock.lock); |
| 1261 | |
| 1262 | clk = ofw_get_clk_no_lock(np, index, name, RT_TRUE); |
| 1263 | |
| 1264 | rt_hw_spin_unlock(&_clk_lock.lock); |
| 1265 | |
| 1266 | return clk; |
| 1267 | } |
| 1268 | |
| 1269 | /** |
| 1270 | * @brief Get clock array from ofw |
no test coverage detected