From: Mathias Nyman <mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Thomas Petazzoni
<thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Mathias Nyman
<mathias.nyman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>,
Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>,
Sebastian Hesselbarth
<sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Gregory Clement
<gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: Ezequiel Garcia
<ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Tawfik Bayouk <tawfik-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Nadav Haklai <nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCHv5 08/20] usb: host: xhci-plat: add support for the Armada 375/38x XHCI controllers
Date: Mon, 12 May 2014 20:24:45 +0300 [thread overview]
Message-ID: <537103DD.5030906@linux.intel.com> (raw)
In-Reply-To: <1399832288-19899-9-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
On 05/11/2014 09:17 PM, Thomas Petazzoni wrote:
> From: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
>
> The Armada 375 and 38x SoCs come with an XHCI controller that requires
> some specific initialization related to the MBus windows
> configuration. This patch adds the support for this special
> configuration as an XHCI quirk executed during probe.
>
> Two new compatible strings are added to identify the Armada 375 and
> Armada 38x XHCI controllers, and therefore enable the relevant quirk.
>
> Signed-off-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> ---
> drivers/usb/host/Kconfig | 8 +++++
> drivers/usb/host/Makefile | 3 ++
> drivers/usb/host/xhci-mvebu.c | 70 +++++++++++++++++++++++++++++++++++++++++++
> drivers/usb/host/xhci-mvebu.h | 21 +++++++++++++
> drivers/usb/host/xhci-plat.c | 12 ++++++++
> 5 files changed, 114 insertions(+)
> create mode 100644 drivers/usb/host/xhci-mvebu.c
> create mode 100644 drivers/usb/host/xhci-mvebu.h
>
> diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
> index 3d9e540..9247ad2 100644
> --- a/drivers/usb/host/Kconfig
> +++ b/drivers/usb/host/Kconfig
> @@ -29,6 +29,14 @@ if USB_XHCI_HCD
> config USB_XHCI_PLATFORM
> tristate
>
> +config USB_XHCI_MVEBU
> + tristate "xHCI support for Marvell Armada 375/38x"
> + select USB_XHCI_PLATFORM
> + depends on ARCH_MVEBU || COMPILE_TEST
> + ---help---
> + Say 'Y' to enable the support for the xHCI host controller
> + found in Marvell Armada 375/38x ARM SOCs.
> +
> endif # USB_XHCI_HCD
>
> config USB_EHCI_HCD
> diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
> index 7530468..7c0886a 100644
> --- a/drivers/usb/host/Makefile
> +++ b/drivers/usb/host/Makefile
> @@ -19,6 +19,9 @@ xhci-hcd-$(CONFIG_PCI) += xhci-pci.o
>
> ifneq ($(CONFIG_USB_XHCI_PLATFORM), )
> xhci-hcd-y += xhci-plat.o
> +ifneq ($(CONFIG_USB_XHCI_MVEBU), )
> + xhci-hcd-y += xhci-mvebu.o
> +endif
> endif
>
> obj-$(CONFIG_USB_WHCI_HCD) += whci/
> diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
> new file mode 100644
> index 0000000..fab9d6f
> --- /dev/null
> +++ b/drivers/usb/host/xhci-mvebu.c
> @@ -0,0 +1,70 @@
> +/*
> + * Copyright (C) 2014 Marvell
> + * Author: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * version 2 as published by the Free Software Foundation.
> + */
> +
> +#include <linux/io.h>
> +#include <linux/mbus.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +
> +#define USB3_MAX_WINDOWS 4
> +#define USB3_WIN_CTRL(w) (0x0 + ((w) * 8))
> +#define USB3_WIN_BASE(w) (0x4 + ((w) * 8))
> +
> +static void xhci_mvebu_mbus_config(void __iomem *base,
> + const struct mbus_dram_target_info *dram)
> +{
> + int win;
> +
> + /* Clear all existing windows */
> + for (win = 0; win < USB3_MAX_WINDOWS; win++) {
> + writel(0, base + USB3_WIN_CTRL(win));
> + writel(0, base + USB3_WIN_BASE(win));
> + }
> +
> + /* Program each DRAM CS in a seperate window */
> + for (win = 0; win < dram->num_cs; win++) {
> + const struct mbus_dram_window *cs = dram->cs + win;
> +
> + writel(((cs->size - 1) & 0xffff0000) | (cs->mbus_attr << 8) |
> + (dram->mbus_dram_target_id << 4) | 1,
> + base + USB3_WIN_CTRL(win));
> +
> + writel((cs->base & 0xffff0000), base + USB3_WIN_BASE(win));
> + }
> +}
> +
> +int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev)
> +{
> + struct resource *res;
> + void __iomem *base;
> + const struct mbus_dram_target_info *dram;
Hi
Sparse warns about this:
drivers/usb/host/xhci-mvebu.c:42:5: warning: symbol 'xhci_mvebu_mbus_init_quirk'
was not declared. Should it be static?
Otherwise I think it looks good
-Mathias
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-05-12 17:24 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-11 18:17 [PATCHv5 00/20] USB support for Armada 38x and Armada 375 Thomas Petazzoni
[not found] ` <1399832288-19899-1-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-11 18:17 ` [PATCHv5 01/20] usb: ehci-orion: use platform_get_irq() for DT probing Thomas Petazzoni
2014-05-11 18:17 ` [PATCHv5 02/20] usb: ehci-orion: rename error goto labels in ehci_orion_drv_probe() Thomas Petazzoni
2014-05-11 18:17 ` [PATCHv5 03/20] usb: ehci-orion: fix clock reference leaking Thomas Petazzoni
2014-05-11 18:17 ` [PATCHv5 04/20] usb: ehci-orion: add optional PHY support Thomas Petazzoni
2014-05-11 18:17 ` [PATCHv5 05/20] Documentation: dt-bindings: update ehci-orion binding documentation Thomas Petazzoni
[not found] ` <1399832288-19899-6-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-12 14:34 ` Gregory CLEMENT
[not found] ` <5370DC0C.60604-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-12 15:46 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1405121145220.1202-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-05-12 16:00 ` Gregory CLEMENT
2014-05-11 18:17 ` [PATCHv5 06/20] usb: host: xhci-plat: sort the headers in alphabetic order Thomas Petazzoni
2014-05-11 18:17 ` [PATCHv5 07/20] usb: host: xhci-plat: add clock support Thomas Petazzoni
[not found] ` <1399832288-19899-8-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-12 14:46 ` Gregory CLEMENT
[not found] ` <5370DEC7.9080708-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-12 17:43 ` Mathias Nyman
2014-05-12 17:37 ` Felipe Balbi
2014-05-11 18:17 ` [PATCHv5 08/20] usb: host: xhci-plat: add support for the Armada 375/38x XHCI controllers Thomas Petazzoni
[not found] ` <1399832288-19899-9-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-12 17:24 ` Mathias Nyman [this message]
[not found] ` <537103DD.5030906-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2014-05-12 17:36 ` Thomas Petazzoni
[not found] ` <20140512193617.011aa958-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-13 8:24 ` Mathias Nyman
2014-05-11 18:17 ` [PATCHv5 09/20] Documentation: dt-bindings: update xhci-platform DT binding Thomas Petazzoni
[not found] ` <1399832288-19899-10-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-12 17:38 ` Mathias Nyman
2014-05-11 18:17 ` [PATCHv5 10/20] phy: add support for USB cluster on the Armada 375 SoC Thomas Petazzoni
[not found] ` <1399832288-19899-11-git-send-email-thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-12 14:57 ` Gregory CLEMENT
2014-05-13 5:53 ` Kishon Vijay Abraham I
[not found] ` <5371B36C.6000703-l0cyMroinI0@public.gmane.org>
2014-05-13 8:06 ` Gregory CLEMENT
[not found] ` <5371D2A2.5020904-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-13 9:41 ` Gregory CLEMENT
[not found] ` <5371E8BF.50303-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-14 14:08 ` Gregory CLEMENT
2014-05-14 14:27 ` Kishon Vijay Abraham I
[not found] ` <53737D4E.8090706-l0cyMroinI0@public.gmane.org>
2014-05-14 15:35 ` Gregory CLEMENT
[not found] ` <53738D24.5000705-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-15 7:01 ` Gregory CLEMENT
[not found] ` <53746666.50007-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-15 9:01 ` Kishon Vijay Abraham I
[not found] ` <5374826D.4090404-l0cyMroinI0@public.gmane.org>
2014-05-15 9:35 ` Gregory CLEMENT
[not found] ` <53748A61.6040006-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-05-15 9:38 ` Kishon Vijay Abraham I
2014-05-11 18:17 ` [PATCHv5 11/20] Documentation: dt-bindings: document the Armada 375 USB cluster binding Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 12/20] ARM: mvebu: add USB3 support for Armada 38x Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 13/20] ARM: mvebu: add USB3 support for Armada 375 Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 14/20] ARM: configs: enable XHCI mvebu support in mvebu_v7_defconfig Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 15/20] ARM: configs: enable XHCI mvebu support in multi_v7_defconfig Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 16/20] ARM: mvebu: add Device Tree description of xHCI controllers on Armada 38x Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 17/20] ARM: mvebu: add Device Tree description of the EHCI controller " Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 18/20] ARM: mvebu: add Device Tree description of USB cluster controller on Armada 375 Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 19/20] ARM: mvebu: add Device Tree description of the xHCI " Thomas Petazzoni
2014-05-11 18:18 ` [PATCHv5 20/20] ARM: mvebu: add Device Tree description of the EHCI " Thomas Petazzoni
2014-05-12 14:29 ` [PATCHv5 00/20] USB support for Armada 38x and " Gregory CLEMENT
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=537103DD.5030906@linux.intel.com \
--to=mathias.nyman-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=andrew-g2DYL2Zd6BY@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mathias.nyman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=nadavh-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tawfik-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
--cc=thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).