mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-24 16:10:11 +00:00
Get the fdt uart driver working on arm64, there is no machine/fdt.h, and
the default shift should be 2 for the SoCs we support. Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
079419ddc2
commit
be3b046ce8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281204
@ -83,10 +83,16 @@ uart_fdt_get_clock(phandle_t node, pcell_t *cell)
|
||||
int
|
||||
uart_fdt_get_shift(phandle_t node, pcell_t *cell)
|
||||
{
|
||||
#ifdef __aarch64__
|
||||
#define DEFAULT_SHIFT 2
|
||||
#else
|
||||
#define DEFAULT_SHIFT 0
|
||||
#endif
|
||||
|
||||
if ((OF_getencprop(node, "reg-shift", cell, sizeof(*cell))) <= 0)
|
||||
*cell = 0;
|
||||
*cell = DEFAULT_SHIFT;
|
||||
return (0);
|
||||
#undef DEFAULT_SHIFT
|
||||
}
|
||||
|
||||
static uintptr_t
|
||||
|
@ -42,7 +42,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <vm/pmap.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#ifndef __aarch64__
|
||||
#include <machine/fdt.h>
|
||||
#endif
|
||||
|
||||
#include <dev/fdt/fdt_common.h>
|
||||
#include <dev/ofw/ofw_bus.h>
|
||||
@ -52,6 +54,10 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/uart/uart_cpu.h>
|
||||
#include <dev/uart/uart_cpu_fdt.h>
|
||||
|
||||
#ifdef __aarch64__
|
||||
extern bus_space_tag_t fdtbus_bs_tag;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* UART console routines.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user