aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/isp1760-if.c')
-rw-r--r--drivers/usb/host/isp1760-if.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index d4feebfc63bd..1c9f977a5c9c 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -3,6 +3,7 @@
3 * Currently there is support for 3 * Currently there is support for
4 * - OpenFirmware 4 * - OpenFirmware
5 * - PCI 5 * - PCI
6 * - PDEV (generic platform device centralized driver model)
6 * 7 *
7 * (c) 2007 Sebastian Siewior <bigeasy@linutronix.de> 8 * (c) 2007 Sebastian Siewior <bigeasy@linutronix.de>
8 * 9 *
@@ -11,6 +12,7 @@
11#include <linux/usb.h> 12#include <linux/usb.h>
12#include <linux/io.h> 13#include <linux/io.h>
13#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/usb/isp1760.h>
14 16
15#include "../core/hcd.h" 17#include "../core/hcd.h"
16#include "isp1760-hcd.h" 18#include "isp1760-hcd.h"
@@ -308,6 +310,8 @@ static int __devinit isp1760_plat_probe(struct platform_device *pdev)
308 struct resource *mem_res; 310 struct resource *mem_res;
309 struct resource *irq_res; 311 struct resource *irq_res;
310 resource_size_t mem_size; 312 resource_size_t mem_size;
313 struct isp1760_platform_data *priv = pdev->dev.platform_data;
314 unsigned int devflags = 0;
311 unsigned long irqflags = IRQF_SHARED | IRQF_DISABLED; 315 unsigned long irqflags = IRQF_SHARED | IRQF_DISABLED;
312 316
313 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 317 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -330,8 +334,23 @@ static int __devinit isp1760_plat_probe(struct platform_device *pdev)
330 } 334 }
331 irqflags |= irq_res->flags & IRQF_TRIGGER_MASK; 335 irqflags |= irq_res->flags & IRQF_TRIGGER_MASK;
332 336
337 if (priv) {
338 if (priv->is_isp1761)
339 devflags |= ISP1760_FLAG_ISP1761;
340 if (priv->bus_width_16)
341 devflags |= ISP1760_FLAG_BUS_WIDTH_16;
342 if (priv->port1_otg)
343 devflags |= ISP1760_FLAG_OTG_EN;
344 if (priv->analog_oc)
345 devflags |= ISP1760_FLAG_ANALOG_OC;
346 if (priv->dack_polarity_high)
347 devflags |= ISP1760_FLAG_DACK_POL_HIGH;
348 if (priv->dreq_polarity_high)
349 devflags |= ISP1760_FLAG_DREQ_POL_HIGH;
350 }
351
333 hcd = isp1760_register(mem_res->start, mem_size, irq_res->start, 352 hcd = isp1760_register(mem_res->start, mem_size, irq_res->start,
334 irqflags, &pdev->dev, dev_name(&pdev->dev), 0); 353 irqflags, &pdev->dev, dev_name(&pdev->dev), devflags);
335 if (IS_ERR(hcd)) { 354 if (IS_ERR(hcd)) {
336 pr_warning("isp1760: Failed to register the HCD device\n"); 355 pr_warning("isp1760: Failed to register the HCD device\n");
337 ret = -ENODEV; 356 ret = -ENODEV;