coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
clock.c File Reference
#include <soc/clock.h>
#include <device/mmio.h>
#include <soc/addressmap.h>
Include dependency graph for clock.c:

Go to the source code of this file.

Data Structures

union  cavm_rst_boot
 

Macros

#define PLL_REF_CLK   50000000 /* 50 MHz */
 

Functions

u64 thunderx_get_ref_clock (void)
 Returns the reference clock speed in Hz. More...
 
u64 thunderx_get_io_clock (void)
 Returns the I/O clock speed in Hz. More...
 
u64 thunderx_get_core_clock (void)
 Returns the core clock speed in Hz. More...
 

Macro Definition Documentation

◆ PLL_REF_CLK

#define PLL_REF_CLK   50000000 /* 50 MHz */

Definition at line 6 of file clock.c.

Function Documentation

◆ thunderx_get_core_clock()

u64 thunderx_get_core_clock ( void  )

Returns the core clock speed in Hz.

Definition at line 57 of file clock.c.

References cavm_rst_boot::c_mul, PLL_REF_CLK, read64(), RST_PF_BAR0, cavm_rst_boot::s, and cavm_rst_boot::u.

Referenced by mainboard_print_info().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thunderx_get_io_clock()

u64 thunderx_get_io_clock ( void  )

Returns the I/O clock speed in Hz.

Definition at line 45 of file clock.c.

References PLL_REF_CLK, cavm_rst_boot::pnr_mul, read64(), RST_PF_BAR0, cavm_rst_boot::s, and cavm_rst_boot::u.

Referenced by dt_platform_fixup(), init_timer(), mainboard_print_info(), spi_get_clock(), spi_set_clock(), twsi_set_speed(), uart_hclk(), uart_setup(), and watchdog_set().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ thunderx_get_ref_clock()

u64 thunderx_get_ref_clock ( void  )

Returns the reference clock speed in Hz.

Definition at line 37 of file clock.c.

References PLL_REF_CLK.

Referenced by mainboard_print_info().

Here is the caller graph for this function: