ehci-platform.c (e3c55d406bd8df1a878546002c93db90c42be10c) | ehci-platform.c (22d9d8e8316d7f69046c8805ce9aa8d9c43d4e5b) |
---|---|
1/* 2 * Generic platform ehci driver 3 * 4 * Copyright 2007 Steven Brown <sbrown@cortland.com> 5 * Copyright 2010-2012 Hauke Mehrtens <hauke@hauke-m.de> 6 * 7 * Derived from the ohci-ssb driver 8 * Copyright 2007 Michael Buesch <m@bues.ch> --- 64 unchanged lines hidden (view full) --- 73static struct usb_ehci_pdata ehci_platform_defaults; 74 75static int ehci_platform_probe(struct platform_device *dev) 76{ 77 struct usb_hcd *hcd; 78 struct resource *res_mem; 79 struct usb_ehci_pdata *pdata; 80 int irq; | 1/* 2 * Generic platform ehci driver 3 * 4 * Copyright 2007 Steven Brown <sbrown@cortland.com> 5 * Copyright 2010-2012 Hauke Mehrtens <hauke@hauke-m.de> 6 * 7 * Derived from the ohci-ssb driver 8 * Copyright 2007 Michael Buesch <m@bues.ch> --- 64 unchanged lines hidden (view full) --- 73static struct usb_ehci_pdata ehci_platform_defaults; 74 75static int ehci_platform_probe(struct platform_device *dev) 76{ 77 struct usb_hcd *hcd; 78 struct resource *res_mem; 79 struct usb_ehci_pdata *pdata; 80 int irq; |
81 int err = -ENOMEM; | 81 int err; |
82 83 if (usb_disabled()) 84 return -ENODEV; 85 86 /* 87 * use reasonable defaults so platforms don't have to provide these. 88 * with DT probing on ARM, none of these are set. 89 */ 90 if (!dev_get_platdata(&dev->dev)) 91 dev->dev.platform_data = &ehci_platform_defaults; 92 if (!dev->dev.dma_mask) 93 dev->dev.dma_mask = &dev->dev.coherent_dma_mask; | 82 83 if (usb_disabled()) 84 return -ENODEV; 85 86 /* 87 * use reasonable defaults so platforms don't have to provide these. 88 * with DT probing on ARM, none of these are set. 89 */ 90 if (!dev_get_platdata(&dev->dev)) 91 dev->dev.platform_data = &ehci_platform_defaults; 92 if (!dev->dev.dma_mask) 93 dev->dev.dma_mask = &dev->dev.coherent_dma_mask; |
94 if (!dev->dev.coherent_dma_mask) 95 dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); | 94 err = dma_set_coherent_mask(&dev->dev, DMA_BIT_MASK(32)); 95 if (err) 96 return err; |
96 97 pdata = dev_get_platdata(&dev->dev); 98 99 irq = platform_get_irq(dev, 0); 100 if (irq < 0) { 101 dev_err(&dev->dev, "no irq provided"); 102 return irq; 103 } --- 154 unchanged lines hidden --- | 97 98 pdata = dev_get_platdata(&dev->dev); 99 100 irq = platform_get_irq(dev, 0); 101 if (irq < 0) { 102 dev_err(&dev->dev, "no irq provided"); 103 return irq; 104 } --- 154 unchanged lines hidden --- |