From: Mike Frysinger Date: Wed, 7 Jan 2009 15:14:38 +0000 (+0800) Subject: Blackfin arch: do not allow people to pass in a diff clkin_hz value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=508808cda6c39819f51b58e95ba5c6222acea222;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Blackfin arch: do not allow people to pass in a diff clkin_hz value do not allow people to pass in a diff clkin_hz value when reprogramming clocks -- it is too late currently Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index c05e5e3bad68..4dffb913147e 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -951,6 +951,10 @@ static u_long get_clkin_hz(void) static int __init early_init_clkin_hz(char *buf) { cached_clkin_hz = simple_strtoul(buf, NULL, 0); +#ifdef BFIN_KERNEL_CLOCK + if (cached_clkin_hz != CONFIG_CLKIN_HZ) + panic("cannot change clkin_hz when reprogramming clocks"); +#endif return 1; } early_param("clkin_hz=", early_init_clkin_hz);