ar71xx: Add QCA955X GPIO mux and function definitions
[openwrt.git] / target / linux / ar71xx / patches-4.1 / 464-spi-ath79-fix-fast-flash-read.patch
1 --- a/drivers/mtd/devices/m25p80.c
2 +++ b/drivers/mtd/devices/m25p80.c
3 @@ -137,6 +137,9 @@ static int m25p80_read(struct spi_nor *n
4         flash->command[0] = nor->read_opcode;
5         m25p_addr2cmd(nor, from, flash->command);
6  
7 +       if (dummy == 1)
8 +               t[0].dummy = true;
9 +
10         t[0].type = SPI_TRANSFER_FLASH_READ_CMD;
11         t[0].tx_buf = flash->command;
12         t[0].len = m25p_cmdsz(nor) + dummy;
13 --- a/drivers/spi/spi-ath79.c
14 +++ b/drivers/spi/spi-ath79.c
15 @@ -260,6 +260,10 @@ static int ath79_spi_do_read_flash_cmd(s
16         sp->read_addr = 0;
17  
18         len = t->len - 1;
19 +
20 +       if (t->dummy)
21 +               len -= 1;
22 +
23         p = t->tx_buf;
24  
25         while (len--) {
26 --- a/include/linux/spi/spi.h
27 +++ b/include/linux/spi/spi.h
28 @@ -633,6 +633,7 @@ struct spi_transfer {
29         u16             delay_usecs;
30         u32             speed_hz;
31         enum spi_transfer_type type;
32 +       bool dummy;
33  
34         struct list_head transfer_list;
35  };