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

Go to the source code of this file.

Data Structures

struct  Ipq806xLccClocks
 
struct  __packed
 
struct  lcc_freq_tbl
 

Typedefs

typedef struct __packed Ipq806xLccGccRegs
 
typedef struct __packed Ipq806xLccPll0Regs
 
typedef struct __packed Ipq806xLccAhbixRegs
 
typedef struct __packed Ipq806xLccMi2sRegs
 
typedef struct __packed Ipq806xLccPllRegs
 

Functions

static int lcc_init_enable_pll0 (Ipq806xLccClocks *bus)
 
static int lcc_init_enable_ahbix (Ipq806xLccClocks *bus)
 
static int lcc_init_mi2s (Ipq806xLccClocks *bus, unsigned int freq)
 
static int lcc_enable_mi2s (Ipq806xLccClocks *bus)
 
int audio_clock_config (unsigned int frequency)
 

Variables

static const struct lcc_freq_tbl lcc_mi2s_freq_tbl []
 

Typedef Documentation

◆ Ipq806xLccAhbixRegs

typedef struct __packed Ipq806xLccAhbixRegs

◆ Ipq806xLccGccRegs

typedef struct __packed Ipq806xLccGccRegs

◆ Ipq806xLccMi2sRegs

typedef struct __packed Ipq806xLccMi2sRegs

◆ Ipq806xLccPll0Regs

typedef struct __packed Ipq806xLccPll0Regs

◆ Ipq806xLccPllRegs

typedef struct __packed Ipq806xLccPllRegs

Function Documentation

◆ audio_clock_config()

int audio_clock_config ( unsigned int  frequency)

Definition at line 260 of file lcc.c.

References GCC_PLL_APCS_REG, LCC_AHBIX_NS_REG, lcc_enable_mi2s(), lcc_init_enable_ahbix(), lcc_init_enable_pll0(), lcc_init_mi2s(), LCC_MI2S_NS_REG, LCC_PLL0_MODE_REG, LCC_PLL_PCLK_REG, MSM_GCC_BASE, and MSM_LPASS_LCC_BASE.

Referenced by mainboard_init().

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

◆ lcc_enable_mi2s()

static int lcc_enable_mi2s ( Ipq806xLccClocks bus)
static

Definition at line 238 of file lcc.c.

References BIOS_ERR, LCC_MI2S_NS_BIT_CXC_ENABLE, LCC_MI2S_NS_OSR_CXC_ENABLE, LCC_MI2S_STAT_BIT_CLK_MASK, LCC_MI2S_STAT_OSR_CLK_MASK, __packed::ns, printk, read32(), __packed::status, udelay(), and write32().

Referenced by audio_clock_config().

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

◆ lcc_init_enable_ahbix()

◆ lcc_init_enable_pll0()

◆ lcc_init_mi2s()

Variable Documentation

◆ lcc_mi2s_freq_tbl

const struct lcc_freq_tbl lcc_mi2s_freq_tbl[]
static

Definition at line 1 of file lcc.c.

Referenced by lcc_init_mi2s().