From patchwork Thu Dec 22 10:52:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 5949 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 877602401D for ; Thu, 22 Dec 2011 10:53:32 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 7DD28A18506 for ; Thu, 22 Dec 2011 10:53:32 +0000 (UTC) Received: by mail-ey0-f180.google.com with SMTP id c11so5602457eaa.11 for ; Thu, 22 Dec 2011 02:53:32 -0800 (PST) Received: by 10.205.120.148 with SMTP id fy20mr2637942bkc.125.1324551212212; Thu, 22 Dec 2011 02:53:32 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs62446bkc; Thu, 22 Dec 2011 02:53:32 -0800 (PST) Received: by 10.236.179.2 with SMTP id g2mr14048723yhm.27.1324551210191; Thu, 22 Dec 2011 02:53:30 -0800 (PST) Received: from mail-gx0-f178.google.com (mail-gx0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id o30si9379534yhl.90.2011.12.22.02.53.29 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Dec 2011 02:53:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of chander.kashyap@linaro.org) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.178 is neither permitted nor denied by best guess record for domain of chander.kashyap@linaro.org) smtp.mail=chander.kashyap@linaro.org Received: by ggnq4 with SMTP id q4so7258647ggn.37 for ; Thu, 22 Dec 2011 02:53:29 -0800 (PST) Received: by 10.50.191.225 with SMTP id hb1mr8198930igc.17.1324551209205; Thu, 22 Dec 2011 02:53:29 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id f32sm24601659ibf.9.2011.12.22.02.53.25 (version=SSLv3 cipher=OTHER); Thu, 22 Dec 2011 02:53:28 -0800 (PST) From: Chander Kashyap To: u-boot@lists.denx.de Cc: mk7.kang@samsung.com, bjlee@samsung.com, patches@linaro.org, samsung@lists.linaro.org, linaro-dev@lists.linaro.org, Chander Kashyap Subject: [PATCH 3/6] Exynos: Clock.c: Replace exynos4 prefix with exynos Date: Thu, 22 Dec 2011 16:22:45 +0530 Message-Id: <1324551168-1202-4-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1324551168-1202-1-git-send-email-chander.kashyap@linaro.org> References: <1324551168-1202-1-git-send-email-chander.kashyap@linaro.org> Replace exynos4 prefix with exynos in arch/arm/cpu/armv7/exynos/clock.c as clock.c is common for exynos architecture. By doing so automatic selection of appropriate clock structure can be done. As per above reason replace exynos4_clock to exynos_clock in clock.h header file. Signed-off-by: Chander Kashyap --- arch/arm/cpu/armv7/exynos/clock.c | 50 +++++++++++++++--------------- arch/arm/include/asm/arch-exynos/clock.h | 2 +- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c index 4d92c53..b101f96 100644 --- a/arch/arm/cpu/armv7/exynos/clock.c +++ b/arch/arm/cpu/armv7/exynos/clock.c @@ -26,11 +26,11 @@ #include #include -/* exynos4: return pll clock frequency */ -static unsigned long exynos4_get_pll_clk(int pllreg) +/* exynos: return pll clock frequency */ +static unsigned long exynos_get_pll_clk(int pllreg) { - struct exynos4_clock *clk = - (struct exynos4_clock *)samsung_get_base_clock(); + struct exynos_clock *clk = + (struct exynos_clock *)samsung_get_base_clock(); unsigned long r, m, p, s, k = 0, mask, fout; unsigned int freq; @@ -92,11 +92,11 @@ static unsigned long exynos4_get_pll_clk(int pllreg) return fout; } -/* exynos4: return ARM clock frequency */ -static unsigned long exynos4_get_arm_clk(void) +/* exynos: return ARM clock frequency */ +static unsigned long exynos_get_arm_clk(void) { - struct exynos4_clock *clk = - (struct exynos4_clock *)samsung_get_base_clock(); + struct exynos_clock *clk = + (struct exynos_clock *)samsung_get_base_clock(); unsigned long div; unsigned long armclk; unsigned int core_ratio; @@ -114,11 +114,11 @@ static unsigned long exynos4_get_arm_clk(void) return armclk; } -/* exynos4: return pwm clock frequency */ -static unsigned long exynos4_get_pwm_clk(void) +/* exynos: return pwm clock frequency */ +static unsigned long exynos_get_pwm_clk(void) { - struct exynos4_clock *clk = - (struct exynos4_clock *)samsung_get_base_clock(); + struct exynos_clock *clk = + (struct exynos_clock *)samsung_get_base_clock(); unsigned long pclk, sclk; unsigned int sel; unsigned int ratio; @@ -157,11 +157,11 @@ static unsigned long exynos4_get_pwm_clk(void) return pclk; } -/* exynos4: return uart clock frequency */ -static unsigned long exynos4_get_uart_clk(int dev_index) +/* exynos: return uart clock frequency */ +static unsigned long exynos_get_uart_clk(int dev_index) { - struct exynos4_clock *clk = - (struct exynos4_clock *)samsung_get_base_clock(); + struct exynos_clock *clk = + (struct exynos_clock *)samsung_get_base_clock(); unsigned long uclk, sclk; unsigned int sel; unsigned int ratio; @@ -204,11 +204,11 @@ static unsigned long exynos4_get_uart_clk(int dev_index) return uclk; } -/* exynos4: set the mmc clock */ -static void exynos4_set_mmc_clk(int dev_index, unsigned int div) +/* exynos: set the mmc clock */ +static void exynos_set_mmc_clk(int dev_index, unsigned int div) { - struct exynos4_clock *clk = - (struct exynos4_clock *)samsung_get_base_clock(); + struct exynos_clock *clk = + (struct exynos_clock *)samsung_get_base_clock(); unsigned int addr; unsigned int val; @@ -233,25 +233,25 @@ static void exynos4_set_mmc_clk(int dev_index, unsigned int div) unsigned long get_pll_clk(int pllreg) { - return exynos4_get_pll_clk(pllreg); + return exynos_get_pll_clk(pllreg); } unsigned long get_arm_clk(void) { - return exynos4_get_arm_clk(); + return exynos_get_arm_clk(); } unsigned long get_pwm_clk(void) { - return exynos4_get_pwm_clk(); + return exynos_get_pwm_clk(); } unsigned long get_uart_clk(int dev_index) { - return exynos4_get_uart_clk(dev_index); + return exynos_get_uart_clk(dev_index); } void set_mmc_clk(int dev_index, unsigned int div) { - exynos4_set_mmc_clk(dev_index, div); + exynos_set_mmc_clk(dev_index, div); } diff --git a/arch/arm/include/asm/arch-exynos/clock.h b/arch/arm/include/asm/arch-exynos/clock.h index 483c911..ecd0cb1 100644 --- a/arch/arm/include/asm/arch-exynos/clock.h +++ b/arch/arm/include/asm/arch-exynos/clock.h @@ -23,7 +23,7 @@ #define __ASM_ARM_ARCH_CLOCK_H_ #ifndef __ASSEMBLY__ -struct exynos4_clock { +struct exynos_clock { unsigned char res1[0x4200]; unsigned int src_leftbus; unsigned char res2[0x1fc];