Ignore:
Timestamp:
2018-02-12T18:58:50Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Parents:
8192d8a
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-12 17:25:25)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-12 18:58:50)
Message:

Generalize ns16550 driver to work with more chips.

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/kbd.c

    r8192d8a r466e75ad  
    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.