mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
serial: lpuart: Enable IPG clock
Current codes only ennable the PER clock. However on iMX8 the LPUART also needs IPG clock which is an LPCG. Should not depend on the default LPCG setting. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
This commit is contained in:
parent
30e5b403d7
commit
cc7df0b9e8
1 changed files with 13 additions and 1 deletions
|
@ -480,18 +480,30 @@ static int lpuart_serial_probe(struct udevice *dev)
|
|||
{
|
||||
#if CONFIG_IS_ENABLED(CLK)
|
||||
struct clk per_clk;
|
||||
struct clk ipg_clk;
|
||||
int ret;
|
||||
|
||||
ret = clk_get_by_name(dev, "per", &per_clk);
|
||||
if (!ret) {
|
||||
ret = clk_enable(&per_clk);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to get per clk: %d\n", ret);
|
||||
dev_err(dev, "Failed to enable per clk: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
debug("%s: Failed to get per clk: %d\n", __func__, ret);
|
||||
}
|
||||
|
||||
ret = clk_get_by_name(dev, "ipg", &ipg_clk);
|
||||
if (!ret) {
|
||||
ret = clk_enable(&ipg_clk);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to enable ipg clk: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
debug("%s: Failed to get ipg clk: %d\n", __func__, ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (is_lpuart32(dev))
|
||||
|
|
Loading…
Reference in a new issue