Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Stephen Warren's avatar
    981b14f0
    i2c: tegra: write clean data to TX FIFO · 981b14f0
    Stephen Warren authored
    
    The Tegra I2C controller's TX FIFO contains 32-bit words. If the final
    FIFO entry of a transaction contains fewer than 4 bytes, the driver
    currently fills the unused FIFO bytes with uninitialized data. This can
    be confusing when reading back the FIFO content for debugging purposes.
    
    Solve this by explicitly initializing the variable containing FIFO data
    before filling it (partially) with data. With this change,
    send_recv_packets()'s loop's if (is_write) code mirrors the else (i.e.
    read) branch.
    
    Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
    Reviewed-by: default avatarYen Lin <yelin@nvidia.com>
    981b14f0
    History
    i2c: tegra: write clean data to TX FIFO
    Stephen Warren authored
    
    The Tegra I2C controller's TX FIFO contains 32-bit words. If the final
    FIFO entry of a transaction contains fewer than 4 bytes, the driver
    currently fills the unused FIFO bytes with uninitialized data. This can
    be confusing when reading back the FIFO content for debugging purposes.
    
    Solve this by explicitly initializing the variable containing FIFO data
    before filling it (partially) with data. With this change,
    send_recv_packets()'s loop's if (is_write) code mirrors the else (i.e.
    read) branch.
    
    Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
    Reviewed-by: default avatarYen Lin <yelin@nvidia.com>