Ignore:
Timestamp:
2010-07-27T21:29:29Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
07c66cf, 571addd
Parents:
3d9d948
Message:

Fix accidentally disabling FIFO in userspace. Also, log receive errors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hw/char/s3c24xx_uart/s3c24xx_uart.c

    r3d9d948 r1720cf9  
    162162        while ((pio_read_32(&uart->io->ufstat) & S3C24XX_UFSTAT_RX_COUNT) != 0) {
    163163                uint32_t data = pio_read_32(&uart->io->urxh) & 0xff;
    164                 pio_read_32(&uart->io->uerstat);
     164                uint32_t status = pio_read_32(&uart->io->uerstat);
    165165
    166166                if (uart->client_phone != -1) {
     
    168168                            data);
    169169                }
     170
     171                if (status & 0x0f)
     172                        printf(NAME ": Error status 0x%x\n", status);
    170173        }
    171174}
     
    198201        ipc_register_irq(inr, device_assign_devno(), 0, &uart_irq_code);
    199202
    200         /* Disable FIFO */
    201         pio_write_32(&uart->io->ufcon,
    202             pio_read_32(&uart->io->ufcon) & ~0x01);
     203        /* Enable FIFO, Tx trigger level: empty, Rx trigger level: 1 byte. */
     204        pio_write_32(&uart->io->ufcon, 0x01);
    203205
    204206        /* Set RX interrupt to pulse mode */
Note: See TracChangeset for help on using the changeset viewer.