Since there is code duplication in different mach-board.c file it is better to set default clock rate of xusbxti clock in plat-s5p/clock.c file.
The patches are based on following commit on Kukjin's for-next branch.
Pankaj (1): ARM: S5P: Set default rate of xusbxti clock
Pankaj Dubey (2): ARM: EXYNOS: Removed code for setting clock rate of xusbxti ARM: S5PV210: Removed code for setting clock rate of xusbxti
arch/arm/mach-exynos/mach-nuri.c | 1 - arch/arm/mach-exynos/mach-origen.c | 1 - arch/arm/mach-exynos/mach-smdk4x12.c | 2 -- arch/arm/mach-exynos/mach-smdkv310.c | 1 - arch/arm/mach-s5pv210/mach-goni.c | 1 - arch/arm/plat-s5p/clock.c | 1 + 6 files changed, 1 insertions(+), 6 deletions(-)
From: Pankaj pankaj.dubey@samsung.com
Initialize xusbxti clock's default value here. So that code duplication in all other mach-board.c can be avoided.
Signed-off-by: Pankaj Dubey pankaj.dubey@samsung.com --- arch/arm/plat-s5p/clock.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c index 5f84a3f..6fb9049 100644 --- a/arch/arm/plat-s5p/clock.c +++ b/arch/arm/plat-s5p/clock.c @@ -38,6 +38,7 @@ struct clk clk_ext_xtal_mux = { struct clk clk_xusbxti = { .name = "xusbxti", .id = -1, + .rate = 24000000, };
struct clk s5p_clk_27m = {
Since now xusbxti clock's default rate is set in clock.c file, there is no need to set it again in the machine file.
Signed-off-by: Pankaj Dubey pankaj.dubey@samsung.com --- arch/arm/mach-exynos/mach-nuri.c | 1 - arch/arm/mach-exynos/mach-origen.c | 1 - arch/arm/mach-exynos/mach-smdk4x12.c | 2 -- arch/arm/mach-exynos/mach-smdkv310.c | 1 - 4 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-nuri.c b/arch/arm/mach-exynos/mach-nuri.c index 236bbe1..d9196b8 100644 --- a/arch/arm/mach-exynos/mach-nuri.c +++ b/arch/arm/mach-exynos/mach-nuri.c @@ -1314,7 +1314,6 @@ static void __init nuri_machine_init(void) nuri_camera_init();
nuri_ehci_init(); - clk_xusbxti.rate = 24000000;
/* Last */ platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices)); diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c index f56d027..4700456 100644 --- a/arch/arm/mach-exynos/mach-origen.c +++ b/arch/arm/mach-exynos/mach-origen.c @@ -702,7 +702,6 @@ static void __init origen_machine_init(void) s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata);
origen_ehci_init(); - clk_xusbxti.rate = 24000000;
s5p_tv_setup(); s5p_i2c_hdmiphy_set_platdata(NULL); diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c index fcf2e0e..35b86ea 100644 --- a/arch/arm/mach-exynos/mach-smdk4x12.c +++ b/arch/arm/mach-exynos/mach-smdk4x12.c @@ -247,8 +247,6 @@ static struct platform_device *smdk4x12_devices[] __initdata = {
static void __init smdk4x12_map_io(void) { - clk_xusbxti.rate = 24000000; - s5p_init_io(NULL, 0, S5P_VA_CHIPID); s3c24xx_init_clocks(clk_xusbxti.rate); s3c24xx_init_uarts(smdk4x12_uartcfgs, ARRAY_SIZE(smdk4x12_uartcfgs)); diff --git a/arch/arm/mach-exynos/mach-smdkv310.c b/arch/arm/mach-exynos/mach-smdkv310.c index cec2afa..c7fb82f 100644 --- a/arch/arm/mach-exynos/mach-smdkv310.c +++ b/arch/arm/mach-exynos/mach-smdkv310.c @@ -363,7 +363,6 @@ static void __init smdkv310_machine_init(void) s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
smdkv310_ehci_init(); - clk_xusbxti.rate = 24000000;
platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
Since now xusbxti clock's default rate is set in clock.c file, there is no need to set it again in the machine file.
Signed-off-by: Pankaj Dubey pankaj.dubey@samsung.com --- arch/arm/mach-s5pv210/mach-goni.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index 15edcae..02d31f4 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c @@ -947,7 +947,6 @@ static void __init goni_machine_init(void) /* KEYPAD */ samsung_keypad_set_platdata(&keypad_data);
- clk_xusbxti.rate = 24000000;
platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices)); }
Pankaj Dubey wrote:
Since there is code duplication in different mach-board.c file it is better to set default clock rate of xusbxti clock in plat-s5p/clock.c file.
The patches are based on following commit on Kukjin's for-next branch.
Pankaj (1): ARM: S5P: Set default rate of xusbxti clock
Pankaj Dubey (2): ARM: EXYNOS: Removed code for setting clock rate of xusbxti ARM: S5PV210: Removed code for setting clock rate of xusbxti
'Pankaj' and 'Pankaj Dubey'?
arch/arm/mach-exynos/mach-nuri.c | 1 - arch/arm/mach-exynos/mach-origen.c | 1 - arch/arm/mach-exynos/mach-smdk4x12.c | 2 -- arch/arm/mach-exynos/mach-smdkv310.c | 1 - arch/arm/mach-s5pv210/mach-goni.c | 1 - arch/arm/plat-s5p/clock.c | 1 + 6 files changed, 1 insertions(+), 6 deletions(-)
-- 1.7.4.1
No, the clock can be different for each board even though current value is same. So it should being at the each board file.
Thanks.
Best regards, Kgene. -- Kukjin Kim kgene.kim@samsung.com, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
Pankaj Dubey wrote:
Subject: [PATCH 0/3] Moving xusbxti clock setting in clock.c file.
Since there is code duplication in different mach-board.c file it is better to set default clock rate of xusbxti clock in plat-s5p/clock.c file.
The patches are based on following commit on Kukjin's for-next branch.
Pankaj (1): ARM: S5P: Set default rate of xusbxti clock
Pankaj Dubey (2): ARM: EXYNOS: Removed code for setting clock rate of xusbxti ARM: S5PV210: Removed code for setting clock rate of xusbxti
arch/arm/mach-exynos/mach-nuri.c | 1 - arch/arm/mach-exynos/mach-origen.c | 1 - arch/arm/mach-exynos/mach-smdk4x12.c | 2 -- arch/arm/mach-exynos/mach-smdkv310.c | 1 - arch/arm/mach-s5pv210/mach-goni.c | 1 - arch/arm/plat-s5p/clock.c | 1 + 6 files changed, 1 insertions(+), 6 deletions(-)
-- 1.7.4.1
No, clock rate of xusbxti clock can be changeable according to board.
-- To unsubscribe from this list: send the line "unsubscribe linux-samsung- soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html