mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-11 13:43:27 +08:00
rockchip: rk3188: init CPU freq in clock driver
Init CPU frquency in clock driver instead of in SPL board file, this will help for use common board file later. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
49105fb7ed
commit
84a6a27ae3
@ -70,27 +70,6 @@ fallback:
|
|||||||
return BOOT_DEVICE_MMC1;
|
return BOOT_DEVICE_MMC1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int setup_arm_clock(void)
|
|
||||||
{
|
|
||||||
struct udevice *dev;
|
|
||||||
struct clk clk;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = rockchip_get_clk(&dev);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
clk.id = CLK_ARM;
|
|
||||||
ret = clk_request(dev, &clk);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = clk_set_rate(&clk, 600000000);
|
|
||||||
|
|
||||||
clk_free(&clk);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
void board_init_f(ulong dummy)
|
void board_init_f(ulong dummy)
|
||||||
{
|
{
|
||||||
struct udevice *dev;
|
struct udevice *dev;
|
||||||
@ -146,7 +125,6 @@ void board_init_f(ulong dummy)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_arm_clock();
|
|
||||||
#if CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
|
#if CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM) && !defined(CONFIG_SPL_BOARD_INIT)
|
||||||
back_to_bootrom(BROM_BOOT_NEXTSTAGE);
|
back_to_bootrom(BROM_BOOT_NEXTSTAGE);
|
||||||
#endif
|
#endif
|
||||||
|
@ -562,6 +562,9 @@ static int rk3188_clk_probe(struct udevice *dev)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
rkclk_init(priv->cru, priv->grf, priv->has_bwadj);
|
rkclk_init(priv->cru, priv->grf, priv->has_bwadj);
|
||||||
|
|
||||||
|
/* Init CPU frequency */
|
||||||
|
rkclk_configure_cpu(priv->cru, priv->grf, APLL_HZ, priv->has_bwadj);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user