Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2014 Google Inc. |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 5 | * Copyright (C) 2015 Intel Corporation. |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 18 | * Foundation, Inc. |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 19 | */ |
| 20 | |
Aaron Durbin | 5a96b37 | 2015-08-18 10:11:35 -0500 | [diff] [blame] | 21 | #include <arch/acpi.h> |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 22 | #include <chip.h> |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 23 | #include <console/console.h> |
| 24 | #include <device/device.h> |
| 25 | #include <device/pci.h> |
Aaron Durbin | 789f2b6 | 2015-09-09 17:05:06 -0500 | [diff] [blame] | 26 | #include <fsp/util.h> |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 27 | #include <soc/interrupt.h> |
| 28 | #include <soc/irq.h> |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 29 | #include <soc/pci_devs.h> |
| 30 | #include <soc/ramstage.h> |
Duncan Laurie | 3745c65 | 2015-08-28 17:21:07 -0700 | [diff] [blame] | 31 | #include <string.h> |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 32 | |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 33 | static const SI_PCH_DEVICE_INTERRUPT_CONFIG devintconfig[] = { |
| 34 | /* |
| 35 | * cAVS(Audio, Voice, Speach), INTA is default, programmed in |
| 36 | * PciCfgSpace 3Dh |
| 37 | */ |
| 38 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_LPC, |
| 39 | PCI_FUNC(PCH_DEVFN_HDA), int_A, cAVS_INTA_IRQ), |
| 40 | /* |
| 41 | * SMBus Controller, no default value, programmed in |
| 42 | * PciCfgSpace 3Dh |
| 43 | */ |
| 44 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_LPC, |
| 45 | PCI_FUNC(PCH_DEVFN_SMBUS), int_A, SMBUS_INTA_IRQ), |
| 46 | /* GbE Controller, INTA is default, programmed in PciCfgSpace 3Dh */ |
| 47 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_LPC, |
| 48 | PCI_FUNC(PCH_DEVFN_GBE), int_A, GbE_INTA_IRQ), |
| 49 | /* TraceHub, INTA is default, RO register */ |
| 50 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_LPC, |
| 51 | PCI_FUNC(PCH_DEVFN_TRACEHUB), int_A, TRACE_HUB_INTA_IRQ), |
| 52 | /* |
| 53 | * SerialIo: UART #0, INTA is default, |
| 54 | * programmed in PCR[SERIALIO] + PCICFGCTRL[7] |
| 55 | */ |
| 56 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_STORAGE, |
| 57 | PCI_FUNC(PCH_DEVFN_UART0), int_A, LPSS_UART0_IRQ), |
| 58 | /* |
| 59 | * SerialIo: UART #1, INTA is default, |
| 60 | * programmed in PCR[SERIALIO] + PCICFGCTRL[8] |
| 61 | */ |
| 62 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_STORAGE, |
| 63 | PCI_FUNC(PCH_DEVFN_UART1), int_B, LPSS_UART1_IRQ), |
| 64 | /* |
| 65 | * SerialIo: SPI #0, INTA is default, |
| 66 | * programmed in PCR[SERIALIO] + PCICFGCTRL[10] |
| 67 | */ |
| 68 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_STORAGE, |
| 69 | PCI_FUNC(PCH_DEVFN_GSPI0), int_C, LPSS_SPI0_IRQ), |
| 70 | /* |
| 71 | * SerialIo: SPI #1, INTA is default, |
| 72 | * programmed in PCR[SERIALIO] + PCICFGCTRL[11] |
| 73 | */ |
| 74 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_STORAGE, |
| 75 | PCI_FUNC(PCH_DEVFN_GSPI1), int_D, LPSS_SPI1_IRQ), |
| 76 | /* SCS: eMMC (SKL PCH-LP Only) */ |
| 77 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_STORAGE, |
| 78 | PCI_FUNC(PCH_DEVFN_EMMC), int_B, eMMC_IRQ), |
| 79 | /* SCS: SDIO (SKL PCH-LP Only) */ |
| 80 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_STORAGE, |
| 81 | PCI_FUNC(PCH_DEVFN_SDIO), int_C, SDIO_IRQ), |
| 82 | /* SCS: SDCard (SKL PCH-LP Only) */ |
| 83 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_STORAGE, |
| 84 | PCI_FUNC(PCH_DEVFN_SDCARD), int_D, SD_IRQ), |
| 85 | /* PCI Express Port 9, INT is default, programmed in PciCfgSpace + FCh */ |
| 86 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE_1, |
| 87 | PCI_FUNC(PCH_DEVFN_PCIE9), int_A, PCIE_9_IRQ), |
| 88 | /* PCI Express Port 10, INT is default, programmed in PciCfgSpace + FCh */ |
| 89 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE_1, |
| 90 | PCI_FUNC(PCH_DEVFN_PCIE10), int_B, PCIE_10_IRQ), |
| 91 | /* PCI Express Port 11, INT is default, programmed in PciCfgSpace + FCh */ |
| 92 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE_1, |
| 93 | PCI_FUNC(PCH_DEVFN_PCIE11), int_C, PCIE_11_IRQ), |
| 94 | /* PCI Express Port 12, INT is default, programmed in PciCfgSpace + FCh */ |
| 95 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE_1, |
| 96 | PCI_FUNC(PCH_DEVFN_PCIE12), int_D, PCIE_12_IRQ), |
| 97 | /* |
| 98 | * PCI Express Port 1, INT is default, |
| 99 | * programmed in PciCfgSpace + FCh |
| 100 | */ |
| 101 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 102 | PCI_FUNC(PCH_DEVFN_PCIE1), int_A, PCIE_1_IRQ), |
| 103 | /* |
| 104 | * PCI Express Port 2, INT is default, |
| 105 | * programmed in PciCfgSpace + FCh |
| 106 | */ |
| 107 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 108 | PCI_FUNC(PCH_DEVFN_PCIE2), int_B, PCIE_2_IRQ), |
| 109 | /* |
| 110 | * PCI Express Port 3, INT is default, |
| 111 | * programmed in PciCfgSpace + FCh |
| 112 | */ |
| 113 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 114 | PCI_FUNC(PCH_DEVFN_PCIE3), int_C, PCIE_3_IRQ), |
| 115 | /* |
| 116 | * PCI Express Port 4, INT is default, |
| 117 | * programmed in PciCfgSpace + FCh |
| 118 | */ |
| 119 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 120 | PCI_FUNC(PCH_DEVFN_PCIE4), int_D, PCIE_4_IRQ), |
| 121 | /* |
| 122 | * PCI Express Port 5, INT is default, |
| 123 | * programmed in PciCfgSpace + FCh |
| 124 | */ |
| 125 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 126 | PCI_FUNC(PCH_DEVFN_PCIE5), int_A, PCIE_5_IRQ), |
| 127 | /* |
| 128 | * PCI Express Port 6, INT is default, |
| 129 | * programmed in PciCfgSpace + FCh |
| 130 | */ |
| 131 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 132 | PCI_FUNC(PCH_DEVFN_PCIE6), int_B, PCIE_6_IRQ), |
| 133 | /* |
| 134 | * PCI Express Port 7, INT is default, |
| 135 | * programmed in PciCfgSpace + FCh |
| 136 | */ |
| 137 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 138 | PCI_FUNC(PCH_DEVFN_PCIE7), int_C, PCIE_7_IRQ), |
| 139 | /* |
| 140 | * PCI Express Port 8, INT is default, |
| 141 | * programmed in PciCfgSpace + FCh |
| 142 | */ |
| 143 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_PCIE, |
| 144 | PCI_FUNC(PCH_DEVFN_PCIE8), int_D, PCIE_8_IRQ), |
| 145 | /* |
| 146 | * SerialIo UART Controller #2, INTA is default, |
| 147 | * programmed in PCR[SERIALIO] + PCICFGCTRL[9] |
| 148 | */ |
| 149 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SIO2, |
| 150 | PCI_FUNC(PCH_DEVFN_UART2), int_A, LPSS_UART2_IRQ), |
| 151 | /* |
| 152 | * SerialIo UART Controller #5, INTA is default, |
| 153 | * programmed in PCR[SERIALIO] + PCICFGCTRL[6] |
| 154 | */ |
| 155 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SIO2, |
| 156 | PCI_FUNC(PCH_DEVFN_I2C5), int_B, LPSS_I2C5_IRQ), |
| 157 | /* |
| 158 | * SerialIo UART Controller #4, INTA is default, |
| 159 | * programmed in PCR[SERIALIO] + PCICFGCTRL[5] |
| 160 | */ |
| 161 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SIO2, |
| 162 | PCI_FUNC(PCH_DEVFN_I2C4), int_C, LPSS_I2C4_IRQ), |
| 163 | /* |
| 164 | * SATA Controller, INTA is default, |
| 165 | * programmed in PciCfgSpace + 3Dh |
| 166 | */ |
| 167 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SATA, |
| 168 | PCI_FUNC(PCH_DEVFN_SATA), int_A, SATA_IRQ), |
| 169 | /* CSME: HECI #1 */ |
| 170 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_ME, |
| 171 | PCI_FUNC(PCH_DEVFN_ME), int_A, HECI_1_IRQ), |
| 172 | /* CSME: HECI #2 */ |
| 173 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_ME, |
| 174 | PCI_FUNC(PCH_DEVFN_ME_2), int_B, HECI_2_IRQ), |
| 175 | /* CSME: IDE-Redirection (IDE-R) */ |
| 176 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_ME, |
| 177 | PCI_FUNC(PCH_DEVFN_ME_IDER), int_C, IDER_IRQ), |
| 178 | /* CSME: Keyboard and Text (KT) Redirection */ |
| 179 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_ME, |
| 180 | PCI_FUNC(PCH_DEVFN_ME_KT), int_D, KT_IRQ), |
| 181 | /* CSME: HECI #3 */ |
| 182 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_ME, |
| 183 | PCI_FUNC(PCH_DEVFN_ME_3), int_A, HECI_3_IRQ), |
| 184 | /* |
| 185 | * SerialIo I2C Controller #0, INTA is default, |
| 186 | * programmed in PCR[SERIALIO] + PCICFGCTRL[1] |
| 187 | */ |
| 188 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SIO1, |
| 189 | PCI_FUNC(PCH_DEVFN_I2C0), int_A, LPSS_I2C0_IRQ), |
| 190 | /* |
| 191 | * SerialIo I2C Controller #1, INTA is default, |
| 192 | * programmed in PCR[SERIALIO] + PCICFGCTRL[2] |
| 193 | */ |
| 194 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SIO1, |
| 195 | PCI_FUNC(PCH_DEVFN_I2C1), int_B, LPSS_I2C1_IRQ), |
| 196 | /* |
| 197 | * SerialIo I2C Controller #2, INTA is default, |
| 198 | * programmed in PCR[SERIALIO] + PCICFGCTRL[3] |
| 199 | */ |
| 200 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SIO1, |
| 201 | PCI_FUNC(PCH_DEVFN_I2C2), int_C, LPSS_I2C2_IRQ), |
| 202 | /* |
| 203 | * SerialIo I2C Controller #3, INTA is default, |
| 204 | * programmed in PCR[SERIALIO] + PCICFGCTRL[4] |
| 205 | */ |
| 206 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_SIO1, |
| 207 | PCI_FUNC(PCH_DEVFN_I2C3), int_D, LPSS_I2C3_IRQ), |
| 208 | /* |
| 209 | * USB 3.0 xHCI Controller, no default value, |
| 210 | * programmed in PciCfgSpace 3Dh |
| 211 | */ |
| 212 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_XHCI, |
| 213 | PCI_FUNC(PCH_DEVFN_XHCI), int_A, XHCI_IRQ), |
| 214 | /* USB Device Controller (OTG) */ |
| 215 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_XHCI, |
| 216 | PCI_FUNC(PCH_DEVFN_USBOTG), int_B, OTG_IRQ), |
| 217 | /* Thermal Subsystem */ |
| 218 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_XHCI, |
| 219 | PCI_FUNC(PCH_DEVFN_THERMAL), int_C, THRMAL_IRQ), |
| 220 | /* Camera IO Host Controller */ |
| 221 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_XHCI, |
| 222 | PCI_FUNC(PCH_DEVFN_CIO), int_A, CIO_INTA_IRQ), |
| 223 | /* Integrated Sensor Hub */ |
| 224 | DEVICE_INT_CONFIG(PCH_DEV_SLOT_ISH, |
| 225 | PCI_FUNC(PCH_DEVFN_ISH), int_A, ISH_IRQ) |
| 226 | }; |
| 227 | |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 228 | static void pci_domain_set_resources(device_t dev) |
| 229 | { |
| 230 | assign_resources(dev->link_list); |
| 231 | } |
| 232 | |
| 233 | static struct device_operations pci_domain_ops = { |
| 234 | .read_resources = &pci_domain_read_resources, |
| 235 | .set_resources = &pci_domain_set_resources, |
| 236 | .scan_bus = &pci_domain_scan_bus, |
| 237 | .ops_pci_bus = &pci_bus_default_ops, |
| 238 | }; |
| 239 | |
| 240 | static struct device_operations cpu_bus_ops = { |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 241 | .init = &soc_init_cpus, |
Aaron Durbin | 5a96b37 | 2015-08-18 10:11:35 -0500 | [diff] [blame] | 242 | .acpi_fill_ssdt_generator = generate_cpu_entries, |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 243 | }; |
| 244 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 245 | static void soc_enable(device_t dev) |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 246 | { |
| 247 | /* Set the operations if it is a special bus type */ |
| 248 | if (dev->path.type == DEVICE_PATH_DOMAIN) { |
| 249 | dev->ops = &pci_domain_ops; |
| 250 | } else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) { |
| 251 | dev->ops = &cpu_bus_ops; |
| 252 | } else if (dev->path.type == DEVICE_PATH_PCI) { |
| 253 | /* Handle PCH device enable */ |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 254 | if (PCI_SLOT(dev->path.pci.devfn) > SA_DEV_SLOT_IGD && |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 255 | (dev->ops == NULL || dev->ops->enable == NULL)) { |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 256 | pch_enable_dev(dev); |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 261 | struct chip_operations soc_intel_skylake_ops = { |
| 262 | CHIP_NAME("Intel Skylake") |
| 263 | .enable_dev = &soc_enable, |
| 264 | .init = &soc_init_pre_device, |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 265 | }; |
| 266 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 267 | /* UPD parameters to be initialized before SiliconInit */ |
| 268 | void soc_silicon_init_params(SILICON_INIT_UPD *params) |
| 269 | { |
Duncan Laurie | 3745c65 | 2015-08-28 17:21:07 -0700 | [diff] [blame] | 270 | const struct device *dev = dev_find_slot(0, PCH_DEVFN_LPC); |
| 271 | const struct soc_intel_skylake_config *config = dev->chip_info; |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 272 | u8 irq_config[PCH_MAX_IRQ_CONFIG]; |
| 273 | int i; |
| 274 | int intdeventry; |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 275 | |
Duncan Laurie | 3745c65 | 2015-08-28 17:21:07 -0700 | [diff] [blame] | 276 | memcpy(params->SerialIoDevMode, config->SerialIoDevMode, |
| 277 | sizeof(params->SerialIoDevMode)); |
| 278 | memcpy(params->PortUsb20Enable, config->PortUsb20Enable, |
| 279 | sizeof(params->PortUsb20Enable)); |
| 280 | memcpy(params->PortUsb30Enable, config->PortUsb30Enable, |
| 281 | sizeof(params->PortUsb30Enable)); |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 282 | |
Rizwan Qureshi | 952cb03 | 2015-10-05 19:11:39 +0530 | [diff] [blame] | 283 | memcpy(params->Usb2AfePetxiset, config->Usb2AfePetxiset, |
| 284 | sizeof(params->Usb2AfePetxiset)); |
| 285 | memcpy(params->Usb2AfeTxiset, config->Usb2AfeTxiset, |
| 286 | sizeof(params->Usb2AfeTxiset)); |
| 287 | memcpy(params->Usb2AfePredeemp, config->Usb2AfePredeemp, |
| 288 | sizeof(params->Usb2AfePredeemp)); |
| 289 | memcpy(params->Usb2AfePehalfbit, config->Usb2AfePehalfbit, |
| 290 | sizeof(params->Usb2AfePehalfbit)); |
| 291 | |
| 292 | memcpy(params->Usb3HsioTxDeEmphEnable, config->Usb3HsioTxDeEmphEnable, |
| 293 | sizeof(params->Usb3HsioTxDeEmphEnable)); |
| 294 | memcpy(params->Usb3HsioTxDeEmph, config->Usb3HsioTxDeEmph, |
| 295 | sizeof(params->Usb3HsioTxDeEmph)); |
| 296 | memcpy(params->Usb3HsioTxDownscaleAmpEnable, config->Usb3HsioTxDownscaleAmpEnable, |
| 297 | sizeof(params->Usb3HsioTxDownscaleAmpEnable)); |
| 298 | memcpy(params->Usb3HsioTxDownscaleAmp, config->Usb3HsioTxDownscaleAmp, |
| 299 | sizeof(params->Usb3HsioTxDownscaleAmp)); |
| 300 | |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 301 | params->SataSalpSupport = config->SataSalpSupport; |
| 302 | params->SataPortsEnable[0] = config->SataPortsEnable[0]; |
| 303 | params->SsicPortEnable = config->SsicPortEnable; |
| 304 | params->SmbusEnable = config->SmbusEnable; |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 305 | params->ScsEmmcEnabled = config->ScsEmmcEnabled; |
| 306 | params->ScsEmmcHs400Enabled = config->ScsEmmcHs400Enabled; |
| 307 | params->ScsSdCardEnabled = config->ScsSdCardEnabled; |
| 308 | params->IshEnable = 0; |
| 309 | params->EnableAzalia = config->EnableAzalia; |
| 310 | params->IoBufferOwnership = config->IoBufferOwnership; |
| 311 | params->DspEnable = config->DspEnable; |
| 312 | params->XdciEnable = config->XdciEnable; |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 313 | params->Device4Enable = config->Device4Enable; |
Barnali Sarkar | b090a26 | 2015-09-08 16:00:46 +0530 | [diff] [blame] | 314 | params->RtcLock = config->RtcLock; |
Rizwan Qureshi | 952cb03 | 2015-10-05 19:11:39 +0530 | [diff] [blame] | 315 | params->EnableSata = config->EnableSata; |
| 316 | params->SataMode = config->SataMode; |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 317 | |
| 318 | /* Show SPI controller if enabled in devicetree.cb */ |
| 319 | dev = dev_find_slot(0, PCH_DEVFN_SPI); |
| 320 | params->ShowSpiController = dev->enabled; |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 321 | |
| 322 | /* Get Device Int Count */ |
| 323 | intdeventry = ARRAY_SIZE(devintconfig); |
| 324 | /*update irq table*/ |
| 325 | memcpy((SI_PCH_DEVICE_INTERRUPT_CONFIG *)(params->DevIntConfigPtr), devintconfig, |
| 326 | intdeventry * sizeof(SI_PCH_DEVICE_INTERRUPT_CONFIG)); |
| 327 | |
| 328 | params->NumOfDevIntConfig = intdeventry; |
| 329 | /* PxRC to IRQ programing */ |
| 330 | for (i = 0; i < PCH_MAX_IRQ_CONFIG; i++) { |
| 331 | switch(i) { |
| 332 | case PCH_PARC: |
| 333 | case PCH_PCRC: |
| 334 | case PCH_PDRC: |
| 335 | case PCH_PERC: |
| 336 | case PCH_PFRC: |
| 337 | case PCH_PGRC: |
| 338 | case PCH_PHRC: |
| 339 | irq_config[i] = PCH_IRQ11; |
| 340 | break; |
| 341 | case PCH_PBRC: |
| 342 | irq_config[PCH_PBRC] = PCH_IRQ10; |
| 343 | break; |
| 344 | } |
| 345 | } |
| 346 | memcpy(params->PxRcConfig, irq_config, PCH_MAX_IRQ_CONFIG); |
| 347 | /* GPIO IRQ Route The valid values is 14 or 15*/ |
| 348 | if(config->GpioIrqSelect == 0) |
| 349 | params->GpioIrqRoute = GPIO_IRQ14; |
| 350 | else |
| 351 | params->GpioIrqRoute = config->GpioIrqSelect; |
| 352 | /* SCI IRQ Select The valid values is 9, 10, 11 and 20 21, 22, 23*/ |
| 353 | if(config->SciIrqSelect == 0) |
| 354 | params->SciIrqSelect = SCI_IRQ9; |
| 355 | else |
| 356 | params->SciIrqSelect = config->SciIrqSelect; |
| 357 | /* TCO IRQ Select The valid values is 9, 10, 11, 20 21, 22, 23*/ |
| 358 | if(config->TcoIrqSelect == 0) |
| 359 | params->TcoIrqSelect = TCO_IRQ9; |
| 360 | else |
| 361 | params->TcoIrqSelect = config->TcoIrqSelect; |
| 362 | /* TCO Irq enable/disable */ |
| 363 | params->TcoIrqEnable = config->TcoIrqEnable; |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 364 | } |
| 365 | |
| 366 | void soc_display_silicon_init_params(const SILICON_INIT_UPD *original, |
| 367 | SILICON_INIT_UPD *params) |
| 368 | { |
| 369 | /* Display the parameters for SiliconInit */ |
| 370 | printk(BIOS_SPEW, "UPD values for SiliconInit:\n"); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 371 | fsp_display_upd_value("LogoPtr", 4, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 372 | (uint32_t)original->LogoPtr, |
| 373 | (uint32_t)params->LogoPtr); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 374 | fsp_display_upd_value("LogoSize", 4, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 375 | (uint32_t)original->LogoSize, |
| 376 | (uint32_t)params->LogoSize); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 377 | fsp_display_upd_value("GraphicsConfigPtr", 4, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 378 | (uint32_t)original->GraphicsConfigPtr, |
| 379 | (uint32_t)params->GraphicsConfigPtr); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 380 | fsp_display_upd_value("MicrocodeRegionBase", 4, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 381 | (uint32_t)original->MicrocodeRegionBase, |
| 382 | (uint32_t)params->MicrocodeRegionBase); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 383 | fsp_display_upd_value("MicrocodeRegionSize", 4, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 384 | (uint32_t)original->MicrocodeRegionSize, |
| 385 | (uint32_t)params->MicrocodeRegionSize); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 386 | fsp_display_upd_value("TurboMode", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 387 | (uint32_t)original->TurboMode, |
| 388 | (uint32_t)params->TurboMode); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 389 | fsp_display_upd_value("Device4Enable", 1, |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 390 | original->Device4Enable, |
| 391 | params->Device4Enable); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 392 | fsp_display_upd_value("SataSalpSupport", 1, original->SataSalpSupport, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 393 | params->SataSalpSupport); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 394 | fsp_display_upd_value("SataPortsEnable[0]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 395 | original->SataPortsEnable[0], params->SataPortsEnable[0]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 396 | fsp_display_upd_value("SataPortsEnable[1]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 397 | original->SataPortsEnable[1], params->SataPortsEnable[1]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 398 | fsp_display_upd_value("SataPortsEnable[2]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 399 | original->SataPortsEnable[2], params->SataPortsEnable[2]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 400 | fsp_display_upd_value("SataPortsEnable[3]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 401 | original->SataPortsEnable[3], params->SataPortsEnable[3]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 402 | fsp_display_upd_value("SataPortsEnable[4]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 403 | original->SataPortsEnable[4], params->SataPortsEnable[4]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 404 | fsp_display_upd_value("SataPortsEnable[5]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 405 | original->SataPortsEnable[5], params->SataPortsEnable[5]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 406 | fsp_display_upd_value("SataPortsEnable[6]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 407 | original->SataPortsEnable[6], params->SataPortsEnable[6]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 408 | fsp_display_upd_value("SataPortsEnable[7]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 409 | original->SataPortsEnable[7], params->SataPortsEnable[7]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 410 | fsp_display_upd_value("SataPortsDevSlp[0]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 411 | original->SataPortsDevSlp[0], params->SataPortsDevSlp[0]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 412 | fsp_display_upd_value("SataPortsDevSlp[1]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 413 | original->SataPortsDevSlp[1], params->SataPortsDevSlp[1]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 414 | fsp_display_upd_value("SataPortsDevSlp[2]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 415 | original->SataPortsDevSlp[2], params->SataPortsDevSlp[2]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 416 | fsp_display_upd_value("SataPortsDevSlp[3]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 417 | original->SataPortsDevSlp[3], params->SataPortsDevSlp[3]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 418 | fsp_display_upd_value("SataPortsDevSlp[4]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 419 | original->SataPortsDevSlp[4], params->SataPortsDevSlp[4]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 420 | fsp_display_upd_value("SataPortsDevSlp[5]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 421 | original->SataPortsDevSlp[5], params->SataPortsDevSlp[5]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 422 | fsp_display_upd_value("SataPortsDevSlp[6]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 423 | original->SataPortsDevSlp[6], params->SataPortsDevSlp[6]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 424 | fsp_display_upd_value("SataPortsDevSlp[7]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 425 | original->SataPortsDevSlp[7], params->SataPortsDevSlp[7]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 426 | fsp_display_upd_value("EnableAzalia", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 427 | original->EnableAzalia, params->EnableAzalia); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 428 | fsp_display_upd_value("DspEnable", 1, original->DspEnable, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 429 | params->DspEnable); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 430 | fsp_display_upd_value("IoBufferOwnership", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 431 | original->IoBufferOwnership, params->IoBufferOwnership); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 432 | fsp_display_upd_value("PortUsb20Enable[0]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 433 | original->PortUsb20Enable[0], params->PortUsb20Enable[0]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 434 | fsp_display_upd_value("PortUsb20Enable[1]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 435 | original->PortUsb20Enable[1], params->PortUsb20Enable[1]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 436 | fsp_display_upd_value("PortUsb20Enable[2]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 437 | original->PortUsb20Enable[2], params->PortUsb20Enable[2]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 438 | fsp_display_upd_value("PortUsb20Enable[3]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 439 | original->PortUsb20Enable[3], params->PortUsb20Enable[3]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 440 | fsp_display_upd_value("PortUsb20Enable[4]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 441 | original->PortUsb20Enable[4], params->PortUsb20Enable[4]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 442 | fsp_display_upd_value("PortUsb20Enable[5]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 443 | original->PortUsb20Enable[5], params->PortUsb20Enable[5]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 444 | fsp_display_upd_value("PortUsb20Enable[6]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 445 | original->PortUsb20Enable[6], params->PortUsb20Enable[6]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 446 | fsp_display_upd_value("PortUsb20Enable[7]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 447 | original->PortUsb20Enable[7], params->PortUsb20Enable[7]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 448 | fsp_display_upd_value("PortUsb20Enable[8]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 449 | original->PortUsb20Enable[8], params->PortUsb20Enable[8]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 450 | fsp_display_upd_value("PortUsb20Enable[9]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 451 | original->PortUsb20Enable[9], params->PortUsb20Enable[9]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 452 | fsp_display_upd_value("PortUsb20Enable[10]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 453 | original->PortUsb20Enable[10], params->PortUsb20Enable[10]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 454 | fsp_display_upd_value("PortUsb20Enable[11]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 455 | original->PortUsb20Enable[11], params->PortUsb20Enable[11]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 456 | fsp_display_upd_value("PortUsb20Enable[12]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 457 | original->PortUsb20Enable[12], params->PortUsb20Enable[12]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 458 | fsp_display_upd_value("PortUsb20Enable[13]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 459 | original->PortUsb20Enable[13], params->PortUsb20Enable[13]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 460 | fsp_display_upd_value("PortUsb20Enable[14]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 461 | original->PortUsb20Enable[14], params->PortUsb20Enable[14]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 462 | fsp_display_upd_value("PortUsb20Enable[15]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 463 | original->PortUsb20Enable[15], params->PortUsb20Enable[15]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 464 | fsp_display_upd_value("PortUsb30Enable[0]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 465 | original->PortUsb30Enable[0], params->PortUsb30Enable[0]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 466 | fsp_display_upd_value("PortUsb30Enable[1]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 467 | original->PortUsb30Enable[1], params->PortUsb30Enable[1]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 468 | fsp_display_upd_value("PortUsb30Enable[2]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 469 | original->PortUsb30Enable[2], params->PortUsb30Enable[2]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 470 | fsp_display_upd_value("PortUsb30Enable[3]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 471 | original->PortUsb30Enable[3], params->PortUsb30Enable[3]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 472 | fsp_display_upd_value("PortUsb30Enable[4]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 473 | original->PortUsb30Enable[4], params->PortUsb30Enable[4]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 474 | fsp_display_upd_value("PortUsb30Enable[5]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 475 | original->PortUsb30Enable[5], params->PortUsb30Enable[5]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 476 | fsp_display_upd_value("PortUsb30Enable[6]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 477 | original->PortUsb30Enable[6], params->PortUsb30Enable[6]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 478 | fsp_display_upd_value("PortUsb30Enable[7]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 479 | original->PortUsb30Enable[7], params->PortUsb30Enable[7]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 480 | fsp_display_upd_value("PortUsb30Enable[8]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 481 | original->PortUsb30Enable[8], params->PortUsb30Enable[8]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 482 | fsp_display_upd_value("PortUsb30Enable[9]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 483 | original->PortUsb30Enable[9], params->PortUsb30Enable[9]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 484 | fsp_display_upd_value("XdciEnable", 1, original->XdciEnable, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 485 | params->XdciEnable); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 486 | fsp_display_upd_value("SsicPortEnable", 1, original->SsicPortEnable, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 487 | params->SsicPortEnable); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 488 | fsp_display_upd_value("SmbusEnable", 1, original->SmbusEnable, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 489 | params->SmbusEnable); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 490 | fsp_display_upd_value("SerialIoDevMode[0]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 491 | original->SerialIoDevMode[0], params->SerialIoDevMode[0]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 492 | fsp_display_upd_value("SerialIoDevMode[1]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 493 | original->SerialIoDevMode[1], params->SerialIoDevMode[1]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 494 | fsp_display_upd_value("SerialIoDevMode[2]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 495 | original->SerialIoDevMode[2], params->SerialIoDevMode[2]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 496 | fsp_display_upd_value("SerialIoDevMode[3]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 497 | original->SerialIoDevMode[3], params->SerialIoDevMode[3]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 498 | fsp_display_upd_value("SerialIoDevMode[4]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 499 | original->SerialIoDevMode[4], params->SerialIoDevMode[4]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 500 | fsp_display_upd_value("SerialIoDevMode[5]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 501 | original->SerialIoDevMode[5], params->SerialIoDevMode[5]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 502 | fsp_display_upd_value("SerialIoDevMode[6]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 503 | original->SerialIoDevMode[6], params->SerialIoDevMode[6]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 504 | fsp_display_upd_value("SerialIoDevMode[7]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 505 | original->SerialIoDevMode[7], params->SerialIoDevMode[7]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 506 | fsp_display_upd_value("SerialIoDevMode[8]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 507 | original->SerialIoDevMode[8], params->SerialIoDevMode[8]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 508 | fsp_display_upd_value("SerialIoDevMode[9]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 509 | original->SerialIoDevMode[9], params->SerialIoDevMode[9]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 510 | fsp_display_upd_value("SerialIoDevMode[10]", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 511 | original->SerialIoDevMode[10], params->SerialIoDevMode[10]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 512 | fsp_display_upd_value("ScsEmmcEnabled", 1, original->ScsEmmcEnabled, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 513 | params->ScsEmmcEnabled); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 514 | fsp_display_upd_value("ScsEmmcHs400Enabled", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 515 | original->ScsEmmcHs400Enabled, params->ScsEmmcHs400Enabled); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 516 | fsp_display_upd_value("ScsSdCardEnabled", 1, original->ScsSdCardEnabled, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 517 | params->ScsSdCardEnabled); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 518 | fsp_display_upd_value("IshEnable", 1, original->IshEnable, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 519 | params->IshEnable); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 520 | fsp_display_upd_value("ShowSpiController", 1, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 521 | original->ShowSpiController, params->ShowSpiController); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 522 | fsp_display_upd_value("HsioMessaging", 1, original->HsioMessaging, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 523 | params->HsioMessaging); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 524 | fsp_display_upd_value("Heci3Enabled", 1, original->Heci3Enabled, |
Rizwan Qureshi | 5c1c3d6 | 2015-07-21 20:21:50 +0530 | [diff] [blame] | 525 | params->Heci3Enabled); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 526 | fsp_display_upd_value("RtcLock", 1, original->RtcLock, |
Barnali Sarkar | b090a26 | 2015-09-08 16:00:46 +0530 | [diff] [blame] | 527 | params->RtcLock); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 528 | fsp_display_upd_value("EnableSata", 1, original->EnableSata, |
Rizwan Qureshi | 952cb03 | 2015-10-05 19:11:39 +0530 | [diff] [blame] | 529 | params->EnableSata); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 530 | fsp_display_upd_value("SataMode", 1, original->SataMode, |
Rizwan Qureshi | 952cb03 | 2015-10-05 19:11:39 +0530 | [diff] [blame] | 531 | params->SataMode); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 532 | fsp_display_upd_value("NumOfDevIntConfig", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 533 | original->NumOfDevIntConfig, |
| 534 | params->NumOfDevIntConfig); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 535 | fsp_display_upd_value("PxRcConfig[PARC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 536 | original->PxRcConfig[PCH_PARC], |
| 537 | params->PxRcConfig[PCH_PARC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 538 | fsp_display_upd_value("PxRcConfig[PBRC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 539 | original->PxRcConfig[PCH_PBRC], |
| 540 | params->PxRcConfig[PCH_PBRC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 541 | fsp_display_upd_value("PxRcConfig[PCRC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 542 | original->PxRcConfig[PCH_PCRC], |
| 543 | params->PxRcConfig[PCH_PCRC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 544 | fsp_display_upd_value("PxRcConfig[PDRC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 545 | original->PxRcConfig[PCH_PDRC], |
| 546 | params->PxRcConfig[PCH_PDRC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 547 | fsp_display_upd_value("PxRcConfig[PERC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 548 | original->PxRcConfig[PCH_PERC], |
| 549 | params->PxRcConfig[PCH_PERC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 550 | fsp_display_upd_value("PxRcConfig[PFRC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 551 | original->PxRcConfig[PCH_PFRC], |
| 552 | params->PxRcConfig[PCH_PFRC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 553 | fsp_display_upd_value("PxRcConfig[PGRC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 554 | original->PxRcConfig[PCH_PGRC], |
| 555 | params->PxRcConfig[PCH_PGRC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 556 | fsp_display_upd_value("PxRcConfig[PHRC]", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 557 | original->PxRcConfig[PCH_PHRC], |
| 558 | params->PxRcConfig[PCH_PHRC]); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 559 | fsp_display_upd_value("GpioIrqRoute", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 560 | original->GpioIrqRoute, |
| 561 | params->GpioIrqRoute); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 562 | fsp_display_upd_value("SciIrqSelect", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 563 | original->SciIrqSelect, |
| 564 | params->SciIrqSelect); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 565 | fsp_display_upd_value("TcoIrqSelect", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 566 | original->TcoIrqSelect, |
| 567 | params->TcoIrqSelect); |
Lee Leahy | 66208bd | 2015-10-15 16:17:58 -0700 | [diff] [blame^] | 568 | fsp_display_upd_value("TcoIrqEnable", 1, |
Subrata Banik | d0def39 | 2015-07-22 12:19:28 +0530 | [diff] [blame] | 569 | original->TcoIrqEnable, |
| 570 | params->TcoIrqEnable); |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 571 | } |
| 572 | |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 573 | static void pci_set_subsystem(device_t dev, unsigned vendor, unsigned device) |
| 574 | { |
| 575 | if (!vendor || !device) |
| 576 | pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID, |
| 577 | pci_read_config32(dev, PCI_VENDOR_ID)); |
| 578 | else |
| 579 | pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID, |
| 580 | (device << 16) | vendor); |
| 581 | } |
| 582 | |
Lee Leahy | 1d14b3e | 2015-05-12 18:23:27 -0700 | [diff] [blame] | 583 | struct pci_operations soc_pci_ops = { |
Lee Leahy | b000513 | 2015-05-12 18:19:47 -0700 | [diff] [blame] | 584 | .set_subsystem = &pci_set_subsystem |
| 585 | }; |