Lines Matching refs:m10bmc

25 	struct intel_m10bmc *m10bmc;  member
43 struct intel_m10bmc *m10bmc = sec->m10bmc; in m10bmc_sec_write() local
44 unsigned int stride = regmap_get_reg_stride(m10bmc->regmap); in m10bmc_sec_write()
51 if (sec->m10bmc->flash_bulk_ops) in m10bmc_sec_write()
52 return sec->m10bmc->flash_bulk_ops->write(m10bmc, buf, offset, size); in m10bmc_sec_write()
57 ret = regmap_bulk_write(m10bmc->regmap, M10BMC_STAGING_BASE + offset, in m10bmc_sec_write()
65 ret = regmap_write(m10bmc->regmap, M10BMC_STAGING_BASE + offset + leftover_offset, in m10bmc_sec_write()
76 struct intel_m10bmc *m10bmc = sec->m10bmc; in m10bmc_sec_read() local
77 unsigned int stride = regmap_get_reg_stride(m10bmc->regmap); in m10bmc_sec_read()
84 if (sec->m10bmc->flash_bulk_ops) in m10bmc_sec_read()
85 return sec->m10bmc->flash_bulk_ops->read(m10bmc, buf, addr, size); in m10bmc_sec_read()
90 ret = regmap_bulk_read(m10bmc->regmap, addr, buf, read_count); in m10bmc_sec_read()
96 ret = regmap_read(m10bmc->regmap, addr + leftover_offset, &leftover_tmp); in m10bmc_sec_read()
149 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; \
195 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; \
215 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in flash_count_show()
264 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in log_error_regs()
269 if (!m10bmc_sys_read(sec->m10bmc, csr_map->auth_result, &auth_result)) in log_error_regs()
275 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in m10bmc_sec_n3000_rsu_status()
279 ret = m10bmc_sys_read(sec->m10bmc, csr_map->doorbell, &doorbell); in m10bmc_sec_n3000_rsu_status()
288 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in m10bmc_sec_n6000_rsu_status()
292 ret = m10bmc_sys_read(sec->m10bmc, csr_map->auth_result, &auth_result); in m10bmc_sec_n6000_rsu_status()
324 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in m10bmc_sec_progress_status()
327 ret = m10bmc_sys_read(sec->m10bmc, csr_map->doorbell, doorbell_reg); in m10bmc_sec_progress_status()
343 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in rsu_check_idle()
347 ret = m10bmc_sys_read(sec->m10bmc, csr_map->doorbell, &doorbell); in rsu_check_idle()
375 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in rsu_update_init()
379 ret = m10bmc_sys_update_bits(sec->m10bmc, csr_map->doorbell, in rsu_update_init()
414 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in rsu_prog_ready()
419 ret = m10bmc_sys_read(sec->m10bmc, csr_map->doorbell, &doorbell); in rsu_prog_ready()
429 ret = m10bmc_sys_read(sec->m10bmc, csr_map->doorbell, &doorbell); in rsu_prog_ready()
448 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in rsu_send_data()
452 ret = m10bmc_sys_update_bits(sec->m10bmc, csr_map->doorbell, in rsu_send_data()
459 ret = regmap_read_poll_timeout(sec->m10bmc->regmap, in rsu_send_data()
507 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in rsu_cancel()
511 ret = m10bmc_sys_read(sec->m10bmc, csr_map->doorbell, &doorbell); in rsu_cancel()
518 ret = m10bmc_sys_update_bits(sec->m10bmc, csr_map->doorbell, in rsu_cancel()
532 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in m10bmc_sec_prepare()
540 if (sec->m10bmc->flash_bulk_ops) in m10bmc_sec_prepare()
541 if (sec->m10bmc->flash_bulk_ops->lock_write(sec->m10bmc)) in m10bmc_sec_prepare()
548 m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_SEC_UPDATE_PREPARE); in m10bmc_sec_prepare()
563 m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_SEC_UPDATE_WRITE); in m10bmc_sec_prepare()
568 m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_NORMAL); in m10bmc_sec_prepare()
571 if (sec->m10bmc->flash_bulk_ops) in m10bmc_sec_prepare()
572 sec->m10bmc->flash_bulk_ops->unlock_write(sec->m10bmc); in m10bmc_sec_prepare()
582 const struct m10bmc_csr_map *csr_map = sec->m10bmc->info->csr_map; in m10bmc_sec_fw_write()
583 struct intel_m10bmc *m10bmc = sec->m10bmc; in m10bmc_sec_fw_write() local
590 ret = m10bmc_sys_read(m10bmc, csr_map->doorbell, &doorbell); in m10bmc_sec_fw_write()
598 WARN_ON_ONCE(WRITE_BLOCK_SIZE % regmap_get_reg_stride(m10bmc->regmap)); in m10bmc_sec_fw_write()
618 m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_SEC_UPDATE_PROGRAM); in m10bmc_sec_poll_complete()
663 m10bmc_fw_state_set(sec->m10bmc, M10BMC_FW_STATE_NORMAL); in m10bmc_sec_cleanup()
665 if (sec->m10bmc->flash_bulk_ops) in m10bmc_sec_cleanup()
666 sec->m10bmc->flash_bulk_ops->unlock_write(sec->m10bmc); in m10bmc_sec_cleanup()
699 sec->m10bmc = dev_get_drvdata(pdev->dev.parent); in m10bmc_sec_probe()