aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-09-02 14:01:55 -0400
committerRob Clark <robdclark@gmail.com>2014-09-11 06:49:20 -0400
commit28a38b656283bfea04f112abc587ce28760dac25 (patch)
tree901ad522a9a6b218576bf137f1b5e14ba7e7b7b8 /drivers/gpu/drm
parentfc886107c55634415d24584008ebac4edd074af1 (diff)
drm/msm/hdmi: fix build break on non-CCF platforms
Reported-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
index 902d7685d441..f408b69486a8 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c
@@ -15,19 +15,25 @@
15 * this program. If not, see <http://www.gnu.org/licenses/>. 15 * this program. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18#ifdef CONFIG_COMMON_CLK
18#include <linux/clk.h> 19#include <linux/clk.h>
19#include <linux/clk-provider.h> 20#include <linux/clk-provider.h>
21#endif
20 22
21#include "hdmi.h" 23#include "hdmi.h"
22 24
23struct hdmi_phy_8960 { 25struct hdmi_phy_8960 {
24 struct hdmi_phy base; 26 struct hdmi_phy base;
25 struct hdmi *hdmi; 27 struct hdmi *hdmi;
28#ifdef CONFIG_COMMON_CLK
26 struct clk_hw pll_hw; 29 struct clk_hw pll_hw;
27 struct clk *pll; 30 struct clk *pll;
28 unsigned long pixclk; 31 unsigned long pixclk;
32#endif
29}; 33};
30#define to_hdmi_phy_8960(x) container_of(x, struct hdmi_phy_8960, base) 34#define to_hdmi_phy_8960(x) container_of(x, struct hdmi_phy_8960, base)
35
36#ifdef CONFIG_COMMON_CLK
31#define clk_to_phy(x) container_of(x, struct hdmi_phy_8960, pll_hw) 37#define clk_to_phy(x) container_of(x, struct hdmi_phy_8960, pll_hw)
32 38
33/* 39/*
@@ -374,7 +380,7 @@ static struct clk_init_data pll_init = {
374 .parent_names = hdmi_pll_parents, 380 .parent_names = hdmi_pll_parents,
375 .num_parents = ARRAY_SIZE(hdmi_pll_parents), 381 .num_parents = ARRAY_SIZE(hdmi_pll_parents),
376}; 382};
377 383#endif
378 384
379/* 385/*
380 * HDMI Phy: 386 * HDMI Phy:
@@ -480,12 +486,15 @@ struct hdmi_phy *hdmi_phy_8960_init(struct hdmi *hdmi)
480{ 486{
481 struct hdmi_phy_8960 *phy_8960; 487 struct hdmi_phy_8960 *phy_8960;
482 struct hdmi_phy *phy = NULL; 488 struct hdmi_phy *phy = NULL;
483 int ret, i; 489 int ret;
490#ifdef CONFIG_COMMON_CLK
491 int i;
484 492
485 /* sanity check: */ 493 /* sanity check: */
486 for (i = 0; i < (ARRAY_SIZE(freqtbl) - 1); i++) 494 for (i = 0; i < (ARRAY_SIZE(freqtbl) - 1); i++)
487 if (WARN_ON(freqtbl[i].rate < freqtbl[i+1].rate)) 495 if (WARN_ON(freqtbl[i].rate < freqtbl[i+1].rate))
488 return ERR_PTR(-EINVAL); 496 return ERR_PTR(-EINVAL);
497#endif
489 498
490 phy_8960 = kzalloc(sizeof(*phy_8960), GFP_KERNEL); 499 phy_8960 = kzalloc(sizeof(*phy_8960), GFP_KERNEL);
491 if (!phy_8960) { 500 if (!phy_8960) {
@@ -499,6 +508,7 @@ struct hdmi_phy *hdmi_phy_8960_init(struct hdmi *hdmi)
499 508
500 phy_8960->hdmi = hdmi; 509 phy_8960->hdmi = hdmi;
501 510
511#ifdef CONFIG_COMMON_CLK
502 phy_8960->pll_hw.init = &pll_init; 512 phy_8960->pll_hw.init = &pll_init;
503 phy_8960->pll = devm_clk_register(hdmi->dev->dev, &phy_8960->pll_hw); 513 phy_8960->pll = devm_clk_register(hdmi->dev->dev, &phy_8960->pll_hw);
504 if (IS_ERR(phy_8960->pll)) { 514 if (IS_ERR(phy_8960->pll)) {
@@ -506,6 +516,7 @@ struct hdmi_phy *hdmi_phy_8960_init(struct hdmi *hdmi)
506 phy_8960->pll = NULL; 516 phy_8960->pll = NULL;
507 goto fail; 517 goto fail;
508 } 518 }
519#endif
509 520
510 return phy; 521 return phy;
511 522