Lines Matching defs:dev
399 struct device *dev;
717 data->sg_count = dma_map_sg(host->dev, data->sg, data->sg_len,
730 dma_unmap_sg(host->dev, data->sg, data->sg_len,
815 dev_dbg(host->dev, "set mclk to 0\n");
938 dev_dbg(host->dev, "sclk: %d, timing: %d\n", mmc->actual_clock,
1038 dev_dbg(host->dev, "DMA start\n");
1039 dev_dbg(host->dev, "%s: cmd=%d DMA data: %d blocks; read=%d\n",
1061 dev_err(host->dev,
1098 dev_dbg(host->dev, "%s: cmd=%d arg=%08X; host->error=0x%08X\n",
1188 dev_dbg(host->dev,
1211 dev_err(host->dev, "CMD bus busy detected\n");
1224 dev_err(host->dev, "Controller busy detected\n");
1248 dev_err(host->dev, "TX/RX FIFO non-empty before start of IO. Reset\n");
1361 dev_dbg(host->dev, "DMA status: 0x%8X\n",
1368 dev_dbg(host->dev, "DMA stop\n");
1373 dev_dbg(host->dev, "interrupt events: %x\n", events);
1383 dev_dbg(host->dev, "%s: cmd=%d; blocks=%d",
1385 dev_dbg(host->dev, "data_error=%d xfer_size=%d\n",
1415 dev_dbg(host->dev, "Bus Width = %d", width);
1426 dev_err(host->dev, "Unsupported signal voltage!\n");
1432 dev_dbg(host->dev, "Regulator set error %d (%d)\n",
1461 dev_err(host->dev, "%s: aborting cmd/data/mrq\n", __func__);
1463 dev_err(host->dev, "%s: aborting mrq=%p cmd=%d\n", __func__,
1466 dev_err(host->dev, "%s: aborting cmd=%d\n",
1471 dev_err(host->dev, "%s: abort data: cmd%d; %d blocks\n",
1503 pm_runtime_get_noresume(host->dev);
1505 pm_runtime_put_noidle(host->dev);
1515 dev_err(host->dev, "%s: CMD CRC ERR", __func__);
1518 dev_err(host->dev, "%s: CMD TIMEOUT ERR", __func__);
1523 dev_err(host->dev, "%s: DATA CRC ERR", __func__);
1526 dev_err(host->dev, "%s: DATA TIMEOUT ERR", __func__);
1530 dev_err(host->dev, "cmd_err = %d, dat_err =%d, intsts = 0x%x",
1583 dev_err(host->dev,
1590 dev_dbg(host->dev, "%s: events=%08X\n", __func__, events);
1737 dev_dbg(host->dev, "init hardware done!");
1805 dev_err(host->dev, "Failed to set vmmc power!\n");
1814 dev_err(host->dev, "Failed to set vqmmc power!\n");
1861 dev_err(host->dev, "phase error: [map:%x]\n", delay);
1882 dev_info(host->dev, "phase: [map:%x] [maxlen:%d] [final:%d]\n",
2000 dev_dbg(host->dev, "Final internal delay: 0x%x\n", internal_delay);
2005 dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay);
2055 dev_dbg(host->dev, "Final cmd pad delay: %x\n", final_delay);
2106 dev_dbg(host->dev, "Final data pad delay: %x\n", final_delay);
2170 dev_dbg(host->dev, "Final pad delay: %x\n", final_delay);
2195 dev_err(host->dev, "Tune response fail!\n");
2201 dev_err(host->dev, "Tune data fail!\n");
2355 of_property_read_u32(pdev->dev.of_node, "mediatek,latch-ck",
2358 of_property_read_u32(pdev->dev.of_node, "hs400-ds-delay",
2361 of_property_read_u32(pdev->dev.of_node, "mediatek,hs200-cmd-int-delay",
2364 of_property_read_u32(pdev->dev.of_node, "mediatek,hs400-cmd-int-delay",
2367 if (of_property_read_bool(pdev->dev.of_node,
2373 if (of_property_read_bool(pdev->dev.of_node,
2387 if (!pdev->dev.of_node) {
2388 dev_err(&pdev->dev, "No DT found\n");
2393 mmc = mmc_alloc_host(sizeof(struct msdc_host), &pdev->dev);
2410 host->top_base = devm_ioremap_resource(&pdev->dev, res);
2419 host->src_clk = devm_clk_get(&pdev->dev, "source");
2425 host->h_clk = devm_clk_get(&pdev->dev, "hclk");
2431 host->bus_clk = devm_clk_get(&pdev->dev, "bus_clk");
2435 host->src_clk_cg = devm_clk_get(&pdev->dev, "source_cg");
2439 host->reset = devm_reset_control_get_optional_exclusive(&pdev->dev,
2450 host->pinctrl = devm_pinctrl_get(&pdev->dev);
2453 dev_err(&pdev->dev, "Cannot find pinctrl!\n");
2460 dev_err(&pdev->dev, "Cannot find pinctrl default!\n");
2467 dev_err(&pdev->dev, "Cannot find pinctrl uhs!\n");
2473 host->dev = &pdev->dev;
2474 host->dev_comp = of_device_get_match_data(&pdev->dev);
2515 host->dma.gpd = dma_alloc_coherent(&pdev->dev,
2518 host->dma.bd = dma_alloc_coherent(&pdev->dev,
2553 ret = devm_request_irq(&pdev->dev, host->irq, msdc_irq,
2558 pm_runtime_set_active(host->dev);
2559 pm_runtime_set_autosuspend_delay(host->dev, MTK_MMC_AUTOSUSPEND_DELAY);
2560 pm_runtime_use_autosuspend(host->dev);
2561 pm_runtime_enable(host->dev);
2569 pm_runtime_disable(host->dev);
2576 dma_free_coherent(&pdev->dev,
2580 dma_free_coherent(&pdev->dev,
2597 pm_runtime_get_sync(host->dev);
2604 pm_runtime_disable(host->dev);
2605 pm_runtime_put_noidle(host->dev);
2606 dma_free_coherent(&pdev->dev,
2609 dma_free_coherent(&pdev->dev, MAX_BD_NUM * sizeof(struct mt_bdma_desc),
2675 static int __maybe_unused msdc_runtime_suspend(struct device *dev)
2677 struct mmc_host *mmc = dev_get_drvdata(dev);
2685 static int __maybe_unused msdc_runtime_resume(struct device *dev)
2687 struct mmc_host *mmc = dev_get_drvdata(dev);
2695 static int __maybe_unused msdc_suspend(struct device *dev)
2697 struct mmc_host *mmc = dev_get_drvdata(dev);
2709 return pm_runtime_force_suspend(dev);
2712 static int __maybe_unused msdc_resume(struct device *dev)
2714 return pm_runtime_force_resume(dev);