From patchwork Wed Sep 7 00:49:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vikram pandita X-Patchwork-Id: 1127072 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p870o97g029437 for ; Wed, 7 Sep 2011 00:50:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752208Ab1IGAty (ORCPT ); Tue, 6 Sep 2011 20:49:54 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:42623 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751876Ab1IGAtv (ORCPT ); Tue, 6 Sep 2011 20:49:51 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p870npUv015264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Sep 2011 19:49:51 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p870npC4008646; Tue, 6 Sep 2011 19:49:51 -0500 (CDT) Received: from DLEE74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p870npUX025955; Tue, 6 Sep 2011 19:49:51 -0500 (CDT) Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Tue, 6 Sep 2011 19:49:50 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id p870no9j013603; Tue, 6 Sep 2011 19:49:50 -0500 Received: from localhost (aeolius.am.dhcp.ti.com [146.252.42.223]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p870no005444; Tue, 6 Sep 2011 19:49:50 -0500 (CDT) From: Vikram Pandita To: CC: , , Vikram Pandita , Anand Gadiyar Subject: [PATCH 1/2] usb: musb: omap2+: fix context api's Date: Tue, 6 Sep 2011 17:49:32 -0700 Message-ID: <1315356573-1057-2-git-send-email-vikram.pandita@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1315356573-1057-1-git-send-email-vikram.pandita@ti.com> References: <1315356573-1057-1-git-send-email-vikram.pandita@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 07 Sep 2011 00:50:11 +0000 (UTC) From: Vikram Pandita RxFifoSz, TxFifoSz, RxFifoAddr, TxFifoAddr are all indexed registers. So before doing a context save or restore, INDEX register should be set, then only one gets to the right register offset. Change-Id: I33ab09f8c214457914ee848e097880c8800de9e6 Signed-off-by: Vikram Pandita Signed-off-by: Anand Gadiyar --- drivers/usb/musb/musb_core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 20a2873..83facaf 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2158,7 +2158,7 @@ static void musb_save_context(struct musb *musb) epio = hw_ep->regs; if (!epio) continue; - + musb_writeb(musb_base, MUSB_INDEX, i); musb->context.index_regs[i].txmaxp = musb_readw(epio, MUSB_TXMAXP); musb->context.index_regs[i].txcsr = @@ -2233,7 +2233,7 @@ static void musb_restore_context(struct musb *musb) epio = hw_ep->regs; if (!epio) continue; - + musb_writeb(musb_base, MUSB_INDEX, i); musb_writew(epio, MUSB_TXMAXP, musb->context.index_regs[i].txmaxp); musb_writew(epio, MUSB_TXCSR,