Ignore:
Timestamp:
2006-10-06T22:37:15Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
33b1903
Parents:
233af8c5
Message:

Add support for interrupt mapping in the Sabre PCI controller.
Add support for PCI and EBUS interrupt mapping via the OpenFirmware device tree.
Unfortunatelly, the code is not capable enough to earn single ns16550 interrupt.
I suspect something needs to be enabled in the EBUS registers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/drivers/ns16550.h

    r233af8c5 re2cc9a0  
    3939#include <arch/drivers/kbd.h>
    4040
     41/* NS16550 registers */
    4142#define RBR_REG         0       /** Receiver Buffer Register. */
    4243#define IER_REG         1       /** Interrupt Enable Register. */
     44#define IIR_REG         2       /** Interrupt Ident Register (read). */
     45#define FCR_REG         2       /** FIFO control register (write). */
     46#define LCR_REG         3       /** Line Control register. */
    4347#define LSR_REG         5       /** Line Status Register. */
     48
     49#define IER_ERBFI       0x01    /** Enable Receive Buffer Full Interrupt. */
     50
     51#define LCR_DLAB        0x80    /** Divisor Latch Access bit. */
    4452
    4553static inline uint8_t ns16550_rbr_read(void)
     
    5866}
    5967
     68static inline uint8_t ns16550_iir_read(void)
     69{
     70        return kbd_virt_address[IIR_REG];
     71}
     72
     73static inline void ns16550_fcr_write(uint8_t v)
     74{
     75        kbd_virt_address[FCR_REG] = v;
     76}
     77
     78static inline uint8_t ns16550_lcr_read(void)
     79{
     80        return kbd_virt_address[LCR_REG];
     81}
     82
     83static inline void ns16550_lcr_write(uint8_t v)
     84{
     85        kbd_virt_address[LCR_REG] = v;
     86}
     87
    6088static inline uint8_t ns16550_lsr_read(void)
    6189{
Note: See TracChangeset for help on using the changeset viewer.