Skip to content
Snippets Groups Projects
Commit e477f4bd authored by Yangbo Lu's avatar Yangbo Lu Committed by York Sun
Browse files

armv8/fsl-lsch2: fix sdhc clock frequency value


The eSDHC could select to use platform clock or peripheral clock to
generate SD clock. The default selection is platform clock. So, fix
the clock frequency value that's calculated for eSDHC.

Signed-off-by: default avatarYangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: default avatarYork Sun <york.sun@nxp.com>
parent 0f4b82a5
No related branches found
No related tags found
No related merge requests found
......@@ -106,9 +106,13 @@ void get_sys_info(struct sys_info *sys_info)
#define HWA_CGA_M2_CLK_SEL 0x00000007
#define HWA_CGA_M2_CLK_SHIFT 0
#ifdef CONFIG_FSL_ESDHC
#ifdef CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK
rcw_tmp = in_be32(&gur->rcwsr[15]);
rcw_tmp = (rcw_tmp & HWA_CGA_M2_CLK_SEL) >> HWA_CGA_M2_CLK_SHIFT;
sys_info->freq_sdhc = freq_c_pll[1] / rcw_tmp;
#else
sys_info->freq_sdhc = sys_info->freq_systembus;
#endif
#endif
#if defined(CONFIG_FSL_IFC)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment