mirror of
https://review.haiku-os.org/haiku
synced 2025-02-05 21:36:49 +01:00
e9ec7a55dd
* introduce a DebugUART baseclass, * rework 8250 and PL011 implementations from kallisti5 to inherit DebutUART, * each arch should override the IO methods to access registers. * on ARM registers are 32bit-aligned. * U-Boot still works for the verdex target. * rPi still compiles, needs testing. * Still some more consolidation needed to allow runtime choice of the UART type (as read from FDT blobs for ex.). * serial.cpp should probably mostly be made generic as well. * didn't touch x86 or ppc yet.
38 lines
730 B
C++
38 lines
730 B
C++
/*
|
|
* Copyright 2012 Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* François Revol, revol@free.fr
|
|
*/
|
|
#ifndef _KERNEL_ARCH_DEBUG_UART_8250_H
|
|
#define _KERNEL_ARCH_DEBUG_UART_8250_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
#include <sys/types.h>
|
|
|
|
#include "debug_uart.h"
|
|
|
|
|
|
class DebugUART8250 : public DebugUART {
|
|
public:
|
|
DebugUART8250(addr_t base, int64 clock);
|
|
~DebugUART8250();
|
|
|
|
void InitEarly();
|
|
void Init();
|
|
void InitPort(uint32 baud);
|
|
|
|
int PutChar(char c);
|
|
int GetChar(bool wait);
|
|
|
|
void FlushTx();
|
|
void FlushRx();
|
|
};
|
|
|
|
|
|
extern DebugUART8250 *arch_get_uart_8250(addr_t base, int64 clock);
|
|
|
|
#endif /* _KERNEL_ARCH_DEBUG_UART_8250_H */
|