Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/xtensa/include/asm/mtd-xip.h
26451 views
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#ifndef _ASM_MTD_XIP_H
4
#define _ASM_MTD_XIP_H
5
6
#include <asm/processor.h>
7
8
#define xip_irqpending() (xtensa_get_sr(interrupt) & xtensa_get_sr(intenable))
9
#define xip_currtime() (xtensa_get_sr(ccount))
10
#define xip_elapsed_since(x) ((xtensa_get_sr(ccount) - (x)) / 1000) /* should work up to 1GHz */
11
#define xip_cpu_idle() do { asm volatile ("waiti 0"); } while (0)
12
13
#endif /* _ASM_MTD_XIP_H */
14
15
16