Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102018452
D47072.id144856.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47072.id144856.diff
View Options
diff --git a/sys/dev/uart/uart.h b/sys/dev/uart/uart.h
--- a/sys/dev/uart/uart.h
+++ b/sys/dev/uart/uart.h
@@ -45,6 +45,7 @@
u_int regshft;
u_int regiowidth;
u_int busy_detect;
+ u_int rclk_guess;/* if rclk == 0, use baud + divisor to compute rclk */
};
#define uart_regofs(bas, reg) ((reg) << (bas)->regshft)
diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c
--- a/sys/dev/uart/uart_cpu_acpi.c
+++ b/sys/dev/uart/uart_cpu_acpi.c
@@ -189,6 +189,14 @@
(int)spcr->BaudRate);
goto out;
}
+ /*
+ * If no rclk is set, then we will assume the BIOS has configured the
+ * hardware at the stated baudrate, so we can use it to guess the rclk
+ * relatively accurately, so make a note for later.
+ */
+ if (di->bas.rclk == 0)
+ di->bas.rclk_guess = 1;
+
if (spcr->PciVendorId != PCIV_INVALID &&
spcr->PciDeviceId != PCIV_INVALID) {
di->pci_info.vendor = spcr->PciVendorId;
diff --git a/sys/dev/uart/uart_subr.c b/sys/dev/uart/uart_subr.c
--- a/sys/dev/uart/uart_subr.c
+++ b/sys/dev/uart/uart_subr.c
@@ -279,6 +279,8 @@
break;
case UART_TAG_XO:
di->bas.rclk = uart_parse_long(&spec);
+ if (di->bas.rclk == 0)
+ di->bas.rclk_guess = 1;
break;
default:
goto inval;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 2:56 PM (3 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14513725
Default Alt Text
D47072.id144856.diff (1 KB)
Attached To
Mode
D47072: uart: Add a signal to compute rclk from baudrate
Attached
Detach File
Event Timeline
Log In to Comment