diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-05-08 09:03:19 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-05-08 09:03:19 +0000 |
commit | 86680e7f4b12e7d086259c2c8b60f226f4c12675 (patch) | |
tree | d817874d468cb338f87d783da6a75e9b4669034f | |
parent | 6e5e20b1e17eb0a9c1f0e21b43dea0e60e4f5356 (diff) | |
download | rockbox-86680e7f4b12e7d086259c2c8b60f226f4c12675.tar.gz 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
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/usb-imx31.c | 10 |
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 */ } } |