summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSakethram Bommisetti <sakethram.bommisetti@stericsson.com>2012-01-25 16:55:23 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:03:17 +0200
commitc25e434e1c5495d75747d0021ca9b1dadefdda88 (patch)
tree5a7a5a76d0d7e5f11e709945e2485999ed967502
parentfc38da7233c9a91e2a3bbf30115b31ad1c8bbd75 (diff)
ux500:USB: Use proper musb structure for 8500
On 8500 _musb is always NULL hence it will not restore the context._musb is required only on 5500 and hence adding a 5500 check ST-Ericsson Linux next: NA ST-Ericsson ID: 373930 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ic806d6983c97e632188a6ff568efe67bb86b1baa Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/46486 Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
-rw-r--r--drivers/usb/musb/ux500.c10
-rw-r--r--drivers/usb/otg/ab5500-usb.c3
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index 77454c6ead2..fe322cf541c 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -145,10 +145,12 @@ void ux500_restore_context(struct musb *musb)
if (!context_stored)
return;
- if (_musb != NULL)
- musb = _musb;
- else
- return;
+ if (cpu_is_u5500()) {
+ if (_musb != NULL)
+ musb = _musb;
+ else
+ return;
+ }
musb_base = musb->mregs;
if (is_host_enabled(musb)) {
diff --git a/drivers/usb/otg/ab5500-usb.c b/drivers/usb/otg/ab5500-usb.c
index ae2c2127598..d37529f7f0a 100644
--- a/drivers/usb/otg/ab5500-usb.c
+++ b/drivers/usb/otg/ab5500-usb.c
@@ -201,7 +201,8 @@ static void ab5500_usb_phy_enable(struct ab5500_usb *ab, bool sel_host)
clk_enable(ab->sysclk);
regulator_enable(ab->v_ape);
- ux500_restore_context();
+ /* TODO: Remove ux500_resotore_context and handle similar to ab8500 */
+ ux500_restore_context(NULL);
ret = gpio_direction_output(ab->usb_cs_gpio, 0);
if (ret < 0) {
dev_err(ab->dev, "usb_cs_gpio: gpio direction failed\n");