On Thu, Jul 26, 2018 at 5:01 PM, Gevorg Sahakyan
<[email protected]> 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() ?
--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html