> From: Antti Seppälä [mailto:a.sepp...@gmail.com]
> Sent: Wednesday, January 21, 2015 10:28 AM
> 
> This patch switches calls to readl/writel to their
> __raw_readl/__raw_writel equivalents which preserve platform endianness.
> 
> This patch is necessary to access dwc2 registers correctly on big endian
> systems such as mips. Then dwc2 can be used to replace ifx-hcd driver
> for lantiq platform found e.g. in OpenWrt.
> 
> The patch was autogenerated with the following commands:
> sed -i "s/\<readl\>/__raw_readl/g" *.c hcd.h hw.h
> sed -i "s/\<writel\>/__raw_writel/g" *.c hcd.h hw.h
> 
> Some files were then hand-edited to fix checkpatch.pl warning about
> too long lines.
> 
> Signed-off-by: Antti Seppälä <a.sepp...@gmail.com>
> Signed-off-by: Vincent Pelletier <plr.vinc...@gmail.com>
> ---

Having the __raw functions everywhere is not pretty and probably not a
good idea either.

I would rather have a dwc2_writel/dwc2_readl (like in dwc3), and we
can figure out what needs to happen in there to support your platform.

As for readl/writel or the __raw equivalents, I am not sure. I haven't
run the in-kernel driver on a big endian system so I don't know what
the issue is. But I suspect there may be consequences to other
platforms if we simply change this to __raw_readl/__raw_writel.

Does anyone have feedback on this?

Thanks,
John


Reply via email to