Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 4 | * Copyright (C) 2017-2018 Intel Corporation. |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | */ |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 15 | |
| 16 | #include <arch/acpi.h> |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 17 | #include <cbmem.h> |
| 18 | #include <console/uart.h> |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 19 | #include <device/device.h> |
| 20 | #include <device/pci.h> |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 21 | #include <device/pci_def.h> |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 22 | #include <device/pci_ids.h> |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 23 | #include <device/pci_ops.h> |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 24 | #include <intelblocks/lpss.h> |
| 25 | #include <intelblocks/uart.h> |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 26 | #include <soc/pci_devs.h> |
| 27 | #include <soc/iomap.h> |
| 28 | #include <soc/nvs.h> |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 29 | |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 30 | #define UART_PCI_ENABLE (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER) |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 31 | #define UART_CONSOLE_INVALID_INDEX 0xFF |
| 32 | |
| 33 | extern const struct uart_gpio_pad_config uart_gpio_pads[]; |
| 34 | extern const int uart_max_index; |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 35 | |
Usha P | 5e59a82 | 2019-08-09 18:42:00 +0530 | [diff] [blame] | 36 | static void uart_lpss_init(const struct device *dev, uintptr_t baseaddr) |
Furquan Shaikh | 3406dd6 | 2017-08-04 15:58:26 -0700 | [diff] [blame] | 37 | { |
Usha P | 5e59a82 | 2019-08-09 18:42:00 +0530 | [diff] [blame] | 38 | /* Ensure controller is in D0 state */ |
| 39 | lpss_set_power_state(dev, STATE_D0); |
| 40 | |
Furquan Shaikh | 3406dd6 | 2017-08-04 15:58:26 -0700 | [diff] [blame] | 41 | /* Take UART out of reset */ |
| 42 | lpss_reset_release(baseaddr); |
| 43 | |
| 44 | /* Set M and N divisor inputs and enable clock */ |
| 45 | lpss_clk_update(baseaddr, CONFIG_SOC_INTEL_COMMON_LPSS_UART_CLK_M_VAL, |
| 46 | CONFIG_SOC_INTEL_COMMON_LPSS_UART_CLK_N_VAL); |
| 47 | } |
| 48 | |
Nico Huber | 62ddc49 | 2019-05-29 18:39:31 +0200 | [diff] [blame] | 49 | #if CONFIG(INTEL_LPSS_UART_FOR_CONSOLE) |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 50 | uintptr_t uart_platform_base(int idx) |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 51 | { |
Nico Huber | ce8eebd | 2019-05-29 18:33:35 +0200 | [diff] [blame] | 52 | if (idx == CONFIG_UART_FOR_CONSOLE) |
Nico Huber | 9995418 | 2019-05-29 23:33:06 +0200 | [diff] [blame] | 53 | return CONFIG_CONSOLE_UART_BASE_ADDRESS; |
Nico Huber | ce8eebd | 2019-05-29 18:33:35 +0200 | [diff] [blame] | 54 | return 0; |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 55 | } |
| 56 | #endif |
| 57 | |
| 58 | static int uart_get_valid_index(void) |
| 59 | { |
| 60 | int index; |
| 61 | |
| 62 | for (index = 0; index < uart_max_index; index++) { |
| 63 | if (uart_gpio_pads[index].console_index == |
| 64 | CONFIG_UART_FOR_CONSOLE) |
| 65 | return index; |
| 66 | } |
| 67 | /* For valid index, code should not reach here */ |
| 68 | return UART_CONSOLE_INVALID_INDEX; |
| 69 | } |
| 70 | |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 71 | void uart_common_init(const struct device *device, uintptr_t baseaddr) |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 72 | { |
| 73 | #if defined(__SIMPLE_DEVICE__) |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 74 | pci_devfn_t dev = PCI_BDF(device); |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 75 | #else |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 76 | const struct device *dev = device; |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 77 | #endif |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 78 | |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 79 | /* Set UART base address */ |
| 80 | pci_write_config32(dev, PCI_BASE_ADDRESS_0, baseaddr); |
| 81 | |
| 82 | /* Enable memory access and bus master */ |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 83 | pci_write_config32(dev, PCI_COMMAND, UART_PCI_ENABLE); |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 84 | |
Usha P | 5e59a82 | 2019-08-09 18:42:00 +0530 | [diff] [blame] | 85 | uart_lpss_init(device, baseaddr); |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 86 | } |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 87 | |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 88 | const struct device *uart_get_device(void) |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 89 | { |
| 90 | /* |
Nico Huber | a96e66a | 2018-11-11 02:51:14 +0100 | [diff] [blame] | 91 | * This function will get called even if INTEL_LPSS_UART_FOR_CONSOLE |
| 92 | * config option is not selected. |
| 93 | * By default return NULL in this case to avoid compilation errors. |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 94 | */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 95 | if (!CONFIG(INTEL_LPSS_UART_FOR_CONSOLE)) |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 96 | return NULL; |
| 97 | |
| 98 | int console_index = uart_get_valid_index(); |
| 99 | |
| 100 | if (console_index != UART_CONSOLE_INVALID_INDEX) |
| 101 | return soc_uart_console_to_device(CONFIG_UART_FOR_CONSOLE); |
| 102 | else |
| 103 | return NULL; |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 104 | } |
| 105 | |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 106 | bool uart_is_controller_initialized(void) |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 107 | { |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 108 | uintptr_t base; |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 109 | const struct device *dev_uart = uart_get_device(); |
| 110 | |
| 111 | if (!dev_uart) |
| 112 | return false; |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 113 | |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 114 | #if defined(__SIMPLE_DEVICE__) |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 115 | pci_devfn_t dev = PCI_BDF(dev_uart); |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 116 | #else |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 117 | const struct device *dev = dev_uart; |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 118 | #endif |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 119 | |
| 120 | base = pci_read_config32(dev, PCI_BASE_ADDRESS_0) & ~0xFFF; |
| 121 | if (!base) |
| 122 | return false; |
| 123 | |
| 124 | if ((pci_read_config32(dev, PCI_COMMAND) & UART_PCI_ENABLE) |
| 125 | != UART_PCI_ENABLE) |
| 126 | return false; |
| 127 | |
| 128 | return !lpss_is_controller_in_reset(base); |
Aamir Bohra | 01d75f4 | 2017-03-30 20:12:21 +0530 | [diff] [blame] | 129 | } |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 130 | |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 131 | static void uart_configure_gpio_pads(void) |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 132 | { |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 133 | int index = uart_get_valid_index(); |
| 134 | |
| 135 | if (index != UART_CONSOLE_INVALID_INDEX) |
| 136 | gpio_configure_pads(uart_gpio_pads[index].gpios, |
| 137 | MAX_GPIO_PAD_PER_UART); |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 138 | } |
| 139 | |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 140 | void uart_bootblock_init(void) |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 141 | { |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 142 | const struct device *dev_uart; |
| 143 | |
| 144 | dev_uart = uart_get_device(); |
| 145 | |
| 146 | if (!dev_uart) |
| 147 | return; |
| 148 | |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 149 | /* Program UART BAR0, command, reset and clock register */ |
Aamir Bohra | 17cfba6 | 2019-07-25 20:56:54 +0530 | [diff] [blame] | 150 | uart_common_init(dev_uart, CONFIG_CONSOLE_UART_BASE_ADDRESS); |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 151 | |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 152 | /* Configure the 2 pads per UART. */ |
| 153 | uart_configure_gpio_pads(); |
| 154 | } |
| 155 | |
| 156 | #if ENV_RAMSTAGE |
| 157 | |
| 158 | static void uart_read_resources(struct device *dev) |
| 159 | { |
| 160 | pci_dev_read_resources(dev); |
| 161 | |
| 162 | /* Set the configured UART base address for the debug port */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 163 | if (CONFIG(INTEL_LPSS_UART_FOR_CONSOLE) && |
Nico Huber | a96e66a | 2018-11-11 02:51:14 +0100 | [diff] [blame] | 164 | uart_is_debug_controller(dev)) { |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 165 | struct resource *res = find_resource(dev, PCI_BASE_ADDRESS_0); |
| 166 | /* Need to set the base and size for the resource allocator. */ |
Nico Huber | 9995418 | 2019-05-29 23:33:06 +0200 | [diff] [blame] | 167 | res->base = CONFIG_CONSOLE_UART_BASE_ADDRESS; |
| 168 | res->size = 0x1000; |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 169 | res->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | |
| 170 | IORESOURCE_FIXED; |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | /* |
| 175 | * Check if UART debug port controller needs to be initialized on resume. |
| 176 | * |
| 177 | * Returns: |
| 178 | * true = when SoC wants debug port initialization on resume |
| 179 | * false = otherwise |
| 180 | */ |
| 181 | static bool pch_uart_init_debug_controller_on_resume(void) |
| 182 | { |
| 183 | global_nvs_t *gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); |
| 184 | |
| 185 | if (gnvs) |
| 186 | return !!gnvs->uior; |
| 187 | |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 188 | return false; |
| 189 | } |
| 190 | |
| 191 | bool uart_is_debug_controller(struct device *dev) |
| 192 | { |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 193 | return dev == uart_get_device(); |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | /* |
| 197 | * This is a workaround to enable UART controller for the debug port if: |
| 198 | * 1. CONSOLE_SERIAL is not enabled in coreboot, and |
| 199 | * 2. This boot is S3 resume, and |
| 200 | * 3. SoC wants to initialize debug UART controller. |
| 201 | * |
| 202 | * This workaround is required because Linux kernel hangs on resume if console |
| 203 | * is not enabled in coreboot, but it is enabled in kernel and not suspended. |
| 204 | */ |
| 205 | static bool uart_controller_needs_init(struct device *dev) |
| 206 | { |
| 207 | /* |
Jonathan Neuschäfer | 5268b76 | 2018-02-12 12:24:25 +0100 | [diff] [blame] | 208 | * If coreboot has CONSOLE_SERIAL enabled, the skip re-initializing |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 209 | * controller here. |
| 210 | */ |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 211 | if (CONFIG(CONSOLE_SERIAL)) |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 212 | return false; |
| 213 | |
| 214 | /* If this device does not correspond to debug port, then skip. */ |
| 215 | if (!uart_is_debug_controller(dev)) |
| 216 | return false; |
| 217 | |
| 218 | /* Initialize UART controller only on S3 resume. */ |
| 219 | if (!acpi_is_wakeup_s3()) |
| 220 | return false; |
| 221 | |
| 222 | /* |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 223 | * check if SOC wants to initialize UART on resume |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 224 | */ |
| 225 | return pch_uart_init_debug_controller_on_resume(); |
| 226 | } |
| 227 | |
| 228 | static void uart_common_enable_resources(struct device *dev) |
| 229 | { |
| 230 | pci_dev_enable_resources(dev); |
| 231 | |
| 232 | if (uart_controller_needs_init(dev)) { |
| 233 | uintptr_t base; |
| 234 | |
| 235 | base = pci_read_config32(dev, PCI_BASE_ADDRESS_0) & ~0xFFF; |
| 236 | if (base) |
Usha P | 5e59a82 | 2019-08-09 18:42:00 +0530 | [diff] [blame] | 237 | uart_lpss_init(dev, base); |
Furquan Shaikh | a8198eb | 2017-08-04 16:12:19 -0700 | [diff] [blame] | 238 | } |
| 239 | } |
| 240 | |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 241 | static struct device_operations device_ops = { |
Elyes HAOUAS | 1d19127 | 2018-11-27 12:23:48 +0100 | [diff] [blame] | 242 | .read_resources = uart_read_resources, |
| 243 | .set_resources = pci_dev_set_resources, |
| 244 | .enable_resources = uart_common_enable_resources, |
Subrata Banik | 6bbc91a | 2017-12-07 14:55:51 +0530 | [diff] [blame] | 245 | .ops_pci = &pci_dev_ops_pci, |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 246 | }; |
| 247 | |
| 248 | static const unsigned short pci_device_ids[] = { |
| 249 | PCI_DEVICE_ID_INTEL_SPT_UART0, |
| 250 | PCI_DEVICE_ID_INTEL_SPT_UART1, |
| 251 | PCI_DEVICE_ID_INTEL_SPT_UART2, |
V Sowmya | 7c15047 | 2018-01-23 14:44:45 +0530 | [diff] [blame] | 252 | PCI_DEVICE_ID_INTEL_SPT_H_UART0, |
| 253 | PCI_DEVICE_ID_INTEL_SPT_H_UART1, |
| 254 | PCI_DEVICE_ID_INTEL_SPT_H_UART2, |
V Sowmya | acc2a48 | 2018-01-23 15:27:23 +0530 | [diff] [blame] | 255 | PCI_DEVICE_ID_INTEL_KBP_H_UART0, |
| 256 | PCI_DEVICE_ID_INTEL_KBP_H_UART1, |
| 257 | PCI_DEVICE_ID_INTEL_KBP_H_UART2, |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 258 | PCI_DEVICE_ID_INTEL_APL_UART0, |
| 259 | PCI_DEVICE_ID_INTEL_APL_UART1, |
| 260 | PCI_DEVICE_ID_INTEL_APL_UART2, |
| 261 | PCI_DEVICE_ID_INTEL_APL_UART3, |
Lijian Zhao | bbedef9 | 2017-07-29 16:38:38 -0700 | [diff] [blame] | 262 | PCI_DEVICE_ID_INTEL_CNL_UART0, |
| 263 | PCI_DEVICE_ID_INTEL_CNL_UART1, |
| 264 | PCI_DEVICE_ID_INTEL_CNL_UART2, |
Hannah Williams | f714965 | 2017-05-13 16:18:02 -0700 | [diff] [blame] | 265 | PCI_DEVICE_ID_INTEL_GLK_UART0, |
| 266 | PCI_DEVICE_ID_INTEL_GLK_UART1, |
| 267 | PCI_DEVICE_ID_INTEL_GLK_UART2, |
| 268 | PCI_DEVICE_ID_INTEL_GLK_UART3, |
praveen hodagatta pranesh | e26c4a4 | 2018-09-20 03:49:45 +0800 | [diff] [blame] | 269 | PCI_DEVICE_ID_INTEL_CNP_H_UART0, |
| 270 | PCI_DEVICE_ID_INTEL_CNP_H_UART1, |
| 271 | PCI_DEVICE_ID_INTEL_CNP_H_UART2, |
Aamir Bohra | 9eac039 | 2018-06-30 12:07:04 +0530 | [diff] [blame] | 272 | PCI_DEVICE_ID_INTEL_ICP_UART0, |
| 273 | PCI_DEVICE_ID_INTEL_ICP_UART1, |
| 274 | PCI_DEVICE_ID_INTEL_ICP_UART2, |
Ronak Kanabar | da7ffb48 | 2019-02-05 01:51:13 +0530 | [diff] [blame] | 275 | PCI_DEVICE_ID_INTEL_CMP_UART0, |
| 276 | PCI_DEVICE_ID_INTEL_CMP_UART1, |
| 277 | PCI_DEVICE_ID_INTEL_CMP_UART2, |
Gaggery Tsai | 12a651c | 2019-12-05 11:23:20 -0800 | [diff] [blame] | 278 | PCI_DEVICE_ID_INTEL_CMP_H_UART0, |
| 279 | PCI_DEVICE_ID_INTEL_CMP_H_UART1, |
| 280 | PCI_DEVICE_ID_INTEL_CMP_H_UART2, |
Ravi Sarawadi | 6b5bf40 | 2019-10-21 22:25:04 -0700 | [diff] [blame] | 281 | PCI_DEVICE_ID_INTEL_TGP_UART0, |
| 282 | PCI_DEVICE_ID_INTEL_TGP_UART1, |
| 283 | PCI_DEVICE_ID_INTEL_TGP_UART2, |
rkanabar | 263f129 | 2019-11-28 10:41:45 +0530 | [diff] [blame] | 284 | PCI_DEVICE_ID_INTEL_JSP_PRE_PROD_UART0, |
| 285 | PCI_DEVICE_ID_INTEL_JSP_PRE_PROD_UART1, |
| 286 | PCI_DEVICE_ID_INTEL_JSP_PRE_PROD_UART2, |
Tan, Lean Sheng | 2613609 | 2020-01-20 19:13:56 -0800 | [diff] [blame^] | 287 | PCI_DEVICE_ID_INTEL_MCC_UART0, |
| 288 | PCI_DEVICE_ID_INTEL_MCC_UART1, |
| 289 | PCI_DEVICE_ID_INTEL_MCC_UART2, |
Hannah Williams | f714965 | 2017-05-13 16:18:02 -0700 | [diff] [blame] | 290 | 0, |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 291 | }; |
| 292 | |
| 293 | static const struct pci_driver pch_uart __pci_driver = { |
Subrata Banik | afa07f7 | 2018-05-24 12:21:06 +0530 | [diff] [blame] | 294 | .ops = &device_ops, |
| 295 | .vendor = PCI_VENDOR_ID_INTEL, |
Aamir Bohra | 83f7bae | 2017-04-26 19:30:41 +0530 | [diff] [blame] | 296 | .devices = pci_device_ids, |
| 297 | }; |
| 298 | #endif /* ENV_RAMSTAGE */ |