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