Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Hannes Schmelzer's avatar
    c0eaffa0
    spi: omap3: fix claim/release bus within DM · c0eaffa0
    Hannes Schmelzer authored
    
    The claim/release bus function must not reset the whole SPI core because
    settings regarding wordlen, clock-frequency and so on made by
    set_wordlen, set_mode, set_speed get lost with this action. Resulting in
    a non-functional SPI.
    
    Without DM the failure didn't came up since after the spi_reset within
    claim bus all the setup (wordlen, mode, ...) was called, in DM they are
    called by the spi uclass.
    
    We change now the things as following for having a working SPI instance
    in DM:
    
    - move the spi_reset(...) to the probe call in DM for having a known
    hardware state after probe. Without DM we don't have a probe call, so we
    issue the reset as before during the claim_bus call.
    
    - in release bus we just reset the modulctrl to the reset-value (spi-
    slave)
    
    Signed-off-by: default avatarHannes Schmelzer <oe5hpm@oevsv.at>
    Reviewed-by: default avatarJagan Teki <jagan@openedev.com>
    c0eaffa0
    History
    spi: omap3: fix claim/release bus within DM
    Hannes Schmelzer authored
    
    The claim/release bus function must not reset the whole SPI core because
    settings regarding wordlen, clock-frequency and so on made by
    set_wordlen, set_mode, set_speed get lost with this action. Resulting in
    a non-functional SPI.
    
    Without DM the failure didn't came up since after the spi_reset within
    claim bus all the setup (wordlen, mode, ...) was called, in DM they are
    called by the spi uclass.
    
    We change now the things as following for having a working SPI instance
    in DM:
    
    - move the spi_reset(...) to the probe call in DM for having a known
    hardware state after probe. Without DM we don't have a probe call, so we
    issue the reset as before during the claim_bus call.
    
    - in release bus we just reset the modulctrl to the reset-value (spi-
    slave)
    
    Signed-off-by: default avatarHannes Schmelzer <oe5hpm@oevsv.at>
    Reviewed-by: default avatarJagan Teki <jagan@openedev.com>