Contributors: 14
| Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
| Russell King |
107 |
44.96% |
4 |
22.22% |
| Kumaravel Thiagarajan |
38 |
15.97% |
1 |
5.56% |
| Niklas Schnelle |
34 |
14.29% |
1 |
5.56% |
| Alan Cox |
21 |
8.82% |
1 |
5.56% |
| Florian Eckert |
6 |
2.52% |
1 |
5.56% |
| Arnd Bergmann |
6 |
2.52% |
1 |
5.56% |
| Linus Torvalds |
5 |
2.10% |
1 |
5.56% |
| Jeff Johnson |
5 |
2.10% |
1 |
5.56% |
| Shawn Bohrer |
4 |
1.68% |
1 |
5.56% |
| Crescent CY Hsieh |
4 |
1.68% |
1 |
5.56% |
| Greg Kroah-Hartman |
3 |
1.26% |
2 |
11.11% |
| Peter Zijlstra |
2 |
0.84% |
1 |
5.56% |
| Alex Williamson |
2 |
0.84% |
1 |
5.56% |
| Denis Efremov |
1 |
0.42% |
1 |
5.56% |
| Total |
238 |
|
18 |
|
// SPDX-License-Identifier: GPL-2.0
/*
* 8250 PCI library.
*
* Copyright (C) 2001 Russell King, All Rights Reserved.
*/
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/types.h>
#include "8250.h"
#include "8250_pcilib.h"
int serial_8250_warn_need_ioport(struct pci_dev *dev)
{
dev_warn(&dev->dev,
"Serial port not supported because of missing I/O resource\n");
return -ENXIO;
}
EXPORT_SYMBOL_NS_GPL(serial_8250_warn_need_ioport, "SERIAL_8250_PCI");
int serial8250_pci_setup_port(struct pci_dev *dev, struct uart_8250_port *port,
u8 bar, unsigned int offset, int regshift, void __iomem *iomem)
{
if (bar >= PCI_STD_NUM_BARS)
return -EINVAL;
if (pci_resource_flags(dev, bar) & IORESOURCE_MEM) {
port->port.iotype = UPIO_MEM;
port->port.iobase = 0;
port->port.mapbase = pci_resource_start(dev, bar) + offset;
port->port.membase = iomem + offset;
port->port.regshift = regshift;
} else if (IS_ENABLED(CONFIG_HAS_IOPORT)) {
port->port.iotype = UPIO_PORT;
port->port.iobase = pci_resource_start(dev, bar) + offset;
port->port.mapbase = 0;
port->port.membase = NULL;
port->port.regshift = 0;
} else {
return serial_8250_warn_need_ioport(dev);
}
return 0;
}
EXPORT_SYMBOL_NS_GPL(serial8250_pci_setup_port, "SERIAL_8250_PCI");
MODULE_DESCRIPTION("8250 PCI library");
MODULE_LICENSE("GPL");