Lines Matching refs:sup

537 	struct sunplus_uart_port *sup;  in sunplus_console_setup()  local
546 sup = sunplus_console_ports[co->index]; in sunplus_console_setup()
547 if (!sup) in sunplus_console_setup()
553 return uart_set_options(&sup->port, co, baud, parity, bits, flow); in sunplus_console_setup()
594 struct sunplus_uart_port *sup; in sunplus_uart_probe() local
604 sup = devm_kzalloc(&pdev->dev, sizeof(*sup), GFP_KERNEL); in sunplus_uart_probe()
605 if (!sup) in sunplus_uart_probe()
608 sup->clk = devm_clk_get_optional(&pdev->dev, NULL); in sunplus_uart_probe()
609 if (IS_ERR(sup->clk)) in sunplus_uart_probe()
610 return dev_err_probe(&pdev->dev, PTR_ERR(sup->clk), "clk not found\n"); in sunplus_uart_probe()
612 ret = clk_prepare_enable(sup->clk); in sunplus_uart_probe()
616 ret = devm_add_action_or_reset(&pdev->dev, sunplus_uart_disable_unprepare, sup->clk); in sunplus_uart_probe()
620 sup->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); in sunplus_uart_probe()
621 if (IS_ERR(sup->rstc)) in sunplus_uart_probe()
622 return dev_err_probe(&pdev->dev, PTR_ERR(sup->rstc), "rstc not found\n"); in sunplus_uart_probe()
624 port = &sup->port; in sunplus_uart_probe()
635 port->uartclk = clk_get_rate(sup->clk); in sunplus_uart_probe()
644 ret = reset_control_deassert(sup->rstc); in sunplus_uart_probe()
648 ret = devm_add_action_or_reset(&pdev->dev, sunplus_uart_reset_control_assert, sup->rstc); in sunplus_uart_probe()
653 sunplus_console_ports[sup->port.line] = sup; in sunplus_uart_probe()
656 platform_set_drvdata(pdev, &sup->port); in sunplus_uart_probe()
658 ret = uart_add_one_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_probe()
661 sunplus_console_ports[sup->port.line] = NULL; in sunplus_uart_probe()
669 struct sunplus_uart_port *sup = platform_get_drvdata(pdev); in sunplus_uart_remove() local
671 uart_remove_one_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_remove()
678 struct sunplus_uart_port *sup = dev_get_drvdata(dev); in sunplus_uart_suspend() local
680 if (!uart_console(&sup->port)) in sunplus_uart_suspend()
681 uart_suspend_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_suspend()
688 struct sunplus_uart_port *sup = dev_get_drvdata(dev); in sunplus_uart_resume() local
690 if (!uart_console(&sup->port)) in sunplus_uart_resume()
691 uart_resume_port(&sunplus_uart_driver, &sup->port); in sunplus_uart_resume()