Changeset 37
- Timestamp:
- Nov 5, 2010, 4:01:49 PM (15 years ago)
- Location:
- trunk/src/os2ahci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/ahci.c
r36 r37 576 576 u8 _far *port_mmio = port_base(ai, p); 577 577 u32 tmp; 578 int timeout = 500 ;578 int timeout = 5000; 579 579 580 580 dprintf("resetting port %d.%d\n", ad_no(ai), p); … … 1046 1046 ddprintf("sending IDLE=%d command to port %d\n", idle, p); 1047 1047 return ahci_exec_polled_cmd(ai, p, 0, 500, ATA_CMD_IDLE, AP_COUNT, 1048 1048 idle ? 1 : 0, AP_END); 1049 1049 } 1050 1050 … … 1091 1091 if ((tmp = readl(port_mmio + PORT_SCR_ERR)) != 0) { 1092 1092 dprintf("SERR = 0x%08lx\n", tmp); 1093 return(-1);1093 timeout = 0; 1094 1094 } 1095 1095 if (((tmp = readl(port_mmio + PORT_TFDATA)) & 0x89) != 0) { 1096 1096 dprintf("TFDATA = 0x%08lx\n", tmp); 1097 timeout = 0; 1098 } 1099 1100 if (timeout <= 0) { 1101 ahci_reset_port(ai, p, 0); 1097 1102 return(-1); 1098 1103 } 1099 1100 return((timeout <= 0) ? -1 : 0); 1104 return(0); 1101 1105 } 1102 1106 -
trunk/src/os2ahci/libc.c
r26 r37 75 75 } com1_init_sequence[] = { 76 76 3, 0x80, /* overlay divisor latch register at 0x3f8 and 0x3f9 */ 77 0, 0x0 0, /* set low byte of divisor to 1 (115200 baud) */78 1, 0x0 1, /* set high byte of divisor to 0 */77 0, 0x01, /* set low byte of divisor to 1 (115200 baud) */ 78 1, 0x00, /* set high byte of divisor to 0 */ 79 79 3, 0x03, /* reset divisor latch register overlay and set 8,n,1 */ 80 80 1, 0x00, /* disable interrupts */ … … 94 94 95 95 /****************************************************************************** 96 * Initialize COM1 to 57600,n,8,196 * Initialize COM1 to 115200,n,8,1 97 97 */ 98 98 void init_com1(void)
Note:
See TracChangeset
for help on using the changeset viewer.