Changeset 3296df5 in mainline for kernel/arch/ia32/src/ia32.c


Ignore:
Timestamp:
2012-10-28T21:34:06Z (11 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24b06199
Parents:
b2ac3998
Message:

Add NS16550 serial input support on ia32 and amd64 platforms.

This is based on ia64 code for the same.
Currently the port used is hardcoded to be COM1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/ia32.c

    rb2ac3998 r3296df5  
    5151#include <genarch/drivers/ega/ega.h>
    5252#include <genarch/drivers/i8042/i8042.h>
     53#include <genarch/drivers/ns16550/ns16550.h>
    5354#include <genarch/drivers/legacy/ia32/io.h>
    5455#include <genarch/fb/bfb.h>
    5556#include <genarch/kbrd/kbrd.h>
     57#include <genarch/srln/srln.h>
    5658#include <genarch/multiboot/multiboot.h>
    5759#include <genarch/multiboot/multiboot2.h>
     
    169171        }
    170172#endif
     173
     174#ifdef CONFIG_NS16550
     175        /*
     176         * Initialize the ns16550 controller. Then initialize the serial
     177         * input module and connect it to ns16550.
     178         */
     179        ns16550_instance_t *ns16550_instance
     180            = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL);
     181        if (ns16550_instance) {
     182                srln_instance_t *srln_instance = srln_init();
     183                if (srln_instance) {
     184                        indev_t *sink = stdin_wire();
     185                        indev_t *srln = srln_wire(srln_instance, sink);
     186                        ns16550_wire(ns16550_instance, srln);
     187                }
     188        }
     189#endif
    171190       
    172191        if (irqs_info != NULL)
Note: See TracChangeset for help on using the changeset viewer.