mtd-xip.h 669 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * MTD primitives for XIP support. Architecture specific functions
  4. *
  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.
  10. */
  11. #ifndef __ARCH_SA1100_MTD_XIP_H__
  12. #define __ARCH_SA1100_MTD_XIP_H__
  13. #include <mach/hardware.h>
  14. #define xip_irqpending() (ICIP & ICMR)
  15. /* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
  16. #define xip_currtime() readl_relaxed(OSCR)
  17. #define xip_elapsed_since(x) (signed)((readl_relaxed(OSCR) - (x)) / 4)
  18. #endif /* __ARCH_SA1100_MTD_XIP_H__ */