Changeset 37


Ignore:
Timestamp:
Nov 5, 2010, 4:01:49 PM (15 years ago)
Author:
markus
Message:

changed serial port setup (still not working ok), prolonged timeout during port reset

Location:
trunk/src/os2ahci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/ahci.c

    r36 r37  
    576576  u8 _far *port_mmio = port_base(ai, p);
    577577  u32 tmp;
    578   int timeout = 500;
     578  int timeout = 5000;
    579579
    580580  dprintf("resetting port %d.%d\n", ad_no(ai), p);
     
    10461046  ddprintf("sending IDLE=%d command to port %d\n", idle, p);
    10471047  return ahci_exec_polled_cmd(ai, p, 0, 500, ATA_CMD_IDLE, AP_COUNT,
    1048                               idle ? 1 : 0, AP_END);
     1048                              idle ? 1 : 0, AP_END);
    10491049}
    10501050
     
    10911091  if ((tmp = readl(port_mmio + PORT_SCR_ERR)) != 0) {
    10921092    dprintf("SERR = 0x%08lx\n", tmp);
    1093     return(-1);
     1093    timeout = 0;
    10941094  }
    10951095  if (((tmp = readl(port_mmio + PORT_TFDATA)) & 0x89) != 0) {
    10961096    dprintf("TFDATA = 0x%08lx\n", tmp);
     1097    timeout = 0;
     1098  }
     1099
     1100  if (timeout <= 0) {
     1101    ahci_reset_port(ai, p, 0);
    10971102    return(-1);
    10981103  }
    1099 
    1100   return((timeout <= 0) ? -1 : 0);
     1104  return(0);
    11011105}
    11021106
  • trunk/src/os2ahci/libc.c

    r26 r37  
    7575} com1_init_sequence[] = {
    7676  3, 0x80,   /* overlay divisor latch register at 0x3f8 and 0x3f9 */
    77   0, 0x00,   /* set low byte of divisor to 1 (115200 baud) */
    78   1, 0x01,   /* 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 */
    7979  3, 0x03,   /* reset divisor latch register overlay and set 8,n,1 */
    8080  1, 0x00,   /* disable interrupts */
     
    9494
    9595/******************************************************************************
    96  * Initialize COM1 to 57600,n,8,1
     96 * Initialize COM1 to 115200,n,8,1
    9797 */
    9898void init_com1(void)
Note: See TracChangeset for help on using the changeset viewer.