[PATCH/RFC 3/8] of: Add helper function to check MMIO register endianness

2014-11-12 Thread Kevin Cernekee
SoC peripherals can come in several different flavors: - little-endian: registers always need to be accessed in LE mode (so the kernel should perform a swap if the CPU is running BE) - big-endian: registers always need to be accessed in BE mode (so the kernel should perform a swap if the

Re: [PATCH/RFC 3/8] of: Add helper function to check MMIO register endianness

2014-11-12 Thread Jiri Slaby
On 11/12/2014, 09:46 AM, Kevin Cernekee wrote: SoC peripherals can come in several different flavors: - little-endian: registers always need to be accessed in LE mode (so the kernel should perform a swap if the CPU is running BE) - big-endian: registers always need to be accessed in

Re: [PATCH/RFC 3/8] of: Add helper function to check MMIO register endianness

2014-11-12 Thread Kevin Cernekee
On Wed, Nov 12, 2014 at 12:50 AM, Jiri Slaby jsl...@suse.cz wrote: /** + * of_device_is_big_endian - check if a device has BE registers + * + * @device: Node to check for availability Oops, just noticed a copy/paste error here. + * + * Returns 1 if the device has a big-endian property,

Re: [PATCH/RFC 3/8] of: Add helper function to check MMIO register endianness

2014-11-12 Thread Jiri Slaby
On 11/12/2014, 10:04 AM, Kevin Cernekee wrote: This should actually return bool and use true/false. Well, the other APIs currently return an int: extern int of_device_is_compatible(const struct device_node *device, const char *); extern int