Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/uart/uart_bus_pci.c
Context not available. | |||||
#include <dev/uart/uart.h> | #include <dev/uart/uart.h> | ||||
#include <dev/uart/uart_bus.h> | #include <dev/uart/uart_bus.h> | ||||
#include <dev/uart/uart_cpu.h> | |||||
#define DEFAULT_RCLK 1843200 | #define DEFAULT_RCLK 1843200 | ||||
Context not available. | |||||
return ((id->vendor == vendor && id->device == device) ? id : NULL); | return ((id->vendor == vendor && id->device == device) ? id : NULL); | ||||
} | } | ||||
extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; | |||||
static int | static int | ||||
uart_pci_probe(device_t dev) | uart_pci_probe(device_t dev) | ||||
{ | { | ||||
struct uart_softc *sc; | struct uart_softc *sc; | ||||
struct uart_devinfo *sysdev; | |||||
const struct pci_id *id; | const struct pci_id *id; | ||||
int result; | int result; | ||||
Context not available. | |||||
return (ENXIO); | return (ENXIO); | ||||
match: | match: | ||||
SLIST_FOREACH(sysdev, &uart_sysdevs, next) { | |||||
if (sysdev->pci_info.vendor == pci_get_vendor(dev) | |||||
&& sysdev->pci_info.device == pci_get_device(dev) | |||||
&& sysdev->pci_info.bus == pci_get_bus(dev) | |||||
&& sysdev->pci_info.slot == pci_get_slot(dev)) { | |||||
sc->sc_sysdev = sysdev; | |||||
sysdev->bas.rclk = sc->sc_bas.rclk; | |||||
} | |||||
} | |||||
result = uart_bus_probe(dev, id->regshft, 0, id->rclk, id->rid, 0, 0); | result = uart_bus_probe(dev, id->regshft, 0, id->rclk, id->rid, 0, 0); | ||||
/* Bail out on error. */ | /* Bail out on error. */ | ||||
if (result > 0) | if (result > 0) | ||||
Context not available. |