add support for omap3 usbhost power domain control
authorJuha Riihimäki <juhriihi@esdhcp03565.research.nokia.com>
Thu, 16 Apr 2009 07:24:06 +0000 (10:24 +0300)
committerRiku Voipio <riku.voipio@nokia.com>
Fri, 17 Apr 2009 13:51:46 +0000 (16:51 +0300)
hw/omap3.c

index de66d7b..5dc4849 100644 (file)
@@ -2062,9 +2062,16 @@ static void omap3_prm_write(void *opaque, target_phys_addr_t addr,
         case 0x14a8: s->usbhost.pm_ivagrpsel = value & 1; break;
         case 0x14b0: s->usbhost.pm_wkst &= ~(value & 1); break;
         case 0x14c8: s->usbhost.pm_wkdep = value & 0x17; break;
-        case 0x14e0: s->usbhost.pm_pwstctrl = 0x030104 | (value & 0x13); break;
+        case 0x14e0:
+            s->usbhost.pm_pwstctrl = 0x030104 | (value & 0x13);
+            /* TODO: support USBHOST wakeup control. For now let's keep the
+             * USBHOST domain always in ON state and if another state is
+             * requested pretend that we just woke up */
+            s->usbhost.pm_pwstst = 0x3;
+            s->usbhost.pm_prepwstst = value & 3;
+            break;
         case 0x14e4: OMAP_RO_REG(addr); break;
-        case 0x14e8: s->usbhost.pm_prepwstst = value & 3; break;
+        case 0x14e8: /* ignore, we set the value in PWSTCTRL write */ break;
         default:
             OMAP_BAD_REGV(addr, value);
             break;