Module Name: src
Committed By: bouyer
Date: Tue Apr 3 13:38:13 UTC 2018
Modified Files:
src/sys/arch/arm/sunxi: sunxi_debe.c sunxi_dep.c sunxi_hdmi.c
sunxi_tcon.c
Log Message:
A10 and A20 should have the same display hardware, so consistenly support
sun4i-a10 the same way as sun7i-a20.
This would need to be tested on a real A10.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_debe.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/sunxi/sunxi_dep.c \
src/sys/arch/arm/sunxi/sunxi_hdmi.c src/sys/arch/arm/sunxi/sunxi_tcon.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/sunxi/sunxi_debe.c
diff -u src/sys/arch/arm/sunxi/sunxi_debe.c:1.3 src/sys/arch/arm/sunxi/sunxi_debe.c:1.4
--- src/sys/arch/arm/sunxi/sunxi_debe.c:1.3 Tue Apr 3 12:52:16 2018
+++ src/sys/arch/arm/sunxi/sunxi_debe.c Tue Apr 3 13:38:13 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_debe.c,v 1.3 2018/04/03 12:52:16 bouyer Exp $ */
+/* $NetBSD: sunxi_debe.c,v 1.4 2018/04/03 13:38:13 bouyer Exp $ */
/*-
* Copyright (c) 2018 Manuel Bouyer <[email protected]>
@@ -38,7 +38,7 @@
#define SUNXI_DEBE_CURMAX 64
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.3 2018/04/03 12:52:16 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c,v 1.4 2018/04/03 13:38:13 bouyer Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -61,7 +61,6 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_debe.c
enum sunxi_debe_type {
DEBE_A10 = 1,
- DEBE_A20,
};
struct sunxi_debe_softc {
@@ -100,7 +99,7 @@ struct sunxi_debe_softc {
static const struct of_compat_data compat_data[] = {
{"allwinner,sun4i-a10-display-backend", DEBE_A10},
- {"allwinner,sun7i-a20-display-backend", DEBE_A20},
+ {"allwinner,sun7i-a20-display-backend", DEBE_A10},
{NULL}
};
Index: src/sys/arch/arm/sunxi/sunxi_dep.c
diff -u src/sys/arch/arm/sunxi/sunxi_dep.c:1.1 src/sys/arch/arm/sunxi/sunxi_dep.c:1.2
--- src/sys/arch/arm/sunxi/sunxi_dep.c:1.1 Tue Apr 3 12:52:16 2018
+++ src/sys/arch/arm/sunxi/sunxi_dep.c Tue Apr 3 13:38:13 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_dep.c,v 1.1 2018/04/03 12:52:16 bouyer Exp $ */
+/* $NetBSD: sunxi_dep.c,v 1.2 2018/04/03 13:38:13 bouyer Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: sunxi_dep.c,v 1.1 2018/04/03 12:52:16 bouyer Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sunxi_dep.c,v 1.2 2018/04/03 13:38:13 bouyer Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -52,6 +52,7 @@ struct sunxi_dep_softc {
};
static const struct of_compat_data compat_data[] = {
+ {"allwinner,sun4i-a10-display-engine", 0},
{"allwinner,sun7i-a20-display-engine", 0},
{NULL}
};
Index: src/sys/arch/arm/sunxi/sunxi_hdmi.c
diff -u src/sys/arch/arm/sunxi/sunxi_hdmi.c:1.1 src/sys/arch/arm/sunxi/sunxi_hdmi.c:1.2
--- src/sys/arch/arm/sunxi/sunxi_hdmi.c:1.1 Tue Apr 3 12:52:16 2018
+++ src/sys/arch/arm/sunxi/sunxi_hdmi.c Tue Apr 3 13:38:13 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_hdmi.c,v 1.1 2018/04/03 12:52:16 bouyer Exp $ */
+/* $NetBSD: sunxi_hdmi.c,v 1.2 2018/04/03 13:38:13 bouyer Exp $ */
/*-
* Copyright (c) 2014 Jared D. McNeill <[email protected]>
@@ -29,7 +29,7 @@
#include "opt_ddb.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_hdmi.c,v 1.1 2018/04/03 12:52:16 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_hdmi.c,v 1.2 2018/04/03 13:38:13 bouyer Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -55,7 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_hdmi.c
enum sunxi_hdmi_type {
HDMI_A10 = 1,
- HDMI_A20,
HDMI_A31,
};
@@ -107,7 +106,7 @@ struct sunxi_hdmi_softc {
static const struct of_compat_data compat_data[] = {
{"allwinner,sun4i-a10-hdmi", HDMI_A10},
- {"allwinner,sun7i-a20-hdmi", HDMI_A20},
+ {"allwinner,sun7i-a20-hdmi", HDMI_A10},
{NULL}
};
@@ -618,7 +617,7 @@ sunxi_hdmi_do_enable(struct sunxi_hdmi_s
HDMI_WRITE(sc, SUNXI_HDMI_CTRL_REG, SUNXI_HDMI_CTRL_MODULE_EN);
delay(1000);
- if (sc->sc_type == HDMI_A20) {
+ if (sc->sc_type == HDMI_A10) {
HDMI_WRITE(sc, SUNXI_HDMI_PAD_CTRL0_REG, 0xfe800000);
HDMI_WRITE(sc, SUNXI_HDMI_PAD_CTRL1_REG, 0x00d8c830);
} else if (sc->sc_type == HDMI_A31) {
Index: src/sys/arch/arm/sunxi/sunxi_tcon.c
diff -u src/sys/arch/arm/sunxi/sunxi_tcon.c:1.1 src/sys/arch/arm/sunxi/sunxi_tcon.c:1.2
--- src/sys/arch/arm/sunxi/sunxi_tcon.c:1.1 Tue Apr 3 12:52:16 2018
+++ src/sys/arch/arm/sunxi/sunxi_tcon.c Tue Apr 3 13:38:13 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_tcon.c,v 1.1 2018/04/03 12:52:16 bouyer Exp $ */
+/* $NetBSD: sunxi_tcon.c,v 1.2 2018/04/03 13:38:13 bouyer Exp $ */
/*-
* Copyright (c) 2018 Manuel Bouyer <[email protected]>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_tcon.c,v 1.1 2018/04/03 12:52:16 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_tcon.c,v 1.2 2018/04/03 13:38:13 bouyer Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -54,7 +54,6 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_tcon.c
enum sunxi_tcon_type {
TCON_A10 = 1,
- TCON_A20,
};
struct sunxi_tcon_softc {
@@ -95,7 +94,7 @@ void sunxi_tcon_dump_regs(int);
static const struct of_compat_data compat_data[] = {
{"allwinner,sun4i-a10-tcon", TCON_A10},
- {"allwinner,sun7i-a20-tcon", TCON_A20},
+ {"allwinner,sun7i-a20-tcon", TCON_A10},
{NULL}
};