void write_test (void) { unsigned long now = 0x12345; log_open_for_writing (now); now += 50; latch_output (now, IO_ADDR(WPC_RAM_LOCKSIZE), 0x00); now += 10; latch_output (now, IO_ADDR(WPC_ZEROCROSS_IRQ_CLEAR), 0x00); log_close (); }
static void __iomem *get_gpio_addr(unsigned gpio) { /* Our list of GPIO chips */ static void __iomem *gpio_addrs[GPIO_BLOCKS_COUNT] = { IO_ADDR(CFG_GPIO_0_BASE), IO_ADDR(CFG_GPIO_1_BASE), IO_ADDR(CFG_GPIO_2_BASE), IO_ADDR(CFG_GPIO_3_BASE), IO_ADDR(CFG_GPIO_4_BASE), IO_ADDR(CFG_GPIO_5_BASE), IO_ADDR(CFG_GPIO_6_BASE), IO_ADDR(CFG_GPIO_7_BASE), IO_ADDR(CFG_GPIO_8_BASE) }; return gpio_addrs[GPIO_BLOCK(gpio)]; }
unsigned int _inl (unsigned long int port) { return *((volatile unsigned long *)(IO_ADDR (port))); }
void _outl (unsigned int b, unsigned long int port) { *((volatile unsigned long *)(IO_ADDR (port))) = b; }
void _outw (unsigned short b, unsigned long int port) { *((volatile unsigned short *)(IO_ADDR (port))) = b; }
void _outb (unsigned char b, unsigned long int port) { *((volatile unsigned char *)(IO_ADDR (port))) = b; }
unsigned long int inl(unsigned long int port) { return *((__volatile__ unsigned long *)(IO_ADDR (port))); }
unsigned char inb (unsigned long int port) { return *((__volatile__ unsigned char *)(IO_ADDR (port))); }
void outl(unsigned long b, unsigned long int port) { *((__volatile__ unsigned long *)(IO_ADDR (port))) = b; }
void outw(unsigned short b, unsigned long int port) { *((__volatile__ unsigned short *)(IO_ADDR (port))) = b; }
void outb(unsigned char b, unsigned long int port) { *((__volatile__ unsigned char *)(IO_ADDR (port))) = b; }