Skip to content

Commit

Permalink
sh_mobile_meram: Reset ICBs at unregistration time
Browse files Browse the repository at this point in the history
When ICBs are unregistered and later reused they need to be reset to
avoid data corruption. Set the WBF, WF and RF bits to make sure ICBs get
reset properly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
  • Loading branch information
Laurent Pinchart authored and Florian Tobias Schandinat committed Sep 5, 2011
1 parent 3c8a63e commit da6cf51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/video/sh_mobile_meram.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,10 @@ static void meram_deinit(struct sh_mobile_meram_priv *priv,
struct sh_mobile_meram_icb *icb)
{
/* disable ICB */
meram_write_icb(priv->base, icb->cache_icb, MExxCTL, 0);
meram_write_icb(priv->base, icb->marker_icb, MExxCTL, 0);
meram_write_icb(priv->base, icb->cache_icb, MExxCTL,
MExxCTL_WBF | MExxCTL_WF | MExxCTL_RF);
meram_write_icb(priv->base, icb->marker_icb, MExxCTL,
MExxCTL_WBF | MExxCTL_WF | MExxCTL_RF);
icb->cache_unit = 0;
}

Expand Down

0 comments on commit da6cf51

Please sign in to comment.