| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 and |
|---|
| 6 | | - * only version 2 as published by the Free Software Foundation. |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 9 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 | | - * GNU General Public License for more details. |
|---|
| 12 | 4 | */ |
|---|
| 13 | 5 | |
|---|
| 14 | 6 | #include <linux/clk.h> |
|---|
| .. | .. |
|---|
| 156 | 148 | if (rate <= lpfr_lut[i].vco_rate) |
|---|
| 157 | 149 | break; |
|---|
| 158 | 150 | if (i == LPFR_LUT_SIZE) { |
|---|
| 159 | | - dev_err(dev, "unable to get loop filter resistance. vco=%lu\n", |
|---|
| 151 | + DRM_DEV_ERROR(dev, "unable to get loop filter resistance. vco=%lu\n", |
|---|
| 160 | 152 | rate); |
|---|
| 161 | 153 | return -EINVAL; |
|---|
| 162 | 154 | } |
|---|
| .. | .. |
|---|
| 386 | 378 | } |
|---|
| 387 | 379 | |
|---|
| 388 | 380 | if (unlikely(!locked)) |
|---|
| 389 | | - dev_err(dev, "DSI PLL lock failed\n"); |
|---|
| 381 | + DRM_DEV_ERROR(dev, "DSI PLL lock failed\n"); |
|---|
| 390 | 382 | else |
|---|
| 391 | 383 | DBG("DSI PLL Lock success"); |
|---|
| 392 | 384 | |
|---|
| .. | .. |
|---|
| 429 | 421 | locked = pll_28nm_poll_for_ready(pll_28nm, max_reads, timeout_us); |
|---|
| 430 | 422 | |
|---|
| 431 | 423 | if (unlikely(!locked)) |
|---|
| 432 | | - dev_err(dev, "DSI PLL lock failed\n"); |
|---|
| 424 | + DRM_DEV_ERROR(dev, "DSI PLL lock failed\n"); |
|---|
| 433 | 425 | else |
|---|
| 434 | 426 | DBG("DSI PLL lock success"); |
|---|
| 435 | 427 | |
|---|
| .. | .. |
|---|
| 468 | 460 | ret = dsi_pll_28nm_clk_set_rate(&pll->clk_hw, |
|---|
| 469 | 461 | cached_state->vco_rate, 0); |
|---|
| 470 | 462 | if (ret) { |
|---|
| 471 | | - dev_err(&pll_28nm->pdev->dev, |
|---|
| 463 | + DRM_DEV_ERROR(&pll_28nm->pdev->dev, |
|---|
| 472 | 464 | "restore vco rate failed. ret=%d\n", ret); |
|---|
| 473 | 465 | return ret; |
|---|
| 474 | 466 | } |
|---|
| .. | .. |
|---|
| 562 | 554 | snprintf(parent1, 32, "dsi%dvco_clk", pll_28nm->id); |
|---|
| 563 | 555 | snprintf(parent2, 32, "dsi%dindirect_path_div2_clk", pll_28nm->id); |
|---|
| 564 | 556 | clks[num++] = clk_register_mux(dev, clk_name, |
|---|
| 565 | | - (const char *[]){ |
|---|
| 557 | + ((const char *[]){ |
|---|
| 566 | 558 | parent1, parent2 |
|---|
| 567 | | - }, 2, CLK_SET_RATE_PARENT, pll_28nm->mmio + |
|---|
| 559 | + }), 2, CLK_SET_RATE_PARENT, pll_28nm->mmio + |
|---|
| 568 | 560 | REG_DSI_28nm_PHY_PLL_VREG_CFG, 1, 1, 0, NULL); |
|---|
| 569 | 561 | |
|---|
| 570 | 562 | snprintf(clk_name, 32, "dsi%dpllbyte", pll_28nm->id); |
|---|
| .. | .. |
|---|
| 581 | 573 | ret = of_clk_add_provider(dev->of_node, |
|---|
| 582 | 574 | of_clk_src_onecell_get, &pll_28nm->clk_data); |
|---|
| 583 | 575 | if (ret) { |
|---|
| 584 | | - dev_err(dev, "failed to register clk provider: %d\n", ret); |
|---|
| 576 | + DRM_DEV_ERROR(dev, "failed to register clk provider: %d\n", ret); |
|---|
| 585 | 577 | return ret; |
|---|
| 586 | 578 | } |
|---|
| 587 | 579 | |
|---|
| .. | .. |
|---|
| 607 | 599 | |
|---|
| 608 | 600 | pll_28nm->mmio = msm_ioremap(pdev, "dsi_pll", "DSI_PLL"); |
|---|
| 609 | 601 | if (IS_ERR_OR_NULL(pll_28nm->mmio)) { |
|---|
| 610 | | - dev_err(&pdev->dev, "%s: failed to map pll base\n", __func__); |
|---|
| 602 | + DRM_DEV_ERROR(&pdev->dev, "%s: failed to map pll base\n", __func__); |
|---|
| 611 | 603 | return ERR_PTR(-ENOMEM); |
|---|
| 612 | 604 | } |
|---|
| 613 | 605 | |
|---|
| .. | .. |
|---|
| 633 | 625 | pll->en_seq_cnt = 1; |
|---|
| 634 | 626 | pll->enable_seqs[0] = dsi_pll_28nm_enable_seq_lp; |
|---|
| 635 | 627 | } else { |
|---|
| 636 | | - dev_err(&pdev->dev, "phy type (%d) is not 28nm\n", type); |
|---|
| 628 | + DRM_DEV_ERROR(&pdev->dev, "phy type (%d) is not 28nm\n", type); |
|---|
| 637 | 629 | return ERR_PTR(-EINVAL); |
|---|
| 638 | 630 | } |
|---|
| 639 | 631 | |
|---|
| 640 | 632 | ret = pll_28nm_register(pll_28nm); |
|---|
| 641 | 633 | if (ret) { |
|---|
| 642 | | - dev_err(&pdev->dev, "failed to register PLL: %d\n", ret); |
|---|
| 634 | + DRM_DEV_ERROR(&pdev->dev, "failed to register PLL: %d\n", ret); |
|---|
| 643 | 635 | return ERR_PTR(ret); |
|---|
| 644 | 636 | } |
|---|
| 645 | 637 | |
|---|