aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-imx6sl.c
diff options
context:
space:
mode:
authorFugang Duan <B38611@freescale.com>2013-09-03 22:58:17 -0400
committerShawn Guo <shawn.guo@linaro.org>2013-10-20 21:11:04 -0400
commita9aec30dcf2aae5929bc43ada552a33c8d737967 (patch)
tree66bb06c85a408abcd40353833e4bb7cc2b7cbfdc /arch/arm/mach-imx/mach-imx6sl.c
parent7f6ac89c1d1e0c654ea02c8c2dd0ee8e1ce2795f (diff)
ARM: imx6sl: config iomux-gpr1 to select clock for fec
Config iomux-gpr1 to select clock source for fec system clock. Clear gpr1[14], gpr1[18-17] bit to select the fec clock source from internal anatop PLL. Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/mach-imx6sl.c')
-rw-r--r--arch/arm/mach-imx/mach-imx6sl.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c
index c70bd7c64974..21cde21daf9b 100644
--- a/arch/arm/mach-imx/mach-imx6sl.c
+++ b/arch/arm/mach-imx/mach-imx6sl.c
@@ -10,16 +10,37 @@
10#include <linux/irqchip.h> 10#include <linux/irqchip.h>
11#include <linux/of.h> 11#include <linux/of.h>
12#include <linux/of_platform.h> 12#include <linux/of_platform.h>
13#include <linux/mfd/syscon.h>
14#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
15#include <linux/regmap.h>
13#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
14#include <asm/mach/map.h> 17#include <asm/mach/map.h>
15 18
16#include "common.h" 19#include "common.h"
17 20
21static void __init imx6sl_fec_init(void)
22{
23 struct regmap *gpr;
24
25 /* set FEC clock from internal PLL clock source */
26 gpr = syscon_regmap_lookup_by_compatible("fsl,imx6sl-iomuxc-gpr");
27 if (!IS_ERR(gpr)) {
28 regmap_update_bits(gpr, IOMUXC_GPR1,
29 IMX6SL_GPR1_FEC_CLOCK_MUX2_SEL_MASK, 0);
30 regmap_update_bits(gpr, IOMUXC_GPR1,
31 IMX6SL_GPR1_FEC_CLOCK_MUX1_SEL_MASK, 0);
32 } else {
33 pr_err("failed to find fsl,imx6sl-iomux-gpr regmap\n");
34 }
35}
36
18static void __init imx6sl_init_machine(void) 37static void __init imx6sl_init_machine(void)
19{ 38{
20 mxc_arch_reset_init_dt(); 39 mxc_arch_reset_init_dt();
21 40
22 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); 41 of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
42
43 imx6sl_fec_init();
23} 44}
24 45
25static void __init imx6sl_init_irq(void) 46static void __init imx6sl_init_irq(void)