Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2010 Advanced Micro Devices, Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include <console/console.h> |
| 17 | #include <device/device.h> |
| 18 | #include <device/pci.h> |
| 19 | #include <device/pci_ids.h> |
| 20 | #include <device/pci_ops.h> |
| 21 | #include "hudson.h" |
| 22 | |
| 23 | static void pcie_init(struct device *dev) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | static struct pci_operations lops_pci = { |
| 28 | .set_subsystem = 0, |
| 29 | }; |
| 30 | |
| 31 | static struct device_operations pci_ops = { |
| 32 | .read_resources = pci_bus_read_resources, |
| 33 | .set_resources = pci_dev_set_resources, |
| 34 | .enable_resources = pci_bus_enable_resources, |
| 35 | .init = pcie_init, |
| 36 | .scan_bus = pci_scan_bridge, |
| 37 | .reset_bus = pci_bus_reset, |
| 38 | .ops_pci = &lops_pci, |
| 39 | }; |
| 40 | |
| 41 | static const struct pci_driver pciea_driver __pci_driver = { |
| 42 | .ops = &pci_ops, |
| 43 | .vendor = PCI_VENDOR_ID_AMD, |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame^] | 44 | .device = PCI_DEVICE_ID_AMD_SB900_PCIEA, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 45 | }; |
| 46 | |
| 47 | static const struct pci_driver pcieb_driver __pci_driver = { |
| 48 | .ops = &pci_ops, |
| 49 | .vendor = PCI_VENDOR_ID_AMD, |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame^] | 50 | .device = PCI_DEVICE_ID_AMD_SB900_PCIEB, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 51 | }; |
| 52 | static const struct pci_driver pciec_driver __pci_driver = { |
| 53 | .ops = &pci_ops, |
| 54 | .vendor = PCI_VENDOR_ID_AMD, |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame^] | 55 | .device = PCI_DEVICE_ID_AMD_SB900_PCIEC, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 56 | }; |
| 57 | static const struct pci_driver pcied_driver __pci_driver = { |
| 58 | .ops = &pci_ops, |
| 59 | .vendor = PCI_VENDOR_ID_AMD, |
Kyösti Mälkki | 9d9a552 | 2016-11-19 22:14:59 +0200 | [diff] [blame^] | 60 | .device = PCI_DEVICE_ID_AMD_SB900_PCIED, |
Kyösti Mälkki | e8b4da2 | 2014-10-21 18:22:32 +0300 | [diff] [blame] | 61 | }; |