Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion drivers/spi/sunxi_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,11 @@ static int sunxi_spi_xfer(struct udevice *dev, unsigned int bitlen,
sunxi_spi_cs_activate(dev, slave_plat->cs);

while (len) {
nbytes = min(len, (size_t)64 - 1);
nbytes = min(len, (size_t) 64);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I am aware this doesn't work for SPI2 on the A10 (see drivers/spi/spi-sun4i.c in the Linux kernel source).


writel(SUNXI_SPI_BURST_CNT(nbytes), &priv->regs->burst_cnt);
sunxi_spi_write(dev, tx_buf, nbytes);
tx_buf += nbytes;
setbits_le32(&priv->regs->xfer_ctl, SUNXI_SPI_CTL_XCH);

while (((readl(&priv->regs->fifo_sta) &
Expand Down