coreboot/src/southbridge/intel/i82801ex/ac97.c
<<
>>
Prefs
   1#include <console/console.h>
   2#include <device/device.h>
   3#include <device/pci.h>
   4#include <device/pci_ids.h>
   5#include <device/pci_ops.h>
   6#include "i82801ex.h"
   7
   8static void ac97_set_subsystem(device_t dev, unsigned vendor, unsigned device)
   9{
  10        /* Write the subsystem vendor and device id */
  11        pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
  12                ((device & 0xffff) << 16) | (vendor & 0xffff));
  13}
  14
  15static struct pci_operations lops_pci = {
  16        .set_subsystem = ac97_set_subsystem,
  17};
  18static struct device_operations ac97_ops  = {
  19        .read_resources   = pci_dev_read_resources,
  20        .set_resources    = pci_dev_set_resources,
  21        .enable_resources = pci_dev_enable_resources,
  22        .init             = 0,
  23        .scan_bus         = 0,
  24        .enable           = i82801ex_enable,
  25        .ops_pci          = &lops_pci,
  26};
  27
  28static const struct pci_driver ac97_audio_driver __pci_driver = {
  29        .ops    = &ac97_ops,
  30        .vendor = PCI_VENDOR_ID_INTEL,
  31        .device = PCI_DEVICE_ID_INTEL_82801ER_AC97_AUDIO,
  32};
  33static const struct pci_driver ac97_modem_driver __pci_driver = {
  34        .ops    = &ac97_ops,
  35        .vendor = PCI_VENDOR_ID_INTEL,
  36        .device = PCI_DEVICE_ID_INTEL_82801ER_AC97_MODEM,
  37};
  38
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.