1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * Texas Instruments, <www.ti.com>
5 * Aneesh V <aneesh@ti.com>
10 static inline s32 log_2_n_round_up(u32 n)
21 return log2n + 1; /* not power of 2 - round up */
23 return log2n; /* power of 2 */
26 static inline s32 log_2_n_round_down(u32 n)