* [Patch] IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor
@ 2018-04-17 8:15 Liming Gao
0 siblings, 0 replies; 3+ messages in thread
From: Liming Gao @ 2018-04-17 8:15 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni
To align the way in MdeModulePkg SerialPortLib and PciSioSerialDxe driver,
Divisor is added by one when the reminder is more than half (16 * BaudRate).
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
---
IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
index 57ee669d14..7824d38a9c 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
@@ -1,7 +1,7 @@
/** @file
Serial driver for standard UARTS on an ISA bus.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1397,7 +1397,7 @@ IsaSerialSetAttributes (
((UINT32) BaudRate * 16),
&Remained
);
- if (Remained != 0) {
+ if (Remained >= ((UINT32) BaudRate * 8)) {
Divisor += 1;
}
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Patch] IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor
@ 2018-07-27 5:53 Liming Gao
2018-07-27 9:29 ` Ni, Ruiyu
0 siblings, 1 reply; 3+ messages in thread
From: Liming Gao @ 2018-07-27 5:53 UTC (permalink / raw)
To: edk2-devel; +Cc: Ruiyu Ni
To align the way in MdeModulePkg SerialPortLib and PciSioSerialDxe driver,
Divisor is added by one when the reminder is more than half (16 * BaudRate).
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
---
IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
index 57ee669d14..7824d38a9c 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
@@ -1,7 +1,7 @@
/** @file
Serial driver for standard UARTS on an ISA bus.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1397,7 +1397,7 @@ IsaSerialSetAttributes (
((UINT32) BaudRate * 16),
&Remained
);
- if (Remained != 0) {
+ if (Remained >= ((UINT32) BaudRate * 8)) {
Divisor += 1;
}
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Patch] IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor
2018-07-27 5:53 [Patch] IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor Liming Gao
@ 2018-07-27 9:29 ` Ni, Ruiyu
0 siblings, 0 replies; 3+ messages in thread
From: Ni, Ruiyu @ 2018-07-27 9:29 UTC (permalink / raw)
To: Liming Gao, edk2-devel
On 7/27/2018 1:53 PM, Liming Gao wrote:
> To align the way in MdeModulePkg SerialPortLib and PciSioSerialDxe driver,
> Divisor is added by one when the reminder is more than half (16 * BaudRate).
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Liming Gao <liming.gao@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> ---
> IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
> index 57ee669d14..7824d38a9c 100644
> --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
> +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c
> @@ -1,7 +1,7 @@
> /** @file
> Serial driver for standard UARTS on an ISA bus.
>
> -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
> This program and the accompanying materials
> are licensed and made available under the terms and conditions of the BSD License
> which accompanies this distribution. The full text of the license may be found at
> @@ -1397,7 +1397,7 @@ IsaSerialSetAttributes (
> ((UINT32) BaudRate * 16),
> &Remained
> );
> - if (Remained != 0) {
> + if (Remained >= ((UINT32) BaudRate * 8)) {
> Divisor += 1;
> }
>
>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
--
Thanks,
Ray
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-27 9:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-27 5:53 [Patch] IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor Liming Gao
2018-07-27 9:29 ` Ni, Ruiyu
-- strict thread matches above, loose matches on Subject: below --
2018-04-17 8:15 Liming Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox