世界是圆的
分类: LINUX
2008-11-11 10:49:17
chinaunix网友2009-08-13 18:06:05
static __inline__ void ctrl_outl(unsigned int b, unsigned long addr) { *(volatile unsigned long*)addr = b; }
chinaunix网友2009-08-13 18:04:32
void generic_writel(unsigned int b, unsigned long addr) { *(volatile unsigned long*)addr = b; }
chinaunix网友2009-08-13 17:11:43
static __inline__ unsigned short ctrl_inw(unsigned long addr) { return *(volatile unsigned short*)addr; } static __inline__ unsigned int ctrl_inl(unsigned long addr) { return *(volatile unsigned long*)addr; } static __inline__ void ctrl_outb(unsigned char b, unsigned long addr) { *(volatile unsigned char*)addr = b; }
chinaunix网友2009-08-13 17:09:33
找到啦,哈哈: 52 void generic_outsb(unsigned long port, const void *src, unsigned long count) 153 { 154 volatile u8 *port_addr; 155 const u8 *buf = src; 156 157 port_addr = (volatile u8 __force *)ioport_map(port, 1); 158 159 while (count--) 160 *port_addr = *buf++; 161 } 162 163 void generic_outsw(unsigned long port, const void *src, unsigned long count) 164 { 165 volatile u16 *port_addr; 166 const u16 *buf = src; 167
chinaunix网友2009-08-13 17:07:29
刚刚我有看到,我的内核里面的定义不是你说的那个哟!看这个是什么意思: 197 #define __IO_PREFIX generic 这样的话,就是说是调用generic_writel函数了哟!好像网上是有这个函数哟,不过不知道是干啥的!