crunch.h

来自「一个2.4.21版本的嵌入式linux内核」· C头文件 代码 · 共 57 行

H
57
字号
#ifndef	__asm_crunch_h__#define	__asm_crunch_h__#include "asm/arch/regmap.h"#define	CRUNCH_INIT	0x00900000#define	CRUNCH_IRQ	58#ifndef	__ASSEMBLY__/* enable the MaverickCrunch clock */static inline void crunch_enable(void){	int tmp, aa = 0xAA;	int *lock = (int *)SYSCON_SWLOCK;	int *syscfg = (int *)SYSCON_DEVCFG;	asm volatile (	"str    %3, [%1]\n\t"	"ldr    %0, [%2]\n\t"	"orr    %0, %0, #(1 << 23)\n\t"	"str    %0, [%2]"	:"=r" (tmp)	:"r" (lock), "r" (syscfg), "r" (aa)	:"memory" );}/* disable the MaverickCrunch clock */static inline void crunch_disable(void){	int tmp, aa = 0xAA;	int *lock = (int *)SYSCON_SWLOCK;	int *syscfg = (int *)SYSCON_DEVCFG;	asm volatile (	"str    %3, [%1]\n\t"	"ldr    %0, [%2]\n\t"	"bic    %0, %0, #(1 << 23)\n\t"	"str    %0, [%2]"	:"=r" (tmp)	:"r" (lock), "r" (syscfg), "r" (aa)	:"memory" );}unsigned int read_dspsc_low(void);unsigned int read_dspsc_high(void);void write_dspsc(unsigned int);void save_crunch(struct task_struct *);void restore_crunch(struct task_struct *);int setup_crunch(void);void crunch_init(void);#endif#endif	/* __asm_crunch_h__ */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?