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); } nu/packages/uucp.scm?id=308877be17b2c2c92d972e105e8cc6a782ab4c82'>commitdiff
AgeCommit message (Collapse)Author
2024-07-25gnu: go-github-com-hjson-hjson-go: Rename variable.Sharlatan Hellseher
* gnu/packages/golang-web.scm (go-github-com-hjson-hjson-go): Rename variable to go-github-com-hjson-hjson-go-v4 to reflect go.mod import path. Apply new package style. * gnu/packages/networking.scm (yggdrasil) [propagated-inputs]: Remove go-github-com-hjson-hjson-go, add go-github-com-hjson-hjson-go-v4. * gnu/packages/uucp.scm (nncp) [propagated-inputs]: Remove go-github-com-hjson-hjson-go, add go-github-com-hjson-hjson-go-v4. Change-Id: I9e99f208feaf535d9946e11dff09a81fc4a01a7a
2024-06-29gnu: nncp: Apply "-trimpath" flag.Sharlatan Hellseher
* gnu/packages/uucp.scm (nncp) [arguments]: <#:phases>: Remove 'remove-go-references phase. Set BUILDFLAGS=-trimpath to replace 'remove-go-references phase in 'configure phase. Change-Id: I7cfe14174e38708d36329d8e33ed6bb1ce0ae220