summaryrefslogtreecommitdiff
path: root/package/platform/lantiq/ltq-hcd
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-15 11:01:05 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-12-15 11:01:05 +0000
commit36e626f26da5bb9a39288559c5d8e9b59f4565e5 (patch)
tree211dc9f8a77e2c9e2656d80541ddf4b1f9a55e85 /package/platform/lantiq/ltq-hcd
parent553786683f6d1316f38c7459fb17f3f88e9c553d (diff)
[lantiq] allow to load only 1 usb port on AR9 / VR9
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34700 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/platform/lantiq/ltq-hcd')
-rw-r--r--package/platform/lantiq/ltq-hcd/src/ifxusb_driver.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/package/platform/lantiq/ltq-hcd/src/ifxusb_driver.c b/package/platform/lantiq/ltq-hcd/src/ifxusb_driver.c
index b49a197883..c30cf44914 100644
--- a/package/platform/lantiq/ltq-hcd/src/ifxusb_driver.c
+++ b/package/platform/lantiq/ltq-hcd/src/ifxusb_driver.c
@@ -305,6 +305,8 @@ static int ifxusb_driver_probe(struct platform_device *_pdev)
int retval = 0;
struct device_node *np;
int gpio_count;
+ u32 port_mask = 0x1;
+
#ifdef __IS_DANUBE__
np = of_find_compatible_node(NULL, NULL, "lantiq,ifxhcd-danube");
#elif defined __IS_AMAZON_SE__
@@ -318,7 +320,7 @@ static int ifxusb_driver_probe(struct platform_device *_pdev)
dev_err(&_pdev->dev, "failed to find hcd device node\n");
return -ENODEV;
}
-
+ of_property_read_u32(np, "lantiq,portmask", &port_mask);
// Parsing and store the parameters
IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
parse_parms();
@@ -349,24 +351,27 @@ static int ifxusb_driver_probe(struct platform_device *_pdev)
ifxusb_hcd_1.dev=&_pdev->dev;
ifxusb_hcd_2.dev=&_pdev->dev;
- retval = ifxusb_driver_probe_h(&ifxusb_hcd_1,
+ if (port_mask & 0x1) {
+ retval = ifxusb_driver_probe_h(&ifxusb_hcd_1,
IFXUSB1_IRQ,
IFXUSB1_IOMEM_BASE,
IFXUSB1_FIFOMEM_BASE,
IFXUSB1_FIFODBG_BASE
);
- if(retval)
- goto ifxusb_driver_probe_fail;
+ if(retval)
+ goto ifxusb_driver_probe_fail;
+ }
- retval = ifxusb_driver_probe_h(&ifxusb_hcd_2,
+ if (port_mask & 0x2) {
+ retval = ifxusb_driver_probe_h(&ifxusb_hcd_2,
IFXUSB2_IRQ,
IFXUSB2_IOMEM_BASE,
IFXUSB2_FIFOMEM_BASE,
IFXUSB2_FIFODBG_BASE
);
- if(retval)
- goto ifxusb_driver_probe_fail;
-
+ if(retval)
+ goto ifxusb_driver_probe_fail;
+ }
#elif defined(__IS_FIRST__)
memset(&ifxusb_hcd, 0, sizeof(ifxhcd_hcd_t));