/drivers/tty/serial/ |
D | omap-serial.c | 180 static void serial_omap_mdr1_errataset(struct uart_omap_port *up, u8 mdr1); 182 static inline unsigned int serial_in(struct uart_omap_port *up, int offset) in serial_in() argument 184 offset <<= up->port.regshift; in serial_in() 185 return readw(up->port.membase + offset); in serial_in() 188 static inline void serial_out(struct uart_omap_port *up, int offset, int value) in serial_out() argument 190 offset <<= up->port.regshift; in serial_out() 191 writew(value, up->port.membase + offset); in serial_out() 194 static inline void serial_omap_clear_fifos(struct uart_omap_port *up) in serial_omap_clear_fifos() argument 196 serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO); in serial_omap_clear_fifos() 197 serial_out(up, UART_FCR, UART_FCR_ENABLE_FIFO | in serial_omap_clear_fifos() [all …]
|
D | sunsu.c | 107 static unsigned int serial_in(struct uart_sunsu_port *up, int offset) in serial_in() argument 109 offset <<= up->port.regshift; in serial_in() 111 switch (up->port.iotype) { in serial_in() 113 outb(up->port.hub6 - 1 + offset, up->port.iobase); in serial_in() 114 return inb(up->port.iobase + 1); in serial_in() 117 return readb(up->port.membase + offset); in serial_in() 120 return inb(up->port.iobase + offset); in serial_in() 124 static void serial_out(struct uart_sunsu_port *up, int offset, int value) in serial_out() argument 138 offset <<= up->port.regshift; in serial_out() 140 switch (up->port.iotype) { in serial_out() [all …]
|
D | sunsab.c | 94 static __inline__ void sunsab_tec_wait(struct uart_sunsab_port *up) in sunsab_tec_wait() argument 96 int timeout = up->tec_timeout; in sunsab_tec_wait() 98 while ((readb(&up->regs->r.star) & SAB82532_STAR_TEC) && --timeout) in sunsab_tec_wait() 102 static __inline__ void sunsab_cec_wait(struct uart_sunsab_port *up) in sunsab_cec_wait() argument 104 int timeout = up->cec_timeout; in sunsab_cec_wait() 106 while ((readb(&up->regs->r.star) & SAB82532_STAR_CEC) && --timeout) in sunsab_cec_wait() 111 receive_chars(struct uart_sunsab_port *up, in receive_chars() argument 121 if (up->port.state != NULL) /* Unopened serial console */ in receive_chars() 122 port = &up->port.state->port; in receive_chars() 131 count = readb(&up->regs->r.rbcl) & (SAB82532_RECV_FIFO_SIZE - 1); in receive_chars() [all …]
|
D | pxa.c | 59 static inline unsigned int serial_in(struct uart_pxa_port *up, int offset) in serial_in() argument 62 return readl(up->port.membase + offset); in serial_in() 65 static inline void serial_out(struct uart_pxa_port *up, int offset, int value) in serial_out() argument 68 writel(value, up->port.membase + offset); in serial_out() 73 struct uart_pxa_port *up = (struct uart_pxa_port *)port; in serial_pxa_enable_ms() local 75 up->ier |= UART_IER_MSI; in serial_pxa_enable_ms() 76 serial_out(up, UART_IER, up->ier); in serial_pxa_enable_ms() 81 struct uart_pxa_port *up = (struct uart_pxa_port *)port; in serial_pxa_stop_tx() local 83 if (up->ier & UART_IER_THRI) { in serial_pxa_stop_tx() 84 up->ier &= ~UART_IER_THRI; in serial_pxa_stop_tx() [all …]
|
D | bfin_sport_uart.c | 59 static int sport_uart_tx_chars(struct sport_uart_port *up); 62 static inline void tx_one_byte(struct sport_uart_port *up, unsigned int value) in tx_one_byte() argument 65 up->txmask1, up->txmask2); in tx_one_byte() 73 : [mask1]"d"(up->txmask1), [mask2]"d"(up->txmask2) in tx_one_byte() 78 SPORT_PUT_TX(up, value); in tx_one_byte() 81 static inline unsigned char rx_one_byte(struct sport_uart_port *up) in rx_one_byte() argument 87 if ((up->csize + up->stopb) > 7) in rx_one_byte() 88 value = SPORT_GET_RX32(up); in rx_one_byte() 90 value = SPORT_GET_RX(up); in rx_one_byte() 93 up->csize, up->rxmask); in rx_one_byte() [all …]
|
D | sunzilog.c | 271 static void sunzilog_maybe_update_regs(struct uart_sunzilog_port *up, in sunzilog_maybe_update_regs() argument 274 if (!ZS_REGS_HELD(up)) { in sunzilog_maybe_update_regs() 275 if (ZS_TX_ACTIVE(up)) { in sunzilog_maybe_update_regs() 276 up->flags |= SUNZILOG_FLAG_REGS_HELD; in sunzilog_maybe_update_regs() 278 __load_zsregs(channel, up->curregs); in sunzilog_maybe_update_regs() 283 static void sunzilog_change_mouse_baud(struct uart_sunzilog_port *up) in sunzilog_change_mouse_baud() argument 285 unsigned int cur_cflag = up->cflag; in sunzilog_change_mouse_baud() 288 up->cflag &= ~CBAUD; in sunzilog_change_mouse_baud() 289 up->cflag |= suncore_mouse_baud_cflag_next(cur_cflag, &new_baud); in sunzilog_change_mouse_baud() 292 up->curregs[R12] = (brg & 0xff); in sunzilog_change_mouse_baud() [all …]
|
D | ar933x_uart.c | 60 static inline unsigned int ar933x_uart_read(struct ar933x_uart_port *up, in ar933x_uart_read() argument 63 return readl(up->port.membase + offset); in ar933x_uart_read() 66 static inline void ar933x_uart_write(struct ar933x_uart_port *up, in ar933x_uart_write() argument 69 writel(value, up->port.membase + offset); in ar933x_uart_write() 72 static inline void ar933x_uart_rmw(struct ar933x_uart_port *up, in ar933x_uart_rmw() argument 79 t = ar933x_uart_read(up, offset); in ar933x_uart_rmw() 82 ar933x_uart_write(up, offset, t); in ar933x_uart_rmw() 85 static inline void ar933x_uart_rmw_set(struct ar933x_uart_port *up, in ar933x_uart_rmw_set() argument 89 ar933x_uart_rmw(up, offset, 0, val); in ar933x_uart_rmw_set() 92 static inline void ar933x_uart_rmw_clear(struct ar933x_uart_port *up, in ar933x_uart_rmw_clear() argument [all …]
|
D | m32r_sio.c | 175 static unsigned int sio_in(struct uart_sio_port *up, int offset) in sio_in() argument 177 return __sio_in(up->port.iobase + offset); in sio_in() 180 static void sio_out(struct uart_sio_port *up, int offset, int value) in sio_out() argument 182 __sio_out(value, up->port.iobase + offset); in sio_out() 185 static unsigned int serial_in(struct uart_sio_port *up, int offset) in serial_in() argument 193 static void serial_out(struct uart_sio_port *up, int offset, int value) in serial_out() argument 203 struct uart_sio_port *up = in m32r_sio_stop_tx() local 206 if (up->ier & UART_IER_THRI) { in m32r_sio_stop_tx() 207 up->ier &= ~UART_IER_THRI; in m32r_sio_stop_tx() 208 serial_out(up, UART_IER, up->ier); in m32r_sio_stop_tx() [all …]
|
D | serial_txx9.c | 173 static inline unsigned int sio_in(struct uart_txx9_port *up, int offset) in sio_in() argument 175 switch (up->port.iotype) { in sio_in() 177 return __raw_readl(up->port.membase + offset); in sio_in() 179 return inl(up->port.iobase + offset); in sio_in() 184 sio_out(struct uart_txx9_port *up, int offset, int value) in sio_out() argument 186 switch (up->port.iotype) { in sio_out() 188 __raw_writel(value, up->port.membase + offset); in sio_out() 191 outl(value, up->port.iobase + offset); in sio_out() 197 sio_mask(struct uart_txx9_port *up, int offset, unsigned int value) in sio_mask() argument 199 sio_out(up, offset, sio_in(up, offset) & ~value); in sio_mask() [all …]
|
D | ip22zilog.c | 236 static void ip22zilog_maybe_update_regs(struct uart_ip22zilog_port *up, in ip22zilog_maybe_update_regs() argument 239 if (!ZS_REGS_HELD(up)) { in ip22zilog_maybe_update_regs() 240 if (ZS_TX_ACTIVE(up)) { in ip22zilog_maybe_update_regs() 241 up->flags |= IP22ZILOG_FLAG_REGS_HELD; in ip22zilog_maybe_update_regs() 243 __load_zsregs(channel, up->curregs); in ip22zilog_maybe_update_regs() 251 static bool ip22zilog_receive_chars(struct uart_ip22zilog_port *up, in ip22zilog_receive_chars() argument 256 bool push = up->port.state != NULL; in ip22zilog_receive_chars() 274 ch &= up->parity_mask; in ip22zilog_receive_chars() 278 r1 |= up->tty_break; in ip22zilog_receive_chars() 282 up->port.icount.rx++; in ip22zilog_receive_chars() [all …]
|
D | etraxfs-uart.c | 51 struct uart_cris_port *up; in cris_console_write() local 56 up = etraxfs_uart_ports[co->index]; in cris_console_write() 58 if (!up) in cris_console_write() 62 tr_dma_en = old = REG_RD(ser, up->regi_ser, rw_tr_dma_en); in cris_console_write() 65 REG_WR(ser, up->regi_ser, rw_tr_dma_en, tr_dma_en); in cris_console_write() 73 stat = REG_RD(ser, up->regi_ser, r_stat_din); in cris_console_write() 75 REG_WR_INT(ser, up->regi_ser, rw_dout, '\r'); in cris_console_write() 79 stat = REG_RD(ser, up->regi_ser, r_stat_din); in cris_console_write() 81 REG_WR_INT(ser, up->regi_ser, rw_dout, s[i]); in cris_console_write() 86 REG_WR(ser, up->regi_ser, rw_tr_dma_en, old); in cris_console_write() [all …]
|
D | rp2.c | 237 static void rp2_rmw(struct rp2_uart_port *up, int reg, in rp2_rmw() argument 240 u32 tmp = readl(up->base + reg); in rp2_rmw() 243 writel(tmp, up->base + reg); in rp2_rmw() 246 static void rp2_rmw_clr(struct rp2_uart_port *up, int reg, u32 val) in rp2_rmw_clr() argument 248 rp2_rmw(up, reg, val, 0); in rp2_rmw_clr() 251 static void rp2_rmw_set(struct rp2_uart_port *up, int reg, u32 val) in rp2_rmw_set() argument 253 rp2_rmw(up, reg, 0, val); in rp2_rmw_set() 256 static void rp2_mask_ch_irq(struct rp2_uart_port *up, int ch_num, in rp2_mask_ch_irq() argument 261 spin_lock_irqsave(&up->card->card_lock, flags); in rp2_mask_ch_irq() 263 irq_mask = readl(up->asic_base + RP2_CH_IRQ_MASK); in rp2_mask_ch_irq() [all …]
|
/drivers/tty/serial/8250/ |
D | 8250_port.c | 279 static int default_serial_dl_read(struct uart_8250_port *up) in default_serial_dl_read() argument 281 return serial_in(up, UART_DLL) | serial_in(up, UART_DLM) << 8; in default_serial_dl_read() 285 static void default_serial_dl_write(struct uart_8250_port *up, int value) in default_serial_dl_write() argument 287 serial_out(up, UART_DLL, value & 0xff); in default_serial_dl_write() 288 serial_out(up, UART_DLM, value >> 8 & 0xff); in default_serial_dl_write() 337 static int au_serial_dl_read(struct uart_8250_port *up) in au_serial_dl_read() argument 339 return __raw_readl(up->port.membase + 0x28); in au_serial_dl_read() 342 static void au_serial_dl_write(struct uart_8250_port *up, int value) in au_serial_dl_write() argument 344 __raw_writel(value, up->port.membase + 0x28); in au_serial_dl_write() 428 struct uart_8250_port *up = up_to_u8250p(p); in set_io_from_upio() local [all …]
|
D | 8250_omap.c | 124 static u32 uart_read(struct uart_8250_port *up, u32 reg) in uart_read() argument 126 return readl(up->port.membase + (reg << up->port.regshift)); in uart_read() 131 struct uart_8250_port *up = up_to_u8250p(port); in omap8250_set_mctrl() local 132 struct omap8250_priv *priv = up->port.private_data; in omap8250_set_mctrl() 141 lcr = serial_in(up, UART_LCR); in omap8250_set_mctrl() 142 serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); in omap8250_set_mctrl() 147 serial_out(up, UART_EFR, priv->efr); in omap8250_set_mctrl() 148 serial_out(up, UART_LCR, lcr); in omap8250_set_mctrl() 160 static void omap_8250_mdr1_errataset(struct uart_8250_port *up, in omap_8250_mdr1_errataset() argument 166 old_mdr1 = serial_in(up, UART_OMAP_MDR1); in omap_8250_mdr1_errataset() [all …]
|
D | 8250_core.c | 123 struct uart_8250_port *up; in serial8250_interrupt() local 126 up = list_entry(l, struct uart_8250_port, list); in serial8250_interrupt() 127 port = &up->port; in serial8250_interrupt() 159 static void serial_do_unlink(struct irq_info *i, struct uart_8250_port *up) in serial_do_unlink() argument 164 if (i->head == &up->list) in serial_do_unlink() 166 list_del(&up->list); in serial_do_unlink() 168 BUG_ON(i->head != &up->list); in serial_do_unlink() 179 static int serial_link_irq_chain(struct uart_8250_port *up) in serial_link_irq_chain() argument 184 int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0; in serial_link_irq_chain() 188 h = &irq_lists[up->port.irq % NR_IRQ_HASH]; in serial_link_irq_chain() [all …]
|
D | 8250_em.c | 79 static int serial8250_em_serial_dl_read(struct uart_8250_port *up) in serial8250_em_serial_dl_read() argument 81 return serial_in(up, UART_DLL_EM) | serial_in(up, UART_DLM_EM) << 8; in serial8250_em_serial_dl_read() 84 static void serial8250_em_serial_dl_write(struct uart_8250_port *up, int value) in serial8250_em_serial_dl_write() argument 86 serial_out(up, UART_DLL_EM, value & 0xff); in serial8250_em_serial_dl_write() 87 serial_out(up, UART_DLM_EM, value >> 8 & 0xff); in serial8250_em_serial_dl_write() 95 struct uart_8250_port up; in serial8250_em_probe() local 113 memset(&up, 0, sizeof(up)); in serial8250_em_probe() 114 up.port.mapbase = regs->start; in serial8250_em_probe() 115 up.port.irq = irq->start; in serial8250_em_probe() 116 up.port.type = PORT_UNKNOWN; in serial8250_em_probe() [all …]
|
D | 8250_uniphier.c | 140 static int uniphier_serial_dl_read(struct uart_8250_port *up) in uniphier_serial_dl_read() argument 142 int offset = UNIPHIER_UART_DLR << up->port.regshift; in uniphier_serial_dl_read() 144 return readl(up->port.membase + offset); in uniphier_serial_dl_read() 147 static void uniphier_serial_dl_write(struct uart_8250_port *up, int value) in uniphier_serial_dl_write() argument 149 int offset = UNIPHIER_UART_DLR << up->port.regshift; in uniphier_serial_dl_write() 151 writel(value, up->port.membase + offset); in uniphier_serial_dl_write() 193 struct uart_8250_port up; in uniphier_uart_probe() local 220 memset(&up, 0, sizeof(up)); in uniphier_uart_probe() 222 ret = uniphier_of_serial_setup(dev, &up.port, priv); in uniphier_uart_probe() 228 up.port.dev = dev; in uniphier_uart_probe() [all …]
|
D | 8250_fsl.c | 31 struct uart_8250_port *up = up_to_u8250p(port); in fsl8250_handle_irq() local 33 spin_lock_irqsave(&up->port.lock, flags); in fsl8250_handle_irq() 37 spin_unlock_irqrestore(&up->port.lock, flags); in fsl8250_handle_irq() 42 if (unlikely(up->lsr_saved_flags & UART_LSR_BI)) { in fsl8250_handle_irq() 43 up->lsr_saved_flags &= ~UART_LSR_BI; in fsl8250_handle_irq() 45 spin_unlock_irqrestore(&up->port.lock, flags); in fsl8250_handle_irq() 49 lsr = orig_lsr = up->port.serial_in(&up->port, UART_LSR); in fsl8250_handle_irq() 52 lsr = serial8250_rx_chars(up, lsr); in fsl8250_handle_irq() 54 serial8250_modem_status(up); in fsl8250_handle_irq() 57 serial8250_tx_chars(up); in fsl8250_handle_irq() [all …]
|
D | 8250.h | 109 static inline int serial_in(struct uart_8250_port *up, int offset) in serial_in() argument 111 return up->port.serial_in(&up->port, offset); in serial_in() 114 static inline void serial_out(struct uart_8250_port *up, int offset, int value) in serial_out() argument 116 up->port.serial_out(&up->port, offset, value); in serial_out() 121 static inline int serial_dl_read(struct uart_8250_port *up) in serial_dl_read() argument 123 return up->dl_read(up); in serial_dl_read() 126 static inline void serial_dl_write(struct uart_8250_port *up, int value) in serial_dl_write() argument 128 up->dl_write(up, value); in serial_dl_write() 137 static inline void serial8250_out_MCR(struct uart_8250_port *up, int value) in serial8250_out_MCR() argument 139 serial_out(up, UART_MCR, value); in serial8250_out_MCR() [all …]
|
/drivers/media/v4l2-core/ |
D | v4l2-compat-ioctl32.c | 60 struct v4l2_window32 __user *up, in get_v4l2_window32() argument 68 if (!access_ok(VERIFY_READ, up, sizeof(*up)) || in get_v4l2_window32() 69 copy_in_user(&kp->w, &up->w, sizeof(up->w)) || in get_v4l2_window32() 70 assign_in_user(&kp->field, &up->field) || in get_v4l2_window32() 71 assign_in_user(&kp->chromakey, &up->chromakey) || in get_v4l2_window32() 72 assign_in_user(&kp->global_alpha, &up->global_alpha) || in get_v4l2_window32() 73 get_user(clipcount, &up->clipcount) || in get_v4l2_window32() 81 if (get_user(p, &up->clips)) in get_v4l2_window32() 102 struct v4l2_window32 __user *up) in put_v4l2_window32() argument 109 if (copy_in_user(&up->w, &kp->w, sizeof(kp->w)) || in put_v4l2_window32() [all …]
|
/drivers/mtd/maps/ |
D | sun_uflash.c | 52 struct uflash_dev *up; in uflash_devinit() local 64 up = kzalloc(sizeof(struct uflash_dev), GFP_KERNEL); in uflash_devinit() 65 if (!up) { in uflash_devinit() 71 memcpy(&up->map, &uflash_map_templ, sizeof(uflash_map_templ)); in uflash_devinit() 73 up->map.size = resource_size(&op->resource[0]); in uflash_devinit() 75 up->name = of_get_property(dp, "model", NULL); in uflash_devinit() 76 if (up->name && 0 < strlen(up->name)) in uflash_devinit() 77 up->map.name = up->name; in uflash_devinit() 79 up->map.phys = op->resource[0].start; in uflash_devinit() 81 up->map.virt = of_ioremap(&op->resource[0], 0, up->map.size, in uflash_devinit() [all …]
|
/drivers/scsi/ |
D | aha1740.h | 84 #define any2scsi(up, p) \ argument 85 (up)[0] = (((unsigned long)(p)) >> 16) ; \ 86 (up)[1] = (((unsigned long)(p)) >> 8); \ 87 (up)[2] = ((unsigned long)(p)); 89 #define scsi2int(up) ( (((long)*(up)) << 16) + (((long)(up)[1]) << 8) + ((long)(up)[2]) ) argument 91 #define xany2scsi(up, p) \ argument 92 (up)[0] = ((long)(p)) >> 24; \ 93 (up)[1] = ((long)(p)) >> 16; \ 94 (up)[2] = ((long)(p)) >> 8; \ 95 (up)[3] = ((long)(p)); [all …]
|
D | aha1542.h | 72 #define scsi2int(up) ( (((long)*(up)) << 16) + (((long)(up)[1]) << 8) + ((long)(up)[2]) ) argument 74 #define xscsi2int(up) ( (((long)(up)[0]) << 24) + (((long)(up)[1]) << 16) \ argument 75 + (((long)(up)[2]) << 8) + ((long)(up)[3]) )
|
/drivers/firmware/efi/ |
D | runtime-wrappers.c | 100 up(&efi_runtime_lock); in virt_efi_get_time() 111 up(&efi_runtime_lock); in virt_efi_set_time() 124 up(&efi_runtime_lock); in virt_efi_get_wakeup_time() 135 up(&efi_runtime_lock); in virt_efi_set_wakeup_time() 151 up(&efi_runtime_lock); in virt_efi_get_variable() 164 up(&efi_runtime_lock); in virt_efi_get_next_variable() 180 up(&efi_runtime_lock); in virt_efi_set_variable() 196 up(&efi_runtime_lock); in virt_efi_set_variable_nonblocking() 215 up(&efi_runtime_lock); in virt_efi_query_variable_info() 235 up(&efi_runtime_lock); in virt_efi_query_variable_info_nonblocking() [all …]
|
/drivers/tty/vt/ |
D | vt_ioctl.c | 342 void __user *up = (void __user *)arg; in vt_ioctl() local 445 if (copy_from_user(&kbrep, up, sizeof(struct kbd_repeat))) { in vt_ioctl() 452 if (copy_to_user(up, &kbrep, sizeof(struct kbd_repeat))) in vt_ioctl() 540 ret = vt_do_kbkeycode_ioctl(cmd, up, perm); in vt_ioctl() 545 ret = vt_do_kdsk_ioctl(cmd, up, perm, console); in vt_ioctl() 550 ret = vt_do_kdgkb_ioctl(cmd, up, perm); in vt_ioctl() 559 ret = vt_do_diacrit(cmd, up, perm); in vt_ioctl() 600 if (copy_from_user(&tmp, up, sizeof(struct vt_mode))) { in vt_ioctl() 629 rc = copy_to_user(up, &tmp, sizeof(struct vt_mode)); in vt_ioctl() 642 struct vt_stat __user *vtstat = up; in vt_ioctl() [all …]
|