diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/usb-meg-fx.c')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/usb-meg-fx.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/usb-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/usb-meg-fx.c index af66e2a60c..374fb21136 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/usb-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/usb-meg-fx.c | |||
@@ -17,7 +17,6 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | 19 | #include "config.h" |
20 | #include <stdbool.h> | ||
21 | #include "cpu.h" | 20 | #include "cpu.h" |
22 | #include "system.h" | 21 | #include "system.h" |
23 | #include "kernel.h" | 22 | #include "kernel.h" |
@@ -46,14 +45,14 @@ void usb_init_device(void) | |||
46 | /* Input is the default configuration, only pullups need to be disabled */ | 45 | /* Input is the default configuration, only pullups need to be disabled */ |
47 | /* GPFUP|=0x02; */ | 46 | /* GPFUP|=0x02; */ |
48 | 47 | ||
49 | USB_VPLUS_PWR_ASSERT; | ||
50 | GPBCON=( GPBCON&~(1<<13) ) | (1 << 12); | 48 | GPBCON=( GPBCON&~(1<<13) ) | (1 << 12); |
49 | USB_VPLUS_PWR_ASSERT; | ||
51 | 50 | ||
52 | sleep(HZ/20); | 51 | sleep(HZ/20); |
53 | 52 | ||
54 | /* Reset the usb port */ | 53 | /* Reset the usb port */ |
55 | USB_RST_ASSERT; | ||
56 | GPBCON = (GPBCON & ~0x200) | 0x100; /* Make sure reset line is an output */ | 54 | GPBCON = (GPBCON & ~0x200) | 0x100; /* Make sure reset line is an output */ |
55 | USB_RST_ASSERT; | ||
57 | 56 | ||
58 | sleep(HZ/25); | 57 | sleep(HZ/25); |
59 | USB_RST_DEASSERT; | 58 | USB_RST_DEASSERT; |
@@ -75,6 +74,9 @@ void usb_init_device(void) | |||
75 | 74 | ||
76 | void usb_enable(bool on) | 75 | void usb_enable(bool on) |
77 | { | 76 | { |
77 | GPHCON=( GPHCON&~(1<<17) ) | (1<<16); /* Make the pin an output */ | ||
78 | GPHUP|=1<<8; /* Disable pullup in SOC as we are now driving */ | ||
79 | |||
78 | if (on) | 80 | if (on) |
79 | { | 81 | { |
80 | USB_VPLUS_PWR_ASSERT; | 82 | USB_VPLUS_PWR_ASSERT; |
@@ -86,9 +88,5 @@ void usb_enable(bool on) | |||
86 | USB_VPLUS_PWR_DEASSERT; | 88 | USB_VPLUS_PWR_DEASSERT; |
87 | } | 89 | } |
88 | 90 | ||
89 | /* Make sure USB_CRADLE_BUS pin is an output */ | ||
90 | GPHCON=( GPHCON&~(1<<17) ) | (1<<16); /* Make the pin an output */ | ||
91 | GPHUP|=1<<8; /* Disable pullup in SOC as we are now driving */ | ||
92 | |||
93 | sleep(HZ/20); // > 50ms for detecting the enable state change | 91 | sleep(HZ/20); // > 50ms for detecting the enable state change |
94 | } | 92 | } |