2005-04-17 06:20:36 +08:00
|
|
|
/*
|
2008-08-02 17:55:55 +08:00
|
|
|
* arch/arm/include/asm/fiq.h
|
2005-04-17 06:20:36 +08:00
|
|
|
*
|
|
|
|
* Support for FIQ on ARM architectures.
|
|
|
|
* Written by Philip Blundell <philb@gnu.org>, 1998
|
|
|
|
* Re-written by Russell King
|
2011-05-24 19:11:48 +08:00
|
|
|
*
|
|
|
|
* NOTE: The FIQ mode registers are not magically preserved across
|
|
|
|
* suspend/resume.
|
|
|
|
*
|
|
|
|
* Drivers which require these registers to be preserved across power
|
|
|
|
* management operations must implement appropriate suspend/resume handlers to
|
|
|
|
* save and restore them.
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASM_FIQ_H
|
|
|
|
#define __ASM_FIQ_H
|
|
|
|
|
|
|
|
#include <asm/ptrace.h>
|
|
|
|
|
|
|
|
struct fiq_handler {
|
|
|
|
struct fiq_handler *next;
|
|
|
|
/* Name
|
|
|
|
*/
|
|
|
|
const char *name;
|
|
|
|
/* Called to ask driver to relinquish/
|
|
|
|
* reacquire FIQ
|
|
|
|
* return zero to accept, or -<errno>
|
|
|
|
*/
|
|
|
|
int (*fiq_op)(void *, int relinquish);
|
|
|
|
/* data for the relinquish/reacquire functions
|
|
|
|
*/
|
|
|
|
void *dev_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int claim_fiq(struct fiq_handler *f);
|
|
|
|
extern void release_fiq(struct fiq_handler *f);
|
|
|
|
extern void set_fiq_handler(void *start, unsigned int length);
|
|
|
|
extern void enable_fiq(int fiq);
|
|
|
|
extern void disable_fiq(int fiq);
|
|
|
|
|
2011-05-23 19:22:10 +08:00
|
|
|
/* helpers defined in fiqasm.S: */
|
|
|
|
extern void __set_fiq_regs(unsigned long const *regs);
|
|
|
|
extern void __get_fiq_regs(unsigned long *regs);
|
|
|
|
|
|
|
|
static inline void set_fiq_regs(struct pt_regs const *regs)
|
|
|
|
{
|
|
|
|
__set_fiq_regs(®s->ARM_r8);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void get_fiq_regs(struct pt_regs *regs)
|
|
|
|
{
|
|
|
|
__get_fiq_regs(®s->ARM_r8);
|
|
|
|
}
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|