Skip to content

Commit

Permalink
habanalabs: remove left-over code from bring-up
Browse files Browse the repository at this point in the history
There is some left-over code from the gaudi2 bring-up that wasn't
removed so far.

Signed-off-by: Oded Gabbay <[email protected]>
  • Loading branch information
ogabbay committed Sep 18, 2022
1 parent 6419b52 commit 07056f5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
20 changes: 0 additions & 20 deletions drivers/misc/habanalabs/common/firmware_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@

#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;
Expand Down Expand Up @@ -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",
Expand Down
28 changes: 21 additions & 7 deletions drivers/misc/habanalabs/include/common/hl_boot_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
};
};

Expand Down

0 comments on commit 07056f5

Please sign in to comment.