From 783cbd59fcf086a9aaf603271823fb4ca71f0c55 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 8 Oct 2020 23:01:05 +0200 Subject: [PATCH] meminfo: Replace sys/io.h by direct register accesses. See: https://github.com/linux-sunxi/sunxi-tools/pull/144 Signed-off-by: Danny Milosavljevic --- meminfo.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/meminfo.c b/meminfo.c index 0b0ff23..3b3a5df 100644 --- a/meminfo.c +++ b/meminfo.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include "common.h" @@ -74,24 +73,24 @@ static enum sunxi_soc_version soc_version; unsigned int sunxi_io_read(void *base, int offset) { - return inl((unsigned long) (base + offset)); + return *(volatile unsigned int*) (base + offset); } void sunxi_io_write(void *base, int offset, unsigned int value) { - outl(value, (unsigned long) (base + offset)); + *(volatile unsigned int*) (base + offset) = value; } void sunxi_io_mask(void *base, int offset, unsigned int value, unsigned int mask) { - unsigned int tmp = inl((unsigned long) (base + offset)); + unsigned int tmp = sunxi_io_read(base, offset); tmp &= ~mask; tmp |= value & mask; - outl(tmp, (unsigned long) (base + offset)); + sunxi_io_write(base, offset, tmp); } c90dc736295b19fda88cd8652f67f138409a1'>commitdiff
AgeCommit message (Expand)Author
2022-11-09machine/digital-ocean: Pull operating system definition out of string....* gnu/machine/digital-ocean.scm (guix-infect): Define the operating system declaration as an s-expression and paste it into the generated Bash script to simplify editing. Ricardo Wurmus
2022-11-09machine/digital-ocean: Set load path to Guile 3.0 directories....* gnu/machine/digital-ocean.scm (guix-infect, add-static-networking): Set GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH to directories for Guile 3.0 instead of 2.2. Ricardo Wurmus
2022-11-09machine/digital-ocean: Use static-networking-service-type....* gnu/machine/digital-ocean.scm (ip+netmask->cidr): New procedure. (guix-infect, add-static-networking): Use static-networking-service-type instead of the deprecated static-networking-service. Ricardo Wurmus
2022-11-09machine/digital-ocean: Use nightly Guix....* gnu/machine/digital-ocean.scm (guix-infect): Fetch latest Guix build from ci.guix.gnu.org. Ricardo Wurmus
2022-09-04Fix misspelling of GUIX_DIGITAL_OCEAN_TOKEN....* gnu/machine/digital-ocean.scm (maybe-raise-missing-api-key-error): Fix misspelling of GUIX_DIGITAL_OCEAN_TOKEN. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Matthew James Kraai