diff options
author | Ramneek Mehresh <ramneek.mehresh@freescale.com> | 2014-10-30 05:24:08 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:28 (GMT) |
commit | 53c99566aeffa132dcb23ede0ca53deb39a2f8cb (patch) | |
tree | d95b12bce307f284a7ee75bb65674f827c225a16 | |
parent | a95321a3f5b639c4b284ece420b1bb2bc863a1e0 (diff) | |
download | linux-53c99566aeffa132dcb23ede0ca53deb39a2f8cb.tar.xz |
usb: pm: Fix pm defect in rcpm driver for usb ip
Pass device-tree usb node offset to each usb device structure.
This is required by rcpm driver to get mask setting for
ip exception register to make/remove usb as wake-up source
for sleep/deep-sleep
Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: yinbo.zhu <yinbo.zhu@nxp.com>
-rw-r--r-- | drivers/usb/core/usb.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/fsl-mph-dr-of.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 5921514..bd74c0f 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -452,6 +452,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, */ dev->dev.dma_mask = bus->controller->dma_mask; dev->dev.dma_pfn_offset = bus->controller->dma_pfn_offset; + set_dev_node(&dev->dev, dev_to_node(bus->sysdev)); set_dev_node(&dev->dev, dev_to_node(bus->controller)); dev->state = USB_STATE_ATTACHED; dev->lpm_disable_count = 1; diff --git a/drivers/usb/host/fsl-mph-dr-of.c b/drivers/usb/host/fsl-mph-dr-of.c index 1e59ea9..e95639e 100644 --- a/drivers/usb/host/fsl-mph-dr-of.c +++ b/drivers/usb/host/fsl-mph-dr-of.c @@ -103,6 +103,8 @@ static struct platform_device *fsl_usb2_device_register( else dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); + pdev->dev.of_node = ofdev->dev.of_node; + retval = platform_device_add_data(pdev, pdata, sizeof(*pdata)); if (retval) goto error; |