diff options
author | Stefan Agner <stefan@agner.ch> | 2014-09-22 08:14:15 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-23 21:32:30 -0700 |
commit | f40017e0f3325b4c42139f54748ac4f0bbed3c52 (patch) | |
tree | e00bd4584c25a9030dfd0cbb244c6dae13ae5715 /drivers/usb/chipidea/ci_hdrc_imx.c | |
parent | c0e602dbf39eef7af75a84a8a354eade6be6a9ff (diff) | |
download | blackbird-op-linux-f40017e0f3325b4c42139f54748ac4f0bbed3c52.tar.gz blackbird-op-linux-f40017e0f3325b4c42139f54748ac4f0bbed3c52.zip |
chipidea: usbmisc_imx: Add USB support for VF610 SoCs
This adds Vybrid VF610 SoC support. The IP is very similar to i.MX6,
however, the non-core registers are spread in two different register
areas. Hence we support multiple instances of the USB misc driver
and add the driver instance to the imx_usbmisc_data structure.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/ci_hdrc_imx.c')
-rw-r--r-- | drivers/usb/chipidea/ci_hdrc_imx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 65444b02bd68..a7ab0f15926e 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -54,6 +54,7 @@ struct ci_hdrc_imx_data { static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) { + struct platform_device *misc_pdev; struct device_node *np = dev->of_node; struct of_phandle_args args; struct imx_usbmisc_data *data; @@ -79,8 +80,15 @@ static struct imx_usbmisc_data *usbmisc_get_init_data(struct device *dev) } data->index = args.args[0]; + + misc_pdev = of_find_device_by_node(args.np); of_node_put(args.np); + if (!misc_pdev) + return ERR_PTR(-EPROBE_DEFER); + + data->dev = &misc_pdev->dev; + if (of_find_property(np, "disable-over-current", NULL)) data->disable_oc = 1; |