Date: Tue, 7 Apr 2015 15:12:04 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r281204 - head/sys/dev/uart Message-ID: <201504071512.t37FC4Hc081868@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Tue Apr 7 15:12:03 2015 New Revision: 281204 URL: https://svnweb.freebsd.org/changeset/base/281204 Log: 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 Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 14:47:27 2015 (r281203) +++ head/sys/dev/uart/uart_bus_fdt.c Tue Apr 7 15:12:03 2015 (r281204) @@ -83,10 +83,16 @@ uart_fdt_get_clock(phandle_t node, pcell 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 Modified: head/sys/dev/uart/uart_cpu_fdt.c ============================================================================== --- head/sys/dev/uart/uart_cpu_fdt.c Tue Apr 7 14:47:27 2015 (r281203) +++ head/sys/dev/uart/uart_cpu_fdt.c Tue Apr 7 15:12:03 2015 (r281204) @@ -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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504071512.t37FC4Hc081868>