On Fri, 28 Aug 2015 08:19:00 +0200 Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote: > On Fri, Aug 28, 2015 at 01:24:08AM +0300, Antony Pavlov wrote: > > + > > +#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO > > +#define ehci_big_endian_mmio(e) ((e)->big_endian_mmio) > > +#else > > +#define ehci_big_endian_mmio(e) 0 > > +#endif > > + > > +static inline void ehci_writel(const struct ehci_priv *ehci, > > + __u32 __iomem *regs, const unsigned int val) > > { > > - writel(val, regs); > > + if (IS_ENABLED(CONFIG_USB_EHCI_BIG_ENDIAN_MMIO)) { > > + ehci_big_endian_mmio(ehci) ? > > + iowrite32be(val, regs) : > > + writel(val, regs); > > + } else > > + writel(val, regs); > > } > > if (ehci_big_endian_mmio(ehci)) > iowrite32be(val, regs); > else > writel(val, regs); > > is enough. It looks you are right. :) I have just stealed this code from linux kernel. I have some suspicions on redundancy of this code but I didn't proposed any good solution. Thanks! -- Best regards, Antony Pavlov _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox