mfd: intel-m10-bmc: Change staging size to a variable
[linux-block.git] / drivers / fpga / intel-m10-bmc-sec-update.c
index 89851b1337097c0a58750a5feaa4dbdd4bd12f86..7ac9f9f5af129bcc5674c5891e11a6378e5744ee 100644 (file)
@@ -529,11 +529,12 @@ static enum fw_upload_err m10bmc_sec_prepare(struct fw_upload *fwl,
                                             const u8 *data, u32 size)
 {
        struct m10bmc_sec *sec = fwl->dd_handle;
+       const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map;
        u32 ret;
 
        sec->cancel_request = false;
 
-       if (!size || size > M10BMC_STAGING_SIZE)
+       if (!size || size > csr_map->staging_size)
                return FW_UPLOAD_ERR_INVALID_SIZE;
 
        if (sec->m10bmc->flash_bulk_ops)