Lines Matching refs:sport

751         struct uart_pxa_port *sport = dev_get_drvdata(dev);  in serial_pxa_suspend()  local
753 if (sport) in serial_pxa_suspend()
754 uart_suspend_port(&serial_pxa_reg, &sport->port); in serial_pxa_suspend()
761 struct uart_pxa_port *sport = dev_get_drvdata(dev); in serial_pxa_resume() local
763 if (sport) in serial_pxa_resume()
764 uart_resume_port(&serial_pxa_reg, &sport->port); in serial_pxa_resume()
782 struct uart_pxa_port *sport) in serial_pxa_probe_dt() argument
795 sport->port.line = ret; in serial_pxa_probe_dt()
801 struct uart_pxa_port *sport; in serial_pxa_probe() local
814 sport = kzalloc(sizeof(struct uart_pxa_port), GFP_KERNEL); in serial_pxa_probe()
815 if (!sport) in serial_pxa_probe()
818 sport->clk = clk_get(&dev->dev, NULL); in serial_pxa_probe()
819 if (IS_ERR(sport->clk)) { in serial_pxa_probe()
820 ret = PTR_ERR(sport->clk); in serial_pxa_probe()
824 ret = clk_prepare(sport->clk); in serial_pxa_probe()
826 clk_put(sport->clk); in serial_pxa_probe()
830 sport->port.type = PORT_PXA; in serial_pxa_probe()
831 sport->port.iotype = UPIO_MEM; in serial_pxa_probe()
832 sport->port.mapbase = mmres->start; in serial_pxa_probe()
833 sport->port.irq = irq; in serial_pxa_probe()
834 sport->port.fifosize = 64; in serial_pxa_probe()
835 sport->port.ops = &serial_pxa_pops; in serial_pxa_probe()
836 sport->port.dev = &dev->dev; in serial_pxa_probe()
837 sport->port.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF; in serial_pxa_probe()
838 sport->port.uartclk = clk_get_rate(sport->clk); in serial_pxa_probe()
839 sport->port.has_sysrq = IS_ENABLED(CONFIG_SERIAL_PXA_CONSOLE); in serial_pxa_probe()
841 ret = serial_pxa_probe_dt(dev, sport); in serial_pxa_probe()
843 sport->port.line = dev->id; in serial_pxa_probe()
846 if (sport->port.line >= ARRAY_SIZE(serial_pxa_ports)) { in serial_pxa_probe()
847 dev_err(&dev->dev, "serial%d out of range\n", sport->port.line); in serial_pxa_probe()
851 snprintf(sport->name, PXA_NAME_LEN - 1, "UART%d", sport->port.line + 1); in serial_pxa_probe()
853 sport->port.membase = ioremap(mmres->start, resource_size(mmres)); in serial_pxa_probe()
854 if (!sport->port.membase) { in serial_pxa_probe()
859 serial_pxa_ports[sport->port.line] = sport; in serial_pxa_probe()
861 uart_add_one_port(&serial_pxa_reg, &sport->port); in serial_pxa_probe()
862 platform_set_drvdata(dev, sport); in serial_pxa_probe()
867 clk_unprepare(sport->clk); in serial_pxa_probe()
868 clk_put(sport->clk); in serial_pxa_probe()
870 kfree(sport); in serial_pxa_probe()