Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/uart/uart_bus_fdt.c
| Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Lines | class = | ||||
| (struct uart_class *)uart_fdt_find_by_node(node, 1); | (struct uart_class *)uart_fdt_find_by_node(node, 1); | ||||
| if (class == NULL) | if (class == NULL) | ||||
| return (ENXIO); | return (ENXIO); | ||||
| if (uart_fdt_get_clock(node, &clk) != 0) | if (uart_fdt_get_clock(node, &clk) != 0) | ||||
| clk = 0; | clk = 0; | ||||
| } | } | ||||
| /* | /* | ||||
| * Grab the default rclk from the uart class. | |||||
| */ | |||||
| if (clk == 0) | |||||
| clk = class->uc_rclk; | |||||
| /* | |||||
| * Retrieve serial attributes. | * Retrieve serial attributes. | ||||
| */ | */ | ||||
| if (uart_fdt_get_shift(node, &shift) != 0) | if (uart_fdt_get_shift(node, &shift) != 0) | ||||
| shift = uart_getregshift(class); | shift = uart_getregshift(class); | ||||
| if (uart_fdt_get_io_width(node, &iowidth) != 0) | if (uart_fdt_get_io_width(node, &iowidth) != 0) | ||||
| iowidth = uart_getregiowidth(class); | iowidth = uart_getregiowidth(class); | ||||
| ▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines | |||||