Lines Matching full:ssp

35 MODULE_DESCRIPTION("PXA2xx SSP SPI Controller");
42 * For testing SSCR1 changes that require SSP restart, basically
309 * Read and write LPSS SSP private registers. Caller must first check that
326 * lpss_ssp_setup - perform LPSS SSP specific setup
329 * Perform LPSS SSP specific setup. This function must be called first if
330 * one is going to use LPSS SSP private registers.
338 drv_data->lpss_base = drv_data->ssp->mmio_base + config->offset; in lpss_ssp_setup()
450 /* Wait until SSP becomes idle before deasserting the CS */ in cs_deassert()
487 pxa_ssp_disable(drv_data->ssp); in pxa2xx_spi_off()
626 dev_err(drv_data->ssp->dev, "%s\n", msg); in int_error_stop()
722 dev_err(drv_data->ssp->dev, "bad message state in interrupt handler\n"); in handle_bad_msg()
738 if (pm_runtime_suspended(drv_data->ssp->dev)) in ssp_int()
900 const struct ssp_device *ssp = drv_data->ssp; in ssp_get_clk_div() local
906 * that the SSP transmission rate can be greater than the device rate. in ssp_get_clk_div()
908 if (ssp->type == PXA25x_SSP || ssp->type == CE4100_SSP) in ssp_get_clk_div()
1078 /* Stop the SSP */ in pxa2xx_spi_transfer_one()
1080 pxa_ssp_disable(drv_data->ssp); in pxa2xx_spi_transfer_one()
1091 /* Restart the SSP */ in pxa2xx_spi_transfer_one()
1092 pxa_ssp_enable(drv_data->ssp); in pxa2xx_spi_transfer_one()
1141 /* Disable the SSP */ in pxa2xx_spi_handle_err()
1159 /* Disable the SSP now */ in pxa2xx_spi_unprepare_transfer()
1341 * autoloading and probing in this module but matching the LPSS SSP type.
1439 { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP },
1459 struct ssp_device *ssp; in pxa2xx_spi_init_pdata() local
1483 ssp = &pdata->ssp; in pxa2xx_spi_init_pdata()
1486 ssp->mmio_base = devm_ioremap_resource(&pdev->dev, res); in pxa2xx_spi_init_pdata()
1487 if (IS_ERR(ssp->mmio_base)) in pxa2xx_spi_init_pdata()
1488 return ERR_CAST(ssp->mmio_base); in pxa2xx_spi_init_pdata()
1490 ssp->phys_base = res->start; in pxa2xx_spi_init_pdata()
1500 ssp->clk = devm_clk_get(&pdev->dev, NULL); in pxa2xx_spi_init_pdata()
1501 if (IS_ERR(ssp->clk)) in pxa2xx_spi_init_pdata()
1502 return ERR_CAST(ssp->clk); in pxa2xx_spi_init_pdata()
1504 ssp->irq = platform_get_irq(pdev, 0); in pxa2xx_spi_init_pdata()
1505 if (ssp->irq < 0) in pxa2xx_spi_init_pdata()
1506 return ERR_PTR(ssp->irq); in pxa2xx_spi_init_pdata()
1508 ssp->type = type; in pxa2xx_spi_init_pdata()
1509 ssp->dev = &pdev->dev; in pxa2xx_spi_init_pdata()
1513 ssp->port_id = -1; in pxa2xx_spi_init_pdata()
1515 ssp->port_id = uid; in pxa2xx_spi_init_pdata()
1530 if (has_acpi_companion(drv_data->ssp->dev)) { in pxa2xx_spi_fw_translate_cs()
1560 struct ssp_device *ssp; in pxa2xx_spi_probe() local
1574 ssp = pxa_ssp_request(pdev->id, pdev->name); in pxa2xx_spi_probe()
1575 if (!ssp) in pxa2xx_spi_probe()
1576 ssp = &platform_info->ssp; in pxa2xx_spi_probe()
1578 if (!ssp->mmio_base) { in pxa2xx_spi_probe()
1579 dev_err(&pdev->dev, "failed to get SSP\n"); in pxa2xx_spi_probe()
1596 drv_data->ssp = ssp; in pxa2xx_spi_probe()
1603 controller->bus_num = ssp->port_id; in pxa2xx_spi_probe()
1616 drv_data->ssp_type = ssp->type; in pxa2xx_spi_probe()
1641 status = request_irq(ssp->irq, ssp_int, IRQF_SHARED, dev_name(dev), in pxa2xx_spi_probe()
1644 dev_err(&pdev->dev, "cannot get IRQ %d\n", ssp->irq); in pxa2xx_spi_probe()
1663 status = clk_prepare_enable(ssp->clk); in pxa2xx_spi_probe()
1667 controller->max_speed_hz = clk_get_rate(ssp->clk); in pxa2xx_spi_probe()
1679 pxa_ssp_disable(ssp); in pxa2xx_spi_probe()
1681 /* Load default SSP configuration */ in pxa2xx_spi_probe()
1770 clk_disable_unprepare(ssp->clk); in pxa2xx_spi_probe()
1774 free_irq(ssp->irq, drv_data); in pxa2xx_spi_probe()
1777 pxa_ssp_free(ssp); in pxa2xx_spi_probe()
1784 struct ssp_device *ssp = drv_data->ssp; in pxa2xx_spi_remove() local
1790 /* Disable the SSP at the peripheral and SOC level */ in pxa2xx_spi_remove()
1791 pxa_ssp_disable(ssp); in pxa2xx_spi_remove()
1792 clk_disable_unprepare(ssp->clk); in pxa2xx_spi_remove()
1802 free_irq(ssp->irq, drv_data); in pxa2xx_spi_remove()
1804 /* Release SSP */ in pxa2xx_spi_remove()
1805 pxa_ssp_free(ssp); in pxa2xx_spi_remove()
1814 struct ssp_device *ssp = drv_data->ssp; in pxa2xx_spi_suspend() local
1821 pxa_ssp_disable(ssp); in pxa2xx_spi_suspend()
1824 clk_disable_unprepare(ssp->clk); in pxa2xx_spi_suspend()
1832 struct ssp_device *ssp = drv_data->ssp; in pxa2xx_spi_resume() local
1835 /* Enable the SSP clock */ in pxa2xx_spi_resume()
1837 status = clk_prepare_enable(ssp->clk); in pxa2xx_spi_resume()
1852 clk_disable_unprepare(drv_data->ssp->clk); in pxa2xx_spi_runtime_suspend()
1860 return clk_prepare_enable(drv_data->ssp->clk); in pxa2xx_spi_runtime_resume()