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);
531 static void sci_port_enable(struct sci_port *sci_port)
535 if (!sci_port->port.dev)
538 pm_runtime_get_sync(sci_port->port.dev);
541 clk_prepare_enable(sci_port->clks[i]);
542 sci_port->clk_rates[i] = clk_get_rate(sci_port->clks[i]);
544 sci_port->port.uartclk = sci_port->clk_rates[SCI_FCK];
547 static void sci_port_disable(struct sci_port *sci_port)
551 if (!sci_port->port.dev)
555 clk_disable_unprepare(sci_port->clks[i]);
557 pm_runtime_put_sync(sci_port->port.dev);
574 struct sci_port *s = to_sci_port(port);
728 struct sci_port *s = to_sci_port(port);
778 struct sci_port *s = to_sci_port(port);
800 struct sci_port *s = to_sci_port(port);
958 struct sci_port *s = to_sci_port(port);
994 struct sci_port *s = to_sci_port(port);
1113 struct sci_port *s = from_timer(s, t, rx_fifo_timer);
1124 struct sci_port *sci = to_sci_port(port);
1134 struct sci_port *sci = to_sci_port(port);
1156 struct sci_port *sci = to_sci_port(port);
1173 struct sci_port *sci = to_sci_port(port);
1201 struct sci_port *s = arg;
1236 static int sci_dma_rx_push(struct sci_port *s, void *buf, size_t count)
1251 static int sci_dma_rx_find_active(struct sci_port *s)
1262 static void sci_dma_rx_chan_invalidate(struct sci_port *s)
1272 static void sci_dma_rx_release(struct sci_port *s)
1293 static void sci_dma_rx_reenable_irq(struct sci_port *s)
1313 struct sci_port *s = arg;
1366 static void sci_dma_tx_release(struct sci_port *s)
1379 static int sci_dma_rx_submit(struct sci_port *s, bool port_lock_held)
1424 struct sci_port *s = container_of(work, struct sci_port, work_tx);
1489 struct sci_port *s = container_of(t, struct sci_port, rx_timer);
1589 struct sci_port *s = to_sci_port(port);
1676 struct sci_port *s = to_sci_port(port);
1686 struct sci_port *s = to_sci_port(port);
1714 struct sci_port *s = to_sci_port(port);
1816 struct sci_port *s = to_sci_port(port);
1857 struct sci_port *s = to_sci_port(port);
1946 static int sci_request_irq(struct sci_port *port)
2005 static void sci_free_irq(struct sci_port *port)
2102 struct sci_port *s = to_sci_port(port);
2147 struct sci_port *s = to_sci_port(port);
2209 struct sci_port *s = to_sci_port(port);
2227 struct sci_port *s = to_sci_port(port);
2262 static int sci_sck_calc(struct sci_port *s, unsigned int bps,
2289 static int sci_brg_calc(struct sci_port *s, unsigned int bps,
2321 static int sci_scbrr_calc(struct sci_port *s, unsigned int bps,
2392 struct sci_port *s = to_sci_port(port);
2429 struct sci_port *s = to_sci_port(port);
2681 struct sci_port *sci_port = to_sci_port(port);
2685 sci_port_disable(sci_port);
2688 sci_port_enable(sci_port);
2715 struct sci_port *sport = to_sci_port(port);
2743 struct sci_port *sport = to_sci_port(port);
2756 struct sci_port *sport = to_sci_port(port);
2778 struct sci_port *sport = to_sci_port(port);
2819 static int sci_init_clocks(struct sci_port *sci_port, struct device *dev)
2830 if (sci_port->cfg->type == PORT_HSCIF)
2856 sci_port->clks[i] = clk;
2903 struct sci_port *sci_port, unsigned int index,
2906 struct uart_port *port = &sci_port->port;
2911 sci_port->cfg = p;
2923 sci_port->reg_size = resource_size(res);
2925 for (i = 0; i < ARRAY_SIZE(sci_port->irqs); ++i) {
2927 sci_port->irqs[i] = platform_get_irq_optional(dev, i);
2929 sci_port->irqs[i] = platform_get_irq(dev, i);
2937 swap(sci_port->irqs[SCIx_BRI_IRQ], sci_port->irqs[SCIx_TEI_IRQ]);
2946 if (sci_port->irqs[0] < 0)
2949 if (sci_port->irqs[1] < 0)
2950 for (i = 1; i < ARRAY_SIZE(sci_port->irqs); i++)
2951 sci_port->irqs[i] = sci_port->irqs[0];
2953 sci_port->params = sci_probe_regmap(p);
2954 if (unlikely(sci_port->params == NULL))
2959 sci_port->rx_trigger = 48;
2962 sci_port->rx_trigger = 64;
2965 sci_port->rx_trigger = 32;
2970 sci_port->rx_trigger = 1;
2972 sci_port->rx_trigger = 8;
2975 sci_port->rx_trigger = 1;
2979 sci_port->rx_fifo_timeout = 0;
2980 sci_port->hscif_tot = 0;
2986 sci_port->sampling_rate_mask = p->sampling_rate
2988 : sci_port->params->sampling_rate_mask;
2991 ret = sci_init_clocks(sci_port, &dev->dev);
3002 port->fifosize = sci_port->params->fifosize;
3005 if (sci_port->reg_size >= 0x20)
3018 port->irq = sci_port->irqs[SCIx_RXI_IRQ];
3027 static void sci_cleanup_single(struct sci_port *port)
3046 struct sci_port *sci_port = &sci_ports[co->index];
3047 struct uart_port *port = &sci_port->port;
3062 (sci_port->cfg->scscr & ~(SCSCR_CKE1 | SCSCR_CKE0)) |
3064 serial_port_out(port, SCSCR, ctrl_temp | sci_port->hscif_tot);
3082 struct sci_port *sci_port;
3096 sci_port = &sci_ports[co->index];
3097 port = &sci_port->port;
3195 struct sci_port *port = platform_get_drvdata(dev);
3277 struct sci_port *sp;
3335 struct sci_port *sciport)
3389 struct sci_port *sp;
3451 struct sci_port *sport = dev_get_drvdata(dev);
3461 struct sci_port *sport = dev_get_drvdata(dev);