diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-03-11 10:49:48 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-03-11 10:49:48 +0100 |
commit | 690ec1804cc8acbcc1afe3cc132dfcabfc7d11d5 (patch) | |
tree | a4b1bc34272ef576fe876b8edf9073bcc687293d /drivers/usb | |
parent | d69ea86d795aea0ad833f271f0690e5e02b8bbb6 (diff) | |
parent | 3bd69ad077a955b469baa90d938fd83510297335 (diff) | |
download | barebox-690ec1804cc8acbcc1afe3cc132dfcabfc7d11d5.tar.gz barebox-690ec1804cc8acbcc1afe3cc132dfcabfc7d11d5.tar.xz |
Merge branch 'for-next/driver'
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/at91_udc.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/pxa27x_udc.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/ehci-atmel.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 16 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/xhci-hcd.c | 6 | ||||
-rw-r--r-- | drivers/usb/imx/chipidea-imx.c | 8 | ||||
-rw-r--r-- | drivers/usb/imx/imx-usb-misc.c | 8 | ||||
-rw-r--r-- | drivers/usb/imx/imx-usb-phy.c | 8 | ||||
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 15 | ||||
-rw-r--r-- | drivers/usb/musb/phy-am335x-control.c | 15 | ||||
-rw-r--r-- | drivers/usb/musb/phy-am335x.c | 8 |
12 files changed, 74 insertions, 38 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c index b36ef19c8a..5f6bebc733 100644 --- a/drivers/usb/gadget/at91_udc.c +++ b/drivers/usb/gadget/at91_udc.c @@ -1379,6 +1379,7 @@ static void at91_udc_gadget_poll(struct usb_gadget *gadget) static int __init at91udc_probe(struct device_d *dev) { + struct resource *iores; struct at91_udc *udc = &controller; int retval; @@ -1422,7 +1423,10 @@ static int __init at91udc_probe(struct device_d *dev) udc->ep[3].maxpacket = 64; } - udc->udp_baseaddr = dev_request_mem_region(dev, 0); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + udc->udp_baseaddr = IOMEM(iores->start); if (IS_ERR(udc->udp_baseaddr)) { retval = PTR_ERR(udc->udp_baseaddr); goto fail0a; diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index 3db3480cad..372c07b418 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c @@ -1449,12 +1449,14 @@ static struct pxa_udc memory = { static int __init pxa_udc_probe(struct device_d *dev) { + struct resource *iores; struct pxa_udc *udc = &memory; int gpio, ret; - udc->regs = dev_request_mem_region(dev, 0); - if (!udc->regs) - return -ENXIO; + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + udc->regs = IOMEM(iores->start); udc->dev = dev; udc->mach = dev->platform_data; diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index 11b1a894e1..cc9636c4b7 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -46,6 +46,7 @@ static void atmel_stop_clock(void) static int atmel_ehci_probe(struct device_d *dev) { + struct resource *iores; struct ehci_data data; iclk = clk_get(dev, "ehci_clk"); @@ -67,7 +68,10 @@ static int atmel_ehci_probe(struct device_d *dev) data.flags = 0; - data.hccr = dev_request_mem_region(dev, 0); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + data.hccr = IOMEM(iores->start); ehci_register(dev, &data); diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 91c6d73c30..8ea26e3591 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -1334,6 +1334,7 @@ int ehci_register(struct device_d *dev, struct ehci_data *data) static int ehci_probe(struct device_d *dev) { + struct resource *iores; struct ehci_data data = {}; struct ehci_platform_data *pdata = dev->platform_data; struct device_node *dn = dev->device_node; @@ -1350,12 +1351,17 @@ static int ehci_probe(struct device_d *dev) */ data.flags = EHCI_HAS_TT; - data.hccr = dev_request_mem_region(dev, 0); - if (IS_ERR(data.hccr)) - return PTR_ERR(data.hccr); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + data.hccr = IOMEM(iores->start); - if (dev->num_resources > 1) - data.hcor = dev_request_mem_region(dev, 1); + if (dev->num_resources > 1) { + iores = dev_request_mem_resource(dev, 1); + if (IS_ERR(iores)) + return PTR_ERR(iores); + data.hcor = IOMEM(iores->start); + } else data.hcor = NULL; diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 1d511b7563..612c3a1033 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -1793,6 +1793,7 @@ static int ohci_init(struct usb_host *host) static int ohci_probe(struct device_d *dev) { + struct resource *iores; struct usb_host *host; struct ohci *ohci; @@ -1818,9 +1819,10 @@ static int ohci_probe(struct device_d *dev) usb_register_host(host); - ohci->regs = dev_request_mem_region(dev, 0); - if (IS_ERR(ohci->regs)) - return PTR_ERR(ohci->regs); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + ohci->regs = IOMEM(iores->start); return 0; } diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c index a44a1a4dff..2b808cc875 100644 --- a/drivers/usb/host/xhci-hcd.c +++ b/drivers/usb/host/xhci-hcd.c @@ -1509,9 +1509,13 @@ int xhci_register(struct device_d *dev, struct xhci_data *data) static int xhci_probe(struct device_d *dev) { + struct resource *iores; struct xhci_data data = {}; - data.regs = dev_request_mem_region(dev, 0); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + data.regs = IOMEM(iores->start); return xhci_register(dev, &data); } diff --git a/drivers/usb/imx/chipidea-imx.c b/drivers/usb/imx/chipidea-imx.c index a1c36cf644..a799abe4ee 100644 --- a/drivers/usb/imx/chipidea-imx.c +++ b/drivers/usb/imx/chipidea-imx.c @@ -216,6 +216,7 @@ static int ci_register_otg_device(struct imx_chipidea *ci) static int imx_chipidea_probe(struct device_d *dev) { + struct resource *iores; struct imxusb_platformdata *pdata = dev->platform_data; int ret; void __iomem *base; @@ -245,9 +246,10 @@ static int imx_chipidea_probe(struct device_d *dev) if (!IS_ERR(ci->vbus)) regulator_enable(ci->vbus); - base = dev_request_mem_region(dev, 0); - if (IS_ERR(base)) - return PTR_ERR(base); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + base = IOMEM(iores->start); ci->base = base; diff --git a/drivers/usb/imx/imx-usb-misc.c b/drivers/usb/imx/imx-usb-misc.c index af1a32110c..d938a2cd87 100644 --- a/drivers/usb/imx/imx-usb-misc.c +++ b/drivers/usb/imx/imx-usb-misc.c @@ -545,6 +545,7 @@ int imx_usbmisc_port_post_init(int port, unsigned flags) static int imx_usbmisc_probe(struct device_d *dev) { + struct resource *iores; struct imx_usb_misc_data *devtype; int ret; @@ -552,9 +553,10 @@ static int imx_usbmisc_probe(struct device_d *dev) if (ret) return ret; - usbmisc_base = dev_request_mem_region(dev, 0); - if (!usbmisc_base) - return -ENOMEM; + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + usbmisc_base = IOMEM(iores->start); imxusbmisc_data = devtype; diff --git a/drivers/usb/imx/imx-usb-phy.c b/drivers/usb/imx/imx-usb-phy.c index 3fe94868bc..1aa12be29d 100644 --- a/drivers/usb/imx/imx-usb-phy.c +++ b/drivers/usb/imx/imx-usb-phy.c @@ -65,16 +65,18 @@ static int imx_usbphy_enable(struct imx_usbphy *imxphy) static int imx_usbphy_probe(struct device_d *dev) { + struct resource *iores; int ret; struct imx_usbphy *imxphy; imxphy = xzalloc(sizeof(*imxphy)); - imxphy->base = dev_request_mem_region(dev, 0); - if (!imxphy->base) { - ret = -ENODEV; + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) { + ret = PTR_ERR(iores); goto err_free; } + imxphy->base = IOMEM(iores->start); imxphy->clk = clk_get(dev, NULL); if (IS_ERR(imxphy->clk)) { diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 958aeec685..431b97ea9b 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -349,6 +349,7 @@ static int dsps_register_otg_device(struct dsps_glue *glue) static int dsps_probe(struct device_d *dev) { + struct resource *iores; struct musb_hdrc_platform_data *pdata; struct musb_hdrc_config *config; struct device_node *dn = dev->device_node; @@ -378,13 +379,15 @@ static int dsps_probe(struct device_d *dev) pdata = &glue->pdata; - glue->musb.mregs = dev_request_mem_region(dev, 0); - if (IS_ERR(glue->musb.mregs)) - return PTR_ERR(glue->musb.mregs); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + glue->musb.mregs = IOMEM(iores->start); - glue->musb.ctrl_base = dev_request_mem_region(dev, 1); - if (IS_ERR(glue->musb.ctrl_base)) - return PTR_ERR(glue->musb.ctrl_base); + iores = dev_request_mem_resource(dev, 1); + if (IS_ERR(iores)) + return PTR_ERR(iores); + glue->musb.ctrl_base = IOMEM(iores->start); glue->musb.controller = dev; diff --git a/drivers/usb/musb/phy-am335x-control.c b/drivers/usb/musb/phy-am335x-control.c index 809c5182c0..5fd8802b3a 100644 --- a/drivers/usb/musb/phy-am335x-control.c +++ b/drivers/usb/musb/phy-am335x-control.c @@ -129,6 +129,7 @@ EXPORT_SYMBOL(am335x_get_phy_control); static int am335x_control_usb_probe(struct device_d *dev) { + struct resource *iores; /*struct resource *res;*/ struct am335x_control_usb *ctrl_usb; const struct phy_control *phy_ctrl; @@ -146,13 +147,15 @@ static int am335x_control_usb_probe(struct device_d *dev) ctrl_usb->dev = dev; - ctrl_usb->phy_reg = dev_request_mem_region(dev, 0); - if (IS_ERR(ctrl_usb->phy_reg)) - return PTR_ERR(ctrl_usb->phy_reg); + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) + return PTR_ERR(iores); + ctrl_usb->phy_reg = IOMEM(iores->start); - ctrl_usb->wkup = dev_request_mem_region(dev, 1); - if (IS_ERR(ctrl_usb->wkup)) - return PTR_ERR(ctrl_usb->wkup); + iores = dev_request_mem_resource(dev, 1); + if (IS_ERR(iores)) + return PTR_ERR(iores); + ctrl_usb->wkup = IOMEM(iores->start); spin_lock_init(&ctrl_usb->lock); ctrl_usb->phy_ctrl = *phy_ctrl; diff --git a/drivers/usb/musb/phy-am335x.c b/drivers/usb/musb/phy-am335x.c index 2d58bbedb4..204e51054d 100644 --- a/drivers/usb/musb/phy-am335x.c +++ b/drivers/usb/musb/phy-am335x.c @@ -30,17 +30,19 @@ static int am335x_init(struct usb_phy *phy) static int am335x_phy_probe(struct device_d *dev) { + struct resource *iores; int ret; am_usbphy = xzalloc(sizeof(*am_usbphy)); if (!am_usbphy) return -ENOMEM; - am_usbphy->base = dev_request_mem_region(dev, 0); - if (!am_usbphy->base) { - ret = -ENODEV; + iores = dev_request_mem_resource(dev, 0); + if (IS_ERR(iores)) { + ret = PTR_ERR(iores); goto err_free; } + am_usbphy->base = IOMEM(iores->start); am_usbphy->phy_ctrl = am335x_get_phy_control(dev); if (!am_usbphy->phy_ctrl) |