* must contains the highest number of consecutive "pass"
* results and not span across multiple rows.
*/
-static u32 aspeed_spi_ast2600_optimized_timing(u32 rows, u32 cols,
- u8 buf[rows][cols])
+static u32 aspeed_spi_ast2600_optimized_timing(u32 rows, u32 cols, u8 *buf)
{
int r = 0, c = 0;
int max = 0;
for (j = 0; j < cols;) {
int k = j;
- while (k < cols && buf[i][k])
+ while (k < cols && buf[(i * cols) + k])
k++;
if (k - j > max) {
}
}
- calib_point = aspeed_spi_ast2600_optimized_timing(6, 17, calib_res);
+ calib_point = aspeed_spi_ast2600_optimized_timing(6, 17, &calib_res[0][0]);
/* No good setting for this frequency */
if (calib_point == 0)
return -1;