diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-08-13 10:10:29 +0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-10-21 05:12:51 +0400 |
commit | 3f75978b3742157853618c5c6dd4a5f49aa950b1 (patch) | |
tree | b8a87c92a3e258034cebe93a42f4cf47fba0b354 /arch/arm/mach-imx/mach-imx6q.c | |
parent | bfefdff8f91aa0a9ff1291d18d54498af276a6e5 (diff) | |
download | linux-3f75978b3742157853618c5c6dd4a5f49aa950b1.tar.xz |
ARM: imx6q: use common soc revision helpers
It calls imx_set_soc_revision() to set up soc revision in
imx6q_init_revision(), and replaces all the occurrences of
imx6q_revision() with common helper imx_get_soc_revision().
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/mach-imx6q.c')
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 3be0fa0e9796..f260aad9850b 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -38,16 +38,10 @@ #include "cpuidle.h" #include "hardware.h" -static u32 chip_revision; - -int imx6q_revision(void) -{ - return chip_revision; -} - static void __init imx6q_init_revision(void) { u32 rev = imx_anatop_get_digprog(); + u32 chip_revision; switch (rev & 0xff) { case 0: @@ -64,6 +58,7 @@ static void __init imx6q_init_revision(void) } mxc_set_cpu_type(rev >> 16 & 0xff); + imx_set_soc_revision(chip_revision); } static void imx6q_restart(enum reboot_mode mode, const char *cmd) @@ -191,7 +186,7 @@ static void __init imx6q_1588_init(void) static void __init imx6q_init_machine(void) { imx_print_silicon_rev(cpu_is_imx6dl() ? "i.MX6DL" : "i.MX6Q", - imx6q_revision()); + imx_get_soc_revision()); imx6q_enet_phy_init(); @@ -270,7 +265,7 @@ static void __init imx6q_init_late(void) * WAIT mode is broken on TO 1.0 and 1.1, so there is no point * to run cpuidle on them. */ - if (imx6q_revision() > IMX_CHIP_REVISION_1_1) + if (imx_get_soc_revision() > IMX_CHIP_REVISION_1_1) imx6q_cpuidle_init(); if (IS_ENABLED(CONFIG_ARM_IMX6Q_CPUFREQ)) { |