linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Nagarjuna Kristam <nkristam@nvidia.com>
Cc: gregkh@linuxfoundation.org, thierry.reding@gmail.com,
	jonathanh@nvidia.com, mark.rutland@arm.com, robh+dt@kernel.org,
	devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-usb@vger.kernel.org
Subject: Re: [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller
Date: Mon, 12 Aug 2019 15:49:09 +0300	[thread overview]
Message-ID: <871rxqtupm.fsf@gmail.com> (raw)
In-Reply-To: <1565613783.23705.49.camel@mhfsdcap03>

[-- Attachment #1: Type: text/plain, Size: 684 bytes --]


Hi,

Chunfeng Yun <chunfeng.yun@mediatek.com> writes:
>> +/* XUSB_DEV registers */
>> +#define SPARAM 0x000
>> +#define  SPARAM_ERSTMAX_SHIFT 16
>> +#define  SPARAM_ERSTMAX_MASK GENMASK(4, 0)
>> +#define DB 0x004
>> +#define  DB_TARGET_SHIFT 8
>> +#define  DB_TARGET_MASK GENMASK(7, 0)
>> +#define  DB_STREAMID_SHIFT 16
>> +#define  DB_STREAMID_MASK GENMASK(15, 0)
> To me, define it as :
> #define  DB_STREAMID_MASK GENMASK(31, 16),
> it's more clearer.
> and define another macro
> #define  DB_STREAMID(x) (((x) & 0xffff) << 16)

perhaps?

#define DB_STREAMID(x)	(((x) << 16) & DB_STREAMID_MASK)

Otherwise you end up defining the mask twice.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2019-08-12 12:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08  9:37 [Patch V6 0/8] Tegra XUSB gadget driver support Nagarjuna Kristam
2019-08-08  9:37 ` [Patch V6 1/8] phy: tegra: xusb: Add XUSB dual mode support on Tegra210 Nagarjuna Kristam
2019-08-08  9:37 ` [Patch V6 2/8] phy: tegra: xusb: Add usb3 port fake " Nagarjuna Kristam
2019-08-08  9:37 ` [Patch V6 3/8] phy: tegra: xusb: Add vbus override " Nagarjuna Kristam
2019-08-22  9:04   ` Thierry Reding
2019-08-08  9:37 ` [Patch V6 4/8] dt-bindings: usb: Add NVIDIA Tegra XUSB device mode controller binding Nagarjuna Kristam
2019-08-21 20:52   ` Rob Herring
2019-08-22  9:04   ` Thierry Reding
2019-08-08  9:37 ` [Patch V6 5/8] arm64: tegra: Add xudc node for Tegra210 Nagarjuna Kristam
2019-08-08  9:37 ` [Patch V6 6/8] arm64: tegra: Enable xudc on Jetson TX1 Nagarjuna Kristam
2019-08-08  9:37 ` [Patch V6 7/8] usb: gadget: Add UDC driver for tegra XUSB device mode controller Nagarjuna Kristam
2019-08-09 12:03   ` Felipe Balbi
2019-08-22 10:29     ` Nagarjuna Kristam
2019-08-09 14:28   ` kbuild test robot
2019-08-12 12:43   ` Chunfeng Yun
2019-08-12 12:49     ` Felipe Balbi [this message]
2019-08-12 13:00       ` Chunfeng Yun
2019-08-13 10:16     ` Nagarjuna Kristam
2019-08-22  9:12   ` Thierry Reding
2019-08-22 10:35     ` Nagarjuna Kristam
2019-08-08  9:37 ` [Patch V6 8/8] arm64: defconfig: Enable tegra XUDC driver Nagarjuna Kristam
2019-08-22  9:07 ` [Patch V6 0/8] Tegra XUSB gadget driver support Thierry Reding

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=871rxqtupm.fsf@gmail.com \
    --to=balbi@kernel.org \
    --cc=chunfeng.yun@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nkristam@nvidia.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    /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).