ask to map in oxpcie i/o memory and support serial i/o for it in the kernel. set oxpcie=<address> in boot monitor (retrieve address using pci_debug=1 output). (no sanity checking is done on the address currently.) disabled by default. The change also contains some other minor cleanup (a new serial.h to set register info common to UART and the OXPCIe card, in-kernel memory mapping a little more structured and env_get() to get sysenv variables without knowing about the params_buffer).
20 lines
436 B
C
20 lines
436 B
C
|
|
#ifndef _KERN_SERIAL_H
|
|
#define _KERN_SERIAL_H 1
|
|
|
|
#define THRREG 0
|
|
#define RBRREG 0
|
|
#define FICRREG 2
|
|
#define LSRREG 5
|
|
#define LCRREG 3
|
|
#define SPRREG 7
|
|
|
|
#define COM1_BASE 0x3F8
|
|
#define COM1_THR (COM1_BASE + THRREG)
|
|
#define COM1_RBR (COM1_BASE + RBRREG)
|
|
#define COM1_LSR (COM1_BASE + LSRREG)
|
|
#define LSR_DR 0x01
|
|
#define LSR_THRE 0x20
|
|
#define LCR_DLA 0x80
|
|
|
|
#endif
|