[PATCH v2 1/2] USB: dwc3-exynos: Add support for device tree
Felipe Balbi
balbi at ti.com
Tue Oct 16 20:53:33 EST 2012
On Tue, Oct 16, 2012 at 02:15:56PM +0530, Vivek Gautam wrote:
> This patch adds support to parse probe data for
> dwc3-exynos driver using device tree.
>
> Signed-off-by: Vivek Gautam <gautam.vivek at samsung.com>
> ---
> drivers/usb/dwc3/dwc3-exynos.c | 20 ++++++++++++++++++++
> 1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
> index ca65978..d11ef49 100644
> --- a/drivers/usb/dwc3/dwc3-exynos.c
> +++ b/drivers/usb/dwc3/dwc3-exynos.c
> @@ -21,6 +21,7 @@
> #include <linux/clk.h>
> #include <linux/usb/otg.h>
> #include <linux/usb/nop-usb-xceiv.h>
> +#include <linux/of.h>
>
> #include "core.h"
>
> @@ -87,6 +88,8 @@ err1:
> return ret;
> }
>
> +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;
> @@ -103,6 +106,14 @@ 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;
says who ?
$ git grep -e dma_mask drivers/of/
drivers/of/platform.c: dev->dev.dma_mask = &dev->archdata.dma_mask;
drivers/of/platform.c: dev->archdata.dma_mask = 0xffffffffUL;
drivers/of/platform.c: dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
drivers/of/platform.c: dev->dev.coherent_dma_mask = ~0;
drivers/of/platform.c: dev->dma_mask = ~0;
-ECONFUSED
--
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20121016/eab0c9e3/attachment.sig>
More information about the devicetree-discuss
mailing list