ia64/linux-2.6.18-xen.hg

annotate include/asm-arm/arch-pxa/mtd-xip.h @ 782:9ab1c319531f

merge with linux-2.6.18-xen.hg
author Isaku Yamahata <yamahata@valinux.co.jp>
date Wed Jan 28 13:07:23 2009 +0900 (2009-01-28)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 * MTD primitives for XIP support. Architecture specific functions
ian@0 3 *
ian@0 4 * Do not include this file directly. It's included from linux/mtd/xip.h
ian@0 5 *
ian@0 6 * Author: Nicolas Pitre
ian@0 7 * Created: Nov 2, 2004
ian@0 8 * Copyright: (C) 2004 MontaVista Software, Inc.
ian@0 9 *
ian@0 10 * This program is free software; you can redistribute it and/or modify
ian@0 11 * it under the terms of the GNU General Public License version 2 as
ian@0 12 * published by the Free Software Foundation.
ian@0 13 *
ian@0 14 * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
ian@0 15 */
ian@0 16
ian@0 17 #ifndef __ARCH_PXA_MTD_XIP_H__
ian@0 18 #define __ARCH_PXA_MTD_XIP_H__
ian@0 19
ian@0 20 #include <asm/arch/pxa-regs.h>
ian@0 21
ian@0 22 #define xip_irqpending() (ICIP & ICMR)
ian@0 23
ian@0 24 /* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
ian@0 25 #define xip_currtime() (OSCR)
ian@0 26 #define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)
ian@0 27
ian@0 28 /*
ian@0 29 * xip_cpu_idle() is used when waiting for a delay equal or larger than
ian@0 30 * the system timer tick period. This should put the CPU into idle mode
ian@0 31 * to save power and to be woken up only when some interrupts are pending.
ian@0 32 * As above, this should not rely upon standard kernel code.
ian@0 33 */
ian@0 34
ian@0 35 #define xip_cpu_idle() asm volatile ("mcr p14, 0, %0, c7, c0, 0" :: "r" (1))
ian@0 36
ian@0 37 #endif /* __ARCH_PXA_MTD_XIP_H__ */