Skip to content

RFC usb: ehci: Allow ehci accessors to be overridden.

Daniel Palmer linux-usb lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usb: ehci: Add option to override ehci_readl()/ehci_writel()drivers/usb/host/Kconfig drivers/usb/host/ehci.h+19 -05 replies
2/2usb: chipidea: use the generic ehci_writel override for i.MX28drivers/usb/chipidea/Kconfig drivers/usb/chipidea/host.c drivers/usb/host/ehci.h+19 -182 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] usb: ehci: Allow ehci accessors to be overridden.

In the kernel tree at the moment there is a driver for fotg210. There was, I think, at some point a driver for the host only version of this too. With a few tweaks the host part can actually just use the ehci driver and a bunch of code can be dropped.

The weird ARM SoCs I have been trying to mainline have the host only version of this IP and have been running with a modified version of the normal ehci driver for years.

To use the ehci driver we need to be able to override the accessors for the registers, override the standard locations of a few of them and hardcode values for some things that are not needed.

Before I clean up and send the rest of this I wanted to show how I did the overriding of the accessors and how it cleans up the hack that is already in there. If this way of doing it is acceptable I'll clean up the whole thing and send it.

The benefit of this is that we should be able to drop one mangled copy of the ehci driver.

Daniel Palmer (2):
usb: ehci: Add option to override ehci_readl()/ehci_writel()
usb: chipidea: use the generic ehci_writel override for i.MX28

 drivers/usb/chipidea/Kconfig |  1 +
 drivers/usb/chipidea/host.c  | 17 ++++++++++++++++-
 drivers/usb/host/Kconfig     |  3 +++
 drivers/usb/host/ehci.h      | 31 ++++++++++++++++---------------
 4 files changed, 36 insertions(+), 16 deletions(-)
Signature · 1 line
2.53.0