summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/usb-drv-pp502x.c1
-rw-r--r--firmware/usb.c5
-rw-r--r--firmware/usbstack/usb_storage.c3
3 files changed, 5 insertions, 4 deletions
diff --git a/firmware/target/arm/usb-drv-pp502x.c b/firmware/target/arm/usb-drv-pp502x.c
index 7a88e2b..62addc1 100644
--- a/firmware/target/arm/usb-drv-pp502x.c
+++ b/firmware/target/arm/usb-drv-pp502x.c
@@ -353,7 +353,6 @@ bool usb_drv_powered(void)
/* manual: 32.14.1 Device Controller Initialization */
void usb_drv_init(void)
{
- trigger_cpu_boost();
REG_USBCMD &= ~USBCMD_RUN;
udelay(50000);
REG_USBCMD |= USBCMD_CTRL_RESET;
diff --git a/firmware/usb.c b/firmware/usb.c
index 3cd93d8..977a3fb 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -529,6 +529,10 @@ bool usb_inserted(void)
#ifdef HAVE_USBSTACK
void usb_request_exclusive_ata(void)
{
+ /* This is not really a clean place to start boosting the cpu. but it's
+ * currently the best one. We want to get rid of having to boost the cpu
+ * for usb anyway */
+ trigger_cpu_boost();
if(!exclusive_ata_access) {
queue_post(&usb_queue, USB_REQUEST_DISK, 0);
}
@@ -536,6 +540,7 @@ void usb_request_exclusive_ata(void)
void usb_release_exclusive_ata(void)
{
+ cancel_cpu_boost();
if(exclusive_ata_access) {
queue_post(&usb_queue, USB_RELEASE_DISK, 0);
exclusive_ata_access = false;
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 8de0f41..c528a3a 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -879,7 +879,6 @@ static void handle_scsi(struct command_block_wrapper* cbw)
cur_sense_data.ascq=0;
}
else {
- trigger_cpu_boost();
cur_cmd.last_result = ata_read_sectors(IF_MV2(cur_cmd.lun,)
cur_cmd.sector,
MIN(BUFFER_SIZE/SECTOR_SIZE,
@@ -917,7 +916,6 @@ static void handle_scsi(struct command_block_wrapper* cbw)
cur_sense_data.ascq=0;
}
else {
- trigger_cpu_boost();
receive_block_data(cur_cmd.data[0],
MIN(BUFFER_SIZE,
cur_cmd.count*SECTOR_SIZE));
@@ -953,7 +951,6 @@ static void receive_block_data(void *data,int size)
static void send_csw(int status)
{
- cancel_cpu_boost();
tb.csw->signature = htole32(CSW_SIGNATURE);
tb.csw->tag = cur_cmd.tag;
tb.csw->data_residue = 0;