habanalabs: remove left-over code from bring-up
authorOded Gabbay <ogabbay@kernel.org>
Sun, 7 Aug 2022 13:36:30 +0000 (16:36 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 18 Sep 2022 10:29:51 +0000 (13:29 +0300)
There is some left-over code from the gaudi2 bring-up that wasn't
removed so far.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/firmware_if.c
drivers/misc/habanalabs/include/common/hl_boot_if.h

index cbcb944..12d0f18 100644 (file)
 
 #define FW_FILE_MAX_SIZE               0x1400000 /* maximum size of 20MB */
 
-struct fw_binning_conf {
-       u64 tpc_binning;
-       u32 dec_binning;
-       u32 hbm_binning;
-       u32 edma_binning;
-       u32 mme_redundancy;
-};
-
 static char *extract_fw_ver_from_str(const char *fw_str)
 {
        char *str, *fw_ver, *whitespace;
@@ -2424,18 +2416,6 @@ static int hl_fw_dynamic_send_msg(struct hl_device *hdev,
                msg.reset_cause = *(__u8 *) data;
                break;
 
-       case HL_COMMS_BINNING_CONF_TYPE:
-       {
-               struct fw_binning_conf *binning_conf = (struct fw_binning_conf *) data;
-
-               msg.tpc_binning_conf = cpu_to_le64(binning_conf->tpc_binning);
-               msg.dec_binning_conf = cpu_to_le32(binning_conf->dec_binning);
-               msg.hbm_binning_conf = cpu_to_le32(binning_conf->hbm_binning);
-               msg.edma_binning_conf = cpu_to_le32(binning_conf->edma_binning);
-               msg.mme_redundancy_conf = cpu_to_le32(binning_conf->mme_redundancy);
-               break;
-       }
-
        default:
                dev_err(hdev->dev,
                        "Send COMMS message - invalid message type %u\n",
index a359411..f2f6488 100644 (file)
@@ -465,6 +465,26 @@ enum comms_msg_type {
        HL_COMMS_BINNING_CONF_TYPE = 3,
 };
 
+/*
+ * Binning information shared between LKD and FW
+ * @tpc_mask - TPC binning information
+ * @dec_mask - Decoder binning information
+ * @hbm_mask - HBM binning information
+ * @edma_mask - EDMA binning information
+ * @mme_mask_l - MME binning information lower 32
+ * @mme_mask_h - MME binning information upper 32
+ * @reserved - reserved field for 64 bit alignment
+ */
+struct lkd_fw_binning_info {
+       __le64 tpc_mask;
+       __le32 dec_mask;
+       __le32 hbm_mask;
+       __le32 edma_mask;
+       __le32 mme_mask_l;
+       __le32 mme_mask_h;
+       __le32 reserved;
+};
+
 /* TODO: remove this struct after the code is updated to use message */
 /* this is the comms descriptor header - meta data */
 struct comms_desc_header {
@@ -525,13 +545,7 @@ struct lkd_fw_comms_msg {
                struct {
                        __u8 fw_cfg_skip; /* 1 - skip, 0 - don't skip */
                };
-               struct {
-                       __le64 tpc_binning_conf;
-                       __le32 dec_binning_conf;
-                       __le32 hbm_binning_conf;
-                       __le32 edma_binning_conf;
-                       __le32 mme_redundancy_conf; /* use MME_REDUNDANT_COLUMN */
-               };
+               struct lkd_fw_binning_info binning_info;
        };
 };