From: Rajeshwari Shinde Date: Thu, 14 Feb 2013 19:46:11 +0000 (+0000) Subject: EXYNOS5: Add function to enable XXTI clock source X-Git-Tag: v2013.04-rc2~14^2~5^2~18 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a006076b15c32e2f9c2c133697b5c662f7d1294e;p=u-boot EXYNOS5: Add function to enable XXTI clock source This patch adds funtion to enable XXTI clock source required by MAX98095 codec. Signed-off-by: Rajeshwari Shinde Signed-off-by: Minkyu Kang --- diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c index 400c8bcfc5..db7249ef7f 100644 --- a/arch/arm/cpu/armv7/exynos/power.c +++ b/arch/arm/cpu/armv7/exynos/power.c @@ -111,3 +111,20 @@ void set_ps_hold_ctrl(void) if (cpu_is_exynos5()) exynos5_set_ps_hold_ctrl(); } + + +static void exynos5_set_xclkout(void) +{ + struct exynos5_power *power = + (struct exynos5_power *)samsung_get_base_power(); + + /* use xxti for xclk out */ + clrsetbits_le32(&power->pmu_debug, PMU_DEBUG_CLKOUT_SEL_MASK, + PMU_DEBUG_XXTI); +} + +void set_xclkout(void) +{ + if (cpu_is_exynos5()) + exynos5_set_xclkout(); +} diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h index f2f73faa75..5f2633763c 100644 --- a/arch/arm/include/asm/arch-exynos/power.h +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -873,4 +873,15 @@ void set_dp_phy_ctrl(unsigned int enable); * (e.g. power button). */ void set_ps_hold_ctrl(void); + +/* PMU_DEBUG bits [12:8] = 0x1000 selects XXTI clock source */ +#define PMU_DEBUG_XXTI 0x1000 +/* Mask bit[12:8] for xxti clock selection */ +#define PMU_DEBUG_CLKOUT_SEL_MASK 0x1f00 + +/* + * Pmu debug is used for xclkout, enable xclkout with + * source as XXTI + */ +void set_xclkout(void); #endif