diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-07-26 03:52:21 +0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-26 03:52:21 +0400 |
commit | 5ffdcd94ea0171cf9a3ca63051c2246426103b5b (patch) | |
tree | dfa1522796d5af649caf64ac6e2f1e69119e85d0 /drivers/usb/otg/ulpi.c | |
parent | cf40f082f8d3a98e28af02af20d00d2500eb6a65 (diff) | |
parent | b37fa16e78d6f9790462b3181602a26b5af36260 (diff) | |
download | linux-5ffdcd94ea0171cf9a3ca63051c2246426103b5b.tar.xz |
Merge commit 'v2.6.35-rc6' into spi/test
Diffstat (limited to 'drivers/usb/otg/ulpi.c')
-rw-r--r-- | drivers/usb/otg/ulpi.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c index b1b346932946..d331b222ad21 100644 --- a/drivers/usb/otg/ulpi.c +++ b/drivers/usb/otg/ulpi.c @@ -59,12 +59,17 @@ static int ulpi_set_flags(struct otg_transceiver *otg) static int ulpi_init(struct otg_transceiver *otg) { - int i, vid, pid; - - vid = (otg_io_read(otg, ULPI_VENDOR_ID_HIGH) << 8) | - otg_io_read(otg, ULPI_VENDOR_ID_LOW); - pid = (otg_io_read(otg, ULPI_PRODUCT_ID_HIGH) << 8) | - otg_io_read(otg, ULPI_PRODUCT_ID_LOW); + int i, vid, pid, ret; + u32 ulpi_id = 0; + + for (i = 0; i < 4; i++) { + ret = otg_io_read(otg, ULPI_PRODUCT_ID_HIGH - i); + if (ret < 0) + return ret; + ulpi_id = (ulpi_id << 8) | ret; + } + vid = ulpi_id & 0xffff; + pid = ulpi_id >> 16; pr_info("ULPI transceiver vendor/product ID 0x%04x/0x%04x\n", vid, pid); |