.. | .. |
---|
8 | 8 | #define SDW_CADENCE_GSYNC_KHZ 4 /* 4 kHz */ |
---|
9 | 9 | #define SDW_CADENCE_GSYNC_HZ (SDW_CADENCE_GSYNC_KHZ * 1000) |
---|
10 | 10 | |
---|
| 11 | +/* |
---|
| 12 | + * The Cadence IP supports up to 32 entries in the FIFO, though implementations |
---|
| 13 | + * can configure the IP to have a smaller FIFO. |
---|
| 14 | + */ |
---|
| 15 | +#define CDNS_MCP_IP_MAX_CMD_LEN 32 |
---|
| 16 | + |
---|
11 | 17 | /** |
---|
12 | 18 | * struct sdw_cdns_pdi: PDI (Physical Data Interface) instance |
---|
13 | 19 | * |
---|
.. | .. |
---|
119 | 125 | struct sdw_bus bus; |
---|
120 | 126 | unsigned int instance; |
---|
121 | 127 | |
---|
122 | | - u32 response_buf[0x80]; |
---|
| 128 | + /* |
---|
| 129 | + * The datasheet says the RX FIFO AVAIL can be 2 entries more |
---|
| 130 | + * than the FIFO capacity, so allow for this. |
---|
| 131 | + */ |
---|
| 132 | + u32 response_buf[CDNS_MCP_IP_MAX_CMD_LEN + 2]; |
---|
| 133 | + |
---|
123 | 134 | struct completion tx_complete; |
---|
124 | 135 | struct sdw_defer *defer; |
---|
125 | 136 | |
---|