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
This commit is contained in:
Amaury Pouly 2011-09-05 11:29:32 +00:00
parent 11e1f71612
commit 7d4fed53cc
17 changed files with 353 additions and 104 deletions

View file

@ -29,10 +29,20 @@
#include "system.h"
#include "system-target.h"
int usb_status = USB_EXTRACTED;
void usb_insert_int(void)
{
usb_status_event(USB_POWERED);
}
void usb_remove_int(void)
{
usb_status_event(USB_UNPOWERED);
}
void usb_drv_usb_detect_event()
{
printf("usb_drv_usb_detect_event");
usb_status_event(USB_INSERTED);
}
@ -58,16 +68,17 @@ void usb_init_device(void)
int usb_detect(void)
{
return usb_status;
return usb_plugged() ? USB_INSERTED : USB_EXTRACTED;
}
bool usb_plugged(void)
{
return true;
return !!(HW_POWER_STS & HW_POWER_STS__VBUSVALID);
}
void usb_enable(bool on)
{
/* FIXME: power up/down usb phy and pll usb */
if(on)
usb_core_init();
else