]> git.ipfire.org Git - thirdparty/u-boot.git/blame - arch/arm/mach-octeontx/clock.c
Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""
[thirdparty/u-boot.git] / arch / arm / mach-octeontx / clock.c
CommitLineData
03c22880
SG
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2018 Marvell International Ltd.
4 *
5 * https://spdx.org/licenses
6 */
7
d678a59d 8#include <common.h>
03c22880
SG
9#include <asm/io.h>
10#include <asm/arch/board.h>
11#include <asm/arch/clock.h>
12
13/**
14 * Returns the I/O clock speed in Hz
15 */
16u64 octeontx_get_io_clock(void)
17{
18 union rst_boot rst_boot;
19
20 rst_boot.u = readq(RST_BOOT);
21
22 return rst_boot.s.pnr_mul * PLL_REF_CLK;
23}
24
25/**
26 * Returns the core clock speed in Hz
27 */
28u64 octeontx_get_core_clock(void)
29{
30 union rst_boot rst_boot;
31
32 rst_boot.u = readq(RST_BOOT);
33
34 return rst_boot.s.c_mul * PLL_REF_CLK;
35}