Lines Matching refs:pdev
98 struct platform_device *pdev; member
122 struct platform_device *pdev = spdif_priv->pdev; in spdif_irq_dpll_lock() local
128 dev_dbg(&pdev->dev, "isr: Rx dpll %s \n", in spdif_irq_dpll_lock()
138 struct platform_device *pdev = spdif_priv->pdev; in spdif_irq_sym_error() local
140 dev_dbg(&pdev->dev, "isr: receiver found illegal symbol\n"); in spdif_irq_sym_error()
152 struct platform_device *pdev = spdif_priv->pdev; in spdif_irq_uqrx_full() local
167 dev_err(&pdev->dev, "unsupported channel name\n"); in spdif_irq_uqrx_full()
171 dev_dbg(&pdev->dev, "isr: %c Channel receive register full\n", name); in spdif_irq_uqrx_full()
176 dev_err(&pdev->dev, "User bit receivce buffer overflow\n"); in spdif_irq_uqrx_full()
190 struct platform_device *pdev = spdif_priv->pdev; in spdif_irq_uq_sync() local
192 dev_dbg(&pdev->dev, "isr: U/Q Channel sync found\n"); in spdif_irq_uq_sync()
207 struct platform_device *pdev = spdif_priv->pdev; in spdif_irq_uq_err() local
210 dev_dbg(&pdev->dev, "isr: U/Q Channel framing error\n"); in spdif_irq_uq_err()
239 struct platform_device *pdev = spdif_priv->pdev; in spdif_isr() local
248 dev_dbg(&pdev->dev, "isr: Tx FIFO under/overrun\n"); in spdif_isr()
251 dev_dbg(&pdev->dev, "isr: Tx FIFO resync\n"); in spdif_isr()
254 dev_dbg(&pdev->dev, "isr: cstatus new\n"); in spdif_isr()
257 dev_dbg(&pdev->dev, "isr: validity flag no good\n"); in spdif_isr()
263 dev_dbg(&pdev->dev, "isr: receiver found parity bit error\n"); in spdif_isr()
269 dev_dbg(&pdev->dev, "isr: U Channel receive register overrun\n"); in spdif_isr()
275 dev_dbg(&pdev->dev, "isr: Q Channel receive register overrun\n"); in spdif_isr()
284 dev_dbg(&pdev->dev, "isr: Rx FIFO under/overrun\n"); in spdif_isr()
287 dev_dbg(&pdev->dev, "isr: Rx FIFO resync\n"); in spdif_isr()
294 dev_dbg(&pdev->dev, "isr: Tx FIFO empty\n"); in spdif_isr()
298 dev_dbg(&pdev->dev, "isr: Rx FIFO full\n"); in spdif_isr()
335 struct platform_device *pdev = spdif_priv->pdev; in spdif_write_channel_status() local
343 dev_dbg(&pdev->dev, "STCSCH: 0x%06x\n", ch_status); in spdif_write_channel_status()
348 dev_dbg(&pdev->dev, "STCSCL: 0x%06x\n", ch_status); in spdif_write_channel_status()
375 struct platform_device *pdev = spdif_priv->pdev; in spdif_set_sample_rate() local
403 dev_err(&pdev->dev, "unsupported sample rate %d\n", sample_rate); in spdif_set_sample_rate()
409 dev_err(&pdev->dev, "tx clock source is out of range\n"); in spdif_set_sample_rate()
415 dev_err(&pdev->dev, "the txclk_df can't be zero\n"); in spdif_set_sample_rate()
431 dev_err(&pdev->dev, "failed to set tx clock rate\n"); in spdif_set_sample_rate()
436 dev_dbg(&pdev->dev, "expected clock rate = %d\n", in spdif_set_sample_rate()
438 dev_dbg(&pdev->dev, "actual clock rate = %ld\n", in spdif_set_sample_rate()
451 dev_dbg(&pdev->dev, "set sample rate to %dHz for %dHz playback\n", in spdif_set_sample_rate()
462 struct platform_device *pdev = spdif_priv->pdev; in fsl_spdif_startup() local
471 dev_err(&pdev->dev, "failed to enable core clock\n"); in fsl_spdif_startup()
477 dev_err(&pdev->dev, "failed to soft reset\n"); in fsl_spdif_startup()
552 struct platform_device *pdev = spdif_priv->pdev; in fsl_spdif_hw_params() local
559 dev_err(&pdev->dev, "%s: set sample rate failed: %d\n", in fsl_spdif_hw_params()
798 struct platform_device *pdev = spdif_priv->pdev; in spdif_get_rxclk_rate() local
817 dev_dbg(&pdev->dev, "FreqMeas: %d\n", freqmeas); in spdif_get_rxclk_rate()
818 dev_dbg(&pdev->dev, "BusclkFreq: %lld\n", busclk_freq); in spdif_get_rxclk_rate()
819 dev_dbg(&pdev->dev, "RxRate: %lld\n", tmpval64); in spdif_get_rxclk_rate()
1116 struct platform_device *pdev = spdif_priv->pdev; in fsl_spdif_probe_txclk() local
1117 struct device *dev = &pdev->dev; in fsl_spdif_probe_txclk()
1125 clk = devm_clk_get(&pdev->dev, tmp); in fsl_spdif_probe_txclk()
1147 dev_dbg(&pdev->dev, "use rxtx%d as tx clock source for %dHz sample rate\n", in fsl_spdif_probe_txclk()
1149 dev_dbg(&pdev->dev, "use txclk df %d for %dHz sample rate\n", in fsl_spdif_probe_txclk()
1152 dev_dbg(&pdev->dev, "use sysclk df %d for %dHz sample rate\n", in fsl_spdif_probe_txclk()
1154 dev_dbg(&pdev->dev, "the best rate for %dHz sample rate is %dHz\n", in fsl_spdif_probe_txclk()
1160 static int fsl_spdif_probe(struct platform_device *pdev) in fsl_spdif_probe() argument
1162 struct device_node *np = pdev->dev.of_node; in fsl_spdif_probe()
1172 spdif_priv = devm_kzalloc(&pdev->dev, in fsl_spdif_probe()
1180 spdif_priv->pdev = pdev; in fsl_spdif_probe()
1187 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); in fsl_spdif_probe()
1188 regs = devm_ioremap_resource(&pdev->dev, res); in fsl_spdif_probe()
1192 spdif_priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev, in fsl_spdif_probe()
1195 dev_err(&pdev->dev, "regmap init failed\n"); in fsl_spdif_probe()
1199 irq = platform_get_irq(pdev, 0); in fsl_spdif_probe()
1201 dev_err(&pdev->dev, "no irq for node %s\n", np->full_name); in fsl_spdif_probe()
1205 ret = devm_request_irq(&pdev->dev, irq, spdif_isr, 0, in fsl_spdif_probe()
1208 dev_err(&pdev->dev, "could not claim irq %u\n", irq); in fsl_spdif_probe()
1213 spdif_priv->sysclk = devm_clk_get(&pdev->dev, "rxtx5"); in fsl_spdif_probe()
1215 dev_err(&pdev->dev, "no sys clock (rxtx5) in devicetree\n"); in fsl_spdif_probe()
1220 spdif_priv->coreclk = devm_clk_get(&pdev->dev, "core"); in fsl_spdif_probe()
1222 dev_err(&pdev->dev, "no core clock in devicetree\n"); in fsl_spdif_probe()
1227 spdif_priv->rxclk = devm_clk_get(&pdev->dev, "rxtx1"); in fsl_spdif_probe()
1229 dev_err(&pdev->dev, "no rxtx1 clock in devicetree\n"); in fsl_spdif_probe()
1260 dev_set_drvdata(&pdev->dev, spdif_priv); in fsl_spdif_probe()
1262 ret = devm_snd_soc_register_component(&pdev->dev, &fsl_spdif_component, in fsl_spdif_probe()
1265 dev_err(&pdev->dev, "failed to register DAI: %d\n", ret); in fsl_spdif_probe()
1269 ret = imx_pcm_dma_init(pdev); in fsl_spdif_probe()
1271 dev_err(&pdev->dev, "imx_pcm_dma_init failed: %d\n", ret); in fsl_spdif_probe()