Linux 5.7.6
[linux/fpc-iii.git] / arch / arm / mach-sa1100 / include / mach / mtd-xip.h
blob85e6a79112d23037099b5cefe41ca86653dc2509
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * MTD primitives for XIP support. Architecture specific functions
5 * Do not include this file directly. It's included from linux/mtd/xip.h
6 *
7 * Author: Nicolas Pitre
8 * Created: Nov 2, 2004
9 * Copyright: (C) 2004 MontaVista Software, Inc.
12 #ifndef __ARCH_SA1100_MTD_XIP_H__
13 #define __ARCH_SA1100_MTD_XIP_H__
15 #include <mach/hardware.h>
17 #define xip_irqpending() (ICIP & ICMR)
19 /* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
20 #define xip_currtime() readl_relaxed(OSCR)
21 #define xip_elapsed_since(x) (signed)((readl_relaxed(OSCR) - (x)) / 4)
23 #endif /* __ARCH_SA1100_MTD_XIP_H__ */