[PATCHv1 5/8] unicore32 additional architecture files: low-level lib: io

Previous thread: [PATCHv1 4/8] unicore32 additional architecture files: low-level lib: ocd debug by Guan Xuetao on Monday, January 3, 2011 - 4:51 am. (1 message)

Next thread: Patch[1/2]X86:Adding_Notification_Support_to_therm_throt.c by R, Durgadoss on Monday, January 3, 2011 - 4:52 am. (7 messages)
From: Guan Xuetao
Date: Monday, January 3, 2011 - 4:52 am

From: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>

Patch 5 implements low-level io libraries.

Signed-off-by: Guan Xuetao <guanxuetao@mprc.pku.edu.cn>
---
 arch/unicore32/include/asm/io.h |   83 +++++++++++++++++++++++++
 arch/unicore32/lib/io-readsb.S  |  130 +++++++++++++++++++++++++++++++++++++++
 arch/unicore32/lib/io-readsl.S  |   83 +++++++++++++++++++++++++
 arch/unicore32/lib/io-readsw.S  |  110 +++++++++++++++++++++++++++++++++
 arch/unicore32/lib/io-writesb.S |   90 +++++++++++++++++++++++++++
 arch/unicore32/lib/io-writesl.S |   69 +++++++++++++++++++++
 arch/unicore32/lib/io-writesw.S |   87 ++++++++++++++++++++++++++
 7 files changed, 652 insertions(+), 0 deletions(-)

diff --git a/arch/unicore32/include/asm/io.h b/arch/unicore32/include/asm/io.h
new file mode 100644
index 0000000..67c5c03
--- /dev/null
+++ b/arch/unicore32/include/asm/io.h
@@ -0,0 +1,83 @@
+/*
+ * linux/arch/unicore32/include/asm/io.h
+ *
+ * Code specific to PKUnity SoC and UniCore ISA
+ *
+ * Copyright (C) 2001-2010 GUAN Xue-tao
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __UNICORE_IO_H__
+#define __UNICORE_IO_H__
+
+#ifdef __KERNEL__
+
+#include <linux/types.h>
+#include <asm/byteorder.h>
+#include <asm/memory.h>
+#include <asm/system.h>
+
+/*
+ *  IO port access primitives
+ *  -------------------------
+ *
+ * The UniCore doesn't have special IO access instructions; all IO is memory
+ * mapped.  Note that these are defined to perform little endian accesses
+ * only.  Their primary purpose is to access PCI peripherals.
+ *
+ * Note that we prevent GCC re-ordering or caching values in expressions
+ * by introducing sequence points into the in*() definitions.  Note that
+ * __raw_* do not guarantee this behaviour.
+ *
+ * The {in,out}[bwl] macros are for emulating x86-style PCI IO space.
+ */
+extern void ...
Previous thread: [PATCHv1 4/8] unicore32 additional architecture files: low-level lib: ocd debug by Guan Xuetao on Monday, January 3, 2011 - 4:51 am. (1 message)

Next thread: Patch[1/2]X86:Adding_Notification_Support_to_therm_throt.c by R, Durgadoss on Monday, January 3, 2011 - 4:52 am. (7 messages)