Lines Matching full:bspi
30 /* BSPI register offsets */
171 BSPI, enumerator
283 /* BSPI helpers */
290 if (!(bcm_qspi_read(qspi, BSPI, BSPI_BUSY_STATUS) & 1)) in bcm_qspi_bspi_busy_poll()
309 bcm_qspi_write(qspi, BSPI, BSPI_B0_CTRL, 1); in bcm_qspi_bspi_flush_prefetch_buffers()
310 bcm_qspi_write(qspi, BSPI, BSPI_B1_CTRL, 1); in bcm_qspi_bspi_flush_prefetch_buffers()
311 bcm_qspi_write(qspi, BSPI, BSPI_B0_CTRL, 0); in bcm_qspi_bspi_flush_prefetch_buffers()
312 bcm_qspi_write(qspi, BSPI, BSPI_B1_CTRL, 0); in bcm_qspi_bspi_flush_prefetch_buffers()
317 return (bcm_qspi_read(qspi, BSPI, BSPI_RAF_STATUS) & in bcm_qspi_bspi_lr_is_fifo_empty()
323 u32 data = bcm_qspi_read(qspi, BSPI, BSPI_RAF_READ_DATA); in bcm_qspi_bspi_lr_read_fifo()
325 /* BSPI v3 LR is LE only, convert data to host endianness */ in bcm_qspi_bspi_lr_read_fifo()
335 bcm_qspi_write(qspi, BSPI, BSPI_RAF_CTRL, in bcm_qspi_bspi_lr_start()
341 bcm_qspi_write(qspi, BSPI, BSPI_RAF_CTRL, in bcm_qspi_bspi_lr_clear()
376 bcm_qspi_write(qspi, BSPI, BSPI_FLEX_MODE_ENABLE, 0); in bcm_qspi_bspi_set_xfer_params()
377 bcm_qspi_write(qspi, BSPI, BSPI_BITS_PER_CYCLE, bpc); in bcm_qspi_bspi_set_xfer_params()
378 bcm_qspi_write(qspi, BSPI, BSPI_BITS_PER_PHASE, bpp); in bcm_qspi_bspi_set_xfer_params()
379 bcm_qspi_write(qspi, BSPI, BSPI_CMD_AND_MODE_BYTE, cmd_byte); in bcm_qspi_bspi_set_xfer_params()
380 bcm_qspi_write(qspi, BSPI, BSPI_FLEX_MODE_ENABLE, flex_mode); in bcm_qspi_bspi_set_xfer_params()
434 u32 data = bcm_qspi_read(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL); in bcm_qspi_bspi_set_override()
468 bcm_qspi_write(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL, data); in bcm_qspi_bspi_set_override()
487 val = bcm_qspi_read(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL); in bcm_qspi_bspi_set_mode()
491 bcm_qspi_write(qspi, BSPI, BSPI_FLEX_MODE_ENABLE, 0); in bcm_qspi_bspi_set_mode()
526 if ((bcm_qspi_read(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL) & 1) == 0) in bcm_qspi_enable_bspi()
531 bcm_qspi_write(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL, 0); in bcm_qspi_enable_bspi()
541 if ((bcm_qspi_read(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL) & 1)) in bcm_qspi_disable_bspi()
545 bcm_qspi_write(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL, 1); in bcm_qspi_disable_bspi()
882 * the upper address byte to bspi in bcm_qspi_bspi_exec_mem_op()
886 bcm_qspi_write(qspi, BSPI, in bcm_qspi_bspi_exec_mem_op()
918 "bspi xfr addr 0x%x len 0x%x", addr, rdlen); in bcm_qspi_bspi_exec_mem_op()
919 bcm_qspi_write(qspi, BSPI, BSPI_RAF_START_ADDR, addr); in bcm_qspi_bspi_exec_mem_op()
920 bcm_qspi_write(qspi, BSPI, BSPI_RAF_NUM_WORDS, len_words); in bcm_qspi_bspi_exec_mem_op()
921 bcm_qspi_write(qspi, BSPI, BSPI_RAF_WATERMARK, 0); in bcm_qspi_bspi_exec_mem_op()
924 * clear soc MSPI and BSPI interrupts and enable in bcm_qspi_bspi_exec_mem_op()
925 * BSPI interrupts. in bcm_qspi_bspi_exec_mem_op()
931 /* Must flush previous writes before starting BSPI operation */ in bcm_qspi_bspi_exec_mem_op()
935 dev_err(&qspi->pdev->dev, "timeout waiting for BSPI\n"); in bcm_qspi_bspi_exec_mem_op()
1038 * But for BSPI <= V3, we need to convert it to a remapped BSPI in bcm_qspi_exec_mem_op()
1104 /* disable soc BSPI interrupt */ in bcm_qspi_bspi_lr_l2_isr()
1118 /* clear soc BSPI interrupt */ in bcm_qspi_bspi_lr_l2_isr()
1135 dev_err(&qspi->pdev->dev, "BSPI INT error\n"); in bcm_qspi_bspi_lr_err_l2_isr()
1218 val = bcm_qspi_read(qspi, BSPI, BSPI_REVISION_ID); in bcm_qspi_bspi_init()
1222 /* Force mapping of BSPI address -> flash offset */ in bcm_qspi_bspi_init()
1223 bcm_qspi_write(qspi, BSPI, BSPI_BSPI_XOR_VALUE, 0); in bcm_qspi_bspi_init()
1224 bcm_qspi_write(qspi, BSPI, BSPI_BSPI_XOR_ENABLE, 1); in bcm_qspi_bspi_init()
1228 bcm_qspi_write(qspi, BSPI, BSPI_B0_CTRL, 0); in bcm_qspi_bspi_init()
1229 bcm_qspi_write(qspi, BSPI, BSPI_B1_CTRL, 0); in bcm_qspi_bspi_init()
1376 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "bspi"); in bcm_qspi_probe()
1378 qspi->base[BSPI] = devm_ioremap_resource(dev, res); in bcm_qspi_probe()
1379 if (IS_ERR(qspi->base[BSPI])) in bcm_qspi_probe()
1380 return PTR_ERR(qspi->base[BSPI]); in bcm_qspi_probe()
1386 dev_info(dev, "using %smspi mode\n", qspi->bspi_mode ? "bspi-" : ""); in bcm_qspi_probe()
1448 /* all mspi, bspi intrs muxed to one L1 intr */ in bcm_qspi_probe()
1528 bcm_qspi_read(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL); in bcm_qspi_suspend()