Lines Matching full:ssp

22 pxa2xx_spi_init_ssp(struct platform_device *pdev, struct ssp_device *ssp, enum pxa_ssp_type type)  in pxa2xx_spi_init_ssp()  argument
29 ssp->mmio_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in pxa2xx_spi_init_ssp()
30 if (IS_ERR(ssp->mmio_base)) in pxa2xx_spi_init_ssp()
31 return PTR_ERR(ssp->mmio_base); in pxa2xx_spi_init_ssp()
33 ssp->phys_base = res->start; in pxa2xx_spi_init_ssp()
35 ssp->clk = devm_clk_get(dev, NULL); in pxa2xx_spi_init_ssp()
36 if (IS_ERR(ssp->clk)) in pxa2xx_spi_init_ssp()
37 return PTR_ERR(ssp->clk); in pxa2xx_spi_init_ssp()
39 ssp->irq = platform_get_irq(pdev, 0); in pxa2xx_spi_init_ssp()
40 if (ssp->irq < 0) in pxa2xx_spi_init_ssp()
41 return ssp->irq; in pxa2xx_spi_init_ssp()
43 ssp->type = type; in pxa2xx_spi_init_ssp()
44 ssp->dev = dev; in pxa2xx_spi_init_ssp()
48 ssp->port_id = -1; in pxa2xx_spi_init_ssp()
50 ssp->port_id = uid; in pxa2xx_spi_init_ssp()
55 static void pxa2xx_spi_ssp_release(void *ssp) in pxa2xx_spi_ssp_release() argument
57 pxa_ssp_free(ssp); in pxa2xx_spi_ssp_release()
62 struct ssp_device *ssp; in pxa2xx_spi_ssp_request() local
65 ssp = pxa_ssp_request(pdev->id, pdev->name); in pxa2xx_spi_ssp_request()
66 if (!ssp) in pxa2xx_spi_ssp_request()
69 status = devm_add_action_or_reset(&pdev->dev, pxa2xx_spi_ssp_release, ssp); in pxa2xx_spi_ssp_request()
73 return ssp; in pxa2xx_spi_ssp_request()
84 struct ssp_device *ssp; in pxa2xx_spi_init_pdata() local
89 ssp = pxa2xx_spi_ssp_request(pdev); in pxa2xx_spi_init_pdata()
90 if (IS_ERR(ssp)) in pxa2xx_spi_init_pdata()
91 return ERR_CAST(ssp); in pxa2xx_spi_init_pdata()
92 if (ssp) { in pxa2xx_spi_init_pdata()
93 type = ssp->type; in pxa2xx_spi_init_pdata()
106 /* Validate the SSP type correctness */ in pxa2xx_spi_init_pdata()
130 /* If SSP has been already enumerated, use it */ in pxa2xx_spi_init_pdata()
131 if (ssp) in pxa2xx_spi_init_pdata()
134 status = pxa2xx_spi_init_ssp(pdev, &pdata->ssp, type); in pxa2xx_spi_init_pdata()
145 struct ssp_device *ssp; in pxa2xx_spi_platform_probe() local
155 ssp = pxa2xx_spi_ssp_request(pdev); in pxa2xx_spi_platform_probe()
156 if (IS_ERR(ssp)) in pxa2xx_spi_platform_probe()
157 return PTR_ERR(ssp); in pxa2xx_spi_platform_probe()
158 if (!ssp) in pxa2xx_spi_platform_probe()
159 ssp = &platform_info->ssp; in pxa2xx_spi_platform_probe()
166 ret = pxa2xx_spi_probe(dev, ssp, platform_info); in pxa2xx_spi_platform_probe()
197 { .compatible = "marvell,mmp2-ssp", .data = (void *)MMP2_SSP },
226 MODULE_DESCRIPTION("PXA2xx SSP SPI Controller platform driver");