Linux does not support this. You can use byte-swapping instructions (e.g. lwbrx, stwbrx).
If this is a kernel driver, use swapping functions like cpu_to_be32() and be32_to_cpu(). If it's a powerpc-specific kernel driver, functions such as ld_le32() and st_le32() are available to use the byte-swapping instructions, but these do not appear to be supported on any other architecture.