Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Verified Commit 75b8a53c authored by Ayush Singh's avatar Ayush Singh
Browse files

Add REFCLK request handlers


They don't really seem to do anything in gbridge, so I am not doing
anything either

Signed-off-by: default avatarAyush Singh <ayushsingh1325@gmail.com>
parent 897da006
Branches
Tags
1 merge request!2HDLC MR
......@@ -46,6 +46,12 @@
#define GB_SVC_TYPE_INTF_VSYS_DISABLE_REQUEST 0x22
#define GB_SVC_TYPE_INTF_VSYS_DISABLE_RESPONSE \
OP_RESPONSE | GB_SVC_TYPE_INTF_VSYS_DISABLE_REQUEST
#define GB_SVC_TYPE_INTF_REFCLK_ENABLE_REQUEST 0x23
#define GB_SVC_TYPE_INTF_REFCLK_ENABLE_RESPONSE \
OP_RESPONSE | GB_SVC_TYPE_INTF_REFCLK_ENABLE_REQUEST
#define GB_SVC_TYPE_INTF_REFCLK_DISABLE_REQUEST 0x24
#define GB_SVC_TYPE_INTF_REFCLK_DISABLE_RESPONSE \
OP_RESPONSE | GB_SVC_TYPE_INTF_VSYS_DISABLE_REQUEST
#define GB_SVC_UNIPRO_HIBERNATE_MODE 0x11
......@@ -54,6 +60,8 @@
#define GB_SVC_INTF_VSYS_OK 0x00
#define GB_SVC_INTF_REFCLK_OK 0x00
/*
* All operation messages (both requests and responses) begin with
* a header that encodes the size of the message (header included).
......
......@@ -20,6 +20,10 @@ struct svc_control_data {
static struct svc_control_data svc_ctrl_data;
struct gb_svc_intf_refclk_response {
uint8_t result_code;
} __packed;
struct gb_svc_intf_vsys_response {
uint8_t result_code;
} __packed;
......@@ -157,16 +161,17 @@ static void svc_intf_set_pwrm_handler(struct gb_message *msg) {
svc_response_helper(msg, &resp, sizeof(struct gb_svc_intf_set_pwrm_response));
}
static void svc_intf_vsys_enable_handler(struct gb_message *msg) {
static void svc_intf_vsys_enable_disable_handler(struct gb_message *msg) {
struct gb_svc_intf_vsys_response resp = {.result_code = GB_SVC_INTF_VSYS_OK};
svc_response_helper(msg, &resp, sizeof(struct gb_svc_intf_vsys_response));
}
static void svc_intf_vsys_disable_handler(struct gb_message *msg) {
struct gb_svc_intf_vsys_response resp = {.result_code = GB_SVC_INTF_VSYS_OK};
svc_response_helper(msg, &resp, sizeof(struct gb_svc_intf_vsys_response));
static void
svc_interface_refclk_enable_disable_handler(struct gb_message *msg) {
struct gb_svc_intf_refclk_response resp = {.result_code =
GB_SVC_INTF_REFCLK_OK};
svc_response_helper(msg, &resp, sizeof(struct gb_svc_intf_refclk_response));
}
static void gb_handle_msg(struct gb_message *msg) {
......@@ -179,11 +184,13 @@ static void gb_handle_msg(struct gb_message *msg) {
case GB_SVC_TYPE_PING_REQUEST:
svc_empty_request_handler(msg);
break;
case GB_SVC_TYPE_INTF_VSYS_ENABLE_REQUEST:
svc_intf_vsys_enable_handler(msg);
case GB_SVC_TYPE_INTF_REFCLK_ENABLE_REQUEST:
case GB_SVC_TYPE_INTF_REFCLK_DISABLE_REQUEST:
svc_interface_refclk_enable_disable_handler(msg);
break;
case GB_SVC_TYPE_INTF_VSYS_ENABLE_REQUEST:
case GB_SVC_TYPE_INTF_VSYS_DISABLE_REQUEST:
svc_intf_vsys_disable_handler(msg);
svc_intf_vsys_enable_disable_handler(msg);
break;
case GB_SVC_TYPE_PWRMON_RAIL_COUNT_GET_REQUEST:
svc_pwrm_get_rail_count_handler(msg);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment