Change in osmo-ccid-firmware[master]: cuart: move generic paramete reset upon powerdown to where it belongs

laforge gerrit-no-reply at lists.osmocom.org
Fri Jul 2 12:34:55 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/24814 )

Change subject: cuart: move generic paramete reset upon powerdown to where it belongs
......................................................................

cuart: move generic paramete reset upon powerdown to where it belongs

Change-Id: I784f66cb998fc04ae64312b809fc3a7c42bd6bff
---
M ccid_common/cuart.c
M sysmoOCTSIM/cuart_driver_asf4_usart_async.c
2 files changed, 12 insertions(+), 6 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/ccid_common/cuart.c b/ccid_common/cuart.c
index c617754..9966942 100644
--- a/ccid_common/cuart.c
+++ b/ccid_common/cuart.c
@@ -148,6 +148,18 @@
 		else
 			osmo_timer_del(&cuart->wtime_tmr);
 		break;
+	case CUART_CTL_POWER_5V0:
+	case CUART_CTL_POWER_3V0:
+	case CUART_CTL_POWER_1V8:
+		/* we have to reset this somewhere, and powering down loses all state
+		 * this is not hw specific so it belongs here, after handling the hw specific part */
+		if (!arg) {
+			cuart->tx_busy = false;
+			cuart->rx_threshold = 1;
+			cuart->wtime_etu = 9600; /* ISO 7816-3 Section 8.1 */
+		}
+
+		break;
 	default:
 		break;
 	}
diff --git a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c
index 7822c1b..42c2110 100644
--- a/sysmoOCTSIM/cuart_driver_asf4_usart_async.c
+++ b/sysmoOCTSIM/cuart_driver_asf4_usart_async.c
@@ -481,12 +481,6 @@
 		settings.vsel = v;
 		ncn8025_set(cuart->u.asf4.slot_nr, &settings);
 
-		/* we have to reset this somewhere, and powering down loses all state */
-		if (!arg) {
-			cuart->tx_busy = false;
-			cuart->wtime_etu = 9600; /* ISO 7816-3 Section 8.1 */
-		}
-
 		break;
 	case CUART_CTL_WTIME:
 		/* no driver-specific handling of this */

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/24814
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ccid-firmware
Gerrit-Branch: master
Gerrit-Change-Id: I784f66cb998fc04ae64312b809fc3a7c42bd6bff
Gerrit-Change-Number: 24814
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210702/e8dc30c1/attachment.htm>


More information about the gerrit-log mailing list