Linux USB
 help / color / mirror / Atom feed
From: Daniel Palmer <daniel@thingy.jp>
To: peter.chen@kernel.org, gregkh@linuxfoundation.org,
	stern@rowland.harvard.edu
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Daniel Palmer <daniel@thingy.jp>
Subject: [RFC PATCH 0/2] usb: ehci: Allow ehci accessors to be overridden.
Date: Mon, 13 Jul 2026 21:22:03 +0900	[thread overview]
Message-ID: <20260713122205.1350933-1-daniel@thingy.jp> (raw)

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(-)

-- 
2.53.0


             reply	other threads:[~2026-07-13 12:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 12:22 Daniel Palmer [this message]
2026-07-13 12:22 ` [RFC PATCH 1/2] usb: ehci: Add option to override ehci_readl()/ehci_writel() Daniel Palmer
2026-07-13 14:21   ` Alan Stern
2026-07-13 14:37     ` Daniel Palmer
2026-07-13 14:45       ` Alan Stern
2026-07-13 15:07         ` Daniel Palmer
2026-07-13 16:18           ` Alan Stern
2026-07-13 12:22 ` [RFC PATCH 2/2] usb: chipidea: use the generic ehci_writel override for i.MX28 Daniel Palmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260713122205.1350933-1-daniel@thingy.jp \
    --to=daniel@thingy.jp \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox