| /linux/drivers/usb/typec/tcpm/ |
| H A D | tcpm.c | 599 struct tcpm_port *port; member 606 struct tcpm_port *port; member 624 #define tcpm_port_is_sink(port) \ argument 625 (tcpm_cc_is_sink((port)->cc1) || tcpm_cc_is_sink((port)->cc2)) 631 #define tcpm_port_is_source(port) \ argument 632 ((tcpm_cc_is_source((port)->cc1) && \ 633 !tcpm_cc_is_source((port)->cc2)) || \ 634 (tcpm_cc_is_source((port)->cc2) && \ 635 !tcpm_cc_is_source((port)->cc1))) 637 #define tcpm_port_is_debug(port) \ argument [all …]
|
| /linux/drivers/parport/ |
| H A D | ieee1284_ops.c | 35 size_t parport_ieee1284_write_compat (struct parport *port, in parport_ieee1284_write_compat() argument 43 struct pardevice *dev = port->physport->cad; in parport_ieee1284_write_compat() 47 if (port->irq != PARPORT_IRQ_NONE) { in parport_ieee1284_write_compat() 48 parport_enable_irq (port); in parport_ieee1284_write_compat() 52 port->physport->ieee1284.phase = IEEE1284_PH_FWD_DATA; in parport_ieee1284_write_compat() 53 parport_write_control (port, ctl); in parport_ieee1284_write_compat() 54 parport_data_forward (port); in parport_ieee1284_write_compat() 66 if (!parport_wait_peripheral (port, mask, val)) in parport_ieee1284_write_compat() 71 if ((parport_read_status (port) & in parport_ieee1284_write_compat() 99 parport_wait_event (port, wait); in parport_ieee1284_write_compat() [all …]
|
| H A D | ieee1284.c | 36 static void parport_ieee1284_wakeup (struct parport *port) in parport_ieee1284_wakeup() argument 38 up (&port->physport->ieee1284.irq); in parport_ieee1284_wakeup() 43 struct parport *port = timer_container_of(port, t, timer); in timeout_waiting_on_port() local 45 parport_ieee1284_wakeup (port); in timeout_waiting_on_port() 64 int parport_wait_event (struct parport *port, signed long timeout) in parport_wait_event() argument 68 if (!port->physport->cad->timeout) in parport_wait_event() 73 timer_setup(&port->timer, timeout_waiting_on_port, 0); in parport_wait_event() 74 mod_timer(&port->timer, jiffies + timeout); in parport_wait_event() 75 ret = down_interruptible (&port->physport->ieee1284.irq); in parport_wait_event() 76 if (!timer_delete_sync(&port->timer) && !ret) in parport_wait_event() [all …]
|
| /linux/drivers/usb/gadget/function/ |
| H A D | u_serial.c | 105 struct tty_port port; member 139 struct gs_port *port; member 210 gs_send_packet(struct gs_port *port, char *packet, unsigned size) in gs_send_packet() argument 214 len = kfifo_len(&port->port_write_buf); in gs_send_packet() 218 size = kfifo_out(&port->port_write_buf, packet, size); in gs_send_packet() 233 static int gs_start_tx(struct gs_port *port) in gs_start_tx() argument 239 struct list_head *pool = &port->write_pool; in gs_start_tx() 244 if (!port->port_usb) in gs_start_tx() 247 in = port->port_usb->in; in gs_start_tx() 249 while (!port->write_busy && !list_empty(pool)) { in gs_start_tx() [all …]
|
| /linux/drivers/usb/host/ |
| H A D | xhci-dbgtty.c | 28 dbc_kfifo_to_req(struct dbc_port *port, char *packet) in dbc_kfifo_to_req() argument 32 len = kfifo_len(&port->port.xmit_fifo); in dbc_kfifo_to_req() 39 if (port->tx_boundary) in dbc_kfifo_to_req() 40 len = min(port->tx_boundary, len); in dbc_kfifo_to_req() 42 len = kfifo_out(&port->port.xmit_fifo, packet, len); in dbc_kfifo_to_req() 44 if (port->tx_boundary) in dbc_kfifo_to_req() 45 port->tx_boundary -= len; in dbc_kfifo_to_req() 50 static int dbc_do_start_tx(struct dbc_port *port) in dbc_do_start_tx() argument 51 __releases(&port->port_lock) in dbc_do_start_tx() 52 __acquires(&port->port_lock) in dbc_do_start_tx() [all …]
|
| /linux/drivers/tty/serial/8250/ |
| H A D | 8250_core.c | 84 struct uart_port *port = &up->port; in serial8250_interrupt() local 86 if (port->handle_irq(port)) { in serial8250_interrupt() 139 hash_for_each_possible(irq_lists, i, node, up->port.irq) in serial_get_or_create_irq_info() 140 if (i->irq == up->port.irq) in serial_get_or_create_irq_info() 148 i->irq = up->port.irq; in serial_get_or_create_irq_info() 174 ret = request_irq(up->port.irq, serial8250_interrupt, up->port.irqflags, up->port.name, i); in serial_link_irq_chain() 187 hash_for_each_possible(irq_lists, i, node, up->port.irq) in serial_unlink_irq_chain() 188 if (i->irq == up->port.irq) { in serial_unlink_irq_chain() 193 free_irq(up->port.irq, i); in serial_unlink_irq_chain() 213 up->port.handle_irq(&up->port); in serial8250_timeout() [all …]
|
| /linux/drivers/scsi/libsas/ |
| H A D | sas_port.c | 15 static bool phy_is_wideport_member(struct asd_sas_port *port, struct asd_sas_phy *phy) in phy_is_wideport_member() argument 19 if (memcmp(port->attached_sas_addr, phy->attached_sas_addr, in phy_is_wideport_member() 21 memcmp(port->sas_addr, phy->sas_addr, SAS_ADDR_SIZE) != 0)) in phy_is_wideport_member() 29 struct asd_sas_port *port = phy->port; in sas_resume_port() local 36 if (port->suspended) in sas_resume_port() 37 port->suspended = 0; in sas_resume_port() 47 list_for_each_entry_safe(dev, n, &port->dev_list, dev_list_node) { in sas_resume_port() 52 sas_unregister_dev(port, dev); in sas_resume_port() 53 sas_destruct_devices(port); in sas_resume_port() 67 sas_discover_event(port, DISCE_RESUME); in sas_resume_port() [all …]
|
| /linux/drivers/tty/serial/ |
| H A D | bcm63xx_uart.c | 73 static inline unsigned int bcm_uart_readl(struct uart_port *port, in bcm_uart_readl() argument 76 return __raw_readl(port->membase + offset); in bcm_uart_readl() 79 static inline void bcm_uart_writel(struct uart_port *port, in bcm_uart_writel() argument 82 __raw_writel(value, port->membase + offset); in bcm_uart_writel() 88 static unsigned int bcm_uart_tx_empty(struct uart_port *port) in bcm_uart_tx_empty() argument 92 val = bcm_uart_readl(port, UART_IR_REG); in bcm_uart_tx_empty() 99 static void bcm_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in bcm_uart_set_mctrl() argument 103 val = bcm_uart_readl(port, UART_MCTL_REG); in bcm_uart_set_mctrl() 110 bcm_uart_writel(port, val, UART_MCTL_REG); in bcm_uart_set_mctrl() 112 val = bcm_uart_readl(port, UART_CTL_REG); in bcm_uart_set_mctrl() [all …]
|
| H A D | timbuart.c | 25 struct uart_port port; member 35 static void timbuart_mctrl_check(struct uart_port *port, u32 isr, u32 *ier); 39 static void timbuart_stop_rx(struct uart_port *port) in timbuart_stop_rx() argument 42 u32 ier = ioread32(port->membase + TIMBUART_IER) & ~RXFLAGS; in timbuart_stop_rx() 43 iowrite32(ier, port->membase + TIMBUART_IER); in timbuart_stop_rx() 46 static void timbuart_stop_tx(struct uart_port *port) in timbuart_stop_tx() argument 49 u32 ier = ioread32(port->membase + TIMBUART_IER) & ~TXBAE; in timbuart_stop_tx() 50 iowrite32(ier, port->membase + TIMBUART_IER); in timbuart_stop_tx() 53 static void timbuart_start_tx(struct uart_port *port) in timbuart_start_tx() argument 56 container_of(port, struct timbuart_port, port); in timbuart_start_tx() [all …]
|
| H A D | altera_uart.c | 77 struct uart_port port; member 83 static u32 altera_uart_readl(struct uart_port *port, int reg) in altera_uart_readl() argument 85 return readl(port->membase + (reg << port->regshift)); in altera_uart_readl() 88 static void altera_uart_writel(struct uart_port *port, u32 dat, int reg) in altera_uart_writel() argument 90 writel(dat, port->membase + (reg << port->regshift)); in altera_uart_writel() 93 static unsigned int altera_uart_tx_empty(struct uart_port *port) in altera_uart_tx_empty() argument 95 return (altera_uart_readl(port, ALTERA_UART_STATUS_REG) & in altera_uart_tx_empty() 99 static unsigned int altera_uart_get_mctrl(struct uart_port *port) in altera_uart_get_mctrl() argument 101 struct altera_uart *pp = container_of(port, struct altera_uart, port); in altera_uart_get_mctrl() 104 sigs = (altera_uart_readl(port, ALTERA_UART_STATUS_REG) & in altera_uart_get_mctrl() [all …]
|
| H A D | apbuart.c | 36 static void apbuart_tx_chars(struct uart_port *port); 38 static void apbuart_stop_tx(struct uart_port *port) in apbuart_stop_tx() argument 42 cr = UART_GET_CTRL(port); in apbuart_stop_tx() 44 UART_PUT_CTRL(port, cr); in apbuart_stop_tx() 47 static void apbuart_start_tx(struct uart_port *port) in apbuart_start_tx() argument 51 cr = UART_GET_CTRL(port); in apbuart_start_tx() 53 UART_PUT_CTRL(port, cr); in apbuart_start_tx() 55 if (UART_GET_STATUS(port) & UART_STATUS_THE) in apbuart_start_tx() 56 apbuart_tx_chars(port); in apbuart_start_tx() 59 static void apbuart_stop_rx(struct uart_port *port) in apbuart_stop_rx() argument [all …]
|
| H A D | mcf.c | 53 struct uart_port port; member 60 static unsigned int mcf_tx_empty(struct uart_port *port) in mcf_tx_empty() argument 62 return (readb(port->membase + MCFUART_USR) & MCFUART_USR_TXEMPTY) ? in mcf_tx_empty() 68 static unsigned int mcf_get_mctrl(struct uart_port *port) in mcf_get_mctrl() argument 70 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); in mcf_get_mctrl() 73 sigs = (readb(port->membase + MCFUART_UIPR) & MCFUART_UIPR_CTS) ? in mcf_get_mctrl() 76 sigs |= (mcf_getppdcd(port->line) ? TIOCM_CD : 0); in mcf_get_mctrl() 77 sigs |= (mcf_getppdtr(port->line) ? TIOCM_DTR : 0); in mcf_get_mctrl() 84 static void mcf_set_mctrl(struct uart_port *port, unsigned int sigs) in mcf_set_mctrl() argument 86 struct mcf_uart *pp = container_of(port, struct mcf_uart, port); in mcf_set_mctrl() [all …]
|
| H A D | atmel_serial.c | 57 static void atmel_start_rx(struct uart_port *port); 58 static void atmel_stop_rx(struct uart_port *port); 184 int (*prepare_rx)(struct uart_port *port); 185 int (*prepare_tx)(struct uart_port *port); 186 void (*schedule_rx)(struct uart_port *port); 187 void (*schedule_tx)(struct uart_port *port); 188 void (*release_rx)(struct uart_port *port); 189 void (*release_tx)(struct uart_port *port); 208 static inline u32 atmel_uart_readl(struct uart_port *port, u32 reg) in atmel_uart_readl() argument 210 return __raw_readl(port->membase + reg); in atmel_uart_readl() [all …]
|
| H A D | st-asc.c | 36 struct uart_port port; member 146 static inline struct asc_port *to_asc_port(struct uart_port *port) in to_asc_port() argument 148 return container_of(port, struct asc_port, port); in to_asc_port() 151 static inline u32 asc_in(struct uart_port *port, u32 offset) in asc_in() argument 154 return readl_relaxed(port->membase + offset); in asc_in() 156 return readl(port->membase + offset); in asc_in() 160 static inline void asc_out(struct uart_port *port, u32 offset, u32 value) in asc_out() argument 163 writel_relaxed(value, port->membase + offset); in asc_out() 165 writel(value, port->membase + offset); in asc_out() 173 static inline void asc_disable_tx_interrupts(struct uart_port *port) in asc_disable_tx_interrupts() argument [all …]
|
| H A D | meson_uart.c | 89 static void meson_uart_set_mctrl(struct uart_port *port, unsigned int mctrl) in meson_uart_set_mctrl() argument 93 static unsigned int meson_uart_get_mctrl(struct uart_port *port) in meson_uart_get_mctrl() argument 98 static unsigned int meson_uart_tx_empty(struct uart_port *port) in meson_uart_tx_empty() argument 102 val = readl(port->membase + AML_UART_STATUS); in meson_uart_tx_empty() 107 static void meson_uart_stop_tx(struct uart_port *port) in meson_uart_stop_tx() argument 111 val = readl(port->membase + AML_UART_CONTROL); in meson_uart_stop_tx() 113 writel(val, port->membase + AML_UART_CONTROL); in meson_uart_stop_tx() 116 static void meson_uart_stop_rx(struct uart_port *port) in meson_uart_stop_rx() argument 120 val = readl(port->membase + AML_UART_CONTROL); in meson_uart_stop_rx() 122 writel(val, port->membase + AML_UART_CONTROL); in meson_uart_stop_rx() [all …]
|
| H A D | esp32_acm.c | 48 static void esp32s3_acm_write(struct uart_port *port, unsigned long reg, u32 v) in esp32s3_acm_write() argument 50 writel(v, port->membase + reg); in esp32s3_acm_write() 53 static u32 esp32s3_acm_read(struct uart_port *port, unsigned long reg) in esp32s3_acm_read() argument 55 return readl(port->membase + reg); in esp32s3_acm_read() 58 static u32 esp32s3_acm_tx_fifo_free(struct uart_port *port) in esp32s3_acm_tx_fifo_free() argument 60 u32 status = esp32s3_acm_read(port, USB_SERIAL_JTAG_EP1_CONF_REG); in esp32s3_acm_tx_fifo_free() 65 static u32 esp32s3_acm_tx_fifo_cnt(struct uart_port *port) in esp32s3_acm_tx_fifo_cnt() argument 67 u32 status = esp32s3_acm_read(port, USB_SERIAL_JTAG_IN_EP1_ST_REG); in esp32s3_acm_tx_fifo_cnt() 72 static u32 esp32s3_acm_rx_fifo_cnt(struct uart_port *port) in esp32s3_acm_rx_fifo_cnt() argument 74 u32 status = esp32s3_acm_read(port, USB_SERIAL_JTAG_OUT_EP1_ST_REG); in esp32s3_acm_rx_fifo_cnt() [all …]
|
| H A D | rda-uart.c | 117 struct uart_port port; member 121 #define to_rda_uart_port(port) container_of(port, struct rda_uart_port, port) argument 125 static inline void rda_uart_write(struct uart_port *port, u32 val, in rda_uart_write() argument 128 writel(val, port->membase + off); in rda_uart_write() 131 static inline u32 rda_uart_read(struct uart_port *port, unsigned int off) in rda_uart_read() argument 133 return readl(port->membase + off); in rda_uart_read() 136 static unsigned int rda_uart_tx_empty(struct uart_port *port) in rda_uart_tx_empty() argument 142 uart_port_lock_irqsave(port, &flags); in rda_uart_tx_empty() 144 val = rda_uart_read(port, RDA_UART_STATUS); in rda_uart_tx_empty() 147 uart_port_unlock_irqrestore(port, flags); in rda_uart_tx_empty() [all …]
|
| H A D | milbeaut_usio.c | 65 static void mlb_usio_stop_tx(struct uart_port *port) in mlb_usio_stop_tx() argument 67 writew(readw(port->membase + MLB_USIO_REG_FCR) & ~MLB_USIO_FCR_FTIE, in mlb_usio_stop_tx() 68 port->membase + MLB_USIO_REG_FCR); in mlb_usio_stop_tx() 69 writeb(readb(port->membase + MLB_USIO_REG_SCR) & ~MLB_USIO_SCR_TBIE, in mlb_usio_stop_tx() 70 port->membase + MLB_USIO_REG_SCR); in mlb_usio_stop_tx() 73 static void mlb_usio_tx_chars(struct uart_port *port) in mlb_usio_tx_chars() argument 75 struct tty_port *tport = &port->state->port; in mlb_usio_tx_chars() 78 writew(readw(port->membase + MLB_USIO_REG_FCR) & ~MLB_USIO_FCR_FTIE, in mlb_usio_tx_chars() 79 port->membase + MLB_USIO_REG_FCR); in mlb_usio_tx_chars() 80 writeb(readb(port->membase + MLB_USIO_REG_SCR) & in mlb_usio_tx_chars() [all …]
|
| H A D | uartlite.c | 118 static inline u32 uart_in32(u32 offset, struct uart_port *port) in uart_in32() argument 120 struct uartlite_data *pdata = port->private_data; in uart_in32() 122 return pdata->reg_ops->in(port->membase + offset); in uart_in32() 125 static inline void uart_out32(u32 val, u32 offset, struct uart_port *port) in uart_out32() argument 127 struct uartlite_data *pdata = port->private_data; in uart_out32() 129 pdata->reg_ops->out(val, port->membase + offset); in uart_out32() 140 static int ulite_receive(struct uart_port *port, int stat) in ulite_receive() argument 142 struct tty_port *tport = &port->state->port; in ulite_receive() 152 port->icount.rx++; in ulite_receive() 153 ch = uart_in32(ULITE_RX, port); in ulite_receive() [all …]
|
| /linux/drivers/char/ |
| H A D | virtio_console.c | 167 struct port { struct 234 static struct port *find_port_by_vtermno(u32 vtermno) in find_port_by_vtermno() argument 236 struct port *port; in find_port_by_vtermno() local 243 port = container_of(cons, struct port, cons); in find_port_by_vtermno() 247 port = NULL; in find_port_by_vtermno() 250 return port; in find_port_by_vtermno() 253 static struct port *find_port_by_devt_in_portdev(struct ports_device *portdev, in find_port_by_devt_in_portdev() 256 struct port *port; in find_port_by_devt_in_portdev() local 260 list_for_each_entry(port, &portdev->ports, list) { in find_port_by_devt_in_portdev() 261 if (port->cdev->dev == dev) { in find_port_by_devt_in_portdev() [all …]
|
| /linux/drivers/tty/ |
| H A D | vcc.c | 114 static int vcc_table_add(struct vcc_port *port) in vcc_table_add() argument 122 vcc_table[i] = port; in vcc_table_add() 160 struct vcc_port *port; in vcc_get() local 166 port = vcc_table[index]; in vcc_get() 167 if (!port) { in vcc_get() 173 if (port->excl_locked) { in vcc_get() 178 port->refcnt++; in vcc_get() 180 return port; in vcc_get() 183 if (port->refcnt) { in vcc_get() 193 port->refcnt++; in vcc_get() [all …]
|
| /linux/drivers/usb/serial/ |
| H A D | generic.c | 105 int usb_serial_generic_open(struct tty_struct *tty, struct usb_serial_port *port) in usb_serial_generic_open() argument 109 clear_bit(USB_SERIAL_THROTTLED, &port->flags); in usb_serial_generic_open() 111 if (port->bulk_in_size) in usb_serial_generic_open() 112 result = usb_serial_generic_submit_read_urbs(port, GFP_KERNEL); in usb_serial_generic_open() 118 void usb_serial_generic_close(struct usb_serial_port *port) in usb_serial_generic_close() argument 123 if (port->bulk_out_size) { in usb_serial_generic_close() 124 for (i = 0; i < ARRAY_SIZE(port->write_urbs); ++i) in usb_serial_generic_close() 125 usb_kill_urb(port->write_urbs[i]); in usb_serial_generic_close() 127 spin_lock_irqsave(&port->lock, flags); in usb_serial_generic_close() 128 kfifo_reset_out(&port->write_fifo); in usb_serial_generic_close() [all …]
|
| /linux/drivers/net/wan/ |
| H A D | hd64572.c | 44 #define get_msci(port) ((port)->chan ? MSCI1_OFFSET : MSCI0_OFFSET) argument 45 #define get_dmac_rx(port) ((port)->chan ? DMAC1RX_OFFSET : DMAC0RX_OFFSET) argument 46 #define get_dmac_tx(port) ((port)->chan ? DMAC1TX_OFFSET : DMAC0TX_OFFSET) argument 62 static inline void enable_intr(port_t *port) in enable_intr() argument 65 sca_outl(sca_inl(IER0, port->card) | in enable_intr() 66 (port->chan ? 0x08002200 : 0x00080022), IER0, port->card); in enable_intr() 69 static inline void disable_intr(port_t *port) in disable_intr() argument 71 sca_outl(sca_inl(IER0, port->card) & in disable_intr() 72 (port->chan ? 0x00FF00FF : 0xFF00FF00), IER0, port->card); in disable_intr() 75 static inline u16 desc_abs_number(port_t *port, u16 desc, int transmit) in desc_abs_number() argument [all …]
|
| /linux/drivers/pci/controller/ |
| H A D | pci-mvebu.c | 103 u32 port; member 128 static inline void mvebu_writel(struct mvebu_pcie_port *port, u32 val, u32 reg) in mvebu_writel() argument 130 writel(val, port->base + reg); in mvebu_writel() 133 static inline u32 mvebu_readl(struct mvebu_pcie_port *port, u32 reg) in mvebu_readl() argument 135 return readl(port->base + reg); in mvebu_readl() 138 static inline bool mvebu_has_ioport(struct mvebu_pcie_port *port) in mvebu_has_ioport() argument 140 return port->io_target != -1 && port->io_attr != -1; in mvebu_has_ioport() 143 static bool mvebu_pcie_link_up(struct mvebu_pcie_port *port) in mvebu_pcie_link_up() argument 145 return !(mvebu_readl(port, PCIE_STAT_OFF) & PCIE_STAT_LINK_DOWN); in mvebu_pcie_link_up() 148 static u8 mvebu_pcie_get_local_bus_nr(struct mvebu_pcie_port *port) in mvebu_pcie_get_local_bus_nr() argument [all …]
|
| /linux/drivers/gpio/ |
| H A D | gpio-mxc.c | 125 #define GPIO_DR (port->hwdata->dr_reg) 126 #define GPIO_GDIR (port->hwdata->gdir_reg) 127 #define GPIO_PSR (port->hwdata->psr_reg) 128 #define GPIO_ICR1 (port->hwdata->icr1_reg) 129 #define GPIO_ICR2 (port->hwdata->icr2_reg) 130 #define GPIO_IMR (port->hwdata->imr_reg) 131 #define GPIO_ISR (port->hwdata->isr_reg) 132 #define GPIO_EDGE_SEL (port->hwdata->edge_sel_reg) 134 #define GPIO_INT_LOW_LEV (port->hwdata->low_level) 135 #define GPIO_INT_HIGH_LEV (port->hwdata->high_level) [all …]
|