Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Retire fdt_putchar and ap_early_put_char in favour ...
details: https://anonhg.NetBSD.org/src/rev/3a5f7a9fbe02
branches: trunk
changeset: 445476:3a5f7a9fbe02
user: skrll <skrll%NetBSD.org@localhost>
date: Tue Oct 30 16:41:51 2018 +0000
description:
Retire fdt_putchar and ap_early_put_char in favour of uartputc.
diffstat:
sys/arch/arm/acpi/acpi_platform.c | 10 +-----
sys/arch/arm/altera/cycv_platform.c | 33 ++++++++++-----------
sys/arch/arm/broadcom/bcm283x_platform.c | 10 ++----
sys/arch/arm/cavium/thunderx_platform.c | 5 +--
sys/arch/arm/fdt/arm_fdtvar.h | 3 +-
sys/arch/arm/nvidia/tegra_platform.c | 40 ++++++++++++--------------
sys/arch/arm/rockchip/rk_platform.c | 6 +--
sys/arch/arm/samsung/exynos_platform.c | 6 +--
sys/arch/arm/sunxi/sunxi_platform.c | 12 +------
sys/arch/arm/ti/ti_platform.c | 36 ++++++++++++-----------
sys/arch/arm/vexpress/vexpress_platform.c | 46 +++++++++++++++---------------
sys/arch/arm/virt/virt_platform.c | 43 ++++++++++++++--------------
sys/arch/evbarm/fdt/fdt_machdep.c | 19 ++----------
13 files changed, 115 insertions(+), 154 deletions(-)
diffs (truncated from 709 to 300 lines):
diff -r f0baacee784f -r 3a5f7a9fbe02 sys/arch/arm/acpi/acpi_platform.c
--- a/sys/arch/arm/acpi/acpi_platform.c Tue Oct 30 14:43:38 2018 +0000
+++ b/sys/arch/arm/acpi/acpi_platform.c Tue Oct 30 16:41:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_platform.c,v 1.5 2018/10/28 10:21:42 jmcneill Exp $ */
+/* $NetBSD: acpi_platform.c,v 1.6 2018/10/30 16:41:51 skrll Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include "opt_efi.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.5 2018/10/28 10:21:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_platform.c,v 1.6 2018/10/30 16:41:51 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -214,11 +214,6 @@
}
static void
-acpi_platform_early_putchar(char c)
-{
-}
-
-static void
acpi_platform_device_register(device_t self, void *aux)
{
}
@@ -245,7 +240,6 @@
.ap_bootstrap = acpi_platform_bootstrap,
.ap_startup = acpi_platform_startup,
.ap_init_attach_args = acpi_platform_init_attach_args,
- .ap_early_putchar = acpi_platform_early_putchar,
.ap_device_register = acpi_platform_device_register,
.ap_reset = acpi_platform_reset,
.ap_delay = gtmr_delay,
diff -r f0baacee784f -r 3a5f7a9fbe02 sys/arch/arm/altera/cycv_platform.c
--- a/sys/arch/arm/altera/cycv_platform.c Tue Oct 30 14:43:38 2018 +0000
+++ b/sys/arch/arm/altera/cycv_platform.c Tue Oct 30 16:41:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cycv_platform.c,v 1.5 2018/10/28 14:58:20 aymeric Exp $ */
+/* $NetBSD: cycv_platform.c,v 1.6 2018/10/30 16:41:52 skrll Exp $ */
/* This file is in the public domain. */
@@ -6,7 +6,7 @@
#include "opt_multiprocessor.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.5 2018/10/28 14:58:20 aymeric Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cycv_platform.c,v 1.6 2018/10/30 16:41:52 skrll Exp $");
#define _ARM32_BUS_DMA_PRIVATE
#include <sys/param.h>
@@ -30,7 +30,20 @@
#include <arm/fdt/arm_fdtvar.h>
#include <dev/fdt/fdtvar.h>
-static void cycv_platform_early_putchar(char);
+void cycv_platform_early_putchar(char);
+
+void
+cycv_platform_early_putchar(char c) {
+#ifdef CONSADDR
+#define CONSADDR_VA (CONSADDR - CYCV_PERIPHERAL_BASE + CYCV_PERIPHERAL_VBASE)
+ volatile uint32_t *uartaddr = (volatile uint32_t *) CONSADDR_VA;
+
+ while ((le32toh(uartaddr[com_lsr]) & LSR_TXRDY) == 0)
+ ;
+
+ uartaddr[com_data] = htole32(c);
+#endif
+}
static const struct pmap_devmap *
cycv_platform_devmap(void) {
@@ -100,19 +113,6 @@
}
static void
-cycv_platform_early_putchar(char c) {
-#ifdef CONSADDR
-#define CONSADDR_VA (CONSADDR - CYCV_PERIPHERAL_BASE + CYCV_PERIPHERAL_VBASE)
- volatile uint32_t *uartaddr = (volatile uint32_t *) CONSADDR_VA;
-
- while ((le32toh(uartaddr[com_lsr]) & LSR_TXRDY) == 0)
- ;
-
- uartaddr[com_data] = htole32(c);
-#endif
-}
-
-static void
cycv_platform_device_register(device_t dev, void *aux) {
prop_dictionary_t dict = device_properties(dev);
@@ -143,7 +143,6 @@
.ap_devmap = cycv_platform_devmap,
.ap_bootstrap = cycv_platform_bootstrap,
.ap_init_attach_args = cycv_platform_init_attach_args,
- .ap_early_putchar = cycv_platform_early_putchar,
.ap_device_register = cycv_platform_device_register,
.ap_reset = cycv_platform_reset,
.ap_delay = a9tmr_delay,
diff -r f0baacee784f -r 3a5f7a9fbe02 sys/arch/arm/broadcom/bcm283x_platform.c
--- a/sys/arch/arm/broadcom/bcm283x_platform.c Tue Oct 30 14:43:38 2018 +0000
+++ b/sys/arch/arm/broadcom/bcm283x_platform.c Tue Oct 30 16:41:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm283x_platform.c,v 1.21 2018/10/20 05:53:22 ryo Exp $ */
+/* $NetBSD: bcm283x_platform.c,v 1.22 2018/10/30 16:41:52 skrll Exp $ */
/*-
* Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.21 2018/10/20 05:53:22 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.22 2018/10/30 16:41:52 skrll Exp $");
#include "opt_arm_debug.h"
#include "opt_bcm283x.h"
@@ -110,7 +110,6 @@
#define RPI_CPU_MAX 4
-void bcm283x_platform_early_putchar(vaddr_t, paddr_t, char c);
void bcm2835_platform_early_putchar(char c);
void bcm2836_platform_early_putchar(char c);
void bcm2837_platform_early_putchar(char c);
@@ -1221,7 +1220,7 @@
#endif
-void
+static void
bcm283x_platform_early_putchar(vaddr_t va, paddr_t pa, char c)
{
volatile uint32_t *uartaddr =
@@ -1350,7 +1349,6 @@
.ap_devmap = bcm2835_platform_devmap,
.ap_bootstrap = bcm2835_platform_bootstrap,
.ap_init_attach_args = bcm2835_platform_init_attach_args,
- .ap_early_putchar = bcm2835_platform_early_putchar,
.ap_device_register = bcm283x_platform_device_register,
.ap_reset = bcm2835_system_reset,
.ap_delay = bcm2835_tmr_delay,
@@ -1372,7 +1370,6 @@
.ap_devmap = bcm2836_platform_devmap,
.ap_bootstrap = bcm2836_platform_bootstrap,
.ap_init_attach_args = bcm2836_platform_init_attach_args,
- .ap_early_putchar = bcm2836_platform_early_putchar,
.ap_device_register = bcm283x_platform_device_register,
.ap_reset = bcm2835_system_reset,
.ap_delay = gtmr_delay,
@@ -1384,7 +1381,6 @@
.ap_devmap = bcm2836_platform_devmap,
.ap_bootstrap = bcm2836_platform_bootstrap,
.ap_init_attach_args = bcm2836_platform_init_attach_args,
- .ap_early_putchar = bcm2837_platform_early_putchar,
.ap_device_register = bcm283x_platform_device_register,
.ap_reset = bcm2835_system_reset,
.ap_delay = gtmr_delay,
diff -r f0baacee784f -r 3a5f7a9fbe02 sys/arch/arm/cavium/thunderx_platform.c
--- a/sys/arch/arm/cavium/thunderx_platform.c Tue Oct 30 14:43:38 2018 +0000
+++ b/sys/arch/arm/cavium/thunderx_platform.c Tue Oct 30 16:41:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thunderx_platform.c,v 1.1 2018/10/03 09:24:36 skrll Exp $ */
+/* $NetBSD: thunderx_platform.c,v 1.2 2018/10/30 16:41:52 skrll Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
#include "opt_multiprocessor.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: thunderx_platform.c,v 1.1 2018/10/03 09:24:36 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: thunderx_platform.c,v 1.2 2018/10/30 16:41:52 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -121,7 +121,6 @@
.ap_devmap = thunderx_platform_devmap,
.ap_bootstrap = arm_fdt_cpu_bootstrap,
.ap_init_attach_args = thunderx_platform_init_attach_args,
- .ap_early_putchar = thunderx_platform_early_putchar,
.ap_device_register = thunderx_platform_device_register,
.ap_reset = psci_fdt_reset,
.ap_delay = gtmr_delay,
diff -r f0baacee784f -r 3a5f7a9fbe02 sys/arch/arm/fdt/arm_fdtvar.h
--- a/sys/arch/arm/fdt/arm_fdtvar.h Tue Oct 30 14:43:38 2018 +0000
+++ b/sys/arch/arm/fdt/arm_fdtvar.h Tue Oct 30 16:41:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm_fdtvar.h,v 1.11 2018/10/18 09:01:52 skrll Exp $ */
+/* $NetBSD: arm_fdtvar.h,v 1.12 2018/10/30 16:41:52 skrll Exp $ */
/*-
* Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -41,7 +41,6 @@
void (*ap_mpstart)(void);
void (*ap_startup)(void);
void (*ap_init_attach_args)(struct fdt_attach_args *);
- void (*ap_early_putchar)(char);
void (*ap_device_register)(device_t, void *);
void (*ap_reset)(void);
void (*ap_delay)(u_int);
diff -r f0baacee784f -r 3a5f7a9fbe02 sys/arch/arm/nvidia/tegra_platform.c
--- a/sys/arch/arm/nvidia/tegra_platform.c Tue Oct 30 14:43:38 2018 +0000
+++ b/sys/arch/arm/nvidia/tegra_platform.c Tue Oct 30 16:41:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_platform.c,v 1.17 2018/10/18 09:01:53 skrll Exp $ */
+/* $NetBSD: tegra_platform.c,v 1.18 2018/10/30 16:41:52 skrll Exp $ */
/*-
* Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -34,7 +34,7 @@
#include "ukbd.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.17 2018/10/18 09:01:53 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.18 2018/10/30 16:41:52 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -69,6 +69,23 @@
void tegra_platform_early_putchar(char);
+void
+tegra_platform_early_putchar(char c)
+{
+#ifdef CONSADDR
+#define CONSADDR_VA (CONSADDR - TEGRA_APB_BASE + TEGRA_APB_VBASE)
+
+ volatile uint32_t *uartaddr = cpu_earlydevice_va_p() ?
+ (volatile uint32_t *)CONSADDR_VA :
+ (volatile uint32_t *)CONSADDR;
+
+ while ((uartaddr[com_lsr] & LSR_TXRDY) == 0)
+ ;
+
+ uartaddr[com_data] = c;
+#endif
+}
+
static const struct pmap_devmap *
tegra_platform_devmap(void)
{
@@ -133,23 +150,6 @@
faa->faa_dmat = &arm_generic_dma_tag;
}
-void
-tegra_platform_early_putchar(char c)
-{
-#ifdef CONSADDR
-#define CONSADDR_VA (CONSADDR - TEGRA_APB_BASE + TEGRA_APB_VBASE)
-
- volatile uint32_t *uartaddr = cpu_earlydevice_va_p() ?
- (volatile uint32_t *)CONSADDR_VA :
- (volatile uint32_t *)CONSADDR;
-
- while ((uartaddr[com_lsr] & LSR_TXRDY) == 0)
- ;
-
- uartaddr[com_data] = c;
-#endif
-}
-
static void
tegra_platform_device_register(device_t self, void *aux)
{
@@ -223,7 +223,6 @@
.ap_devmap = tegra_platform_devmap,
.ap_bootstrap = tegra124_platform_bootstrap,
.ap_init_attach_args = tegra_platform_init_attach_args,
- .ap_early_putchar = tegra_platform_early_putchar,
.ap_device_register = tegra_platform_device_register,
.ap_reset = tegra_platform_reset,
.ap_delay = tegra_platform_delay,
@@ -239,7 +238,6 @@
.ap_devmap = tegra_platform_devmap,
.ap_bootstrap = tegra210_platform_bootstrap,
.ap_init_attach_args = tegra_platform_init_attach_args,
- .ap_early_putchar = tegra_platform_early_putchar,
.ap_device_register = tegra_platform_device_register,
.ap_reset = tegra_platform_reset,
.ap_delay = tegra_platform_delay,
diff -r f0baacee784f -r 3a5f7a9fbe02 sys/arch/arm/rockchip/rk_platform.c
--- a/sys/arch/arm/rockchip/rk_platform.c Tue Oct 30 14:43:38 2018 +0000
+++ b/sys/arch/arm/rockchip/rk_platform.c Tue Oct 30 16:41:51 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_platform.c,v 1.7 2018/10/20 05:38:27 ryo Exp $ */
+/* $NetBSD: rk_platform.c,v 1.8 2018/10/30 16:41:52 skrll Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
Home |
Main Index |
Thread Index |
Old Index