coreboot/src/southbridge/amd/amd8111/ac97.c
<<
>>
Prefs
   1/*
   2 * (C) 2003 Linux Networx
   3 */
   4#include <console/console.h>
   5#include <device/device.h>
   6#include <device/pci.h>
   7#include <device/pci_ids.h>
   8#include <device/pci_ops.h>
   9#include "amd8111.h"
  10
  11static void lpci_set_subsystem(device_t dev, unsigned vendor, unsigned device)
  12{
  13        pci_write_config32(dev, 0x2c,
  14                ((device & 0xffff) << 16) | (vendor & 0xffff));
  15}
  16
  17static struct pci_operations lops_pci = {
  18        .set_subsystem = lpci_set_subsystem,
  19};
  20
  21static struct device_operations ac97audio_ops  = {
  22        .read_resources   = pci_dev_read_resources,
  23        .set_resources    = pci_dev_set_resources,
  24        .enable_resources = pci_dev_enable_resources,
  25        .enable           = amd8111_enable,
  26        .init             = 0,
  27        .scan_bus         = 0,
  28        .ops_pci          = &lops_pci,
  29};
  30
  31static const struct pci_driver ac97audio_driver __pci_driver = {
  32        .ops    = &ac97audio_ops,
  33        .vendor = PCI_VENDOR_ID_AMD,
  34        .device = 0x746D,
  35};
  36
  37
  38static struct device_operations ac97modem_ops  = {
  39        .read_resources   = pci_dev_read_resources,
  40        .set_resources    = pci_dev_set_resources,
  41        .enable_resources = pci_dev_enable_resources,
  42        .enable           = amd8111_enable,
  43        .init             = 0,
  44        .scan_bus         = 0,
  45        .ops_pci          = &lops_pci,
  46};
  47
  48static const struct pci_driver ac97modem_driver __pci_driver = {
  49        .ops    = &ac97modem_ops,
  50        .vendor = PCI_VENDOR_ID_AMD,
  51        .device = 0x746E,
  52};
  53
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.