Patchwork [U-Boot,1/7,V2] EXYNOS5: Add function to enable XXTI clock source

login
register
mail settings
Submitter Rajeshwari Birje
Date Jan. 24, 2013, 9:43 a.m.
Message ID <1359020620-11873-2-git-send-email-rajeshwari.s@samsung.com>
Download mbox | patch
Permalink /patch/215284/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Rajeshwari Birje - Jan. 24, 2013, 9:43 a.m.
This patch adds funtion to enable XXTI clock source
required by MAX98095 codec.

Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>
---
Changes in V2:
	- Corrected multi-line comment style 
 arch/arm/cpu/armv7/exynos/power.c        |   11 +++++++++++
 arch/arm/include/asm/arch-exynos/power.h |   11 +++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)
Simon Glass - Jan. 25, 2013, 9:43 p.m.
On Thu, Jan 24, 2013 at 10:43 PM, Rajeshwari Shinde
<rajeshwari.s@samsung.com> wrote:
> This patch adds funtion to enable XXTI clock source
> required by MAX98095 codec.
>
> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
> Changes in V2:
>         - Corrected multi-line comment style
>  arch/arm/cpu/armv7/exynos/power.c        |   11 +++++++++++
>  arch/arm/include/asm/arch-exynos/power.h |   11 +++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
> index 8572cfd..8de30c1 100644
> --- a/arch/arm/cpu/armv7/exynos/power.c
> +++ b/arch/arm/cpu/armv7/exynos/power.c
> @@ -105,3 +105,14 @@ void power_ps_hold_setup(void)
>         setbits_le32(&power->ps_hold_control,
>                         EXYNOS_PS_HOLD_CONTROL_DATA_HIGH);
>  }
> +
> +
> +void power_enable_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);
> +}
> diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
> index 85e2cd9..09343d7 100644
> --- a/arch/arm/include/asm/arch-exynos/power.h
> +++ b/arch/arm/include/asm/arch-exynos/power.h
> @@ -872,4 +872,15 @@ void set_dp_phy_ctrl(unsigned int enable);
>   * (e.g. power button).
>   */
>  void power_ps_hold_setup(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 power_enable_xclkout(void);
>  #endif
> --
> 1.7.4.4
>

Patch

diff --git a/arch/arm/cpu/armv7/exynos/power.c b/arch/arm/cpu/armv7/exynos/power.c
index 8572cfd..8de30c1 100644
--- a/arch/arm/cpu/armv7/exynos/power.c
+++ b/arch/arm/cpu/armv7/exynos/power.c
@@ -105,3 +105,14 @@  void power_ps_hold_setup(void)
 	setbits_le32(&power->ps_hold_control,
 			EXYNOS_PS_HOLD_CONTROL_DATA_HIGH);
 }
+
+
+void power_enable_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);
+}
diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h
index 85e2cd9..09343d7 100644
--- a/arch/arm/include/asm/arch-exynos/power.h
+++ b/arch/arm/include/asm/arch-exynos/power.h
@@ -872,4 +872,15 @@  void set_dp_phy_ctrl(unsigned int enable);
  * (e.g. power button).
  */
 void power_ps_hold_setup(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 power_enable_xclkout(void);
 #endif