On 27 August 2015 at 20:39, Li Leo <LeoLi@xxxxxxxxxxxxx> wrote: >> > Or Maybe there is another method, use conditional compilation. The previous >> method would delete the MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER to >> use accessors defined in sdhci-esdhc.h, and add dependency of ARM. This >> method could use 'select <accessors> if <ARCH>' to compile LE or BE accessors >> according ARCH. >> >> I don't really follow your suggestion. >> >> Isn't the problem that you need the >> MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER for configurations and for >> some you don't? More precisely, for those where you don't you would >> rather just use the regulator ioread* functions since those will >> internally deal with the endianess in runtime? >> >> If you can make these decisions at compile time an depending of the >> ARCH - I believe I would be fine with that as well. > > I know it is a little bit weird. But the endian of the peripheral device is not always consistent with the type/endian of the core. Yes got it. So it seems relying on the ARCH in compile time isn't going to be a long term solution. Then it's better to have a default mode and then via DT be able to change that, right? As you suggested above. Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html