blob: cbbc7cfd928529445395579846cfba83995a28ba [file] [log] [blame]
Marshall Dawsonaa67def2019-05-03 16:10:34 -06001/*
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.
14 */
15
16#include <device/device.h>
17#include <device/pci.h>
18#include <device/pci_ids.h>
19#include <device/pci_ops.h>
20#include <amdblocks/sata.h>
21
22void __weak soc_enable_sata_features(struct device *dev) { }
23
24static struct device_operations sata_ops = {
25 .read_resources = pci_dev_read_resources,
26 .set_resources = pci_dev_set_resources,
27 .enable_resources = pci_dev_enable_resources,
28 .init = soc_enable_sata_features,
29};
30
31static const unsigned short pci_device_ids[] = {
32 PCI_DEVICE_ID_AMD_CZ_SATA,
33 PCI_DEVICE_ID_AMD_CZ_SATA_AHCI,
34 0
35};
36
37static const struct pci_driver sata0_driver __pci_driver = {
38 .ops = &sata_ops,
39 .vendor = PCI_VENDOR_ID_AMD,
40 .devices = pci_device_ids,
41};