Changeset 581a0f88 in rtems


Ignore:
Timestamp:
Jul 24, 2018, 12:47:05 PM (15 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
65f52d0
Parents:
adede135
git-author:
Sebastian Huber <sebastian.huber@…> (07/24/18 12:47:05)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/25/18 08:07:44)
Message:

bsp/riscv: Use interrupt driven NS16550 driver

Update #3433.

Location:
bsps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bsps/include/bsp/fatal.h

    radede135 r581a0f88  
    152152  RISCV_FATAL_INVALID_PLIC_NDEV_IN_DEVICE_TREE,
    153153  RISCV_FATAL_TOO_LARGE_PLIC_NDEV_IN_DEVICE_TREE,
    154   RISCV_FATAL_INVALID_INTERRUPT_AFFINITY
     154  RISCV_FATAL_INVALID_INTERRUPT_AFFINITY,
     155  RISCV_FATAL_NO_NS16550_INTERRUPTS_IN_DEVICE_TREE
    155156} bsp_fatal_code;
    156157
  • bsps/riscv/riscv/console/console-config.c

    radede135 r581a0f88  
    134134        ctx->clock = fdt32_to_cpu(val[0]);
    135135
     136        val = (fdt32_t *) fdt_getprop(fdt, node, "interrupts", &len);
     137
     138        if (val == NULL || len != 4) {
     139          bsp_fatal(RISCV_FATAL_NO_NS16550_INTERRUPTS_IN_DEVICE_TREE);
     140        }
     141
     142        ctx->irq = RISCV_INTERRUPT_VECTOR_EXTERNAL(fdt32_to_cpu(val[0]));
     143
    136144        if (node == console_node) {
    137145          riscv_console.context = &ctx->base;
     
    199207    rtems_termios_device_install(
    200208      path,
    201       &ns16550_handler_polled,
     209      &ns16550_handler_interrupt,
    202210      NULL,
    203211      &ctx->base
Note: See TracChangeset for help on using the changeset viewer.