mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
armv8/ls1088a/ls2088a: esdhc: Add esdhc clock support
This patch adds esdhc clock support for ls1088a and ls2088a. Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
parent
c3ced8a6ed
commit
0fdf696721
1 changed files with 14 additions and 0 deletions
|
@ -192,6 +192,16 @@ int get_dspi_freq(ulong dummy)
|
||||||
return get_bus_freq(0) / CONFIG_SYS_FSL_DSPI_CLK_DIV;
|
return get_bus_freq(0) / CONFIG_SYS_FSL_DSPI_CLK_DIV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_FSL_ESDHC
|
||||||
|
int get_sdhc_freq(ulong dummy)
|
||||||
|
{
|
||||||
|
if (!gd->arch.sdhc_clk)
|
||||||
|
get_clocks();
|
||||||
|
|
||||||
|
return gd->arch.sdhc_clk;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int get_serial_clock(void)
|
int get_serial_clock(void)
|
||||||
{
|
{
|
||||||
return get_bus_freq(0) / CONFIG_SYS_FSL_DUART_CLK_DIV;
|
return get_bus_freq(0) / CONFIG_SYS_FSL_DUART_CLK_DIV;
|
||||||
|
@ -202,6 +212,10 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
|
||||||
switch (clk) {
|
switch (clk) {
|
||||||
case MXC_I2C_CLK:
|
case MXC_I2C_CLK:
|
||||||
return get_i2c_freq(0);
|
return get_i2c_freq(0);
|
||||||
|
#if defined(CONFIG_FSL_ESDHC)
|
||||||
|
case MXC_ESDHC_CLK:
|
||||||
|
return get_sdhc_freq(0);
|
||||||
|
#endif
|
||||||
case MXC_DSPI_CLK:
|
case MXC_DSPI_CLK:
|
||||||
return get_dspi_freq(0);
|
return get_dspi_freq(0);
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Add table
Reference in a new issue