Lines Matching refs:sup

531 	struct sunplus_uart_port *sup;  in sunplus_console_setup()  local
540 sup = sunplus_console_ports[co->index]; in sunplus_console_setup()
541 if (!sup) in sunplus_console_setup()
547 return uart_set_options(&sup->port, co, baud, parity, bits, flow); in sunplus_console_setup()
588 struct sunplus_uart_port *sup; in sunplus_uart_probe() local
598 sup = devm_kzalloc(&pdev->dev, sizeof(*sup), GFP_KERNEL); in sunplus_uart_probe()
599 if (!sup) in sunplus_uart_probe()
602 sup->clk = devm_clk_get_optional(&pdev->dev, NULL); in sunplus_uart_probe()
603 if (IS_ERR(sup->clk)) in sunplus_uart_probe()
604 return dev_err_probe(&pdev->dev, PTR_ERR(sup->clk), "clk not found\n"); in sunplus_uart_probe()
606 ret = clk_prepare_enable(sup->clk); in sunplus_uart_probe()
610 ret = devm_add_action_or_reset(&pdev->dev, sunplus_uart_disable_unprepare, sup->clk); in sunplus_uart_probe()
614 sup->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); in sunplus_uart_probe()
615 if (IS_ERR(sup->rstc)) in sunplus_uart_probe()
616 return dev_err_probe(&pdev->dev, PTR_ERR(sup->rstc), "rstc not found\n"); in sunplus_uart_probe()
618 port = &sup->port; in sunplus_uart_probe()
629 port->uartclk = clk_get_rate(sup->clk); in sunplus_uart_probe()
638 ret = reset_control_deassert(sup->rstc); in sunplus_uart_probe()
642 ret = devm_add_action_or_reset(&pdev->dev, sunplus_uart_reset_control_assert, sup->rstc); in sunplus_uart_probe()
647 sunplus_console_ports[sup->port.line] = sup; in sunplus_uart_probe()
650 platform_set_drvdata(pdev, &sup->port); in sunplus_uart_probe()
652 ret = uart_add_one_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_probe()
655 sunplus_console_ports[sup->port.line] = NULL; in sunplus_uart_probe()
663 struct sunplus_uart_port *sup = platform_get_drvdata(pdev); in sunplus_uart_remove() local
665 uart_remove_one_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_remove()
670 struct sunplus_uart_port *sup = dev_get_drvdata(dev); in sunplus_uart_suspend() local
672 if (!uart_console(&sup->port)) in sunplus_uart_suspend()
673 uart_suspend_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_suspend()
680 struct sunplus_uart_port *sup = dev_get_drvdata(dev); in sunplus_uart_resume() local
682 if (!uart_console(&sup->port)) in sunplus_uart_resume()
683 uart_resume_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_resume()