• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <acpi/acpigen_pci.h>
4 #include <amdblocks/acpi.h>
5 #include <amdblocks/data_fabric.h>
6 #include <amdblocks/fsp.h>
7 #include <amdblocks/root_complex.h>
8 #include <console/console.h>
9 #include <device/device.h>
10 #include <device/pci.h>
11 #include <drivers/i2c/designware/dw_i2c.h>
12 #include <soc/cpu.h>
13 #include <soc/iomap.h>
14 #include <soc/pci_devs.h>
15 #include <soc/southbridge.h>
16 #include "chip.h"
17 
soc_acpi_name(const struct device * dev)18 static const char *soc_acpi_name(const struct device *dev)
19 {
20 	if (dev->path.type == DEVICE_PATH_DOMAIN)
21 		return "PCI0";
22 
23 	if (dev->path.type != DEVICE_PATH_PCI)
24 		return NULL;
25 
26 	printk(BIOS_WARNING, "Unknown PCI device: dev: %d, fn: %d\n",
27 	       PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
28 	return NULL;
29 };
30 
31 struct device_operations picasso_pci_domain_ops = {
32 	.read_resources	= amd_pci_domain_read_resources,
33 	.set_resources	= pci_domain_set_resources,
34 	.scan_bus	= amd_pci_domain_scan_bus,
35 	.init		= amd_pci_domain_init,
36 	.acpi_name	= soc_acpi_name,
37 	.acpi_fill_ssdt	= pci_domain_fill_ssdt,
38 };
39 
soc_init(void * chip_info)40 static void soc_init(void *chip_info)
41 {
42 	default_dev_ops_root.write_acpi_tables = soc_acpi_write_tables;
43 
44 	amd_fsp_silicon_init();
45 
46 	data_fabric_print_mmio_conf();
47 
48 	fch_init(chip_info);
49 }
50 
soc_final(void * chip_info)51 static void soc_final(void *chip_info)
52 {
53 	fch_final(chip_info);
54 }
55 
56 struct chip_operations soc_amd_picasso_ops = {
57 	.name = "AMD Picasso SOC",
58 	.init = soc_init,
59 	.final = soc_final
60 };
61