Lines Matching refs:sport

794         struct uart_pxa_port *sport = dev_get_drvdata(dev);  in serial_pxa_suspend()  local
796 if (sport) in serial_pxa_suspend()
797 uart_suspend_port(&serial_pxa_reg, &sport->port); in serial_pxa_suspend()
804 struct uart_pxa_port *sport = dev_get_drvdata(dev); in serial_pxa_resume() local
806 if (sport) in serial_pxa_resume()
807 uart_resume_port(&serial_pxa_reg, &sport->port); in serial_pxa_resume()
825 struct uart_pxa_port *sport) in serial_pxa_probe_dt() argument
838 sport->port.line = ret; in serial_pxa_probe_dt()
844 struct uart_pxa_port *sport; in serial_pxa_probe() local
853 sport = kzalloc(sizeof(struct uart_pxa_port), GFP_KERNEL); in serial_pxa_probe()
854 if (!sport) in serial_pxa_probe()
857 sport->clk = clk_get(&dev->dev, NULL); in serial_pxa_probe()
858 if (IS_ERR(sport->clk)) { in serial_pxa_probe()
859 ret = PTR_ERR(sport->clk); in serial_pxa_probe()
863 ret = clk_prepare(sport->clk); in serial_pxa_probe()
865 clk_put(sport->clk); in serial_pxa_probe()
869 sport->port.type = PORT_PXA; in serial_pxa_probe()
870 sport->port.iotype = UPIO_MEM; in serial_pxa_probe()
871 sport->port.mapbase = mmres->start; in serial_pxa_probe()
872 sport->port.irq = irqres->start; in serial_pxa_probe()
873 sport->port.fifosize = 64; in serial_pxa_probe()
874 sport->port.ops = &serial_pxa_pops; in serial_pxa_probe()
875 sport->port.dev = &dev->dev; in serial_pxa_probe()
876 sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; in serial_pxa_probe()
877 sport->port.uartclk = clk_get_rate(sport->clk); in serial_pxa_probe()
878 sport->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_PXA_CONSOLE); in serial_pxa_probe()
880 ret = serial_pxa_probe_dt(dev, sport); in serial_pxa_probe()
882 sport->port.line = dev->id; in serial_pxa_probe()
885 if (sport->port.line >= ARRAY_SIZE(serial_pxa_ports)) { in serial_pxa_probe()
886 dev_err(&dev->dev, "serial%d out of range\n", sport->port.line); in serial_pxa_probe()
890 snprintf(sport->name, PXA_NAME_LEN - 1, "UART%d", sport->port.line + 1); in serial_pxa_probe()
892 sport->port.membase = ioremap(mmres->start, resource_size(mmres)); in serial_pxa_probe()
893 if (!sport->port.membase) { in serial_pxa_probe()
898 serial_pxa_ports[sport->port.line] = sport; in serial_pxa_probe()
900 uart_add_one_port(&serial_pxa_reg, &sport->port); in serial_pxa_probe()
901 platform_set_drvdata(dev, sport); in serial_pxa_probe()
906 clk_unprepare(sport->clk); in serial_pxa_probe()
907 clk_put(sport->clk); in serial_pxa_probe()
909 kfree(sport); in serial_pxa_probe()