Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1577021 > unrolled thread
| Started by | Hans Ulli Kroll <ulli.kroll@googlemail.com> |
|---|---|
| First post | 2017-02-08 21:20 +0100 |
| Last post | 2017-02-10 14:30 +0100 |
| Articles | 8 — 5 participants |
Back to article view | Back to linux.kernel
[PATCH 0/3] usb: add device tree support for fotg2-hcd driver Hans Ulli Kroll <ulli.kroll@googlemail.com> - 2017-02-08 21:20 +0100
[PATCH 1/3] usb: host: fotg2: add devicetree probing Hans Ulli Kroll <ulli.kroll@googlemail.com> - 2017-02-08 21:40 +0100
Re: [PATCH 1/3] usb: host: fotg2: add devicetree probing kbuild test robot <lkp@intel.com> - 2017-02-09 05:30 +0100
[PATCH 1/3 v2] usb: host: fotg2: add device tree probing Hans Ulli Kroll <ulli.kroll@googlemail.com> - 2017-02-09 15:30 +0100
Re: [PATCH 1/3 v2] usb: host: fotg2: add device tree probing Linus Walleij <linus.walleij@linaro.org> - 2017-02-10 14:20 +0100
Re: [PATCH 1/3 v2] usb: host: fotg2: add device tree probing Arnd Bergmann <arnd@arndb.de> - 2017-02-10 21:30 +0100
Re: [PATCH 1/3 v2] usb: host: fotg2: add device tree probing Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-02-10 14:40 +0100
Re: [PATCH 0/3] usb: add device tree support for fotg2-hcd driver Linus Walleij <linus.walleij@linaro.org> - 2017-02-10 14:30 +0100
| From | Hans Ulli Kroll <ulli.kroll@googlemail.com> |
|---|---|
| Date | 2017-02-08 21:20 +0100 |
| Subject | [PATCH 0/3] usb: add device tree support for fotg2-hcd driver |
| Message-ID | <t8GSB-4S1-7@gated-at.bofh.it> |
Add device tree binding and DT driver support for fotg2-hcd controller The device is used on Gemini SoC. striped down dmesg fotg210_hcd: FOTG210 Host Controller (EHCI) Driver fotg210-hcd 68000000.usb: Faraday USB2.0 Host Controller fotg210-hcd 68000000.usb: new USB bus registered, assigned bus number 1 fotg210-hcd 68000000.usb: irq 27, io mem 0x68000000 fotg210-hcd 68000000.usb: USB 2.0 started, EHCI 1.00 hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected fotg210-hcd 69000000.usb: Faraday USB2.0 Host Controller fotg210-hcd 69000000.usb: new USB bus registered, assigned bus number 2 fotg210-hcd 69000000.usb: irq 28, io mem 0x69000000 fotg210-hcd 69000000.usb: USB 2.0 started, EHCI 1.00 hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected Greetings Hans Ulli Kroll
[toc] | [next] | [standalone]
| From | Hans Ulli Kroll <ulli.kroll@googlemail.com> |
|---|---|
| Date | 2017-02-08 21:40 +0100 |
| Subject | [PATCH 1/3] usb: host: fotg2: add devicetree probing |
| Message-ID | <t8HbY-4Z7-33@gated-at.bofh.it> |
| In reply to | #1577021 |
Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
---
drivers/usb/host/fotg210-hcd.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 9d0b0518290a..2acc51b0be5a 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -23,6 +23,7 @@
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/device.h>
#include <linux/dmapool.h>
#include <linux/kernel.h>
@@ -5600,6 +5601,15 @@ static int fotg210_hcd_probe(struct platform_device *pdev)
if (usb_disabled())
return -ENODEV;
+ /* Right now device-tree probed devices don't get dma_mask set.
+ * Since shared usb code relies on it, set it here for now.
+ * Once we have dma capability bindings this can go away.
+ */
+
+ retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+ if (retval)
+ goto fail_create_hcd;
+
pdev->dev.power.power_state = PMSG_ON;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
@@ -5676,9 +5686,18 @@ static int fotg210_hcd_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id fotg210_ehci_match[] = {
+ { .compatible = "faraday,fotg210-hcd" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, exynos_ehci_match);
+#endif
+
static struct platform_driver fotg210_hcd_driver = {
.driver = {
.name = "fotg210-hcd",
+ .of_match_table = of_match_ptr(fotg210_ehci_match),
},
.probe = fotg210_hcd_probe,
.remove = fotg210_hcd_remove,
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Date | 2017-02-09 05:30 +0100 |
| Subject | Re: [PATCH 1/3] usb: host: fotg2: add devicetree probing |
| Message-ID | <t8OwN-1eB-13@gated-at.bofh.it> |
| In reply to | #1577033 |
[Multipart message — attachments visible in raw view] — view raw
Hi Hans,
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on v4.10-rc7 next-20170208]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Hans-Ulli-Kroll/usb-host-fotg2-add-devicetree-probing/20170209-042041
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-randconfig-a0-02091152 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/usb/host/fotg210-hcd.c:5694: error: 'exynos_ehci_match' undeclared here (not in a function)
>> drivers/usb/host/fotg210-hcd.c:5694: error: type defaults to 'int' in declaration of '__mod_of__exynos_ehci_match_device_table'
vim +5694 drivers/usb/host/fotg210-hcd.c
5688
5689 #ifdef CONFIG_OF
5690 static const struct of_device_id fotg210_ehci_match[] = {
5691 { .compatible = "faraday,fotg210-hcd" },
5692 {},
5693 };
> 5694 MODULE_DEVICE_TABLE(of, exynos_ehci_match);
5695 #endif
5696
5697 static struct platform_driver fotg210_hcd_driver = {
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[toc] | [prev] | [next] | [standalone]
| From | Hans Ulli Kroll <ulli.kroll@googlemail.com> |
|---|---|
| Date | 2017-02-09 15:30 +0100 |
| Subject | [PATCH 1/3 v2] usb: host: fotg2: add device tree probing |
| Message-ID | <t8XTr-7gc-7@gated-at.bofh.it> |
| In reply to | #1577033 |
Add device tree probe for fotg2 driver
v2:
fix in wrong MODULE_DEVICE_TABLE
Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
---
drivers/usb/host/fotg210-hcd.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c
index 9d0b0518290a..2acc51b0be5a 100644
--- a/drivers/usb/host/fotg210-hcd.c
+++ b/drivers/usb/host/fotg210-hcd.c
@@ -23,6 +23,7 @@
* Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/device.h>
#include <linux/dmapool.h>
#include <linux/kernel.h>
@@ -5600,6 +5601,15 @@ static int fotg210_hcd_probe(struct platform_device *pdev)
if (usb_disabled())
return -ENODEV;
+ /* Right now device-tree probed devices don't get dma_mask set.
+ * Since shared usb code relies on it, set it here for now.
+ * Once we have dma capability bindings this can go away.
+ */
+
+ retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+ if (retval)
+ goto fail_create_hcd;
+
pdev->dev.power.power_state = PMSG_ON;
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
@@ -5676,9 +5686,18 @@ static int fotg210_hcd_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id fotg210_ehci_match[] = {
+ { .compatible = "faraday,fotg210-hcd" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, fotg210_ehci_match);
+#endif
+
static struct platform_driver fotg210_hcd_driver = {
.driver = {
.name = "fotg210-hcd",
+ .of_match_table = of_match_ptr(fotg210_ehci_match),
},
.probe = fotg210_hcd_probe,
.remove = fotg210_hcd_remove,
--
2.11.0
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2017-02-10 14:20 +0100 |
| Subject | Re: [PATCH 1/3 v2] usb: host: fotg2: add device tree probing |
| Message-ID | <t9jhf-3Q6-3@gated-at.bofh.it> |
| In reply to | #1577640 |
On Thu, Feb 9, 2017 at 3:20 PM, Hans Ulli Kroll <ulli.kroll@googlemail.com> wrote: > Add device tree probe for fotg2 driver > > v2: > fix in wrong MODULE_DEVICE_TABLE > > Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> > + /* Right now device-tree probed devices don't get dma_mask set. > + * Since shared usb code relies on it, set it here for now. > + * Once we have dma capability bindings this can go away. > + */ > + > + retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > + if (retval) > + goto fail_create_hcd; Were you able to test this part? I saw the gemini has some DMA engine but I never saw a driver for it. It looks like a reasonable thing to do to my untrained DMA eye. Yours, Linus Walleij
[toc] | [prev] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-02-10 21:30 +0100 |
| Subject | Re: [PATCH 1/3 v2] usb: host: fotg2: add device tree probing |
| Message-ID | <t9pZo-8ex-5@gated-at.bofh.it> |
| In reply to | #1578438 |
On Friday, February 10, 2017 2:12:36 PM CET Linus Walleij wrote: > > > + /* Right now device-tree probed devices don't get dma_mask set. > > + * Since shared usb code relies on it, set it here for now. > > + * Once we have dma capability bindings this can go away. > > + */ > > + > > + retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > > + if (retval) > > + goto fail_create_hcd; > > Were you able to test this part? I saw the gemini has some DMA engine > but I never saw a driver for it. It looks like a reasonable thing to do to > my untrained DMA eye. We should never use dma_coerce_mask_and_coherent() for new code, it's only needed for broken platforms without DT. A 32-bit mask is set by default. Arnd
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-02-10 14:40 +0100 |
| Subject | Re: [PATCH 1/3 v2] usb: host: fotg2: add device tree probing |
| Message-ID | <t9jAC-3XQ-19@gated-at.bofh.it> |
| In reply to | #1577640 |
On Thu, Feb 09, 2017 at 03:20:49PM +0100, Hans Ulli Kroll wrote: > > Add device tree probe for fotg2 driver > > v2: > fix in wrong MODULE_DEVICE_TABLE > > Signed-off-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> > --- > drivers/usb/host/fotg210-hcd.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/drivers/usb/host/fotg210-hcd.c b/drivers/usb/host/fotg210-hcd.c > index 9d0b0518290a..2acc51b0be5a 100644 > --- a/drivers/usb/host/fotg210-hcd.c > +++ b/drivers/usb/host/fotg210-hcd.c > @@ -23,6 +23,7 @@ > * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > */ > #include <linux/module.h> > +#include <linux/of.h> > #include <linux/device.h> > #include <linux/dmapool.h> > #include <linux/kernel.h> > @@ -5600,6 +5601,15 @@ static int fotg210_hcd_probe(struct platform_device *pdev) > if (usb_disabled()) > return -ENODEV; > > + /* Right now device-tree probed devices don't get dma_mask set. > + * Since shared usb code relies on it, set it here for now. > + * Once we have dma capability bindings this can go away. > + */ > + > + retval = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); > + if (retval) > + goto fail_create_hcd; > + This change doesn't match up with what the changelog describes :(
[toc] | [prev] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2017-02-10 14:30 +0100 |
| Message-ID | <t9jqV-3TZ-9@gated-at.bofh.it> |
| In reply to | #1577021 |
On Wed, Feb 8, 2017 at 9:00 PM, Hans Ulli Kroll <ulli.kroll@googlemail.com> wrote: > Add device tree binding and DT driver support for fotg2-hcd controller > The device is used on Gemini SoC. All looks good to me. If you send a patch on top of my git branch adding it to the gemini.dtsi set as status = "disabled"; and gemini-nas4220b.dts mainly just setting status = "okay"; I can merge this on top of the rest of the stuff in my tree that should go upstream to ARM SoC. Yours. Linus Walleij
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web