drivers: cal-if: fix build without CONFIG_CMUCAL_DEBUG

Signed-off-by: Nahuel Gómez <nahuelgomez329@gmail.com>
This commit is contained in:
Nahuel Gómez 2024-10-27 10:52:03 -03:00 committed by Ksawlii
parent 612d1468a3
commit 2d84789050
3 changed files with 26 additions and 16 deletions

View file

@ -653,8 +653,10 @@ int cal_if_init(void *dev)
if (of_address_to_resource(dev, 1, &res) == 0)
cmucal_dbg_set_cmu_aud_base(res.start);
#if defined(CONFIG_CMUCAL_DEBUG)
if (of_address_to_resource(dev, 2, &res) == 0)
cmucal_dbg_set_cmu_nocl0_base(res.start);
#endif
if (of_address_to_resource(dev, 3, &res) == 0)
cmucal_dbg_set_cmu_cpucl0_base(res.start);

View file

@ -21,7 +21,25 @@ enum clk_info_type {
TOP_CMU_INFO,
};
#if defined(CONFIG_CMUCAL_DEBUG)
static struct dentry *rootdir;
static unsigned int cmu_aud_base = 0x0;
static unsigned int cmu_nocl0_base = 0x0;
static unsigned int cmu_cpucl0_base = 0x0;
static unsigned int cmu_cpucl1_base = 0x0;
static unsigned int cmu_cpucl2_base = 0x0;
static unsigned int cmu_dsu_base = 0x0;
static unsigned int cmu_peris_base = 0x0;
#endif
static unsigned int cmu_top_base = 0x0;
void __iomem *cmu_aud;
void __iomem *cmu_nocl0;
void __iomem *cmu_cpucl0;
void __iomem *cmu_cpucl1;
void __iomem *cmu_cpucl2;
void __iomem *cmu_dsu;
void __iomem *cmu_peris;
static struct cmucal_clk *clk_info;
static struct vclk *dvfs_domain;
static u32 cmu_id;
@ -32,21 +50,6 @@ static unsigned int margin;
static unsigned int debug_freq;
extern unsigned int dbg_offset;
static unsigned int cmu_top_base = 0x0;
static unsigned int cmu_aud_base = 0x0;
void __iomem *cmu_aud;
static unsigned int cmu_nocl0_base = 0x0;
void __iomem *cmu_nocl0;
static unsigned int cmu_cpucl0_base = 0x0;
void __iomem *cmu_cpucl0;
static unsigned int cmu_cpucl1_base = 0x0;
void __iomem *cmu_cpucl1;
static unsigned int cmu_cpucl2_base = 0x0;
void __iomem *cmu_cpucl2;
static unsigned int cmu_dsu_base = 0x0;
void __iomem *cmu_dsu;
static unsigned int cmu_peris_base = 0x0;
void __iomem *cmu_peris;
extern bool is_ignore_cmu_dbg(u32 addr);
@ -645,6 +648,7 @@ static const struct file_operations dsu_stepup_run_fops = {
};
#endif
#if defined(CONFIG_CMUCAL_DEBUG)
/* caller must hold prepare_lock */
static int vclk_debug_create_one(struct vclk *vclk, struct dentry *pdentry)
{
@ -681,6 +685,9 @@ static int vclk_debug_create_one(struct vclk *vclk, struct dentry *pdentry)
out:
return ret;
}
#endif
#if defined(CONFIG_CMUCAL_DEBUG)
unsigned int vclk_debug_clk_get_rate(unsigned int id)
{
@ -875,5 +882,6 @@ int vclk_debug_init(void)
}
EXPORT_SYMBOL_GPL(vclk_debug_init);
#endif
#endif
MODULE_LICENSE("GPL");

View file

@ -513,7 +513,7 @@ static int exynos_pd_probe(struct platform_device *pdev)
}
}
#ifdef CONFIG_DEBUG_FS
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_CMUCAL_DEBUG)
cal_register_pd_lookup_cmu_id(exynos_pd_lookup_cmu_id);
#endif
dev_info(dev, EXYNOS_PD_PREFIX "PM Domain Initialize\n");