From: Pavankumar Kondeti <pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
davidb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org,
Anji jonnala <anjir-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Pavankumar Kondeti
<pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Subject: [PATCH V4 1/5] USB: gadget: Use Zero Interrupt Threshold Control for ci13xxx_msm
Date: Tue, 3 May 2011 10:43:49 +0530 [thread overview]
Message-ID: <1304399633-16120-2-git-send-email-pkondeti@codeaurora.org> (raw)
In-Reply-To: <1304399633-16120-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
From: Anji jonnala <anjir-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
ITC (Interrupt Threshold Control) field is to set the maximum rate at which
the device controller will issue interrupts. The maximum interrupt interval
is measured in micro frames. Valid values are 0, 1, 2, 4, 8, 16, 32, 64.
The default value is 8 micro frames. Set ITC to zero for MSM to gain
performance.
Signed-off-by: Anji jonnala <anjir-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Signed-off-by: Pavankumar Kondeti <pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
---
drivers/usb/gadget/ci13xxx_msm.c | 3 ++-
drivers/usb/gadget/ci13xxx_udc.c | 11 +++++++++++
drivers/usb/gadget/ci13xxx_udc.h | 3 +++
3 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/gadget/ci13xxx_msm.c b/drivers/usb/gadget/ci13xxx_msm.c
index 139ac94..aa8319b 100644
--- a/drivers/usb/gadget/ci13xxx_msm.c
+++ b/drivers/usb/gadget/ci13xxx_msm.c
@@ -64,7 +64,8 @@ static struct ci13xxx_udc_driver ci13xxx_msm_udc_driver = {
.flags = CI13XXX_REGS_SHARED |
CI13XXX_REQUIRE_TRANSCEIVER |
CI13XXX_PULLUP_ON_VBUS |
- CI13XXX_DISABLE_STREAMING,
+ CI13XXX_DISABLE_STREAMING |
+ CI13XXX_ZERO_ITC,
.notify_event = ci13xxx_msm_notify_event,
};
diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c
index e09178b..15857e0 100644
--- a/drivers/usb/gadget/ci13xxx_udc.c
+++ b/drivers/usb/gadget/ci13xxx_udc.c
@@ -318,6 +318,17 @@ static int hw_device_reset(struct ci13xxx *udc)
hw_cwrite(CAP_USBMODE, USBMODE_CM, USBMODE_CM_DEVICE);
hw_cwrite(CAP_USBMODE, USBMODE_SLOM, USBMODE_SLOM); /* HW >= 2.3 */
+ /*
+ * ITC (Interrupt Threshold Control) field is to set the maximum
+ * rate at which the device controller will issue interrupts.
+ * The maximum interrupt interval measured in micro frames.
+ * Valid values are 0, 1, 2, 4, 8, 16, 32, 64. The default value is
+ * 8 micro frames. If CPU can handle interrupts at faster rate, ITC
+ * can be set to lesser value to gain performance.
+ */
+ if (udc->udc_driver->flags & CI13XXX_ZERO_ITC)
+ hw_cwrite(CAP_USBCMD, USBCMD_ITC_MASK, USBCMD_ITC(0));
+
if (hw_cread(CAP_USBMODE, USBMODE_CM) != USBMODE_CM_DEVICE) {
pr_err("cannot enter in device mode");
pr_err("lpm = %i", hw_bank.lpm);
diff --git a/drivers/usb/gadget/ci13xxx_udc.h b/drivers/usb/gadget/ci13xxx_udc.h
index 2370777..a230325 100644
--- a/drivers/usb/gadget/ci13xxx_udc.h
+++ b/drivers/usb/gadget/ci13xxx_udc.h
@@ -108,6 +108,7 @@ struct ci13xxx_udc_driver {
#define CI13XXX_REQUIRE_TRANSCEIVER BIT(1)
#define CI13XXX_PULLUP_ON_VBUS BIT(2)
#define CI13XXX_DISABLE_STREAMING BIT(3)
+#define CI13XXX_ZERO_ITC BIT(4)
#define CI13XXX_CONTROLLER_RESET_EVENT 0
#define CI13XXX_CONTROLLER_STOPPED_EVENT 1
@@ -189,6 +190,8 @@ struct ci13xxx {
#define USBMODE_CM_HOST (0x03UL << 0)
#define USBMODE_SLOM BIT(3)
#define USBMODE_SDIS BIT(4)
+#define USBCMD_ITC(n) (n << 16) /* n = 0, 1, 2, 4, 8, 16, 32, 64 */
+#define USBCMD_ITC_MASK (0xFF << 16)
/* ENDPTCTRL */
#define ENDPTCTRL_RXS BIT(0)
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-05-03 5:13 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 8:01 [PATCH 1/5] USB: gadget: Use Zero Interrupt Threshold Control for ci13xxx_msm Pavankumar Kondeti
2011-04-28 8:01 ` [PATCH 2/5] USB: OTG: vote for dayatona fabric clock Pavankumar Kondeti
2011-04-28 8:01 ` [PATCH 3/5] USB: OTG: msm: Implement charger detection Pavankumar Kondeti
2011-04-28 8:01 ` [PATCH 4/5] USB: OTG: msm: Configure PHY Analog and Digital voltage domains Pavankumar Kondeti
2011-04-29 10:14 ` Sergei Shtylyov
2011-05-02 6:03 ` Pavan Kondeti
2011-04-28 8:01 ` [PATCH 5/5] USB: OTG: msm: Add PHY suspend support for MSM8960 Pavankumar Kondeti
2011-04-28 14:49 ` Sergei Shtylyov
2011-04-29 5:20 ` Pavan Kondeti
2011-04-28 12:18 ` [PATCH 1/5] USB: gadget: Use Zero Interrupt Threshold Control for ci13xxx_msm Sergei Shtylyov
2011-04-29 5:16 ` Pavan Kondeti
2011-04-29 5:22 ` Pavankumar Kondeti
2011-04-29 5:22 ` [PATCH 2/5] USB: OTG: vote for dayatona fabric clock Pavankumar Kondeti
[not found] ` <1304054532-3523-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-04-29 5:22 ` [PATCH 3/5] USB: OTG: msm: Implement charger detection Pavankumar Kondeti
2011-04-29 5:22 ` [PATCH 5/5] USB: OTG: msm: Add PHY suspend support for MSM8960 Pavankumar Kondeti
2011-04-29 5:22 ` [PATCH 4/5] USB: OTG: msm: Configure PHY Analog and Digital voltage domains Pavankumar Kondeti
2011-05-02 6:36 ` [PATCH V2 0/5] USB Charging, PHY init and suspend support for MSM8960 Pavankumar Kondeti
2011-05-02 6:36 ` [PATCH V2 1/5] USB: gadget: Use Zero Interrupt Threshold Control for ci13xxx_msm Pavankumar Kondeti
2011-05-02 6:36 ` [PATCH V2 2/5] USB: OTG: vote for dayatona fabric clock Pavankumar Kondeti
2011-05-02 6:36 ` [PATCH V2 3/5] USB: OTG: msm: Implement charger detection Pavankumar Kondeti
[not found] ` <1304318192-24374-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-02 6:36 ` [PATCH V2 4/5] USB: OTG: msm: Configure PHY Analog and Digital voltage domains Pavankumar Kondeti
2011-05-02 6:36 ` [PATCH V2 5/5] USB: OTG: msm: Add PHY suspend support for MSM8960 Pavankumar Kondeti
2011-05-02 12:22 ` Sergei Shtylyov
2011-05-03 5:01 ` Pavan Kondeti
[not found] ` <1303977693-18389-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-02 9:58 ` [PATCH V3 0/5] USB Charging, PHY init and " Pavankumar Kondeti
[not found] ` <1304330325-21982-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-02 9:58 ` [PATCH V3 1/5] USB: gadget: Use Zero Interrupt Threshold Control for ci13xxx_msm Pavankumar Kondeti
2011-05-02 9:58 ` [PATCH V3 2/5] USB: OTG: msm: vote for dayatona fabric clock Pavankumar Kondeti
2011-05-02 9:58 ` [PATCH V3 3/5] USB: OTG: msm: Implement charger detection Pavankumar Kondeti
2011-05-02 9:58 ` [PATCH V3 4/5] USB: OTG: msm: Configure PHY Analog and Digital voltage domains Pavankumar Kondeti
2011-05-02 9:58 ` [PATCH V3 5/5] USB: OTG: msm: Add PHY suspend support for MSM8960 Pavankumar Kondeti
2011-05-03 5:13 ` [PATCH V4 0/5] USB Charging, PHY init and " Pavankumar Kondeti
[not found] ` <1304399633-16120-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-03 5:13 ` Pavankumar Kondeti [this message]
2011-05-03 5:13 ` [PATCH V4 2/5] USB: OTG: msm: vote for dayatona fabric clock Pavankumar Kondeti
[not found] ` <1304399633-16120-3-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-03 11:14 ` Sergei Shtylyov
2011-05-03 12:29 ` Pavan Kondeti
2011-05-03 17:15 ` Greg KH
2011-05-04 4:48 ` Pavan Kondeti
2011-05-03 5:13 ` [PATCH V4 3/5] USB: OTG: msm: Implement charger detection Pavankumar Kondeti
2011-05-03 5:13 ` [PATCH V4 4/5] USB: OTG: msm: Configure PHY Analog and Digital voltage domains Pavankumar Kondeti
2011-05-03 5:13 ` [PATCH V4 5/5] USB: OTG: msm: Add PHY suspend support for MSM8960 Pavankumar Kondeti
2011-05-04 4:49 ` [PATCH V5 0/4] USB Charging, PHY init and " Pavankumar Kondeti
2011-05-04 4:49 ` [PATCH V5 1/4] USB: OTG: msm: vote for dayatona fabric clock Pavankumar Kondeti
2011-05-04 4:49 ` [PATCH V5 2/4] USB: OTG: msm: Implement charger detection Pavankumar Kondeti
[not found] ` <1304484589-17186-1-git-send-email-pkondeti-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-04 4:49 ` [PATCH V5 3/4] USB: OTG: msm: Configure PHY Analog and Digital voltage domains Pavankumar Kondeti
2011-05-04 4:49 ` [PATCH V5 4/4] USB: OTG: msm: Add PHY suspend support for MSM8960 Pavankumar Kondeti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304399633-16120-2-git-send-email-pkondeti@codeaurora.org \
--to=pkondeti-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=anjir-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=davidb-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sshtylyov-Igf4POYTYCDQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).