aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/uart
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2017-12-08 10:05:23 +0000
committerAndrew Turner <andrew@FreeBSD.org>2017-12-08 10:05:23 +0000
commitfb006e46e77344e136739fdc0ee5d0a77a34519d (patch)
treea9619f6a6c47c312dad514d2131d375df01cf4d0 /sys/dev/uart
parent94a9d7c3b923d617eb35bdfb4a5887fcd5546c1b (diff)
downloadsrc-fb006e46e77344e136739fdc0ee5d0a77a34519d.tar.gz
src-fb006e46e77344e136739fdc0ee5d0a77a34519d.zip
Set the io width when using an ACPI uart. Previously it would only ever be
set when finding the uart from the device tree. Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=326683
Diffstat (limited to 'sys/dev/uart')
-rw-r--r--sys/dev/uart/uart_cpu_arm64.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/uart/uart_cpu_arm64.c b/sys/dev/uart/uart_cpu_arm64.c
index 98a9d9aa4cbd..e6265fedc6f0 100644
--- a/sys/dev/uart/uart_cpu_arm64.c
+++ b/sys/dev/uart/uart_cpu_arm64.c
@@ -100,7 +100,8 @@ uart_cpu_acpi_scan(uint8_t interface_type)
static int
uart_cpu_acpi_probe(struct uart_class **classp, bus_space_tag_t *bst,
- bus_space_handle_t *bsh, int *baud, u_int *rclk, u_int *shiftp)
+ bus_space_handle_t *bsh, int *baud, u_int *rclk, u_int *shiftp,
+ u_int *iowidthp)
{
struct acpi_uart_compat_data *cd;
ACPI_TABLE_SPCR *spcr;
@@ -142,6 +143,7 @@ uart_cpu_acpi_probe(struct uart_class **classp, bus_space_tag_t *bst,
*classp = cd->clas;
*rclk = 0;
*shiftp = 2;
+ *iowidthp = spcr->SerialPort.BitWidth / 8;
out:
acpi_unmap_table(spcr);
@@ -169,7 +171,8 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
err = ENXIO;
#ifdef DEV_ACPI
- err = uart_cpu_acpi_probe(&class, &bst, &bsh, &br, &rclk, &shift);
+ err = uart_cpu_acpi_probe(&class, &bst, &bsh, &br, &rclk, &shift,
+ &iowidth);
#endif
#ifdef FDT
if (err != 0) {