summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-05-08 09:03:19 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-05-08 09:03:19 +0000
commit86680e7f4b12e7d086259c2c8b60f226f4c12675 (patch)
treed817874d468cb338f87d783da6a75e9b4669034f /firmware/target/arm/imx31/gigabeat-s/usb-imx31.c
parent6e5e20b1e17eb0a9c1f0e21b43dea0e60e4f5356 (diff)
downloadrockbox-86680e7f4b12e7d086259c2c8b60f226f4c12675.tar.gz
rockbox-86680e7f4b12e7d086259c2c8b60f226f4c12675.tar.bz2
rockbox-86680e7f4b12e7d086259c2c8b60f226f4c12675.zip
Gigabeat S: Put in (so it appears) proper delays for USB PHY reset. Use the atomic regmod functions to change bits.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17411 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx31/gigabeat-s/usb-imx31.c')
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/usb-imx31.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c
index 7a3ec27ee7..a90384d35e 100644
--- a/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/usb-imx31.c
@@ -35,14 +35,16 @@ static void enable_transceiver(bool enable)
{
if (GPIO1_DR & (1 << 30))
{
- GPIO3_DR &= ~(1 << 16); /* Reset ISP1504 */
- GPIO3_DR |= (1 << 16);
- GPIO1_DR &= ~(1 << 30); /* Select ISP1504 */
+ imx31_regmod32(&GPIO3_DR, 0, (1 << 16)); /* Reset ISP1504 */
+ sleep(HZ/100);
+ imx31_regmod32(&GPIO3_DR, (1 << 16), (1 << 16));
+ sleep(HZ/10);
+ imx31_regmod32(&GPIO1_DR, 0, (1 << 30)); /* Select ISP1504 */
}
}
else
{
- GPIO1_DR |= (1 << 30); /* Deselect ISP1504 */
+ imx31_regmod32(&GPIO1_DR, (1 << 30), (1 << 30)); /* Deselect ISP1504 */
}
}