On Fri, Aug 19, 2011 at 10:09 PM, Amit Daniel Kachhap
<[email protected]> wrote:
> This adds a function to get the revision id.
>
> Signed-off-by: Jaecheol Lee <[email protected]>
> Signed-off-by: Changhwan Youn <[email protected]>
> ---
>  arch/arm/mach-exynos4/cpu.c              |   10 ++++++++++
>  arch/arm/plat-s5p/include/plat/exynos4.h |    1 +
>  2 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
> index 2d8a40c..8b106b8 100644
> --- a/arch/arm/mach-exynos4/cpu.c
> +++ b/arch/arm/mach-exynos4/cpu.c
> @@ -234,6 +234,16 @@ static int __init exynos4_l2x0_cache_init(void)
>  early_initcall(exynos4_l2x0_cache_init);
>  #endif
>
> +int exynos4_subrev(void)
> +{
> +       static int subrev = -1;
> +
> +       if (unlikely(subrev < 0))
> +               subrev = readl(S5P_VA_CHIPID) & 0xf;
How about to add the clock control here?
1. Register chipid clk
2. Get the chipid clk
3. Read CHPIID,
4. Put tht chipid clk.

Then you can save some power.

Thank you,
Kyungmin Park
> +
> +       return subrev;
> +}
> +
>  int __init exynos4_init(void)
>  {
>        printk(KERN_INFO "EXYNOS4: Initializing architecture\n");
> diff --git a/arch/arm/plat-s5p/include/plat/exynos4.h 
> b/arch/arm/plat-s5p/include/plat/exynos4.h
> index 907caab..d62f7f7 100644
> --- a/arch/arm/plat-s5p/include/plat/exynos4.h
> +++ b/arch/arm/plat-s5p/include/plat/exynos4.h
> @@ -15,6 +15,7 @@
>  extern void exynos4_common_init_uarts(struct s3c2410_uartcfg *cfg, int no);
>  extern void exynos4_register_clocks(void);
>  extern void exynos4_setup_clocks(void);
> +extern int exynos4_subrev(void);
>
>  #ifdef CONFIG_CPU_EXYNOS4210
>
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

_______________________________________________
linaro-dev mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to