From patchwork Wed Aug 31 11:00:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1115422 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7VB0ZON023798 for ; Wed, 31 Aug 2011 11:00:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754895Ab1HaLAe (ORCPT ); Wed, 31 Aug 2011 07:00:34 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:54383 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754745Ab1HaLAd (ORCPT ); Wed, 31 Aug 2011 07:00:33 -0400 Received: from localhost.localdomain (unknown [91.178.27.34]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B155A35AA7; Wed, 31 Aug 2011 11:00:32 +0000 (UTC) From: Laurent Pinchart To: linux-fbdev@vger.kernel.org Cc: linux-sh@vger.kernel.org, magnus.damm@gmail.com, dhobsong@igel.co.jp Subject: [PATCH v2 1/8] sh_mobile_meram: Reset ICBs at unregistration time Date: Wed, 31 Aug 2011 13:00:52 +0200 Message-Id: <1314788459-31791-2-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1314788459-31791-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1314788459-31791-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 31 Aug 2011 11:00:35 +0000 (UTC) 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 --- drivers/video/sh_mobile_meram.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/sh_mobile_meram.c b/drivers/video/sh_mobile_meram.c index f632970..4d63490 100644 --- a/drivers/video/sh_mobile_meram.c +++ b/drivers/video/sh_mobile_meram.c @@ -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; }