From patchwork Fri Jul 20 12:29:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Prisk X-Patchwork-Id: 1220691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 5BCECE0038 for ; Fri, 20 Jul 2012 12:34:33 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SsCLJ-0000Kx-F3; Fri, 20 Jul 2012 12:30:01 +0000 Received: from mta06.xtra.co.nz ([210.54.141.249] helo=mta03.xtra.co.nz) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SsCLD-0000KV-77 for linux-arm-kernel@lists.infradead.org; Fri, 20 Jul 2012 12:29:56 +0000 Received: from debian6.prisktech.co.nz ([115.188.14.127]) by mta03.xtra.co.nz with ESMTP id <20120720122946.UIRS22346.mta03.xtra.co.nz@debian6.prisktech.co.nz>; Sat, 21 Jul 2012 00:29:46 +1200 From: Tony Prisk To: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, vt8500-wm8505-linux-kernel@googlegroups.com Subject: [PATCHv2 1/2] ARM: vt8500: Update vt8500-ehci driver to support device tree. Date: Sat, 21 Jul 2012 00:29:32 +1200 Message-Id: <1342787373-2230-1-git-send-email-linux@prisktech.co.nz> X-Mailer: git-send-email 1.7.2.5 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.54.141.249 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Tony Prisk X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Signed-off-by: Tony Prisk --- .../devicetree/bindings/usb/vt8500-ehci.txt | 10 ++++++++++ drivers/usb/host/ehci-vt8500.c | 9 +++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/usb/vt8500-ehci.txt diff --git a/Documentation/devicetree/bindings/usb/vt8500-ehci.txt b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt new file mode 100644 index 0000000..74f75c6 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/vt8500-ehci.txt @@ -0,0 +1,10 @@ +VIA VT8500 and Wondermedia WM8xxx SoC USB controllers. + +Required properties: + - compatible: Should be "via,vt8500-ehci" or "wm,prizm-ehci". + +usb: ehci@D8007100 { + compatible = "wm,prizm-ehci", "usb-ehci"; + reg = <0xD8007100 0x200>; + interrupts = <1>; +}; diff --git a/drivers/usb/host/ehci-vt8500.c b/drivers/usb/host/ehci-vt8500.c index c1eda73..4ba8f0c 100644 --- a/drivers/usb/host/ehci-vt8500.c +++ b/drivers/usb/host/ehci-vt8500.c @@ -16,6 +16,7 @@ * */ +#include #include static int ehci_update_device(struct usb_hcd *hcd, struct usb_device *udev) @@ -162,6 +163,12 @@ static int vt8500_ehci_drv_remove(struct platform_device *pdev) return 0; } +static const struct of_device_id vt8500_ehci_ids[] = { + { .compatible = "via,vt8500-ehci", }, + { .compatible = "wm,prizm-ehci", }, + {} +}; + static struct platform_driver vt8500_ehci_driver = { .probe = vt8500_ehci_drv_probe, .remove = vt8500_ehci_drv_remove, @@ -169,7 +176,9 @@ static struct platform_driver vt8500_ehci_driver = { .driver = { .name = "vt8500-ehci", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(vt8500_ehci_ids), } }; MODULE_ALIAS("platform:vt8500-ehci"); +MODULE_DEVICE_TABLE(of, vt8500_ehci_ids);