From: Jaehoon Chung Date: Thu, 28 Sep 2017 12:08:26 +0000 (+0900) Subject: arm: sc8830: clock_test: remove clock_test.c file X-Git-Tag: accepted/tizen/4.0/unified/20171017.210954~1 X-Git-Url: http://review.tizen.org/git/?p=profile%2Fmobile%2Fplatform%2Fkernel%2Fu-boot-tm1.git;a=commitdiff_plain;h=a686b7254799faacfc2f809e6276424546f0ec45 arm: sc8830: clock_test: remove clock_test.c file clock_teset.c doesn't need to build. Remove clock_teset.c file. Change-Id: Ie1c6bbddfe41990dbaab582dedce855c83238ad5 Signed-off-by: Jaehoon Chung --- diff --git a/arch/arm/cpu/armv7/sc8830/Makefile b/arch/arm/cpu/armv7/sc8830/Makefile index 0b1e7d8..b44c389 100644 --- a/arch/arm/cpu/armv7/sc8830/Makefile +++ b/arch/arm/cpu/armv7/sc8830/Makefile @@ -24,7 +24,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).o -COBJS = generic.o timer.o reset.o ldo.o mfp_sprd.o mmu.o adc.o rtc-sprd.o sec_boot.o glb.o adi.o gpio.o gpio_phy.o clock.o clock_test.o check_reboot.o eic.o +COBJS = generic.o timer.o reset.o ldo.o mfp_sprd.o mmu.o adc.o rtc-sprd.o sec_boot.o glb.o adi.o gpio.o gpio_phy.o clock.o check_reboot.o eic.o ifneq ($(CONFIG_ADIE_SC2723)$(CONFIG_ADIE_SC2723S),) COBJS += vibrator_sc2723.o diff --git a/arch/arm/cpu/armv7/sc8830/clock_test.c b/arch/arm/cpu/armv7/sc8830/clock_test.c deleted file mode 100644 index 788e43e..0000000 --- a/arch/arm/cpu/armv7/sc8830/clock_test.c +++ /dev/null @@ -1,121 +0,0 @@ -#include -#include -#include - -extern const u32 __clkinit0 __clkinit_begin; -extern const u32 __clkinit2 __clkinit_end; - -static unsigned int get_clock_rate(const char *clk_name) -{ - unsigned int rate; - struct clk *clk; - - clk =clk_get(0, clk_name); - - if (clk == NULL) - { - printf("%s can't find!\r\n"); - return 0; - } - - if (clk->ops) - { - rate = clk->ops->get_rate(clk); - } - else - { - rate = clk->rate; - } - printf("%s : %d\r\n", clk_name, rate); - return rate; -} - -static unsigned int change_clock_rate(const *clk_name, unsigned int rate) -{ - struct clk *clk; - - clk =clk_get(0, clk_name); - - if (clk == NULL) - { - printf("%s can't find!\r\n"); - return -1; - } - - if (clk->ops) - { - if (clk->ops->set_rate) - { - clk->ops->set_rate(clk, rate); - } - else - { - return -1; - } - } - else - { - return -1; - } - printf("%s ==> %d\r\n", clk_name, rate); - return 0; -} - -void clock_test() -{ - struct clk *clk; - - sci_clock_init(); - - printf("clock_test, __clkinit_begin:%08X (%08X), __clkinit_end:%08X (%08X)\r\n\r\n", - &__clkinit_begin, __clkinit_begin, &__clkinit_end, __clkinit_end); - - { - struct clk_lookup *cl = (struct clk_lookup *)(&__clkinit_begin + 1); - while (cl < (struct clk_lookup *)&__clkinit_end) - { - clk =clk_get(0, cl->con_id); - if (clk != ERR_PTR(-2)) - { - if (clk->ops) - { - printf("1.clk: %s, rate: %d\r\n", cl->con_id, clk->ops->get_rate(clk)); - } - else - { - printf("2.clk: %s, rate: %d\r\n", cl->con_id, clk->rate); - } - } - else - { - printf("get %s error!\r\n", cl->con_id); - } - cl++; - } - } - printf("---------------------------------------\r\n"); - get_clock_rate("clk_arm"); - get_clock_rate("clk_axi"); - get_clock_rate("clk_ahb"); - get_clock_rate("clk_apb"); - - get_clock_rate("clk_emmc"); - change_clock_rate("clk_emmc", 192000000); - get_clock_rate("clk_emmc"); - - get_clock_rate("clk_apb"); - change_clock_rate("clk_apb", 100000000); - get_clock_rate("clk_apb"); - - - get_clock_rate("clk_emc"); - change_clock_rate("clk_emc", 100000000); - get_clock_rate("clk_emc"); - - get_clock_rate("clk_dbg"); - change_clock_rate("clk_dbg", 200000000); - get_clock_rate("clk_dbg"); - - printf("clock test end!\r\n"); -} -