Lines Matching full:ssp
36 MODULE_DESCRIPTION("PXA2xx SSP SPI Controller");
43 * For testing SSCR1 changes that require SSP restart, basically
310 * Read and write LPSS SSP private registers. Caller must first check that
327 * lpss_ssp_setup - perform LPSS SSP specific setup
330 * Perform LPSS SSP specific setup. This function must be called first if
331 * one is going to use LPSS SSP private registers.
339 drv_data->lpss_base = drv_data->ssp->mmio_base + config->offset; in lpss_ssp_setup()
458 /* Wait until SSP becomes idle before deasserting the CS */ in cs_deassert()
500 pxa_ssp_disable(drv_data->ssp); in pxa2xx_spi_off()
639 dev_err(drv_data->ssp->dev, "%s\n", msg); in int_error_stop()
735 dev_err(drv_data->ssp->dev, "bad message state in interrupt handler\n"); in handle_bad_msg()
751 if (pm_runtime_suspended(drv_data->ssp->dev)) in ssp_int()
913 const struct ssp_device *ssp = drv_data->ssp; in ssp_get_clk_div() local
919 * that the SSP transmission rate can be greater than the device rate. in ssp_get_clk_div()
921 if (ssp->type == PXA25x_SSP || ssp->type == CE4100_SSP) in ssp_get_clk_div()
1100 /* Stop the SSP */ in pxa2xx_spi_transfer_one()
1102 pxa_ssp_disable(drv_data->ssp); in pxa2xx_spi_transfer_one()
1113 /* Restart the SSP */ in pxa2xx_spi_transfer_one()
1114 pxa_ssp_enable(drv_data->ssp); in pxa2xx_spi_transfer_one()
1163 /* Disable the SSP */ in pxa2xx_spi_handle_err()
1181 /* Disable the SSP now */ in pxa2xx_spi_unprepare_transfer()
1444 * autoloading and probing in this module but matching the LPSS SSP type.
1533 { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP },
1576 struct ssp_device *ssp; in pxa2xx_spi_init_pdata() local
1599 ssp = &pdata->ssp; in pxa2xx_spi_init_pdata()
1602 ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res); in pxa2xx_spi_init_pdata()
1603 if (IS_ERR(ssp->mmio_base)) in pxa2xx_spi_init_pdata()
1604 return ERR_CAST(ssp->mmio_base); in pxa2xx_spi_init_pdata()
1606 ssp->phys_base = res->start; in pxa2xx_spi_init_pdata()
1616 ssp->clk = devm_clk_get(&pdev->dev, NULL); in pxa2xx_spi_init_pdata()
1617 if (IS_ERR(ssp->clk)) in pxa2xx_spi_init_pdata()
1618 return ERR_CAST(ssp->clk); in pxa2xx_spi_init_pdata()
1620 ssp->irq = platform_get_irq(pdev, 0); in pxa2xx_spi_init_pdata()
1621 if (ssp->irq < 0) in pxa2xx_spi_init_pdata()
1622 return ERR_PTR(ssp->irq); in pxa2xx_spi_init_pdata()
1624 ssp->type = type; in pxa2xx_spi_init_pdata()
1625 ssp->dev = &pdev->dev; in pxa2xx_spi_init_pdata()
1626 ssp->port_id = pxa2xx_spi_get_port_id(&pdev->dev); in pxa2xx_spi_init_pdata()
1641 if (has_acpi_companion(drv_data->ssp->dev)) { in pxa2xx_spi_fw_translate_cs()
1671 struct ssp_device *ssp; in pxa2xx_spi_probe() local
1685 ssp = pxa_ssp_request(pdev->id, pdev->name); in pxa2xx_spi_probe()
1686 if (!ssp) in pxa2xx_spi_probe()
1687 ssp = &platform_info->ssp; in pxa2xx_spi_probe()
1689 if (!ssp->mmio_base) { in pxa2xx_spi_probe()
1690 dev_err(&pdev->dev, "failed to get SSP\n"); in pxa2xx_spi_probe()
1707 drv_data->ssp = ssp; in pxa2xx_spi_probe()
1715 controller->bus_num = ssp->port_id; in pxa2xx_spi_probe()
1728 drv_data->ssp_type = ssp->type; in pxa2xx_spi_probe()
1753 status = request_irq(ssp->irq, ssp_int, IRQF_SHARED, dev_name(dev), in pxa2xx_spi_probe()
1756 dev_err(&pdev->dev, "cannot get IRQ %d\n", ssp->irq); in pxa2xx_spi_probe()
1775 status = clk_prepare_enable(ssp->clk); in pxa2xx_spi_probe()
1779 controller->max_speed_hz = clk_get_rate(ssp->clk); in pxa2xx_spi_probe()
1791 pxa_ssp_disable(ssp); in pxa2xx_spi_probe()
1793 /* Load default SSP configuration */ in pxa2xx_spi_probe()
1882 clk_disable_unprepare(ssp->clk); in pxa2xx_spi_probe()
1886 free_irq(ssp->irq, drv_data); in pxa2xx_spi_probe()
1889 pxa_ssp_free(ssp); in pxa2xx_spi_probe()
1896 struct ssp_device *ssp = drv_data->ssp; in pxa2xx_spi_remove() local
1902 /* Disable the SSP at the peripheral and SOC level */ in pxa2xx_spi_remove()
1903 pxa_ssp_disable(ssp); in pxa2xx_spi_remove()
1904 clk_disable_unprepare(ssp->clk); in pxa2xx_spi_remove()
1914 free_irq(ssp->irq, drv_data); in pxa2xx_spi_remove()
1916 /* Release SSP */ in pxa2xx_spi_remove()
1917 pxa_ssp_free(ssp); in pxa2xx_spi_remove()
1926 struct ssp_device *ssp = drv_data->ssp; in pxa2xx_spi_suspend() local
1933 pxa_ssp_disable(ssp); in pxa2xx_spi_suspend()
1936 clk_disable_unprepare(ssp->clk); in pxa2xx_spi_suspend()
1944 struct ssp_device *ssp = drv_data->ssp; in pxa2xx_spi_resume() local
1947 /* Enable the SSP clock */ in pxa2xx_spi_resume()
1949 status = clk_prepare_enable(ssp->clk); in pxa2xx_spi_resume()
1964 clk_disable_unprepare(drv_data->ssp->clk); in pxa2xx_spi_runtime_suspend()
1973 status = clk_prepare_enable(drv_data->ssp->clk); in pxa2xx_spi_runtime_resume()