diff options
Diffstat (limited to 'kernel/drivers/spi/spi-sh-msiof.c')
-rw-r--r-- | kernel/drivers/spi/spi-sh-msiof.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/drivers/spi/spi-sh-msiof.c b/kernel/drivers/spi/spi-sh-msiof.c index a7934ab00..d22de4c8c 100644 --- a/kernel/drivers/spi/spi-sh-msiof.c +++ b/kernel/drivers/spi/spi-sh-msiof.c @@ -263,6 +263,9 @@ static void sh_msiof_spi_set_clk_regs(struct sh_msiof_spi_priv *p, for (k = 0; k < ARRAY_SIZE(sh_msiof_spi_div_table); k++) { brps = DIV_ROUND_UP(div, sh_msiof_spi_div_table[k].div); + /* SCR_BRDV_DIV_1 is valid only if BRPS is x 1/1 or x 1/2 */ + if (sh_msiof_spi_div_table[k].div == 1 && brps > 2) + continue; if (brps <= 32) /* max of brdv is 32 */ break; } |