Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch A couple small adjustments to make big endian (BE8)...
details: https://anonhg.NetBSD.org/src/rev/4139cf418162
branches: trunk
changeset: 357032:4139cf418162
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Oct 23 19:36:01 2017 +0000
description:
A couple small adjustments to make big endian (BE8) SUNXI work.
diffstat:
sys/arch/arm/sunxi/sunxi_platform.c | 8 ++++----
sys/arch/evbarm/conf/mk.sunxi | 6 +++++-
2 files changed, 9 insertions(+), 5 deletions(-)
diffs (44 lines):
diff -r 719c94354fcf -r 4139cf418162 sys/arch/arm/sunxi/sunxi_platform.c
--- a/sys/arch/arm/sunxi/sunxi_platform.c Mon Oct 23 19:03:40 2017 +0000
+++ b/sys/arch/arm/sunxi/sunxi_platform.c Mon Oct 23 19:36:01 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_platform.c,v 1.13 2017/10/22 20:35:32 skrll Exp $ */
+/* $NetBSD: sunxi_platform.c,v 1.14 2017/10/23 19:36:01 jakllsch Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
#include "opt_fdt_arm.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.13 2017/10/22 20:35:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_platform.c,v 1.14 2017/10/23 19:36:01 jakllsch Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -121,10 +121,10 @@
#define CONSADDR_VA ((CONSADDR - SUNXI_CORE_PBASE) + SUNXI_CORE_VBASE)
volatile uint32_t *uartaddr = (volatile uint32_t *)CONSADDR_VA;
- while ((uartaddr[com_lsr] & LSR_TXRDY) == 0)
+ while ((le32toh(uartaddr[com_lsr]) & LSR_TXRDY) == 0)
;
- uartaddr[com_data] = c;
+ uartaddr[com_data] = htole32(c);
#endif
}
diff -r 719c94354fcf -r 4139cf418162 sys/arch/evbarm/conf/mk.sunxi
--- a/sys/arch/evbarm/conf/mk.sunxi Mon Oct 23 19:03:40 2017 +0000
+++ b/sys/arch/evbarm/conf/mk.sunxi Mon Oct 23 19:36:01 2017 +0000
@@ -1,4 +1,8 @@
-# $NetBSD: mk.sunxi,v 1.2 2017/07/24 19:37:41 joerg Exp $
+# $NetBSD: mk.sunxi,v 1.3 2017/10/23 19:36:01 jakllsch Exp $
+
+.if !empty(MACHINE_ARCH:M*eb)
+EXTRA_LINKFLAGS+= --be8
+.endif
SYSTEM_FIRST_OBJ= sunxi_start.o
SYSTEM_FIRST_SFILE= ${THISARM}/sunxi/sunxi_start.S
Home |
Main Index |
Thread Index |
Old Index