Changeset 58775d30 in mainline for kernel/arch/ia32/src/ia32.c


Ignore:
Timestamp:
2015-03-16T16:07:21Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2003739
Parents:
6069061 (diff), 795e2bf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Mainline changes

File:
1 edited

Legend:

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

    r6069061 r58775d30  
    5050#include <genarch/drivers/ega/ega.h>
    5151#include <genarch/drivers/i8042/i8042.h>
     52#include <genarch/drivers/ns16550/ns16550.h>
    5253#include <genarch/drivers/legacy/ia32/io.h>
    5354#include <genarch/fb/bfb.h>
    5455#include <genarch/kbrd/kbrd.h>
     56#include <genarch/srln/srln.h>
    5557#include <genarch/multiboot/multiboot.h>
    5658#include <genarch/multiboot/multiboot2.h>
     
    122124}
    123125
    124 void arch_post_cpu_init()
     126void arch_post_cpu_init(void)
    125127{
    126128#ifdef CONFIG_SMP
     
    166168        }
    167169#endif
     170
     171#if (defined(CONFIG_NS16550) || defined(CONFIG_NS16550_OUT))
     172        /*
     173         * Initialize the ns16550 controller.
     174         */
     175#ifdef CONFIG_NS16550_OUT
     176        outdev_t *ns16550_out;
     177        outdev_t **ns16550_out_ptr = &ns16550_out;
     178#else
     179        outdev_t **ns16550_out_ptr = NULL;
     180#endif
     181        ns16550_instance_t *ns16550_instance
     182            = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL,
     183            ns16550_out_ptr);
     184        if (ns16550_instance) {
     185#ifdef CONFIG_NS16550
     186                srln_instance_t *srln_instance = srln_init();
     187                if (srln_instance) {
     188                        indev_t *sink = stdin_wire();
     189                        indev_t *srln = srln_wire(srln_instance, sink);
     190                        ns16550_wire(ns16550_instance, srln);
     191                        trap_virtual_enable_irqs(1 << IRQ_NS16550);
     192                }
     193#endif
     194#ifdef CONFIG_NS16550_OUT
     195                if (ns16550_out) {
     196                        stdout_wire(ns16550_out);
     197                }
     198#endif
     199        }
     200#endif
    168201       
    169202        if (irqs_info != NULL)
Note: See TracChangeset for help on using the changeset viewer.