From: Vivek Gautam <gautam.vivek@samsung.com>
To: stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org
Cc: l.majewski@samsung.com, a.kesavan@samsung.com,
prashanth.g@samsung.com, kmpark@infradead.org, joshi@samsung.com,
olofj@google.com, thomas.abraham@linaro.org,
sshtylyov@mvista.com, av.tikhomirov@samsung.com
Subject: [PATCH 1/2 v3] USB: dwc3-exynos: Add support for device tree
Date: Mon, 16 Jul 2012 11:27:38 +0530 [thread overview]
Message-ID: <1342418259-23802-2-git-send-email-gautam.vivek@samsung.com> (raw)
In-Reply-To: <1342418259-23802-1-git-send-email-gautam.vivek@samsung.com>
This patch adds support to parse probe data for
dwc3 driver for exynos using device tree
Signed-off-by: Praveen Paneri <p.paneri@samsung.com>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---
drivers/usb/dwc3/dwc3-exynos.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index b8f0038..a293c69 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -19,6 +19,7 @@
#include <linux/platform_data/dwc3-exynos.h>
#include <linux/dma-mapping.h>
#include <linux/clk.h>
+#include <linux/of.h>
#include "core.h"
@@ -29,6 +30,8 @@ struct dwc3_exynos {
struct clk *clk;
};
+static u64 dwc3_exynos_dma_mask = DMA_BIT_MASK(32);
+
static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
{
struct dwc3_exynos_data *pdata = pdev->dev.platform_data;
@@ -45,6 +48,16 @@ static int __devinit dwc3_exynos_probe(struct platform_device *pdev)
goto err0;
}
+ /*
+ * 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 move to full device tree support this will vanish off.
+ */
+ if (!pdev->dev.dma_mask)
+ pdev->dev.dma_mask = &dwc3_exynos_dma_mask;
+ if (!pdev->dev.coherent_dma_mask)
+ pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+
platform_set_drvdata(pdev, exynos);
devid = dwc3_get_device_id();
@@ -134,11 +147,20 @@ static int __devexit dwc3_exynos_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id exynos_xhci_match[] = {
+ { .compatible = "samsung,exynos-xhci" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, exynos_xhci_match);
+#endif
+
static struct platform_driver dwc3_exynos_driver = {
.probe = dwc3_exynos_probe,
.remove = __devexit_p(dwc3_exynos_remove),
.driver = {
.name = "exynos-dwc3",
+ .of_match_table = of_match_ptr(exynos_xhci_match),
},
};
--
1.7.0.4
next prev parent reply other threads:[~2012-07-16 5:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-16 5:57 [PATCH 0/2 v3] USB: host: Add Device tree support for dwc3-exynos Vivek Gautam
2012-07-16 5:57 ` Vivek Gautam [this message]
2012-07-20 9:49 ` [PATCH 1/2 v3] USB: dwc3-exynos: Add support for device tree Felipe Balbi
2012-07-16 5:57 ` [PATCH 2/2 v3] USB: dwc3-exynos: Add vbus setup function to the exynos dwc3 glue layer Vivek Gautam
2012-07-20 9:51 ` Felipe Balbi
[not found] ` <CAFp+6iENsdZW0tLRA-9QRPh4AvtyLq-Ebpty9zE+bd=hv3dKog@mail.gmail.com>
2012-07-23 15:24 ` Felipe Balbi
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=1342418259-23802-2-git-send-email-gautam.vivek@samsung.com \
--to=gautam.vivek@samsung.com \
--cc=a.kesavan@samsung.com \
--cc=av.tikhomirov@samsung.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=joshi@samsung.com \
--cc=kmpark@infradead.org \
--cc=l.majewski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=olofj@google.com \
--cc=prashanth.g@samsung.com \
--cc=sshtylyov@mvista.com \
--cc=stern@rowland.harvard.edu \
--cc=thomas.abraham@linaro.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
all inboxes | Powered by JetHome®