
1.Typecast to avoid distinct pointer type comparison 2.Keep DMA mask aligned with api definition. 3.Add Suffix for literals 4.Remove multfrac func to avoid uncompatible division. 5.64-bit division( operator "/") on 32-bit platforms is not supported. Using platform independent API's here Change-Id: I0e7305418e53876bd1adf00c1963f85cbdf980cc Signed-off-by: Ravikanth Tuniki <rtunik@codeaurora.org>
53 righe
1.3 KiB
C
53 righe
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __MDSS_DSI_PLL_H
|
|
#define __MDSS_DSI_PLL_H
|
|
|
|
#include <linux/clk-provider.h>
|
|
#include "pll_drv.h"
|
|
#define MAX_DSI_PLL_EN_SEQS 10
|
|
|
|
/* Register offsets for 20nm PHY PLL */
|
|
#define MMSS_DSI_PHY_PLL_PLL_CNTRL (0x0014)
|
|
#define MMSS_DSI_PHY_PLL_PLL_BKG_KVCO_CAL_EN (0x002C)
|
|
#define MMSS_DSI_PHY_PLL_PLLLOCK_CMP_EN (0x009C)
|
|
|
|
struct lpfr_cfg {
|
|
unsigned long vco_rate;
|
|
u32 r;
|
|
};
|
|
|
|
struct dsi_pll_vco_clk {
|
|
struct clk_hw hw;
|
|
unsigned long ref_clk_rate;
|
|
u64 min_rate;
|
|
u64 max_rate;
|
|
u32 pll_en_seq_cnt;
|
|
struct lpfr_cfg *lpfr_lut;
|
|
u32 lpfr_lut_size;
|
|
void *priv;
|
|
|
|
int (*pll_enable_seqs[MAX_DSI_PLL_EN_SEQS])
|
|
(struct mdss_pll_resources *dsi_pll_Res);
|
|
};
|
|
|
|
int dsi_pll_clock_register_10nm(struct platform_device *pdev,
|
|
struct mdss_pll_resources *pll_res);
|
|
|
|
int dsi_pll_clock_register_7nm(struct platform_device *pdev,
|
|
struct mdss_pll_resources *pll_res);
|
|
int dsi_pll_clock_register_28lpm(struct platform_device *pdev,
|
|
struct mdss_pll_resources *pll_res);
|
|
|
|
static inline struct dsi_pll_vco_clk *to_vco_clk_hw(struct clk_hw *hw)
|
|
{
|
|
return container_of(hw, struct dsi_pll_vco_clk, hw);
|
|
}
|
|
|
|
int dsi_pll_clock_register_14nm(struct platform_device *pdev,
|
|
struct mdss_pll_resources *pll_res);
|
|
#endif
|