soc/intel/pantherlake: Remove soc_info.[hc] interface
[coreboot2.git] / src / soc / intel / skylake / sd.c
blobcfe4b8cd31025f1d19c1399e87976056e7f30bb4
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi_device.h>
4 #include <device/device.h>
5 #include <intelblocks/sd.h>
6 #include <stdint.h>
8 #include "chip.h"
10 int sd_fill_soc_gpio_info(struct acpi_gpio *gpio, const struct device *dev)
12 config_t *config = config_of(dev);
14 if (!config->sdcard_cd_gpio)
15 return -1;
17 gpio->type = ACPI_GPIO_TYPE_INTERRUPT;
18 gpio->pull = ACPI_GPIO_PULL_NONE;
19 gpio->irq.mode = ACPI_IRQ_EDGE_TRIGGERED;
20 gpio->irq.polarity = ACPI_IRQ_ACTIVE_BOTH;
21 gpio->irq.shared = ACPI_IRQ_SHARED;
22 gpio->irq.wake = ACPI_IRQ_WAKE;
23 gpio->interrupt_debounce_timeout = 10000; /* 100ms */
24 gpio->pin_count = 1;
25 gpio->pins[0] = config->sdcard_cd_gpio;
27 return 0;