Path: blob/master/arch/arm/mach-pxa/include/mach/mtd-xip.h
10820 views
/*1* MTD primitives for XIP support. Architecture specific functions2*3* Do not include this file directly. It's included from linux/mtd/xip.h4*5* Author: Nicolas Pitre6* Created: Nov 2, 20047* Copyright: (C) 2004 MontaVista Software, Inc.8*9* This program is free software; you can redistribute it and/or modify10* it under the terms of the GNU General Public License version 2 as11* published by the Free Software Foundation.12*/1314#ifndef __ARCH_PXA_MTD_XIP_H__15#define __ARCH_PXA_MTD_XIP_H__1617#include <mach/regs-ost.h>18#include <mach/regs-intc.h>1920#define xip_irqpending() (ICIP & ICMR)2122/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */23#define xip_currtime() (OSCR)24#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)2526/*27* xip_cpu_idle() is used when waiting for a delay equal or larger than28* the system timer tick period. This should put the CPU into idle mode29* to save power and to be woken up only when some interrupts are pending.30* As above, this should not rely upon standard kernel code.31*/3233#define xip_cpu_idle() asm volatile ("mcr p14, 0, %0, c7, c0, 0" :: "r" (1))3435#endif /* __ARCH_PXA_MTD_XIP_H__ */363738