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 "i82801ix.h"
Include dependency graph for sata.c:

Go to the source code of this file.

Typedefs

typedef struct southbridge_intel_i82801ix_config config_t
 

Functions

static void sata_enable_ahci_mmap (struct device *const dev, const u8 port_map, const int is_mobile)
 
static void sata_program_indexed (struct device *const dev, const int is_mobile)
 
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 220 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,
const int  is_mobile 
)
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,
const int  is_mobile 
)
static

Definition at line 66 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:244
static const unsigned short pci_device_ids[]
Definition: sata.c:253

Definition at line 253 of file sata.c.

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
= {
0,
}
#define PCI_DID_INTEL_82801IB_SATA_P0123
Definition: pci_ids.h:2628
#define PCI_DID_INTEL_82801IBM_IEM_SATA_IDE_P01
Definition: pci_ids.h:2634
#define PCI_DID_INTEL_82801IB_SATA_AHCI1
Definition: pci_ids.h:2630
#define PCI_DID_INTEL_82801IBM_IEM_SATA_AHCI_P0145
Definition: pci_ids.h:2635
#define PCI_DID_INTEL_82801IB_SATA_AHCI2
Definition: pci_ids.h:2631
#define PCI_DID_INTEL_82801IB_SATA_P01
Definition: pci_ids.h:2629

Definition at line 253 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:135

Definition at line 220 of file sata.c.