coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
sata.c File Reference
#include <arch/io.h>
#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 <types.h>
#include "chip.h"
#include "i82801jx.h"
Include dependency graph for sata.c:

Go to the source code of this file.

Typedefs

typedef struct southbridge_intel_i82801jx_config config_t
 

Functions

static void sata_enable_ahci_mmap (struct device *const dev, const u8 port_map)
 
static void sata_program_indexed (struct device *const dev)
 
static void sata_init (struct device *const dev)
 
static void sata_enable (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_enable()

static void sata_enable ( struct device dev)
static

Definition at line 197 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_enable_ahci_mmap()

static void sata_enable_ahci_mmap ( struct device *const  dev,
const u8  port_map 
)
static

Definition at line 18 of file sata.c.

References addr, BIOS_DEBUG, PCI_BASE_ADDRESS_5, printk, probe_resource(), read32(), res2mmio(), void(), and write32().

Referenced by sata_init().

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

◆ sata_init()

◆ sata_program_indexed()

static void sata_program_indexed ( struct device *const  dev)
static

Definition at line 63 of file sata.c.

References D31F2_SDAT, D31F2_SIDX, pci_read_config32(), pci_write_config32(), and pci_write_config8().

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:222
static const unsigned short pci_device_ids[]
Definition: sata.c:231

Definition at line 231 of file sata.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0x3a00,
0x3a02,
0x3a05,
0x3a06,
0x3a20,
0x3a22,
0x3a25,
0x3a26,
0,
}

Definition at line 231 of file sata.c.

◆ sata_ops

struct device_operations sata_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = sata_init,
.enable = sata_enable,
.ops_pci = &pci_dev_ops_pci,
}
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691
void sata_enable(struct device *dev)
Definition: sata.c:33
static void sata_init(struct device *const dev)
Definition: sata.c:126

Definition at line 197 of file sata.c.