RE: [RFC PATCH] usb: dwc2: Use platform endianness when accessing registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Antti Seppälä [mailto:a.seppala@xxxxxxxxx]
> 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.seppala@xxxxxxxxx>
> Signed-off-by: Vincent Pelletier <plr.vincent@xxxxxxxxx>
> ---

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


��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux