mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-06-20 13:41:45 +00:00
rockchip: Add a way to obtain the main clock device
On Rockchip SoCs we typically have a main clock device that uses the Soc clock driver. There is also a fixed clock for the oscillator. Add a function to obtain the core clock. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c57f806bf2
commit
a617c5d3e2
3 changed files with 20 additions and 0 deletions
|
@ -67,4 +67,6 @@ struct rk3288_grf;
|
|||
|
||||
void rk3288_clk_configure_cpu(struct rk3288_cru *cru, struct rk3288_grf *grf);
|
||||
|
||||
int rockchip_get_clk(struct udevice **devp);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0+
|
||||
#
|
||||
|
||||
obj-y += clk_rk3288.o
|
||||
obj-y += reset_rk3288.o
|
||||
obj-y += sdram_rk3288.o
|
||||
obj-y += syscon_rk3288.o
|
||||
|
|
17
arch/arm/mach-rockchip/rk3288/clk_rk3288.c
Normal file
17
arch/arm/mach-rockchip/rk3288/clk_rk3288.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* Copyright (C) 2015 Google, Inc
|
||||
* Written by Simon Glass <sjg@chromium.org>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <dm.h>
|
||||
#include <syscon.h>
|
||||
#include <asm/arch/clock.h>
|
||||
|
||||
int rockchip_get_clk(struct udevice **devp)
|
||||
{
|
||||
return uclass_get_device_by_driver(UCLASS_CLK,
|
||||
DM_GET_DRIVER(rockchip_rk3288_cru), devp);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue