From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f173.google.com (mail-pf1-f173.google.com [209.85.210.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AC6B3F54A0 for ; Mon, 13 Jul 2026 12:22:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783945340; cv=none; b=Dax8J49/kKJwN5VRz5G2ODtH4g1oQ4nyCxuXgleQkMfXOqvfutYCyaNA2OptUGKyIwF7t50+biPrhgyafXwZM4WKhx6GJu1ZsU3+ru1DIvZT9bykgM/5ufs3FGP6otv1Fx15VGUF+sgWrn2vwjc9eyZ0RBQjfpapv1XM1o1lM18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783945340; c=relaxed/simple; bh=i9revy8VLWe78K5LwwdNyDtoNiNQUm0Tl8IJOkz5m7M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EfQ0b9oR8VdAiWgzjBVZ3MpDaz1t3MHAf0KS+MYnwGhQL+xmfJbxBIzcLs3kxxa9PTEyMsh7KfLsH6S9RRa1c9a4l+0xc+JGGQQDBAGv3rtRgk2C5LYfV4DbjYaBvkUrYcKhjUaADEXgrV4wB4Qh2m0+z9tOHtjfIOwRUID6w0c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thingy.jp; spf=pass smtp.mailfrom=0x0f.com; dkim=pass (1024-bit key) header.d=thingy.jp header.i=@thingy.jp header.b=aB5LYk2W; arc=none smtp.client-ip=209.85.210.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thingy.jp Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0x0f.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=thingy.jp header.i=@thingy.jp header.b="aB5LYk2W" Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-848882fdb18so2175352b3a.0 for ; Mon, 13 Jul 2026 05:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thingy.jp; s=google; t=1783945337; x=1784550137; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=9c9AJztkG4yGnpdMUHH4Rn3KSbRLamlzTpskyxVmLgU=; b=aB5LYk2WGNReKmF2qBfiJIJ2pG4Vqw4cB9Y9v6xYnkPQlsDNpX0RRQoVSQyNd3Ue0K SFA+1QbV1pTgogfBjO/LTQ9/82sgEcIuVbWmEO5HaAzQu0FlQzZ/pviUDVtiZbWEuKiO swZheZeY/xM1K5dRCQIUGx3Og/hCKGvJygZ5c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783945337; x=1784550137; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9c9AJztkG4yGnpdMUHH4Rn3KSbRLamlzTpskyxVmLgU=; b=I0JJfVA2/PUhY926Ibi99XBQlWZxalh4fFQSgtoJll7eYPgq+PnPfxT34vFHgRrG02 ZspeP6ohGQ8IWf9Y7su/u2S2rVLiqG9d88a3wHreugkFNBYejJhg5sBtJ+TU3n36HD/o vV8m0IM+vYYALDzU4fni3AHZ3FCiQhBcoDZnFYVbnRWOP7iUEorVXGoqq1ZMmTiSbiJD uZNaEEzFezMp0286+ik1Rkq23ObAzcrPcDoxt8ORR3bajjMRsEDQ89+VGcUTEpropB8w YW5J5w9G6pULPKYpWLFmPNxjehGskJSepy3eXDxzgbAcDKZbnUBApcWRqJzWSPWDYDlp DJTg== X-Forwarded-Encrypted: i=1; AHgh+Ro9HLwF+ppYIG9vBEiKZ1nZIV2S0pQ+KAJJ5AdLBUAzbcYJtscE+CbBY/UsYhLW/VmQvauKi59i/pehmTE=@vger.kernel.org X-Gm-Message-State: AOJu0YztBzjl+ujbpuDke3qps2redc+hYtiMXDPItHqKXlBBel56vjup nlmVYIMaoQn2mzIbSTOPSKoTxB2uDSwCdJElApe8uCmSHSQOn1ta3WHduFNmMr9TA7Y= X-Gm-Gg: AfdE7cmkze9IVfcljLAoFUN+4KaCMwaPbxhNldSetzzkKlKX+yu5GWMS7ilU57uXjMn EtvCZqdc9pNtnh6zX2xj3sAiShE+t2bg7mVOYVmqROtLGmGz5uFc+HkdlYuinY/snPz5vh1rF2f VO5D64bMhv3/hnPx8bpUn3s2lZuDtWjzNTuyzvgdocYvCPyHJsDzMVN1VbDbEw6BMUG2FX2+MTn 7DXBDEFjwUKF+zGRqQUawGjxrgA8RIrbjf2Zx6p0Fxst0cqs3ExxeppGQqsEz48+uCojF5T3uo8 HWg8/WiXxZFyiaDzOCxFBkaF9yiDhO3XAk5T9URhGF1x/3HIUFV5LbCosdhYrgV/qznBnp/EYNr t3oYp3TYycKyIS3lTjdfGbDb1qJ8MS1dzKguVzl9XlqgcfMz/FO5WHJTJJE/uVKHWMkTTvzBhUe Gv75OShiAhPXRZc59eDC8SceQ6Ew== X-Received: by 2002:a05:6a00:3388:b0:848:420a:9cd5 with SMTP id d2e1a72fcca58-8488974a28amr8798261b3a.53.1783945337436; Mon, 13 Jul 2026 05:22:17 -0700 (PDT) Received: from kinako.work.home.arpa ([2400:4162:2428:2ffe:a973:53e4:1a28:8545]) by smtp.googlemail.com with ESMTPSA id 41be03b00d2f7-ca5b3b251eesm8126216a12.31.2026.07.13.05.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2026 05:22:16 -0700 (PDT) From: Daniel Palmer 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 Subject: [RFC PATCH 0/2] usb: ehci: Allow ehci accessors to be overridden. Date: Mon, 13 Jul 2026 21:22:03 +0900 Message-ID: <20260713122205.1350933-1-daniel@thingy.jp> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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