Lines Matching refs:msg

88 	u32 msg;  member
132 static int xgene_hwmon_pcc_rd(struct xgene_hwmon_dev *ctx, u32 *msg) in xgene_hwmon_pcc_rd() argument
149 cpu_to_le16(MSG_TYPE(msg[0]) | PCCC_GENERATE_DB_INT)); in xgene_hwmon_pcc_rd()
158 WRITE_ONCE(ptr[i], cpu_to_le32(msg[i])); in xgene_hwmon_pcc_rd()
161 rc = mbox_send_message(ctx->mbox_chan, msg); in xgene_hwmon_pcc_rd()
174 if (MSG_TYPE(ctx->sync_msg.msg) == MSG_TYPE_ERR) { in xgene_hwmon_pcc_rd()
179 msg[0] = ctx->sync_msg.msg; in xgene_hwmon_pcc_rd()
180 msg[1] = ctx->sync_msg.param1; in xgene_hwmon_pcc_rd()
181 msg[2] = ctx->sync_msg.param2; in xgene_hwmon_pcc_rd()
190 static int xgene_hwmon_rd(struct xgene_hwmon_dev *ctx, u32 *msg) in xgene_hwmon_rd() argument
198 rc = mbox_send_message(ctx->mbox_chan, msg); in xgene_hwmon_rd()
212 if (MSG_TYPE(ctx->sync_msg.msg) == MSG_TYPE_ERR) { in xgene_hwmon_rd()
217 msg[0] = ctx->sync_msg.msg; in xgene_hwmon_rd()
218 msg[1] = ctx->sync_msg.param1; in xgene_hwmon_rd()
219 msg[2] = ctx->sync_msg.param2; in xgene_hwmon_rd()
230 u32 msg[3]; in xgene_hwmon_reg_map_rd() local
233 msg[0] = SENSOR_RD_MSG; in xgene_hwmon_reg_map_rd()
234 msg[1] = SENSOR_RD_EN_ADDR(addr); in xgene_hwmon_reg_map_rd()
235 msg[2] = 0; in xgene_hwmon_reg_map_rd()
238 rc = xgene_hwmon_rd(ctx, msg); in xgene_hwmon_reg_map_rd()
240 rc = xgene_hwmon_pcc_rd(ctx, msg); in xgene_hwmon_reg_map_rd()
248 if (msg[1] & SENSOR_INVALID_DATA) in xgene_hwmon_reg_map_rd()
251 *data = msg[1]; in xgene_hwmon_reg_map_rd()
259 u32 msg[3]; in xgene_hwmon_get_notification_msg() local
262 msg[0] = TPC_EN_MSG(PWRMGMT_SUBTYPE_TPC, TPC_GET_ALARM, 0); in xgene_hwmon_get_notification_msg()
263 msg[1] = 0; in xgene_hwmon_get_notification_msg()
264 msg[2] = 0; in xgene_hwmon_get_notification_msg()
266 rc = xgene_hwmon_pcc_rd(ctx, msg); in xgene_hwmon_get_notification_msg()
270 amsg[0] = msg[0]; in xgene_hwmon_get_notification_msg()
271 amsg[1] = msg[1]; in xgene_hwmon_get_notification_msg()
272 amsg[2] = msg[2]; in xgene_hwmon_get_notification_msg()
429 if ((MSG_SUBTYPE(amsg->msg) == PWRMGMT_SUBTYPE_TPC) && in xgene_hwmon_process_pwrmsg()
430 (TPC_CMD(amsg->msg) == TPC_ALARM)) in xgene_hwmon_process_pwrmsg()
458 if (MSG_TYPE(amsg.msg) == MSG_TYPE_PWRMGMT) in xgene_hwmon_evt_work()
463 static int xgene_hwmon_rx_ready(struct xgene_hwmon_dev *ctx, void *msg) in xgene_hwmon_rx_ready() argument
467 kfifo_in_spinlocked(&ctx->async_msg_fifo, msg, in xgene_hwmon_rx_ready()
479 static void xgene_hwmon_rx_cb(struct mbox_client *cl, void *msg) in xgene_hwmon_rx_cb() argument
489 if (xgene_hwmon_rx_ready(ctx, msg) < 0) in xgene_hwmon_rx_cb()
503 ((MSG_TYPE(((u32 *)msg)[0]) == MSG_TYPE_ERR) || in xgene_hwmon_rx_cb()
504 (MSG_TYPE(((u32 *)msg)[0]) == MSG_TYPE_DBG && in xgene_hwmon_rx_cb()
505 MSG_SUBTYPE(((u32 *)msg)[0]) == DBG_SUBTYPE_SENSOR_READ) || in xgene_hwmon_rx_cb()
506 (MSG_TYPE(((u32 *)msg)[0]) == MSG_TYPE_PWRMGMT && in xgene_hwmon_rx_cb()
507 MSG_SUBTYPE(((u32 *)msg)[0]) == PWRMGMT_SUBTYPE_TPC && in xgene_hwmon_rx_cb()
508 TPC_CMD(((u32 *)msg)[0]) == TPC_ALARM))) { in xgene_hwmon_rx_cb()
509 ctx->sync_msg.msg = ((u32 *)msg)[0]; in xgene_hwmon_rx_cb()
510 ctx->sync_msg.param1 = ((u32 *)msg)[1]; in xgene_hwmon_rx_cb()
511 ctx->sync_msg.param2 = ((u32 *)msg)[2]; in xgene_hwmon_rx_cb()
520 kfifo_in_spinlocked(&ctx->async_msg_fifo, msg, in xgene_hwmon_rx_cb()
529 static void xgene_hwmon_pcc_rx_cb(struct mbox_client *cl, void *msg) in xgene_hwmon_pcc_rx_cb() argument
544 msg = generic_comm_base + 1; in xgene_hwmon_pcc_rx_cb()
561 ((MSG_TYPE(((u32 *)msg)[0]) == MSG_TYPE_ERR) || in xgene_hwmon_pcc_rx_cb()
562 (MSG_TYPE(((u32 *)msg)[0]) == MSG_TYPE_DBG && in xgene_hwmon_pcc_rx_cb()
563 MSG_SUBTYPE(((u32 *)msg)[0]) == DBG_SUBTYPE_SENSOR_READ) || in xgene_hwmon_pcc_rx_cb()
564 (MSG_TYPE(((u32 *)msg)[0]) == MSG_TYPE_PWRMGMT && in xgene_hwmon_pcc_rx_cb()
565 MSG_SUBTYPE(((u32 *)msg)[0]) == PWRMGMT_SUBTYPE_TPC && in xgene_hwmon_pcc_rx_cb()
566 TPC_CMD(((u32 *)msg)[0]) == TPC_ALARM))) { in xgene_hwmon_pcc_rx_cb()
570 ctx->sync_msg.msg = ((u32 *)msg)[0]; in xgene_hwmon_pcc_rx_cb()
571 ctx->sync_msg.param1 = ((u32 *)msg)[1]; in xgene_hwmon_pcc_rx_cb()
572 ctx->sync_msg.param2 = ((u32 *)msg)[2]; in xgene_hwmon_pcc_rx_cb()
595 static void xgene_hwmon_tx_done(struct mbox_client *cl, void *msg, int ret) in xgene_hwmon_tx_done() argument
599 *(u16 *)msg, ret); in xgene_hwmon_tx_done()
602 *(u16 *)msg, ret); in xgene_hwmon_tx_done()