linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Gevorg Sahakyan <Gevorg.Sahakyan@synopsys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
	USB <linux-usb@vger.kernel.org>,
	John Youn <John.Youn@synopsys.com>
Subject: [v2,3/3] usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.
Date: Fri, 27 Jul 2018 10:05:32 +0300	[thread overview]
Message-ID: <87muudyx8j.fsf@linux.intel.com> (raw)

Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Thu, Jul 26, 2018 at 5:01 PM, Gevorg Sahakyan
> <Gevorg.Sahakyan@synopsys.com> wrote:
>> Declared dwc2_check_core_endianness() function for dynamicly check
>> core endianness.
>> Added needs_byte_swap flag to hsotg structure, and depending on
>> flag swap value inside dwc2_readl/writel functions.
>
>> +#define swap32(x) (\
>> +       {typeof(x) x_ = (x); \
>> +       (((u32)(x_) << 24) & (u32)0xFF000000) | \
>> +       (((u32)(x_) <<  8) & (u32)0x00FF0000) | \
>> +       (((u32)(x_) >>  8) & (u32)0x0000FF00) | \
>> +       (((u32)(x_) >> 24) & (u32)0x000000FF); })
>
> What's wrong with swab32() ?

indeed. That's a reimplementation of swab32. Gevorg, care to fix this? I
have pushed patches 1 and 2.

BTW, make sure to send series as a series of patches where patches 2+
come as replies to patch 1. Your series are not showing up as threads.

             reply	other threads:[~2018-07-27  7:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  7:05 Felipe Balbi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-27 10:00 [v2,3/3] usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic Felipe Balbi
2018-07-27  8:41 Grigor Tovmasyan
2018-07-27  8:26 Gevorg Sahakyan
2018-07-27  8:19 Felipe Balbi
2018-07-27  8:19 Gevorg Sahakyan
2018-07-26 15:29 Andy Shevchenko
2018-07-26 14:01 Gevorg Sahakyan

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=87muudyx8j.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=Gevorg.Sahakyan@synopsys.com \
    --cc=John.Youn@synopsys.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.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).