usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.
PATCH v2 3/3 usb: dwc2: Make dwc2_readl/writel functions endianness-agnostic.
Quoted 7 lines · Andy Shevchenko
Quoted 4 lines · Gevorg Sahakyan
Declared
dwc2_check_core_endianness()function for dynamicly check core endianness.
Addedneeds_byte_swapflag to hsotg structure, and depending on flag swap value inside dwc2_readl/writel functions.
Quoted 8 lines
Review
Quoted 6 lines
(quoted diff) +6
-0+#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.