]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - arch/cris/include/arch-v32/arch/delay.h
Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic...
[mirror_ubuntu-focal-kernel.git] / arch / cris / include / arch-v32 / arch / delay.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
51533b61
MS
2#ifndef _ASM_CRIS_ARCH_DELAY_H
3#define _ASM_CRIS_ARCH_DELAY_H
4
94ebe164
JN
5extern void cris_delay10ns(u32 n10ns);
6#define udelay(u) cris_delay10ns((u)*100)
7#define ndelay(n) cris_delay10ns(((n)+9)/10)
8
9/*
10 * Not used anymore for udelay or ndelay. Referenced by
11 * e.g. init/calibrate.c. All other references are likely bugs;
12 * should be replaced by mdelay, udelay or ndelay.
13 */
14
d9b5444e 15static inline void
51533b61
MS
16__delay(int loops)
17{
18 __asm__ __volatile__ (
19 "move.d %0, $r9\n\t"
20 "beq 2f\n\t"
21 "subq 1, $r9\n\t"
22 "1:\n\t"
23 "bne 1b\n\t"
24 "subq 1, $r9\n"
25 "2:"
26 : : "g" (loops) : "r9");
27}
28
29#endif /* _ASM_CRIS_ARCH_DELAY_H */