From 0071351eefe7bf09b3dc8ccd7e0aa379de9a6bd3 Mon Sep 17 00:00:00 2001 From: mengtianfang Date: Thu, 20 Nov 2014 10:54:46 +0800 Subject: [PATCH] 1.Modify pmon/common/main.c The speed of programming flash pmon is very slow, because the south bridge 1A hasn't been stopped. 2.Modify sys/dev/usb/usb_storage.c Fixup the ohci_storage code bug about pioneer DVD-ROM. According to the Change-Id: Iba56042f1d3596aa40bd85e05c908c4b2663ecd8 and Change-Id: I11b499266503fbdb2091484e5e18e9372beecf40 from lixuefeng. Change-Id: I76d536e9cf1a43beb0bf3e07d2ee66c681918de7 Target:LS2G1A --- pmon/common/main.c | 5 ----- sys/dev/usb/usb_storage.c | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pmon/common/main.c b/pmon/common/main.c index 3c3ef21c..ff4afa32 100644 --- a/pmon/common/main.c +++ b/pmon/common/main.c @@ -976,13 +976,8 @@ static const char more_tiks[] = "|/-\\"; static const char *more_tik; tik_cnt -= rate; -#ifndef LOONGSON_2G1A - /* if 2g1a deal with ohci kbd, - * the speed of online programming flash pmon will be slow - */ if(ohci_index) dl_ohci_kbd(); -#endif if (tik_cnt > 0) { return; } diff --git a/sys/dev/usb/usb_storage.c b/sys/dev/usb/usb_storage.c index 83943196..98c639e4 100644 --- a/sys/dev/usb/usb_storage.c +++ b/sys/dev/usb/usb_storage.c @@ -910,7 +910,7 @@ static int usb_request_sense(ccb *srb,struct us_data *ss) static int usb_test_unit_ready(ccb *srb,struct us_data *ss) { -#if (defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H)) +#if (defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H) || defined(LOONGSON_2G1A)) //fixup the pioneer DVD-ROM match bug int retries = 30; #else @@ -1019,14 +1019,14 @@ usb_stor_read(int device, unsigned long blknr, unsigned long blkcnt, unsigned lo } else { smallblks=(unsigned short) blks; } -#if (defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H)) +#if (defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H) || defined(LOONGSON_2G1A)) s = splimp(); #endif retry_it: //if(smallblks==USB_MAX_READ_BLK) // usb_show_progress(); -#if (defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H)) +#if (defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H) || defined(LOONGSON_2G1A)) //fixup pioneer DVD-ROM sleep bug if(usb_test_unit_ready(srb,(struct us_data *)dev->privptr)) { printf("Device NOT ready\n Request Sense returned %02X %02X %02X\n", @@ -1036,7 +1036,7 @@ retry_it: #endif srb->datalen=usb_dev_desc[device].blksz * smallblks; srb->pdata=(unsigned char *)buf_addr; -#if (!(defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H))) +#if (!(defined(LOONGSON_2G5536) || defined(LOONGSON_3A2H) || defined(LOONGSON_2G1A))) s = splimp(); #endif if(usb_read_10(srb,(struct us_data *)dev->privptr, start, smallblks)) {