Module Name:    src
Committed By:   rin
Date:           Tue Dec  1 04:19:04 UTC 2020

Modified Files:
        src/sys/external/bsd/vchiq/dist/interface/vchiq_arm:
            vchiq_netbsd_acpi.c vchiq_netbsd_fdt.c

Log Message:
Do not attach vchiq(4) in big-endian mode.

For big-endian mode, all data written to and read from DMA buffer must be
byte-swapped. This requires heavy modifications to third party codes.

Also, we will switch to vc4 drm driver, hopefully soon.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
    src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_acpi.c \
    src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.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/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_acpi.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_acpi.c:1.2 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_acpi.c:1.3
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_acpi.c:1.2	Sat Feb 22 19:37:31 2020
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_acpi.c	Tue Dec  1 04:19:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: vchiq_netbsd_acpi.c,v 1.2 2020/02/22 19:37:31 jmcneill Exp $ */
+/* $NetBSD: vchiq_netbsd_acpi.c,v 1.3 2020/12/01 04:19:04 rin Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vchiq_netbsd_acpi.c,v 1.2 2020/02/22 19:37:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vchiq_netbsd_acpi.c,v 1.3 2020/12/01 04:19:04 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -93,6 +93,11 @@ vchiq_acpi_attach(device_t parent, devic
 	sc->sc_iot = aa->aa_memt;
 	asc->sc_handle = aa->aa_node->ad_handle;
 
+#if BYTE_ORDER == BIG_ENDIAN
+	aprint_error_dev(sc->sc_dev, "not supported yet in big-endian mode\n");
+	return;
+#endif
+
 	rv = acpi_resource_parse(self, aa->aa_node->ad_handle, "_CRS",
 	    &res, &acpi_resource_parse_ops_default);
 	if (ACPI_FAILURE(rv))
Index: src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c
diff -u src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c:1.2 src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c:1.3
--- src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c:1.2	Tue Dec  1 03:28:08 2020
+++ src/sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_netbsd_fdt.c	Tue Dec  1 04:19:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: vchiq_netbsd_fdt.c,v 1.2 2020/12/01 03:28:08 rin Exp $ */
+/* $NetBSD: vchiq_netbsd_fdt.c,v 1.3 2020/12/01 04:19:04 rin Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vchiq_netbsd_fdt.c,v 1.2 2020/12/01 03:28:08 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vchiq_netbsd_fdt.c,v 1.3 2020/12/01 04:19:04 rin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,6 +89,11 @@ vchiq_fdt_attach(device_t parent, device
 	sc->sc_iot = faa->faa_bst;
 	fsc->sc_phandle = phandle;
 
+#if BYTE_ORDER == BIG_ENDIAN
+	aprint_error_dev(sc->sc_dev, "not supported yet in big-endian mode\n");
+	return;
+#endif
+
 	bus_addr_t addr;
 	bus_size_t size;
 

Reply via email to