aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/phy/phy-fsl-usb.c14
-rw-r--r--drivers/usb/phy/phy-fsl-usb.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/usb/phy/phy-fsl-usb.c b/drivers/usb/phy/phy-fsl-usb.c
index b7f36b212422..ab38aa32a6c1 100644
--- a/drivers/usb/phy/phy-fsl-usb.c
+++ b/drivers/usb/phy/phy-fsl-usb.c
@@ -274,7 +274,7 @@ void b_srp_end(unsigned long foo)
274 fsl_otg_dischrg_vbus(0); 274 fsl_otg_dischrg_vbus(0);
275 srp_wait_done = 1; 275 srp_wait_done = 1;
276 276
277 if ((fsl_otg_dev->phy.state == OTG_STATE_B_SRP_INIT) && 277 if ((fsl_otg_dev->phy.otg->state == OTG_STATE_B_SRP_INIT) &&
278 fsl_otg_dev->fsm.b_sess_vld) 278 fsl_otg_dev->fsm.b_sess_vld)
279 fsl_otg_dev->fsm.b_srp_done = 1; 279 fsl_otg_dev->fsm.b_srp_done = 1;
280} 280}
@@ -624,7 +624,7 @@ static int fsl_otg_set_host(struct usb_otg *otg, struct usb_bus *host)
624 /* Mini-A cable connected */ 624 /* Mini-A cable connected */
625 struct otg_fsm *fsm = &otg_dev->fsm; 625 struct otg_fsm *fsm = &otg_dev->fsm;
626 626
627 otg.state = OTG_STATE_UNDEFINED; 627 otg->state = OTG_STATE_UNDEFINED;
628 fsm->protocol = PROTO_UNDEF; 628 fsm->protocol = PROTO_UNDEF;
629 } 629 }
630 } 630 }
@@ -682,7 +682,7 @@ static int fsl_otg_set_power(struct usb_phy *phy, unsigned mA)
682{ 682{
683 if (!fsl_otg_dev) 683 if (!fsl_otg_dev)
684 return -ENODEV; 684 return -ENODEV;
685 if (phy->otg.state == OTG_STATE_B_PERIPHERAL) 685 if (phy->otg->state == OTG_STATE_B_PERIPHERAL)
686 pr_info("FSL OTG: Draw %d mA\n", mA); 686 pr_info("FSL OTG: Draw %d mA\n", mA);
687 687
688 return 0; 688 return 0;
@@ -715,7 +715,7 @@ static int fsl_otg_start_srp(struct usb_otg *otg)
715{ 715{
716 struct fsl_otg *otg_dev; 716 struct fsl_otg *otg_dev;
717 717
718 if (!otg || otg.state != OTG_STATE_B_IDLE) 718 if (!otg || otg->state != OTG_STATE_B_IDLE)
719 return -ENODEV; 719 return -ENODEV;
720 720
721 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy); 721 otg_dev = container_of(otg->usb_phy, struct fsl_otg, phy);
@@ -990,10 +990,10 @@ int usb_otg_start(struct platform_device *pdev)
990 * Also: record initial state of ID pin 990 * Also: record initial state of ID pin
991 */ 991 */
992 if (fsl_readl(&p_otg->dr_mem_map->otgsc) & OTGSC_STS_USB_ID) { 992 if (fsl_readl(&p_otg->dr_mem_map->otgsc) & OTGSC_STS_USB_ID) {
993 p_otg->phy->otg.state = OTG_STATE_UNDEFINED; 993 p_otg->phy.otg->state = OTG_STATE_UNDEFINED;
994 p_otg->fsm.id = 1; 994 p_otg->fsm.id = 1;
995 } else { 995 } else {
996 p_otg->phy->otg.state = OTG_STATE_A_IDLE; 996 p_otg->phy.otg->state = OTG_STATE_A_IDLE;
997 p_otg->fsm.id = 0; 997 p_otg->fsm.id = 0;
998 } 998 }
999 999
@@ -1048,7 +1048,7 @@ static int show_fsl_usb2_otg_state(struct device *dev,
1048 /* State */ 1048 /* State */
1049 t = scnprintf(next, size, 1049 t = scnprintf(next, size,
1050 "OTG state: %s\n\n", 1050 "OTG state: %s\n\n",
1051 usb_otg_state_string(fsl_otg_dev->phy.state)); 1051 usb_otg_state_string(fsl_otg_dev->phy.otg->state));
1052 size -= t; 1052 size -= t;
1053 next += t; 1053 next += t;
1054 1054
diff --git a/drivers/usb/phy/phy-fsl-usb.h b/drivers/usb/phy/phy-fsl-usb.h
index 5986c96354df..23149954a09c 100644
--- a/drivers/usb/phy/phy-fsl-usb.h
+++ b/drivers/usb/phy/phy-fsl-usb.h
@@ -298,7 +298,7 @@
298/* SE0 Time Before SRP */ 298/* SE0 Time Before SRP */
299#define TB_SE0_SRP (2) /* b_idle,minimum 2 ms, section:5.3.2 */ 299#define TB_SE0_SRP (2) /* b_idle,minimum 2 ms, section:5.3.2 */
300 300
301#define SET_OTG_STATE(otg_ptr, newstate) ((otg_ptr)->state = newstate) 301#define SET_OTG_STATE(phy, newstate) ((phy)->otg->state = newstate)
302 302
303struct usb_dr_mmap { 303struct usb_dr_mmap {
304 /* Capability register */ 304 /* Capability register */