cpu/x86/smm/pci_resource_store: Store DEV/VEN ID
[coreboot2.git] / src / mainboard / amd / gardenia / mainboard.c
blob8353d82099e106a941498cf4dec3935f9aba9ade
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <amdblocks/acpi.h>
4 #include <device/device.h>
5 #include <amdblocks/agesawrapper.h>
6 #include <amdblocks/amd_pci_util.h>
7 #include <gpio.h>
8 #include <soc/acpi.h>
9 #include <soc/southbridge.h>
11 #include "gpio.h"
13 /* The IRQ mapping in fch_irq_map ends up getting written to the indirect address space that is
14 accessed via I/O ports 0xc00/0xc01. */
15 static const struct fch_irq_routing fch_irq_map[] = {
16 { PIRQ_A, 3, 16 },
17 { PIRQ_B, 4, 17 },
18 { PIRQ_C, 5, 18 },
19 { PIRQ_D, 7, 19 },
20 { PIRQ_E, 11, 20 },
21 { PIRQ_F, 10, 21 },
22 { PIRQ_G, PIRQ_NC, 22 },
23 { PIRQ_H, PIRQ_NC, 23 },
24 { PIRQ_SCI, ACPI_SCI_IRQ, ACPI_SCI_IRQ },
25 { PIRQ_SMBUS, PIRQ_NC, PIRQ_NC },
26 { PIRQ_HDA, 3, 16 },
27 { PIRQ_SD, PIRQ_NC, 16 },
28 { PIRQ_SDIO, PIRQ_NC, PIRQ_NC },
29 { PIRQ_EHCI, 5, 18 },
30 { PIRQ_XHCI, 4, 18 },
31 { PIRQ_SATA, PIRQ_NC, 19 },
32 { PIRQ_GPIO, 7, 7 },
33 { PIRQ_I2C0, 3, 3 },
34 { PIRQ_I2C1, 15, 15 },
35 { PIRQ_I2C2, 6, 6 },
36 { PIRQ_I2C3, 14, 14 },
37 { PIRQ_UART0, 10, 10 },
38 { PIRQ_UART1, 11, 11 },
40 /* The MISC registers are not interrupt numbers */
41 { PIRQ_MISC, 0xfa, 0x00 },
42 { PIRQ_MISC0, 0xf1, 0x00 },
43 { PIRQ_MISC1, 0x00, 0x00 },
44 { PIRQ_MISC2, 0x00, 0x00 },
47 const struct fch_irq_routing *mb_get_fch_irq_mapping(size_t *length)
49 *length = ARRAY_SIZE(fch_irq_map);
50 return fch_irq_map;
53 static void mainboard_init(void *chip_info)
55 size_t num_gpios;
56 const struct soc_amd_gpio *gpios;
57 gpios = gpio_table(&num_gpios);
58 gpio_configure_pads(gpios, num_gpios);
61 struct chip_operations mainboard_ops = {
62 .init = mainboard_init,