From 0bf193d8d4f98934d4f539b1950e8b46c03a2716 Mon Sep 17 00:00:00 2001 From: Doug Gilbert Date: Fri, 10 Nov 2017 06:01:29 -0600 Subject: APSS Reset Support Change-Id: I23dd10a7bc78841ecd4382e8ac8667afbb7c2ddd RTC: 163601 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49871 Tested-by: FSP CI Jenkins Reviewed-by: Christopher J. Cain Reviewed-by: William A. Bryan Reviewed-by: Martha Broyles --- src/occ_405/dcom/dcom.h | 4 +++- src/occ_405/dcom/dcomMasterTx.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/occ_405/dcom') diff --git a/src/occ_405/dcom/dcom.h b/src/occ_405/dcom/dcom.h index 109b4ef..3bbfcda 100755 --- a/src/occ_405/dcom/dcom.h +++ b/src/occ_405/dcom/dcom.h @@ -273,8 +273,10 @@ typedef struct uint16_t adc[MAX_APSS_ADC_CHANNELS]; // 32 bytes // Time of Day Clock from the last APSS reading uint64_t tod; // 8 bytes + // Apss reset in progress + uint8_t apss_recovery_in_progress; // 1 byte // Reserved - uint8_t _reserved_1[51]; // 51 bytes + uint8_t _reserved_1[50]; // 50 bytes // Counter in case we want to determine sequence errors uint8_t magic_counter; // 1 byte // Magic Number for denoting the end of the packet diff --git a/src/occ_405/dcom/dcomMasterTx.c b/src/occ_405/dcom/dcomMasterTx.c index a65dc31..7ba80e3 100644 --- a/src/occ_405/dcom/dcomMasterTx.c +++ b/src/occ_405/dcom/dcomMasterTx.c @@ -183,6 +183,7 @@ uint32_t dcom_build_slv_inbox(void) G_dcom_slv_inbox_doorbell_tx.gpio[0] = G_apss_pwr_meas.gpio[0]; G_dcom_slv_inbox_doorbell_tx.gpio[1] = G_apss_pwr_meas.gpio[1]; G_dcom_slv_inbox_doorbell_tx.tod = G_apss_pwr_meas.tod; + G_dcom_slv_inbox_doorbell_tx.apss_recovery_in_progress = G_apss_recovery_requested; G_dcom_slv_inbox_doorbell_tx.magic_counter++; G_dcom_slv_inbox_doorbell_tx.magic2 = PBAX_MAGIC_NUMBER_32B; @@ -245,7 +246,9 @@ void task_dcom_tx_slv_inbox( task_t *i_self) { // If we are in standby or no APSS present, we need to fake out // the APSS data since we aren't talking to APSS. - if( (OCC_STATE_STANDBY == CURRENT_STATE()) || (G_pwr_reading_type != PWR_READING_TYPE_APSS) ) + if( (OCC_STATE_STANDBY == CURRENT_STATE()) || + (G_pwr_reading_type != PWR_READING_TYPE_APSS) || + G_apss_recovery_requested ) { G_ApssPwrMeasCompleted = TRUE; } -- cgit v1.2.1