mirror of https://gitee.com/openkylin/linux.git
greybus: greybus_protocols.h Add SVC_TIMESYNC_WAKE_PINS_ACQUIRE/RELEASE
Its necessary to establish an initial state on the wake-detect lines before enabling timesync on APB/GPB in order to ensure all GPIO edge-transitions are correctly interpreted by the receiving processor. This patch adds the operations defined in the Greybus specification to greybus_protocols.h, this involves adding the SVC_TIMESYNC_WAKE_PINS_ACQUIRE and SVC_TIMESYNC_WAKE_PINS_RELEASE commands and moving the 'strobe_mask' parameter from 'struct gb_svc_timesync_enable_request' to 'struct gb_svc_timesync_wd_pins_acquire_request' since the communication of the strobe_mask will be communicated before preparing any of the bridges to receive the TimeSync pulses. A separate patch to the greybus specification describes the transition between the wake sub-state and the timesync sub-state. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Reviewed-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
5015d5cff9
commit
596e4a1933
|
@ -835,6 +835,8 @@ struct gb_spi_transfer_response {
|
|||
#define GB_SVC_TYPE_PWRMON_RAIL_NAMES_GET 0x15
|
||||
#define GB_SVC_TYPE_PWRMON_SAMPLE_GET 0x16
|
||||
#define GB_SVC_TYPE_PWRMON_INTF_SAMPLE_GET 0x17
|
||||
#define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_ACQUIRE 0x18
|
||||
#define GB_SVC_TYPE_TIMESYNC_WAKE_PINS_RELEASE 0x19
|
||||
#define GB_SVC_TYPE_MODULE_INSERTED 0x1f
|
||||
#define GB_SVC_TYPE_MODULE_REMOVED 0x20
|
||||
#define GB_SVC_TYPE_INTF_ACTIVATE 0x27
|
||||
|
@ -955,7 +957,6 @@ struct gb_svc_timesync_enable_request {
|
|||
__u8 count;
|
||||
__le64 frame_time;
|
||||
__le32 strobe_delay;
|
||||
__le32 strobe_mask;
|
||||
__le32 refclk;
|
||||
} __packed;
|
||||
/* timesync enable response has no payload */
|
||||
|
@ -965,6 +966,15 @@ struct gb_svc_timesync_authoritative_response {
|
|||
__le64 frame_time[GB_TIMESYNC_MAX_STROBES];
|
||||
};
|
||||
|
||||
struct gb_svc_timesync_wake_pins_acquire_request {
|
||||
__le32 strobe_mask;
|
||||
};
|
||||
|
||||
/* timesync wake pins acquire response has no payload */
|
||||
|
||||
/* timesync wake pins release request has no payload */
|
||||
/* timesync wake pins release response has no payload */
|
||||
|
||||
#define GB_SVC_UNIPRO_FAST_MODE 0x01
|
||||
#define GB_SVC_UNIPRO_SLOW_MODE 0x02
|
||||
#define GB_SVC_UNIPRO_FAST_AUTO_MODE 0x04
|
||||
|
|
Loading…
Reference in New Issue