Debian Codegraph @

src/soc/cavium/common/pci/uart.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <device/device.h>
4 #include <soc/uart.h>
5 #include <device/pci.h>
6 #include <device/pci_ids.h>
7
8 static void cavium_uart_init(struct device *dev)
9 {
10 const u8 fn = PCI_FUNC(dev->path.pci.devfn);
11
12 /* Calling uart_setup with no baudrate will do minimal HW init
13 * enough for the kernel to not panic */
14 if (!uart_is_enabled(fn))
15 uart_setup(fn, 0);
16 }
17
18 static struct device_operations device_ops = {
19 .init = cavium_uart_init,
20 };
21
22 static const struct pci_driver soc_cavium_uart __pci_driver = {
23 .ops = &device_ops,
24 .vendor = PCI_VENDOR_CAVIUM,
25 .device = PCI_DID_CAVIUM_THUNDERX_UART,
26 };
27
28 struct chip_operations soc_cavium_common_pci_ops = {
29 .name = "Cavium ThunderX UART",
30 };