Re: [PATCH v2] usb/uhci: Add support for Aspeed BMC SoCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 23 May 2017, Benjamin Herrenschmidt wrote:

> The Aspeed 2400/2500 families have a variant of UHCI which requires
> some quirks to the driver to work:
> 
>  - The register offsets are different. We add a remapping helper.
> 
>  - All accesses have to be done via 32-bit loads and stores. We
>    force all accessors to use readl/writel. This is of no consequence
>    for reads as we never read "in the middle" of a register. For writes
>    it also works fine as the registers only actually implement the bits
>    we try to write (16-bit for the registers accessed with writew and
>    8-bit for the register accessed with writeb), so always using a
>    32-bit write will have no negative effect. We never do partial writes.
> 
>  - The resume detect interrupt is broken
> 
>  - The number of ports is (optionally) provided via the device-tree
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> --
> 
> v2. Remove the bulk of the #ifdef's
> 
>  drivers/usb/host/Kconfig         |  6 ++++-
>  drivers/usb/host/uhci-hcd.c      | 17 +++++++++++---
>  drivers/usb/host/uhci-hcd.h      | 51 ++++++++++++++++++++++++++++++++++++++++
>  drivers/usb/host/uhci-platform.c | 22 ++++++++++++++++-
>  4 files changed, 91 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 6361fc7..dab8a93 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -627,7 +627,11 @@ config USB_UHCI_SUPPORT_NON_PCI_HC
>  
>  config USB_UHCI_PLATFORM
>  	bool
> -	default y if ARCH_VT8500
> +	default y if (ARCH_VT8500 || ARCH_ASPEED)
> +
> +config USB_UHCI_ASPEED
> +       bool
> +       default y if ARCH_ASPEED

Does this new symbol really add anything?  I mean, wouldn't it be just 
as good to use CONFIG_ARCH_ASPEED instead?  It gets used in only one 
place.

Aside from that, this looks very good.

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux