Skip to content
  • Chin Liang See's avatar
    spi: cadence_qspi_apb: Ensure baudrate doesn't exceed max value · 5405817a
    Chin Liang See authored
    
    
    Ensuring the baudrate divisor value doesn't exceed the max value
    in the calculation.It will be capped at max value to ensure the
    correct value being written into the register.
    
    Example of the existing bug is when calculated div = 16. After and
    with the mask, the value written to register is actually 0 (register
    field for baudrate divisor). With this fix, the value written is now
    15 which is max value for baudrate divisor.
    
    Signed-off-by: default avatarChin Liang See <clsee@altera.com>
    Cc: Marek Vasut <marex@denx.de>
    Cc: Jagan Teki <jteki@openedev.com>
    Cc: Dinh Nguyen <dinguyen@altera.com>
    5405817a