coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sata.c File Reference
#include <device/mmio.h>
#include <device/pci_ops.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <option.h>
#include <acpi/acpi_sata.h>
#include <types.h>
#include "chip.h"
#include "pch.h"
Include dependency graph for sata.c:

Go to the source code of this file.

Typedefs

typedef struct southbridge_intel_bd82x6x_config config_t
 

Functions

static u32 sir_read (struct device *dev, int idx)
 
static void sir_write (struct device *dev, int idx, u32 value)
 
static void sata_read_resources (struct device *dev)
 
static void sata_set_resources (struct device *dev)
 
static void sata_init (struct device *dev)
 
static void sata_enable (struct device *dev)
 
static const char * sata_acpi_name (const struct device *dev)
 
static void sata_fill_ssdt (const struct device *dev)
 

Variables

static struct device_operations sata_ops
 
static const unsigned short pci_device_ids []
 
static const struct pci_driver pch_sata __pci_driver
 

Typedef Documentation

◆ config_t

Definition at line 1 of file sata.c.

Function Documentation

◆ sata_acpi_name()

static const char* sata_acpi_name ( const struct device dev)
static

Definition at line 247 of file sata.c.

◆ sata_enable()

static void sata_enable ( struct device dev)
static

Definition at line 224 of file sata.c.

References device::chip_info, config, get_uint_option(), and pci_write_config16().

Here is the call graph for this function:

◆ sata_fill_ssdt()

static void sata_fill_ssdt ( const struct device dev)
static

Definition at line 252 of file sata.c.

References device::chip_info, config, and generate_sata_ssdt_ports().

Here is the call graph for this function:

◆ sata_init()

◆ sata_read_resources()

static void sata_read_resources ( struct device dev)
static

◆ sata_set_resources()

static void sata_set_resources ( struct device dev)
static

Definition at line 71 of file sata.c.

References resource::flags, get_uint_option(), IORESOURCE_FIXED, PCI_BASE_ADDRESS_0, PCI_BASE_ADDRESS_3, pci_dev_set_resources(), and probe_resource().

Here is the call graph for this function:

◆ sir_read()

static u32 sir_read ( struct device dev,
int  idx 
)
inlinestatic

Definition at line 18 of file sata.c.

References pci_read_config32(), pci_write_config32(), SATA_SIRD, and SATA_SIRI.

Referenced by sata_init().

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

◆ sir_write()

static void sir_write ( struct device dev,
int  idx,
u32  value 
)
inlinestatic

Definition at line 24 of file sata.c.

References pci_write_config32(), SATA_SIRD, SATA_SIRI, and value.

Referenced by sata_init().

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

Variable Documentation

◆ __pci_driver

const struct pci_driver pch_sata __pci_driver
static
Initial value:
= {
.ops = &sata_ops,
.vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
}
#define PCI_VID_INTEL
Definition: pci_ids.h:2157
static struct device_operations sata_ops
Definition: sata.c:258
static const unsigned short pci_device_ids[]
Definition: sata.c:269

Definition at line 269 of file sata.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= { 0x1c00, 0x1c01, 0x1c02, 0x1c03,
0x1e00, 0x1e01, 0x1e02, 0x1e03,
0 }

Definition at line 269 of file sata.c.

◆ sata_ops

struct device_operations sata_ops
static
Initial value:
= {
.read_resources = sata_read_resources,
.set_resources = sata_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = sata_fill_ssdt,
.init = sata_init,
.enable = sata_enable,
.ops_pci = &pci_dev_ops_pci,
.acpi_name = sata_acpi_name,
}
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
static void sata_enable(struct device *dev)
Definition: sata.c:224
static void sata_init(struct device *dev)
Definition: sata.c:87
static void sata_set_resources(struct device *dev)
Definition: sata.c:71
static void sata_read_resources(struct device *dev)
Definition: sata.c:30
static const char * sata_acpi_name(const struct device *dev)
Definition: sata.c:247
static void sata_fill_ssdt(const struct device *dev)
Definition: sata.c:252

Definition at line 252 of file sata.c.