blob: a87b20f349e9035264170fc57d18b48f25f64d25 [file] [log] [blame]
Angel Ponsba38f372020-04-05 15:46:45 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2/* This file is part of the coreboot project. */
Lee Leahy77ff0b12015-05-05 15:07:29 -07003
Lee Leahy77ff0b12015-05-05 15:07:29 -07004#include <soc/pci_devs.h>
5#include <soc/ramstage.h>
6#include <soc/sata.h>
7#include <console/console.h>
Lee Leahy77ff0b12015-05-05 15:07:29 -07008#include <device/device.h>
9#include <device/pci.h>
10#include <device/pci_ids.h>
11
12#include "chip.h"
13
Lee Leahy32471722015-04-20 15:20:28 -070014typedef struct soc_intel_braswell_config config_t;
Lee Leahy77ff0b12015-05-05 15:07:29 -070015
16static void sata_init(struct device *dev)
17{
Angel Ponsaee7ab22020-03-19 00:31:58 +010018 printk(BIOS_SPEW, "%s/%s (%s)\n", __FILE__, __func__, dev_name(dev));
Lee Leahy77ff0b12015-05-05 15:07:29 -070019}
20
Elyes HAOUASb13fac32018-05-24 22:29:44 +020021static void sata_enable(struct device *dev)
Lee Leahy77ff0b12015-05-05 15:07:29 -070022{
Lee Leahy77ff0b12015-05-05 15:07:29 -070023 southcluster_enable_dev(dev);
Lee Leahy77ff0b12015-05-05 15:07:29 -070024}
25
26static struct device_operations sata_ops = {
27 .read_resources = pci_dev_read_resources,
28 .set_resources = pci_dev_set_resources,
29 .enable_resources = pci_dev_enable_resources,
30 .init = sata_init,
31 .enable = sata_enable,
Lee Leahy77ff0b12015-05-05 15:07:29 -070032 .ops_pci = &soc_pci_ops,
33};
34
35static const unsigned short pci_device_ids[] = {
Lee Leahy32471722015-04-20 15:20:28 -070036 AHCI1_DEVID, /* AHCI */
Lee Leahy77ff0b12015-05-05 15:07:29 -070037 0,
38};
39
Lee Leahy32471722015-04-20 15:20:28 -070040static const struct pci_driver soc_sata __pci_driver = {
Lee Leahy77ff0b12015-05-05 15:07:29 -070041 .ops = &sata_ops,
42 .vendor = PCI_VENDOR_ID_INTEL,
43 .devices = pci_device_ids,
44};