From 86680e7f4b12e7d086259c2c8b60f226f4c12675 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 8 May 2008 09:03:19 +0000 Subject: 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 --- firmware/target/arm/imx31/gigabeat-s/usb-imx31.c | 10 ++++++---- 1 file 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 7a3ec27..a90384d 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 */ } } -- cgit v1.1