__raw_writeb __raw_writel __raw_readb
#include <mach/ep93xx-regs.h> static unsigned char __raw_readb(unsigned int ptr) { return *((volatile unsigned char *)ptr); } static unsigned int __raw_readl(unsigned int ptr) { return *((volatile unsigned int *)ptr); } static void __raw_writeb(unsigned char value, unsigned int ptr) { *((volatile unsigned char *)ptr) = value; } static void __raw_writel(unsigned int value, unsigned int ptr) { *((volatile unsigned int *)ptr) = value; }
这个函数直接操作的是寄存器,或者内存地址。