Changeset 38b0ae2 in mainline for kernel/arch


Ignore:
Timestamp:
2018-02-12T20:16:44Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
448e093
Parents:
8192d8a
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-12 20:16:44)
git-committer:
GitHub <noreply@…> (2018-02-12 20:16:44)
Message:

Generalize ns16550 driver to work with more chips. (#20)

Some UART controllers are compatible with 16550A, but have more spacing
between registers. In particular, ARMADA 385, which is the basis of
Turris Omnia router, has a compatible UART with 32b registers instead of 8b
(with the top three bytes unused).

Note: The device tree file hints that some UARTs may need register reads/writes
that are wider than 8 bits, and this commit does not address that possibility.

Location:
kernel/arch
Files:
4 edited

Legend:

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

    r8192d8a r38b0ae2  
    216216#endif
    217217        ns16550_instance_t *ns16550_instance
    218             = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL,
     218            = ns16550_init(NS16550_BASE, 0, IRQ_NS16550, NULL, NULL,
    219219            ns16550_out_ptr);
    220220        if (ns16550_instance) {
  • kernel/arch/ia32/src/ia32.c

    r8192d8a r38b0ae2  
    201201#endif
    202202        ns16550_instance_t *ns16550_instance
    203             = ns16550_init((ns16550_t *) NS16550_BASE, IRQ_NS16550, NULL, NULL,
     203            = ns16550_init(NS16550_BASE, 0, IRQ_NS16550, NULL, NULL,
    204204            ns16550_out_ptr);
    205205        if (ns16550_instance) {
  • kernel/arch/ia64/src/ia64.c

    r8192d8a r38b0ae2  
    181181#ifdef CONFIG_NS16550
    182182        ns16550_instance_t *ns16550_instance
    183             = ns16550_init((ns16550_t *) NS16550_BASE, NS16550_IRQ, NULL, NULL,
     183            = ns16550_init(NS16550_BASE, 0, NS16550_IRQ, NULL, NULL,
    184184            NULL);
    185185        if (ns16550_instance) {
  • kernel/arch/sparc64/src/drivers/kbd.c

    r8192d8a r38b0ae2  
    118118        size_t offset = pa - aligned_addr;
    119119       
    120         ns16550_t *ns16550 = (ns16550_t *) (km_map(aligned_addr, offset + size,
     120        ioport8_t *ns16550 = (ioport8_t *) (km_map(aligned_addr, offset + size,
    121121            PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset);
    122122       
    123         ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, inr, cir,
     123        ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, 0, inr, cir,
    124124            cir_arg, NULL);
    125125        if (ns16550_instance) {
Note: See TracChangeset for help on using the changeset viewer.