summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/usb-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-10-20 22:39:39 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-10-21 01:23:14 +0200
commit46416c619d586c45647ddc76045b0ed253733d57 (patch)
tree3d6ad82a2923bede48a0109537497bbf3bfd3274 /firmware/target/arm/imx233/usb-imx233.c
parent187017bad1c5192c50019a15952f7dd9f36eb3e5 (diff)
downloadrockbox-46416c619d586c45647ddc76045b0ed253733d57.tar.gz
rockbox-46416c619d586c45647ddc76045b0ed253733d57.zip
imx233: fix usb_detect() to be consistent with vbus detection
The STMP3700 has unreliable vbusvalid irq so we need to use vdd5gtvddio. Therefore, using the vbusvalid bit produces inconsistent results between events and detect. Fix that by making power handle all the usb detect stuff. Change-Id: Ic521b2f6677602e184fe46352c5359f4b4ba8d56
Diffstat (limited to 'firmware/target/arm/imx233/usb-imx233.c')
-rw-r--r--firmware/target/arm/imx233/usb-imx233.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/usb-imx233.c b/firmware/target/arm/imx233/usb-imx233.c
index a4099ceecf..05e412c77a 100644
--- a/firmware/target/arm/imx233/usb-imx233.c
+++ b/firmware/target/arm/imx233/usb-imx233.c
@@ -61,7 +61,7 @@ void usb_init_device(void)
61 61
62int usb_detect(void) 62int usb_detect(void)
63{ 63{
64 return BF_RD(POWER_STS, VBUSVALID) ? USB_INSERTED : USB_EXTRACTED; 64 return imx233_power_usb_detect() ? USB_INSERTED : USB_EXTRACTED;
65} 65}
66 66
67void usb_enable(bool on) 67void usb_enable(bool on)