Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Loongson 1: more clk support and add select HAVE_CLK

This fixes a redefinition of clk_*:

arch/mips/loongson1/common/clock.c:23:13: error: redefinition of 'clk_get'
include/linux/clk.h:281:27: note: previous definition of 'clk_get' was here
arch/mips/loongson1/common/clock.c:41:15: error: redefinition of 'clk_get_rate'
include/linux/clk.h:302:29: note: previous definition of 'clk_get_rate' was here
make[3]: *** [arch/mips/loongson1/common/clock.o] Error 1

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: linux-mips@linux-mips.org
Reviewed-by: John Crispin <blogic@openwrt.org>
Acked-by: Kelvin Cheung <keguang.zhang@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/4143/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Yoichi Yuasa and committed by
Ralf Baechle
4b00951f 47cd7343

+17
+1
arch/mips/loongson1/Kconfig
··· 15 15 select SYS_SUPPORTS_LITTLE_ENDIAN 16 16 select SYS_SUPPORTS_HIGHMEM 17 17 select SYS_HAS_EARLY_PRINTK 18 + select HAVE_CLK 18 19 19 20 endchoice 20 21
+16
arch/mips/loongson1/common/clock.c
··· 38 38 } 39 39 EXPORT_SYMBOL(clk_get); 40 40 41 + int clk_enable(struct clk *clk) 42 + { 43 + return 0; 44 + } 45 + EXPORT_SYMBOL(clk_enable); 46 + 47 + void clk_disable(struct clk *clk) 48 + { 49 + } 50 + EXPORT_SYMBOL(clk_disable); 51 + 41 52 unsigned long clk_get_rate(struct clk *clk) 42 53 { 43 54 return clk->rate; 44 55 } 45 56 EXPORT_SYMBOL(clk_get_rate); 57 + 58 + void clk_put(struct clk *clk) 59 + { 60 + } 61 + EXPORT_SYMBOL(clk_put); 46 62 47 63 static void pll_clk_init(struct clk *clk) 48 64 {