"Fossies" - the Fresh Open Source Software Archive

Member "coreboot-6625/src/southbridge/amd/amd8111/ac97.c" (8 Dec 2010, 1346 Bytes) of package /linux/misc/old/coreboot-6625.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    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 
   11 static 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 
   17 static struct pci_operations lops_pci = {
   18     .set_subsystem = lpci_set_subsystem,
   19 };
   20 
   21 static 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 
   31 static const struct pci_driver ac97audio_driver __pci_driver = {
   32     .ops    = &ac97audio_ops,
   33     .vendor = PCI_VENDOR_ID_AMD,
   34     .device = 0x746D,
   35 };
   36 
   37 
   38 static 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 
   48 static const struct pci_driver ac97modem_driver __pci_driver = {
   49     .ops    = &ac97modem_ops,
   50     .vendor = PCI_VENDOR_ID_AMD,
   51     .device = 0x746E,
   52 };