[U-Boot] [PATCH 24/27] dm: zynq: usb: Convert to CONFIG_DM_USB
Simon Glass
sjg at chromium.org
Mon Aug 1 03:00:55 CEST 2016
Hi Siva,
On 3 July 2016 at 22:49, Siva Durga Prasad Paladugu
<siva.durga.paladugu at xilinx.com> wrote:
> Hi Simon,
>
>> -----Original Message-----
>> From: Siva Durga Prasad Paladugu
>> Sent: Tuesday, June 28, 2016 11:38 AM
>> To: 'Simon Glass' <sjg at chromium.org>; U-Boot Mailing List <u-
>> boot at lists.denx.de>
>> Cc: Marek Vasut <marex at denx.de>; 'Hans de Goede' <hdegoede at redhat.com>
>> Subject: RE: [U-Boot] [PATCH 24/27] dm: zynq: usb: Convert to
>> CONFIG_DM_USB
>>
>> Hi Simon,
>>
>> > -----Original Message-----
>> > From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Simon
>> > Glass
>> > Sent: Monday, June 13, 2016 11:01 AM
>> > To: U-Boot Mailing List <u-boot at lists.denx.de>
>> > Cc: Marek Vasut <marex at denx.de>
>> > Subject: [U-Boot] [PATCH 24/27] dm: zynq: usb: Convert to
>> > CONFIG_DM_USB
>> >
>> > Convert zynq USB to driver model. It does not actually work, but the
>> > error is similar.
>> >
>> > Before:
>> >
>> > Zynq> dm tree
>> > Class Probed Name
>> > ----------------------------------------
>> > root [ + ] root_driver
>> > rsa_mod_exp [ ] |-- mod_exp_sw
>> > simple_bus [ + ] `-- amba
>> > gpio [ ] |-- gpio at e000a000
>> > serial [ + ] |-- serial at e0001000
>> > spi [ + ] |-- spi at e000d000
>> > spi_flash [ ] | `-- spi_flash at 0:0
>> > eth [ + ] |-- ethernet at e000b000
>> > mmc [ + ] |-- sdhci at e0100000
>> > simple_bus [ ] `-- slcr at f8000000
>> > Zynq> usb start
>> > starting USB...
>> > USB0: USB EHCI 1.00
>> > scanning bus 0 for devices... 2 USB Device(s) found
>> > USB1: usb1 wrong num MIO: 0, Index 1
>> > lowlevel init failed
>> > scanning usb for storage devices... 0 Storage Device(s) found
>> > Zynq>
>> >
>> > After:
>> >
>> > Zynq> dm tree
>> > Class Probed Name
>> > ----------------------------------------
>> > root [ + ] root_driver
>> > rsa_mod_exp [ ] |-- mod_exp_sw
>> > simple_bus [ + ] `-- amba
>> > gpio [ ] |-- gpio at e000a000
>> > serial [ + ] |-- serial at e0001000
>> > spi [ + ] |-- spi at e000d000
>> > spi_flash [ ] | `-- spi_flash at 0:0
>> > eth [ + ] |-- ethernet at e000b000
>> > mmc [ + ] |-- sdhci at e0100000
>> > blk [ + ] | `-- sdhci at e0100000.blk
>> > simple_bus [ ] |-- slcr at f8000000
>> > usb [ + ] `-- usb at e0002000
>> > Zynq> usb start
>> > starting USB...
>> > USB0: USB EHCI 1.00
>> > scanning bus 0 for devices... Error: Cannot find high speed parent of
>> > usb-1 device EHCI timed out on TD - token=0x80008c80 unable to get
>> > device descriptor (error=-1) failed, error -1
>> > Zynq>
>> >
>> > Signed-off-by: Simon Glass <sjg at chromium.org>
>> > ---
>> >
>> > arch/arm/Kconfig | 2 +
>> > drivers/usb/host/ehci-zynq.c | 102
>> > +++++++++++++++++++++----------------------
>> > 2 files changed, 52 insertions(+), 52 deletions(-)
>> >
>> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index
>> > 1af9c35..2b501eb
>> > 100644
>> > --- a/arch/arm/Kconfig
>> > +++ b/arch/arm/Kconfig
>> > @@ -643,6 +643,7 @@ config ARCH_ZYNQ
>> > select DM_SERIAL
>> > select DM_SPI_FLASH
>> > select SPL_SEPARATE_BSS if SPL
>> > + select DM_USB
>> >
>> > config ARCH_ZYNQMP
>> > bool "Support Xilinx ZynqMP Platform"
>> > @@ -651,6 +652,7 @@ config ARCH_ZYNQMP
>> > select OF_CONTROL
>> > select DM_SERIAL
>> > select SUPPORT_SPL
>> > + select DM_USB
>> >
>> > config TEGRA
>> > bool "NVIDIA Tegra"
>> > diff --git a/drivers/usb/host/ehci-zynq.c
>> > b/drivers/usb/host/ehci-zynq.c index 37a7935..b45c68d 100644
>> > --- a/drivers/usb/host/ehci-zynq.c
>> > +++ b/drivers/usb/host/ehci-zynq.c
>> > @@ -7,55 +7,47 @@
>> > */
>> >
>> > #include <common.h>
>> > +#include <dm.h>
>> > +#include <usb.h>
>> > #include <asm/arch/hardware.h>
>> > #include <asm/arch/sys_proto.h>
>> > #include <asm/io.h>
>> > -#include <usb.h>
>> > #include <usb/ehci-ci.h>
>> > #include <usb/ulpi.h>
>> >
>> > #include "ehci.h"
>> >
>> > -#define ZYNQ_USB_USBCMD_RST 0x0000002
>> > -#define ZYNQ_USB_USBCMD_STOP 0x0000000
>> > -#define ZYNQ_USB_NUM_MIO 12
>> > +struct zynq_ehci_priv {
>> Please add below member to this structure as per my conversation with Hans de
>> Goede.
>> This solves the usb issue which you stated,
>> Struct struct ehci_ctrl ehcictrl;
>
> Can you add this element to structure (zynq_ehic_priv) as mentioned above in your patch?
Just to follow up - this was done and is now in mainline.
> Thanks,
> Siva
Regards,
Simon
More information about the U-Boot
mailing list