diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2011-09-05 11:29:32 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2011-09-05 11:29:32 +0000 |
commit | 7d4fed53cc1e8b0e5aa250ebea3a1b53fc3a50b2 (patch) | |
tree | 236a72d742675715fd599daaa98af8f4eeb45ad8 /firmware/target/arm/imx233/usb-imx233.c | |
parent | 11e1f71612f6c1ef8c17f8ceea17f69fd4bc7b02 (diff) | |
download | rockbox-7d4fed53cc1e8b0e5aa250ebea3a1b53fc3a50b2.tar.gz rockbox-7d4fed53cc1e8b0e5aa250ebea3a1b53fc3a50b2.zip |
imx233:fuze+: major memory and usb rework
- now identity map dram uncached and have a cached and buffered virtual alias
- rework dma to handle virtual to physical pointers conversion
- fix lcd frame pointer
- implement usb detection properly
- implement bootloader usb properly
- allow the bootloader to disable MMC windowing (useful for recovery)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30432 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/usb-imx233.c')
-rw-r--r-- | firmware/target/arm/imx233/usb-imx233.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/firmware/target/arm/imx233/usb-imx233.c b/firmware/target/arm/imx233/usb-imx233.c index e3b540fd1e..8e05da0a95 100644 --- a/firmware/target/arm/imx233/usb-imx233.c +++ b/firmware/target/arm/imx233/usb-imx233.c | |||
@@ -29,10 +29,20 @@ | |||
29 | #include "system.h" | 29 | #include "system.h" |
30 | #include "system-target.h" | 30 | #include "system-target.h" |
31 | 31 | ||
32 | int usb_status = USB_EXTRACTED; | 32 | |
33 | void usb_insert_int(void) | ||
34 | { | ||
35 | usb_status_event(USB_POWERED); | ||
36 | } | ||
37 | |||
38 | void usb_remove_int(void) | ||
39 | { | ||
40 | usb_status_event(USB_UNPOWERED); | ||
41 | } | ||
33 | 42 | ||
34 | void usb_drv_usb_detect_event() | 43 | void usb_drv_usb_detect_event() |
35 | { | 44 | { |
45 | printf("usb_drv_usb_detect_event"); | ||
36 | usb_status_event(USB_INSERTED); | 46 | usb_status_event(USB_INSERTED); |
37 | } | 47 | } |
38 | 48 | ||
@@ -58,16 +68,17 @@ void usb_init_device(void) | |||
58 | 68 | ||
59 | int usb_detect(void) | 69 | int usb_detect(void) |
60 | { | 70 | { |
61 | return usb_status; | 71 | return usb_plugged() ? USB_INSERTED : USB_EXTRACTED; |
62 | } | 72 | } |
63 | 73 | ||
64 | bool usb_plugged(void) | 74 | bool usb_plugged(void) |
65 | { | 75 | { |
66 | return true; | 76 | return !!(HW_POWER_STS & HW_POWER_STS__VBUSVALID); |
67 | } | 77 | } |
68 | 78 | ||
69 | void usb_enable(bool on) | 79 | void usb_enable(bool on) |
70 | { | 80 | { |
81 | /* FIXME: power up/down usb phy and pll usb */ | ||
71 | if(on) | 82 | if(on) |
72 | usb_core_init(); | 83 | usb_core_init(); |
73 | else | 84 | else |