Message ID | 1342704684-4858-1-git-send-email-linux@prisktech.co.nz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thursday 19 July 2012, Tony Prisk wrote: > > Signed-off-by: Tony Prisk <linux@prisktech.co.nz> > --- > drivers/usb/host/ehci-vt8500.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) The addition is straightforward and looks correct, but I would suggest you also add the new "compatible" values to Documentation/devicetree/bindings/usb-ehci.txt Arnd
2012/7/19 Tony Prisk <linux@prisktech.co.nz>: > Signed-off-by: Tony Prisk <linux@prisktech.co.nz> > --- > drivers/usb/host/ehci-vt8500.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) Have you tried to use ehci-platform on VIA/WMT devices? If it works (which I would expect), I believe it's better to include OF support into ehci-platform and drop ehci-vt8500 completely after existing boards are converted to Device Tree. When writing ehci-vt8500, I mostly only copied stuff from the PCI version and made it initialize from the platform bus (nothing specific to vt8500). Thanks, Alexey
From: Alexey Charkov [alchark@gmail.com] Sent: 20 July 2012 02:45 To: vt8500-wm8505-linux-kernel@googlegroups.com Cc: Arnd Bergmann; linux-arm-kernel@lists.infradead.org; devicetree-discuss@lists.ozlabs.org; Tony Prisk Subject: Re: [PATCH 1/2] ARM: vt8500: Update vt8500-ehci driver to support device tree. 2012/7/19 Tony Prisk <linux@prisktech.co.nz>: > Signed-off-by: Tony Prisk <linux@prisktech.co.nz> > --- > drivers/usb/host/ehci-vt8500.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) Have you tried to use ehci-platform on VIA/WMT devices? If it works (which I would expect), I believe it's better to include OF support into ehci-platform and drop ehci-vt8500 completely after existing boards are converted to Device Tree. When writing ehci-vt8500, I mostly only copied stuff from the PCI version and made it initialize from the platform bus (nothing specific to vt8500). Thanks, Alexey ----- Alexey, The biggest problem I have at the moment is that its very hard to test anything as I only have a WM8650 which isn't supported in mainline. I think I have a local copy of 'our' repo on my laptop - If I do, I'll try changing the platform_device to use ehci_platform and see if it works. Arnd, There isn't any reason why it couldn't be uhci_of. I was simply trying to preserve our existing platform support without having to introduce more patches for the board files. The existing uhci-grlib is probably a better candidate though as I noticed its been updated to support OF since I wrote this driver, and this driver is based off that one. Regards Tony P
From: Alexey Charkov [alchark@gmail.com] Sent: 20 July 2012 02:45 To: vt8500-wm8505-linux-kernel@googlegroups.com Cc: Arnd Bergmann; linux-arm-kernel@lists.infradead.org; devicetree-discuss@lists.ozlabs.org; Tony Prisk Subject: Re: [PATCH 1/2] ARM: vt8500: Update vt8500-ehci driver to support device tree. 2012/7/19 Tony Prisk <linux@prisktech.co.nz>: > Signed-off-by: Tony Prisk <linux@prisktech.co.nz> > --- > drivers/usb/host/ehci-vt8500.c | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) Have you tried to use ehci-platform on VIA/WMT devices? If it works (which I would expect), I believe it's better to include OF support into ehci-platform and drop ehci-vt8500 completely after existing boards are converted to Device Tree. When writing ehci-vt8500, I mostly only copied stuff from the PCI version and made it initialize from the platform bus (nothing specific to vt8500). Thanks, Alexey ----- The ehci-platform device requires platform_data be passed at probe. While its generic enought , it puts requirements on the device-tree to setup the private data, which would be messy to get approved I suspect. Regards Tony P
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 <linux/of.h> #include <linux/platform_device.h> 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);
Signed-off-by: Tony Prisk <linux@prisktech.co.nz> --- drivers/usb/host/ehci-vt8500.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)