From: Tirumala Marri <tmarri@apm.com>
To: Paul Zimmerman <Paul.Zimmerman@synopsys.com>
Cc: greg@kroah.com, linux-usb@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: RE: [PATCH v14 03/10] USB/ppc4xx: Add Synopsys DWC OTG Core Interface Layer (CIL)
Date: Fri, 14 Oct 2011 11:14:22 -0700 [thread overview]
Message-ID: <9fa903c8656e99d5ad8844f4c8390634@mail.gmail.com> (raw)
In-Reply-To: <F6C4814A9B336243ABC3D1FB44E08AE801D2B2FEF4@US01WXMBX1.internal.synopsys.com>
<> +void dwc_otg_enable_global_interrupts(struct core_if *core_if)
<> +{
<> + u32 ahbcfg = 0;
<> +
<> + ahbcfg |= DWC_AHBCFG_GLBL_INT_MASK;
<> + dwc_reg_modify(core_if->core_global_regs, DWC_GAHBCFG, 0,
<> + ahbcfg);
<
<What is the point of initializing the variable to 0, and then
<immediately
<ORing it with a value? Why not just:
<
< u32 ahbcfg = DWC_AHBCFG_GLBL_INT_MASK;
<
< dwc_reg_modify(core_if->core_global_regs, DWC_GAHBCFG,
< ahbcfg, 0);
<
<or even simpler:
<
< dwc_reg_modify(core_if->core_global_regs, DWC_GAHBCFG,
< DWC_AHBCFG_GLBL_INT_MASK, 0);
<
<? Same for other places in this file.
[Tirumala Marri] I can definitely change this at some places.
This had to do because there was suggestion modify the API to accept
The offset. It happened to be some of the accesses doesn't have offsets.
<
<> +/**
<> + * Tests if the current hardware is using a full speed phy.
<> + */
<> +static inline int full_speed_phy(struct core_if *core_if)
<> +{
<> + if ((DWC_HWCFG2_FS_PHY_TYPE_RD(core_if->hwcfg2) == 2 &&
<> + DWC_HWCFG2_FS_PHY_TYPE_RD(core_if->hwcfg2) == 1 &&
<
<Surely this is a typo? You are checking the same variable for containing
<two different values at the same time. From looking at similar code in
<the dwc_otg_core_init() function, I think you meant to write:
[Tirumala Marri] Will correct
next parent reply other threads:[~2011-10-14 18:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <F6C4814A9B336243ABC3D1FB44E08AE801D2B2FEF4@US01WXMBX1.internal.synopsys.com>
2011-10-14 18:14 ` Tirumala Marri [this message]
2011-10-07 2:30 [PATCH v14 03/10] USB/ppc4xx: Add Synopsys DWC OTG Core Interface Layer (CIL) tmarri
2011-10-20 9:12 ` Pratyush Anand
2011-11-09 18:02 ` Tirumala Marri
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=9fa903c8656e99d5ad8844f4c8390634@mail.gmail.com \
--to=tmarri@apm.com \
--cc=Paul.Zimmerman@synopsys.com \
--cc=greg@kroah.com \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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).