haiku/headers/private/kernel/arch/generic/debug_uart_8250.h
Alexander von Gluck IV 7068c45485 system/uart: refactor debug_uart, fix arm uart
* Drop ArchUART8260 layer to reduce complexity. It's whole
  existance in life was to adjust the mmio alignment.
* Fold architecture mmio alignment into DebugUart
* We could potentially pass a Init(int mmioAlignment)
  arg in the future if the macros get too messy.
* Move Barrier code back a layer into DebugUART
* Fixes the arm uart and EFI build

Change-Id: I0f127d902993e9f6e6a03cac8c7c37c0363134bf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4422
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2021-09-06 20:37:14 +00:00

44 lines
812 B
C++

/*
* Copyright 2012-2021 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* François Revol, revol@free.fr
* Alexander von Gluck IV, kallisti5@unixzen.com
*/
#ifndef _KERNEL_ARCH_DEBUG_UART_8250_H
#define _KERNEL_ARCH_DEBUG_UART_8250_H
#include <sys/types.h>
#include <SupportDefs.h>
#include "debug_uart.h"
#define UART_KIND_8250 "8250"
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();
};
DebugUART8250* arch_get_uart_8250(addr_t base, int64 clock);
#endif /* _KERNEL_ARCH_DEBUG_UART_8250_H */