From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 8 May 2017 12:21:30 +0200 Subject: [U-Boot] [PATCH 2/5] driver: usb: add EHCI driver for hi3787cv200 SoC In-Reply-To: <7bc5e800-4331-002c-9cc4-c86334689fe9@linaro.org> References: <1493905630-8788-1-git-send-email-jorge.ramirez-ortiz@linaro.org> <1493905630-8788-2-git-send-email-jorge.ramirez-ortiz@linaro.org> <20170505143215.GQ12511@bill-the-cat> <451b7244-2b3f-7ff0-9915-83923e4c555e@denx.de> <76f33708-a2cb-f712-8098-2d653d8711e7@linaro.org> <593e672c-f323-6a32-dac8-db7bcb325c6d@denx.de> <7bc5e800-4331-002c-9cc4-c86334689fe9@linaro.org> Message-ID: <37ed1621-3b40-2c1d-d540-a819dc882092@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/08/2017 11:15 AM, Jorge Ramirez wrote: > On 05/07/2017 02:34 PM, Marek Vasut wrote: >> On 05/07/2017 12:56 PM, Jorge Ramirez wrote: >>> On 05/06/2017 01:05 AM, Marek Vasut wrote: >>>> On 05/05/2017 07:55 PM, Jorge Ramirez wrote: >>>>> On 05/05/2017 05:34 PM, Marek Vasut wrote: >>>>>> On 05/05/2017 04:32 PM, Tom Rini wrote: >>>>>>> On Thu, May 04, 2017 at 03:47:07PM +0200, Jorge Ramirez-Ortiz wrote: >>>>>>> >>>>>>> CC'ing Marek... >>>>>>> >>>>>>>> Signed-off-by: Jorge Ramirez-Ortiz >>>>>>>> --- >>>>>>>> .../arm/include/asm/arch-hi3798cv200/hi3798cv200.h | 93 >>>>>>>> ++++++++++ >>>>>>>> drivers/usb/host/Kconfig | 6 + >>>>>>>> drivers/usb/host/Makefile | 1 + >>>>>>>> drivers/usb/host/ehci-hi3798cv200.c | 196 >>>>>>>> +++++++++++++++++++++ >>>>>>>> 4 files changed, 296 insertions(+) >>>>>>>> create mode 100644 >>>>>>>> arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h >>>>>>>> create mode 100644 drivers/usb/host/ehci-hi3798cv200.c >>>>>>>> >>>>>>>> diff --git a/arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h >>>>>>>> b/arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h >>>>>>>> new file mode 100644 >>>>>>>> index 0000000..c67fda1 >>>>>>>> --- /dev/null >>>>>>>> +++ b/arch/arm/include/asm/arch-hi3798cv200/hi3798cv200.h >>>>>>>> @@ -0,0 +1,93 @@ >>>>>>>> +/* >>>>>>>> + * (C) Copyright 2017 Linaro >>>>>>>> + * Jorge Ramirez-Ortiz >>>>>>>> + * >>>>>>>> + * SPDX-License-Identifier: GPL-2.0+ >>>>>>>> + */ >>>>>>>> + >>>>>>>> +#ifndef __HI3798cv200_H__ >>>>>>>> +#define __HI3798cv200_H__ >>>>>> This should be a separate patch .. >>>>> hi Marek >>>>> >>>>> to be clear, are you asking a single patch containing hi3798cv200.h? >>>> Yes, this is arch stuff and is not in any way part of the USB driver >>>> IMO. >>> sure. >>> I suppose that what are really saying is that the usb driver has to be >>> upstreamed after the architecture and not before if such a dependency >>> exists (ie not using the device tree) >> Yes, you can be asked to change stuff in the arch code , at which point >> you might have to modify the (dead, but accepted) usb code. >> >> If you can move arch stuff to arch code, even better. Then you might >> even be able to use ehci-generic. > > yes, that is what I ended up doing. thanks for the suggestion. > >> >>>> [...] >>>> >>>>>>>> +}; >>>>>>>> + >>>>>>>> +#endif >>>>>>>> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig >>>>>>>> index 0bf8274..a749d0e 100644 >>>>>>>> --- a/drivers/usb/host/Kconfig >>>>>>>> +++ b/drivers/usb/host/Kconfig >>>>>>>> @@ -128,6 +128,12 @@ config USB_EHCI_ZYNQ >>>>>>>> ---help--- >>>>>>>> Enable support for Zynq on-chip EHCI USB controller >>>>>>>> +config USB_EHCI_POPLAR >>>>>>>> + bool "Support for HI3798cv200 EHCI USB controller" >>>>>> Does HI stand for Hitachi ? >>>>> Hisilicon >>>> Don't we already have some hisilicon stuff in the tree ? Maybe some >>>> 96board ? >>>> >>>> In fact, could this driver be replaced by ehci-generic ? >>> yes I think so. the driver is basically platform initialization code and >>> the generic driver. >>> the problem I have is that there is not usb host support in the kernel >>> for it so we dont have a device node in the tree. >>> >>> should I commit the linux kernel device tree (first patch in the series) >>> and then add the node when I push the DM usb driver? >> Ideally check the bindings with Rob Herring, otherwise I don't care. >> If you contribute to kernel too, awesome. > > in v2 I pushed the bindings to allow me to use the ehci-generic driver. > > the kernel team working on this platform will push a more detailed node > definition to korg - usb host is still under development - at which > point I'll merge it back. > I hope that this is acceptable? Works for me if you don't invent weird stuff in the bindings and keep them reasonably in sync. Thanks -- Best regards, Marek Vasut