diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2013-07-08 16:04:39 +0530 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-07-26 16:39:11 -0400 |
commit | 65e9d56fb9ce9cfd7ffff7afaa6b7de50e400e06 (patch) | |
tree | 2e94e0403d687c369e9b38e10bb23ee4e3747331 /arch/arm/cpu/armv7/omap-common | |
parent | 454ac635257f78a369015bde7795ddf979d64e12 (diff) | |
download | u-boot-imx-65e9d56fb9ce9cfd7ffff7afaa6b7de50e400e06.zip u-boot-imx-65e9d56fb9ce9cfd7ffff7afaa6b7de50e400e06.tar.gz u-boot-imx-65e9d56fb9ce9cfd7ffff7afaa6b7de50e400e06.tar.bz2 |
ARM: DRA7xx: Lock DPLL_GMAC
Locking DPLL_GMAC
[mugunthanvnm@ti.com:Configure only if CPSW is selected]
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common')
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/clocks-common.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/cpu/armv7/omap-common/clocks-common.c index 20fa678..7580594 100644 --- a/arch/arm/cpu/armv7/omap-common/clocks-common.c +++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c @@ -196,6 +196,18 @@ static const struct dpll_params *get_ddr_dpll_params return &dpll_data->ddr[sysclk_ind]; } +#ifdef CONFIG_DRIVER_TI_CPSW +static const struct dpll_params *get_gmac_dpll_params + (struct dplls const *dpll_data) +{ + u32 sysclk_ind = get_sys_clk_index(); + + if (!dpll_data->gmac) + return NULL; + return &dpll_data->gmac[sysclk_ind]; +} +#endif + static void do_setup_dpll(u32 const base, const struct dpll_params *params, u8 lock, char *dpll) { @@ -398,6 +410,12 @@ static void setup_dplls(void) params = get_ddr_dpll_params(*dplls_data); do_setup_dpll((*prcm)->cm_clkmode_dpll_ddrphy, params, DPLL_LOCK, "ddr"); + +#ifdef CONFIG_DRIVER_TI_CPSW + params = get_gmac_dpll_params(*dplls_data); + do_setup_dpll((*prcm)->cm_clkmode_dpll_gmac, params, + DPLL_LOCK, "gmac"); +#endif } #ifdef CONFIG_SYS_CLOCKS_ENABLE_ALL |