Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Don't byte swap the data, assume the bus...
details: https://anonhg.NetBSD.org/src/rev/fdfbca017a4d
branches: trunk
changeset: 327313:fdfbca017a4d
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 04 15:24:38 2014 +0000
description:
Don't byte swap the data, assume the bus_space will do it.
diffstat:
sys/arch/arm/cortex/gic.c | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diffs (56 lines):
diff -r 73beff24318d -r fdfbca017a4d sys/arch/arm/cortex/gic.c
--- a/sys/arch/arm/cortex/gic.c Tue Mar 04 14:58:14 2014 +0000
+++ b/sys/arch/arm/cortex/gic.c Tue Mar 04 15:24:38 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic.c,v 1.5 2013/12/17 13:12:45 joerg Exp $ */
+/* $NetBSD: gic.c,v 1.6 2014/03/04 15:24:38 matt Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -31,7 +31,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.5 2013/12/17 13:12:45 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.6 2014/03/04 15:24:38 matt Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -104,33 +104,30 @@
__CTASSERT(NIPL == 8);
/*
- * GIC register are always in little-endian.
+ * GIC register are always in little-endian. It is assumed the bus_space
+ * will do any endian conversion required.
*/
static inline uint32_t
gicc_read(struct armgic_softc *sc, bus_size_t o)
{
- uint32_t v = bus_space_read_4(sc->sc_memt, sc->sc_gicch, o);
- return le32toh(v);
+ return bus_space_read_4(sc->sc_memt, sc->sc_gicch, o);
}
static inline void
gicc_write(struct armgic_softc *sc, bus_size_t o, uint32_t v)
{
- v = htole32(v);
bus_space_write_4(sc->sc_memt, sc->sc_gicch, o, v);
}
static inline uint32_t
gicd_read(struct armgic_softc *sc, bus_size_t o)
{
- uint32_t v = bus_space_read_4(sc->sc_memt, sc->sc_gicdh, o);
- return le32toh(v);
+ return bus_space_read_4(sc->sc_memt, sc->sc_gicdh, o);
}
static inline void
gicd_write(struct armgic_softc *sc, bus_size_t o, uint32_t v)
{
- v = htole32(v);
bus_space_write_4(sc->sc_memt, sc->sc_gicdh, o, v);
}
Home |
Main Index |
Thread Index |
Old Index