Changeset 6bbe470 in mainline for kernel/arch/amd64/src/amd64.c


Ignore:
Timestamp:
2012-10-29T22:56:18Z (12 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
21b6307
Parents:
5030acad
Message:

Implement output in ns16550 driver.

File:
1 edited

Legend:

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

    r5030acad r6bbe470  
    5555#include <genarch/kbrd/kbrd.h>
    5656#include <genarch/srln/srln.h>
    57 #include <genarch/drivers/dsrln/dsrlnout.h>
    5857#include <genarch/multiboot/multiboot.h>
    5958#include <genarch/multiboot/multiboot2.h>
     
    219218#endif
    220219
    221 #ifdef CONFIG_NS16550
     220#if (defined(CONFIG_NS16550) || defined(CONFIG_NS16550_OUT))
    222221        /*
    223          * Initialize the ns16550 controller. Then initialize the serial
    224          * input module and connect it to ns16550.
     222         * Initialize the ns16550 controller.
    225223         */
    226224        ns16550_instance_t *ns16550_instance
    227225            = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL);
    228226        if (ns16550_instance) {
     227#ifdef CONFIG_NS16550
    229228                srln_instance_t *srln_instance = srln_init();
    230229                if (srln_instance) {
     
    234233                        trap_virtual_enable_irqs(1 << IRQ_NS16550);
    235234                }
    236         }
    237 #endif
    238 
    239 #ifdef CONFIG_NS16550_DSRLNOUT
    240         /*
    241          * Initialize dummy serial output to the ns16550.
    242          */
    243         outdev_t *dsrlndev = dsrlnout_init(NS16550_BASE);
    244         if (dsrlndev) {
    245                 stdout_wire(dsrlndev);
     235#endif
     236#ifdef CONFIG_NS16550_OUT
     237                outdev_t *ns16550_out = ns16550_output(ns16550_instance);
     238                if (ns16550_out) {
     239                        stdout_wire(ns16550_out);
     240                }
     241#endif
    246242        }
    247243#endif
Note: See TracChangeset for help on using the changeset viewer.