Lines Matching refs:m10bmc
20 struct intel_m10bmc m10bmc; member
149 static int pmci_flash_bulk_write(struct intel_m10bmc *m10bmc, const u8 *buf, u32 size) in pmci_flash_bulk_write() argument
151 struct m10bmc_pmci_device *pmci = container_of(m10bmc, struct m10bmc_pmci_device, m10bmc); in pmci_flash_bulk_write()
157 dev_err(m10bmc->dev, "get FIFO available size fail\n"); in pmci_flash_bulk_write()
183 static int pmci_flash_bulk_read(struct intel_m10bmc *m10bmc, u8 *buf, u32 addr, u32 size) in pmci_flash_bulk_read() argument
185 struct m10bmc_pmci_device *pmci = container_of(m10bmc, struct m10bmc_pmci_device, m10bmc); in pmci_flash_bulk_read()
206 dev_err(m10bmc->dev, "read timed out on reading flash 0x%xn", val); in pmci_flash_bulk_read()
235 static int m10bmc_pmci_set_flash_host_mux(struct intel_m10bmc *m10bmc, bool request) in m10bmc_pmci_set_flash_host_mux() argument
240 ret = regmap_update_bits(m10bmc->regmap, M10BMC_N6000_FLASH_MUX_CTRL, in m10bmc_pmci_set_flash_host_mux()
246 return regmap_read_poll_timeout(m10bmc->regmap, in m10bmc_pmci_set_flash_host_mux()
254 static int m10bmc_pmci_flash_read(struct intel_m10bmc *m10bmc, u8 *buf, u32 addr, u32 size) in m10bmc_pmci_flash_read() argument
256 struct m10bmc_pmci_device *pmci = container_of(m10bmc, struct m10bmc_pmci_device, m10bmc); in m10bmc_pmci_flash_read()
265 ret = m10bmc_pmci_set_flash_host_mux(m10bmc, true); in m10bmc_pmci_flash_read()
269 ret = pmci_flash_bulk_read(m10bmc, buf, addr, size); in m10bmc_pmci_flash_read()
272 ret2 = m10bmc_pmci_set_flash_host_mux(m10bmc, false); in m10bmc_pmci_flash_read()
281 static int m10bmc_pmci_flash_write(struct intel_m10bmc *m10bmc, const u8 *buf, u32 offset, u32 size) in m10bmc_pmci_flash_write() argument
283 struct m10bmc_pmci_device *pmci = container_of(m10bmc, struct m10bmc_pmci_device, m10bmc); in m10bmc_pmci_flash_write()
289 ret = pmci_flash_bulk_write(m10bmc, buf + offset, size); in m10bmc_pmci_flash_write()
295 static int m10bmc_pmci_flash_lock(struct intel_m10bmc *m10bmc) in m10bmc_pmci_flash_lock() argument
297 struct m10bmc_pmci_device *pmci = container_of(m10bmc, struct m10bmc_pmci_device, m10bmc); in m10bmc_pmci_flash_lock()
313 static void m10bmc_pmci_flash_unlock(struct intel_m10bmc *m10bmc) in m10bmc_pmci_flash_unlock() argument
315 struct m10bmc_pmci_device *pmci = container_of(m10bmc, struct m10bmc_pmci_device, m10bmc); in m10bmc_pmci_flash_unlock()
392 pmci->m10bmc.flash_bulk_ops = &m10bmc_pmci_flash_bulk_ops; in m10bmc_pmci_probe()
393 pmci->m10bmc.dev = dev; in m10bmc_pmci_probe()
408 pmci->m10bmc.regmap = devm_regmap_init(dev, NULL, ctx, &m10bmc_pmci_regmap_config); in m10bmc_pmci_probe()
410 if (IS_ERR(pmci->m10bmc.regmap)) { in m10bmc_pmci_probe()
411 ret = PTR_ERR(pmci->m10bmc.regmap); in m10bmc_pmci_probe()
415 ret = m10bmc_dev_init(&pmci->m10bmc, &m10bmc_pmci_n6000); in m10bmc_pmci_probe()
427 struct intel_m10bmc *m10bmc = dev_get_drvdata(&ddev->dev); in m10bmc_pmci_remove() local
428 struct m10bmc_pmci_device *pmci = container_of(m10bmc, struct m10bmc_pmci_device, m10bmc); in m10bmc_pmci_remove()