Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/uart/uart_dev_snps.c
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | static struct ofw_compat_data compat_data[] = { | ||||
{ NULL, (uintptr_t)NULL } | { NULL, (uintptr_t)NULL } | ||||
}; | }; | ||||
UART_FDT_CLASS(compat_data); | UART_FDT_CLASS(compat_data); | ||||
#ifdef EXT_RESOURCES | #ifdef EXT_RESOURCES | ||||
static int | static int | ||||
snps_get_clocks(device_t dev, clk_t *baudclk, clk_t *apb_pclk) | snps_get_clocks(device_t dev, clk_t *baudclk, clk_t *apb_pclk) | ||||
{ | { | ||||
struct snps_softc *sc; | |||||
sc = device_get_softc(dev); | |||||
*baudclk = NULL; | *baudclk = NULL; | ||||
*apb_pclk = NULL; | *apb_pclk = NULL; | ||||
/* Baud clock is either named "baudclk", or there is a single | /* Baud clock is either named "baudclk", or there is a single | ||||
* unnamed clock. | * unnamed clock. | ||||
*/ | */ | ||||
if (clk_get_by_ofw_name(dev, 0, "baudclk", baudclk) != 0 && | if (clk_get_by_ofw_name(dev, 0, "baudclk", baudclk) != 0 && | ||||
clk_get_by_ofw_index(dev, 0, 0, baudclk) != 0) | clk_get_by_ofw_index(dev, 0, 0, baudclk) != 0) | ||||
▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines |