coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
soundwire.c File Reference
#include <acpi/acpi_soundwire.h>
#include <console/console.h>
#include <device/mmio.h>
#include <device/soundwire.h>
#include <drivers/intel/soundwire/soundwire.h>
#include <intelblocks/pmclib.h>
#include <stddef.h>
#include <string.h>
Include dependency graph for soundwire.c:

Go to the source code of this file.

Functions

int soc_fill_soundwire_controller (struct intel_soundwire_controller **controller)
 soc_fill_soundwire_controller() - Get SoundWire controller properties from the SoC. More...
 

Variables

static const struct soundwire_link link_xtal_38_4
 
static const struct soundwire_link link_xtal_24
 
static struct intel_soundwire_controller intel_controller
 

Function Documentation

◆ soc_fill_soundwire_controller()

int soc_fill_soundwire_controller ( struct intel_soundwire_controller **  controller)

soc_fill_soundwire_controller() - Get SoundWire controller properties from the SoC.

@controller: Properties to be filled by the SoC. Return zero for success, -1 if there was any error filling the properties.

Definition at line 43 of file soundwire.c.

References BIOS_ERR, intel_controller, intel_soundwire_controller::ip_clock, KHz, link_xtal_24, link_xtal_38_4, soundwire_controller::master_list, soundwire_controller::master_list_count, memcpy(), MHz, pmc_get_xtal_freq(), printk, intel_soundwire_controller::sdw, XTAL_19_2_MHZ, XTAL_24_MHZ, and XTAL_38_4_MHZ.

Here is the call graph for this function:

Variable Documentation

◆ intel_controller

struct intel_soundwire_controller intel_controller
static
Initial value:
= {
.acpi_address = 0x40000000,
.sdw = {
.master_list_count = 4
}
}

Definition at line 1 of file soundwire.c.

Referenced by intel_soundwire_link_prop_cb(), and soc_fill_soundwire_controller().

◆ link_xtal_24

const struct soundwire_link link_xtal_24
static
Initial value:
= {
.clock_stop_mode0_supported = 1,
.clock_stop_mode1_supported = 1,
.clock_frequencies_supported_count = 1,
.clock_frequencies_supported = { 6 * MHz },
.default_frame_rate = 48 * KHz,
.default_frame_row_size = 125,
.default_frame_col_size = 2,
.dynamic_frame_shape = 1,
.command_error_threshold = 16,
}
#define MHz
Definition: helpers.h:80
#define KHz
Definition: helpers.h:79

Definition at line 1 of file soundwire.c.

Referenced by soc_fill_soundwire_controller().

◆ link_xtal_38_4

const struct soundwire_link link_xtal_38_4
static
Initial value:
= {
.clock_stop_mode0_supported = 1,
.clock_stop_mode1_supported = 1,
.clock_frequencies_supported_count = 1,
.clock_frequencies_supported = { 4800 * KHz },
.default_frame_rate = 48 * KHz,
.default_frame_row_size = 50,
.default_frame_col_size = 4,
.dynamic_frame_shape = 1,
.command_error_threshold = 16,
}

Definition at line 1 of file soundwire.c.

Referenced by soc_fill_soundwire_controller().