spi: efm32: Convert to use GPIO descriptors
[linux/fpc-iii.git] / arch / openrisc / include / asm / bitops / __fls.h
blob9658446ad14102c94edfd8cda8697271c80e505a
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * OpenRISC Linux
5 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
6 */
8 #ifndef __ASM_OPENRISC___FLS_H
9 #define __ASM_OPENRISC___FLS_H
12 #ifdef CONFIG_OPENRISC_HAVE_INST_FL1
14 static inline unsigned long __fls(unsigned long x)
16 int ret;
18 __asm__ ("l.fl1 %0,%1"
19 : "=r" (ret)
20 : "r" (x));
22 return ret-1;
25 #else
26 #include <asm-generic/bitops/__fls.h>
27 #endif
29 #endif /* __ASM_OPENRISC___FLS_H */