diff options
Diffstat (limited to 'sys/dev/flash/flexspi/flex_spi.c')
-rw-r--r-- | sys/dev/flash/flexspi/flex_spi.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sys/dev/flash/flexspi/flex_spi.c b/sys/dev/flash/flexspi/flex_spi.c index 766a1cfaa332..44246f4b1c2d 100644 --- a/sys/dev/flash/flexspi/flex_spi.c +++ b/sys/dev/flash/flexspi/flex_spi.c @@ -329,20 +329,20 @@ flex_spi_write_txfifo(struct flex_spi_softc *sc, uint8_t *buf, uint8_t size) int i, ret, reg; /* invalid the TXFIFO */ - write_reg(sc, FSPI_IPRXFCR, FSPI_IPTXFCR_CLR); + write_reg(sc, FSPI_IPTXFCR, FSPI_IPTXFCR_CLR); /* * Default value of water mark level is 8 bytes, hence in single * read request controller can read max 8 bytes of data. */ for (i = 0; i < size; i += 4) { - /* Wait for RXFIFO available */ + /* Wait for TXFIFO available */ if (i % 8 == 0) { ret = reg_read_poll_tout(sc, FSPI_INTR, FSPI_INTR_IPTXWE, 1, 50000, 1); if (ret) device_printf(sc->dev, - "timed out waiting for FSPI_INTR_IPRXWA\n"); + "timed out waiting for FSPI_INTR_IPTXWE\n"); } if (size >= (i + 4)) @@ -781,12 +781,6 @@ flex_spi_attach(device_t dev) } sc->buf = malloc(sc->erasesize, SECTOR_BUFFER, M_WAITOK); - if (sc->buf == NULL) { - device_printf(sc->dev, "Unable to set up allocate internal buffer\n"); - flex_spi_detach(dev); - return (ENOMEM); - } - /* Move it to per-flash */ sc->disk = disk_alloc(); sc->disk->d_open = flex_spi_open; |