Lines Matching defs:sci_port

60 /* Offsets into the sci_port->irqs array */
117 struct sci_port {
164 static struct sci_port sci_ports[SCI_NPORTS];
168 static inline struct sci_port *
171 return container_of(uart, struct sci_port, port);
530 static void sci_port_enable(struct sci_port *sci_port)
534 if (!sci_port->port.dev)
537 pm_runtime_get_sync(sci_port->port.dev);
540 clk_prepare_enable(sci_port->clks[i]);
541 sci_port->clk_rates[i] = clk_get_rate(sci_port->clks[i]);
543 sci_port->port.uartclk = sci_port->clk_rates[SCI_FCK];
546 static void sci_port_disable(struct sci_port *sci_port)
550 if (!sci_port->port.dev)
554 clk_disable_unprepare(sci_port->clks[i]);
556 pm_runtime_put_sync(sci_port->port.dev);
573 struct sci_port *s = to_sci_port(port);
713 struct sci_port *s = to_sci_port(port);
763 struct sci_port *s = to_sci_port(port);
785 struct sci_port *s = to_sci_port(port);
936 struct sci_port *s = to_sci_port(port);
978 struct sci_port *s = to_sci_port(port);
1101 struct sci_port *s = from_timer(s, t, rx_fifo_timer);
1112 struct sci_port *sci = to_sci_port(port);
1122 struct sci_port *sci = to_sci_port(port);
1144 struct sci_port *sci = to_sci_port(port);
1161 struct sci_port *sci = to_sci_port(port);
1189 struct sci_port *s = arg;
1221 static int sci_dma_rx_push(struct sci_port *s, void *buf, size_t count)
1236 static int sci_dma_rx_find_active(struct sci_port *s)
1247 static void sci_dma_rx_chan_invalidate(struct sci_port *s)
1257 static void sci_dma_rx_release(struct sci_port *s)
1278 static void sci_dma_rx_reenable_irq(struct sci_port *s)
1294 struct sci_port *s = arg;
1347 static void sci_dma_tx_release(struct sci_port *s)
1360 static int sci_dma_rx_submit(struct sci_port *s, bool port_lock_held)
1405 struct sci_port *s = container_of(work, struct sci_port, work_tx);
1472 struct sci_port *s = container_of(t, struct sci_port, rx_timer);
1574 struct sci_port *s = to_sci_port(port);
1660 struct sci_port *s = to_sci_port(port);
1670 struct sci_port *s = to_sci_port(port);
1698 struct sci_port *s = to_sci_port(port);
1776 struct sci_port *s = to_sci_port(port);
1817 struct sci_port *s = to_sci_port(port);
1906 static int sci_request_irq(struct sci_port *port)
1965 static void sci_free_irq(struct sci_port *port)
2062 struct sci_port *s = to_sci_port(port);
2107 struct sci_port *s = to_sci_port(port);
2169 struct sci_port *s = to_sci_port(port);
2187 struct sci_port *s = to_sci_port(port);
2222 static int sci_sck_calc(struct sci_port *s, unsigned int bps,
2249 static int sci_brg_calc(struct sci_port *s, unsigned int bps,
2281 static int sci_scbrr_calc(struct sci_port *s, unsigned int bps,
2352 struct sci_port *s = to_sci_port(port);
2389 struct sci_port *s = to_sci_port(port);
2661 struct sci_port *sci_port = to_sci_port(port);
2665 sci_port_disable(sci_port);
2668 sci_port_enable(sci_port);
2695 struct sci_port *sport = to_sci_port(port);
2723 struct sci_port *sport = to_sci_port(port);
2736 struct sci_port *sport = to_sci_port(port);
2758 struct sci_port *sport = to_sci_port(port);
2799 static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
2810 if (sci_port->cfg->type == PORT_HSCIF)
2851 sci_port->clks[i] = IS_ERR(clk) ? NULL : clk;
2898 struct sci_port *sci_port, unsigned int index,
2901 struct uart_port *port = &sci_port->port;
2906 sci_port->cfg = p;
2918 sci_port->reg_size = resource_size(res);
2920 for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) {
2922 sci_port->irqs[i] = platform_get_irq_optional(dev, i);
2924 sci_port->irqs[i] = platform_get_irq(dev, i);
2932 swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]);
2941 if (sci_port->irqs[0] < 0)
2944 if (sci_port->irqs[1] < 0)
2945 for (i = 1; i < ARRAY_SIZE(sci_port->irqs); i++)
2946 sci_port->irqs[i] = sci_port->irqs[0];
2948 sci_port->params = sci_probe_regmap(p);
2949 if (unlikely(sci_port->params == NULL))
2954 sci_port->rx_trigger = 48;
2957 sci_port->rx_trigger = 64;
2960 sci_port->rx_trigger = 32;
2965 sci_port->rx_trigger = 1;
2967 sci_port->rx_trigger = 8;
2970 sci_port->rx_trigger = 1;
2974 sci_port->rx_fifo_timeout = 0;
2975 sci_port->hscif_tot = 0;
2981 sci_port->sampling_rate_mask = p->sampling_rate
2983 : sci_port->params->sampling_rate_mask;
2986 ret = sci_init_clocks(sci_port, &dev->dev);
2997 port->fifosize = sci_port->params->fifosize;
3000 if (sci_port->reg_size >= 0x20)
3013 port->irq = sci_port->irqs[SCIx_RXI_IRQ];
3022 static void sci_cleanup_single(struct sci_port *port)
3041 struct sci_port *sci_port = &sci_ports[co->index];
3042 struct uart_port *port = &sci_port->port;
3057 (sci_port->cfg->scscr & ~(SCSCR_CKE1 | SCSCR_CKE0)) |
3059 serial_port_out(port, SCSCR, ctrl_temp | sci_port->hscif_tot);
3077 struct sci_port *sci_port;
3091 sci_port = &sci_ports[co->index];
3092 port = &sci_port->port;
3178 struct sci_port *port = platform_get_drvdata(dev);
3247 struct sci_port *sp;
3287 struct sci_port *sciport)
3341 struct sci_port *sp;
3403 struct sci_port *sport = dev_get_drvdata(dev);
3413 struct sci_port *sport = dev_get_drvdata(dev);