Lines Matching full:bspi

30 /* BSPI register offsets */
192 BSPI, enumerator
316 /* BSPI helpers */
323 if (!(bcm_qspi_read(qspi, BSPI, BSPI_BUSY_STATUS) & 1)) in bcm_qspi_bspi_busy_poll()
342 bcm_qspi_write(qspi, BSPI, BSPI_B0_CTRL, 1); in bcm_qspi_bspi_flush_prefetch_buffers()
343 bcm_qspi_write(qspi, BSPI, BSPI_B1_CTRL, 1); in bcm_qspi_bspi_flush_prefetch_buffers()
344 bcm_qspi_write(qspi, BSPI, BSPI_B0_CTRL, 0); in bcm_qspi_bspi_flush_prefetch_buffers()
345 bcm_qspi_write(qspi, BSPI, BSPI_B1_CTRL, 0); in bcm_qspi_bspi_flush_prefetch_buffers()
350 return (bcm_qspi_read(qspi, BSPI, BSPI_RAF_STATUS) & in bcm_qspi_bspi_lr_is_fifo_empty()
356 u32 data = bcm_qspi_read(qspi, BSPI, BSPI_RAF_READ_DATA); in bcm_qspi_bspi_lr_read_fifo()
358 /* BSPI v3 LR is LE only, convert data to host endianness */ in bcm_qspi_bspi_lr_read_fifo()
368 bcm_qspi_write(qspi, BSPI, BSPI_RAF_CTRL, in bcm_qspi_bspi_lr_start()
374 bcm_qspi_write(qspi, BSPI, BSPI_RAF_CTRL, in bcm_qspi_bspi_lr_clear()
409 bcm_qspi_write(qspi, BSPI, BSPI_FLEX_MODE_ENABLE, 0); in bcm_qspi_bspi_set_xfer_params()
410 bcm_qspi_write(qspi, BSPI, BSPI_BITS_PER_CYCLE, bpc); in bcm_qspi_bspi_set_xfer_params()
411 bcm_qspi_write(qspi, BSPI, BSPI_BITS_PER_PHASE, bpp); in bcm_qspi_bspi_set_xfer_params()
412 bcm_qspi_write(qspi, BSPI, BSPI_CMD_AND_MODE_BYTE, cmd_byte); in bcm_qspi_bspi_set_xfer_params()
413 bcm_qspi_write(qspi, BSPI, BSPI_FLEX_MODE_ENABLE, flex_mode); in bcm_qspi_bspi_set_xfer_params()
468 u32 data = bcm_qspi_read(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL); in bcm_qspi_bspi_set_override()
502 bcm_qspi_write(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL, data); in bcm_qspi_bspi_set_override()
521 val = bcm_qspi_read(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL); in bcm_qspi_bspi_set_mode()
525 bcm_qspi_write(qspi, BSPI, BSPI_FLEX_MODE_ENABLE, 0); in bcm_qspi_bspi_set_mode()
560 if ((bcm_qspi_read(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL) & 1) == 0) in bcm_qspi_enable_bspi()
565 bcm_qspi_write(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL, 0); in bcm_qspi_enable_bspi()
575 if ((bcm_qspi_read(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL) & 1)) in bcm_qspi_disable_bspi()
579 bcm_qspi_write(qspi, BSPI, BSPI_MAST_N_BOOT_CTRL, 1); in bcm_qspi_disable_bspi()
1055 * the upper address byte to bspi in bcm_qspi_bspi_exec_mem_op()
1059 bcm_qspi_write(qspi, BSPI, in bcm_qspi_bspi_exec_mem_op()
1091 "bspi xfr addr 0x%x len 0x%x", addr, rdlen); in bcm_qspi_bspi_exec_mem_op()
1092 bcm_qspi_write(qspi, BSPI, BSPI_RAF_START_ADDR, addr); in bcm_qspi_bspi_exec_mem_op()
1093 bcm_qspi_write(qspi, BSPI, BSPI_RAF_NUM_WORDS, len_words); in bcm_qspi_bspi_exec_mem_op()
1094 bcm_qspi_write(qspi, BSPI, BSPI_RAF_WATERMARK, 0); in bcm_qspi_bspi_exec_mem_op()
1097 * clear soc MSPI and BSPI interrupts and enable in bcm_qspi_bspi_exec_mem_op()
1098 * BSPI interrupts. in bcm_qspi_bspi_exec_mem_op()
1104 /* Must flush previous writes before starting BSPI operation */ in bcm_qspi_bspi_exec_mem_op()
1108 dev_err(&qspi->pdev->dev, "timeout waiting for BSPI\n"); in bcm_qspi_bspi_exec_mem_op()
1211 * But for BSPI <= V3, we need to convert it to a remapped BSPI in bcm_qspi_exec_mem_op()
1277 /* disable soc BSPI interrupt */ in bcm_qspi_bspi_lr_l2_isr()
1291 /* clear soc BSPI interrupt */ in bcm_qspi_bspi_lr_l2_isr()
1308 dev_err(&qspi->pdev->dev, "BSPI INT error\n"); in bcm_qspi_bspi_lr_err_l2_isr()
1391 val = bcm_qspi_read(qspi, BSPI, BSPI_REVISION_ID); in bcm_qspi_bspi_init()
1395 /* Force mapping of BSPI address -> flash offset */ in bcm_qspi_bspi_init()
1396 bcm_qspi_write(qspi, BSPI, BSPI_BSPI_XOR_VALUE, 0); in bcm_qspi_bspi_init()
1397 bcm_qspi_write(qspi, BSPI, BSPI_BSPI_XOR_ENABLE, 1); in bcm_qspi_bspi_init()
1401 bcm_qspi_write(qspi, BSPI, BSPI_B0_CTRL, 0); in bcm_qspi_bspi_init()
1402 bcm_qspi_write(qspi, BSPI, BSPI_B1_CTRL, 0); in bcm_qspi_bspi_init()
1550 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "bspi"); in bcm_qspi_probe()
1552 qspi->base[BSPI] = devm_ioremap_resource(dev, res); in bcm_qspi_probe()
1553 if (IS_ERR(qspi->base[BSPI])) in bcm_qspi_probe()
1554 return PTR_ERR(qspi->base[BSPI]); in bcm_qspi_probe()
1560 dev_info(dev, "using %smspi mode\n", qspi->bspi_mode ? "bspi-" : ""); in bcm_qspi_probe()
1622 /* all mspi, bspi intrs muxed to one L1 intr */ in bcm_qspi_probe()
1701 bcm_qspi_read(qspi, BSPI, BSPI_STRAP_OVERRIDE_CTRL); in bcm_qspi_suspend()