summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehoon Chung <jh80.chung@samsung.com>2017-09-28 21:08:26 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2017-09-29 18:58:07 +0900
commita686b7254799faacfc2f809e6276424546f0ec45 (patch)
tree723e75721eb4cb0c47c9422d332f26cfb802a673
parent9e73390b3028e2891904a8c7f2b61efe1f72c1f2 (diff)
downloadu-boot-tm1-a686b7254799faacfc2f809e6276424546f0ec45.tar.gz
u-boot-tm1-a686b7254799faacfc2f809e6276424546f0ec45.tar.bz2
u-boot-tm1-a686b7254799faacfc2f809e6276424546f0ec45.zip
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 <jh80.chung@samsung.com>
-rw-r--r--arch/arm/cpu/armv7/sc8830/Makefile2
-rw-r--r--arch/arm/cpu/armv7/sc8830/clock_test.c121
2 files changed, 1 insertions, 122 deletions
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 <ubi_uboot.h>
-#include <linux/compiler.h>
-#include <asm/arch/clock.h>
-
-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");
-}
-