Lines Matching refs:port

11 static inline u8 sio1007_read(int port, int reg)  in sio1007_read()  argument
13 outb(reg, port); in sio1007_read()
15 return inb(port + 1); in sio1007_read()
18 static inline void sio1007_write(int port, int reg, int val) in sio1007_write() argument
20 outb(reg, port); in sio1007_write()
21 outb(val, port + 1); in sio1007_write()
24 static inline void sio1007_clrsetbits(int port, int reg, u8 clr, u8 set) in sio1007_clrsetbits() argument
26 sio1007_write(port, reg, (sio1007_read(port, reg) & ~clr) | set); in sio1007_clrsetbits()
29 void sio1007_enable_serial(int port, int num, int iobase, int irq) in sio1007_enable_serial() argument
35 outb(0x55, port); in sio1007_enable_serial()
39 sio1007_clrsetbits(port, DEV_POWER_CTRL, 0, UART1_POWER_ON); in sio1007_enable_serial()
40 sio1007_clrsetbits(port, UART1_IOBASE, 0xfe, iobase >> 2); in sio1007_enable_serial()
41 sio1007_clrsetbits(port, UART_IRQ, 0xf0, irq << 4); in sio1007_enable_serial()
43 sio1007_clrsetbits(port, DEV_POWER_CTRL, 0, UART2_POWER_ON); in sio1007_enable_serial()
44 sio1007_clrsetbits(port, UART2_IOBASE, 0xfe, iobase >> 2); in sio1007_enable_serial()
45 sio1007_clrsetbits(port, UART_IRQ, 0x0f, irq); in sio1007_enable_serial()
49 outb(0xaa, port); in sio1007_enable_serial()
52 void sio1007_enable_runtime(int port, int iobase) in sio1007_enable_runtime() argument
55 outb(0x55, port); in sio1007_enable_runtime()
58 sio1007_clrsetbits(port, RTR_IOBASE_LOW, 0, iobase >> 4); in sio1007_enable_runtime()
59 sio1007_clrsetbits(port, RTR_IOBASE_HIGH, 0, iobase >> 12); in sio1007_enable_runtime()
61 sio1007_clrsetbits(port, DEV_ACTIVATE, 0, RTR_EN); in sio1007_enable_runtime()
64 outb(0xaa, port); in sio1007_enable_runtime()
67 void sio1007_gpio_config(int port, int gpio, int dir, int pol, int type) in sio1007_gpio_config() argument
79 outb(0x55, port); in sio1007_gpio_config()
82 sio1007_clrsetbits(port, reg, 1 << gpio, dir << gpio); in sio1007_gpio_config()
83 sio1007_clrsetbits(port, reg + 1, 1 << gpio, pol << gpio); in sio1007_gpio_config()
84 sio1007_clrsetbits(port, reg + 2, 1 << gpio, type << gpio); in sio1007_gpio_config()
87 outb(0xaa, port); in sio1007_gpio_config()
90 int sio1007_gpio_get_value(int port, int gpio) in sio1007_gpio_get_value() argument
102 val = inb(port + reg); in sio1007_gpio_get_value()
109 void sio1007_gpio_set_value(int port, int gpio, int val) in sio1007_gpio_set_value() argument
121 data = inb(port + reg); in sio1007_gpio_set_value()
124 outb(data, port + reg); in sio1007_gpio_set_value()