summaryrefslogtreecommitdiffstats
path: root/src/occ_405/pss/apss.h
diff options
context:
space:
mode:
authorWael El-Essawy <welessa@us.ibm.com>2015-08-20 12:42:00 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2015-08-28 14:24:56 -0500
commitcad7dcf2bbffa702f6f343400ee44b9ba4891261 (patch)
tree5bd92986500ade9b42729952f797abe9b3f1a86c /src/occ_405/pss/apss.h
parent4103221248508ac1aa16a07e5ae7cac8b9860d57 (diff)
downloadtalos-occ-cad7dcf2bbffa702f6f343400ee44b9ba4891261.tar.gz
talos-occ-cad7dcf2bbffa702f6f343400ee44b9ba4891261.zip
Wrote the three assembly GPE0 power measurement routine in C
created an apss_structs.h file to define common arguments data structure (between the OCC and GPE0) translated the _wait_for_adc_ops_complete assembly macro to C added the wait_spi.c file (probably rename in the future) eliminated tabs and trailing spaces and used linux development style cleaned comments, fixed errors added the ipc_send_cmd at the end of GPE0 functions used pss_constants to adopt the new SETENV SIM_OCC_SPIPSS_PCB_BASE RTC: 131177 Change-Id: I541f5e882dd65e0fafc87c3cc6eb95a32d87e466 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19981 Reviewed-by: Fadi Kassem <fmkassem@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Tested-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405/pss/apss.h')
-rw-r--r--src/occ_405/pss/apss.h43
1 files changed, 1 insertions, 42 deletions
diff --git a/src/occ_405/pss/apss.h b/src/occ_405/pss/apss.h
index 8abd42e..482919e 100644
--- a/src/occ_405/pss/apss.h
+++ b/src/occ_405/pss/apss.h
@@ -26,10 +26,10 @@
#ifndef _APSS_H
#define _APSS_H
+#include <apss_structs.h>
#include <occ_common.h>
#include <trac_interface.h>
#include <errl.h>
-#include <gpe_export.h>
#include <rtls.h>
#define NUM_OF_APSS_GPIO_PORTS 2
@@ -58,21 +58,6 @@ extern uint16_t G_apss_fail_updown_count; //Used to keep count of number of
(G_apss_fail_updown_count += APSS_DATA_FAILURE_STEP): \
(G_apss_fail_updown_count = APSS_DATA_FAIL_MAX);}
-struct apssGpioConfigStruct
-{
- uint8_t direction;
- uint8_t drive;
- uint8_t interrupt;
-} __attribute__ ((__packed__));
-typedef struct apssGpioConfigStruct apssGpioConfigStruct_t;
-
-struct apssCompositeConfigStruct
-{
- uint8_t numAdcChannelsToRead;
- uint8_t numGpioPortsToRead;
-} __attribute__ ((__packed__));
-typedef struct apssCompositeConfigStruct apssCompositeConfigStruct_t;
-
struct apssPwrMeasStruct
{
uint16_t adc[MAX_APSS_ADC_CHANNELS];
@@ -82,32 +67,6 @@ struct apssPwrMeasStruct
} __attribute__ ((__packed__));
typedef struct apssPwrMeasStruct apssPwrMeasStruct_t;
-typedef struct {
- PoreGpeErrorStruct error;
- apssGpioConfigStruct_t config0; // G_gpio_config[0] (input to APSS)
- apssGpioConfigStruct_t config1; // G_gpio_config[1] (input to APSS)
-} initGpioArgs_t;
-
-typedef struct {
- PoreGpeErrorStruct error;
- apssCompositeConfigStruct_t config; // G_apss_composite_config (input to APSS)
-} setCompositeModeArgs_t;
-
-typedef struct
-{
- PoreGpeErrorStruct error;
-} apss_start_args_t;
-
-typedef struct {
- PoreGpeErrorStruct error;
- uint64_t meas_data[4]; // G_apss_pwr_meas (1st block of data) (output from APSS)
-} apss_continue_args_t;
-
-typedef struct {
- PoreGpeErrorStruct error;
- uint64_t meas_data[4]; // G_apss_pwr_meas (2nd block of data) (output from APSS)
-} apss_complete_args_t;
-
// @TODO - Does G_gpio_config and G_apss_composite_config need to be used outside of APSS? If not I will remove from .h
// G_gpio_config: configuration for APSS GPIO pins (default all input, all 1's, not int)
extern const apssGpioConfigStruct_t G_gpio_config[NUM_OF_APSS_GPIO_PORTS];
OpenPOWER on IntegriCloud