summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rpc/ecard.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-03-01 20:58:20 +0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-03-24 13:37:36 +0400
commit6e747b4b83c2290b465aabd1ac006332430e2b2e (patch)
tree8c379691a4a1a1faf84d3c412b1bc49759fd8663 /arch/arm/mach-rpc/ecard.h
parent927b6c4da9e30f8f55add2e19487e71415c85bda (diff)
downloadlinux-6e747b4b83c2290b465aabd1ac006332430e2b2e.tar.xz
ARM: riscpc: move ecard.c to arch/arm/mach-rpc
RiscPC is the only platform using the Acorn expansion card support, so move it into its mach-* directory. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-rpc/ecard.h')
-rw-r--r--arch/arm/mach-rpc/ecard.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/arm/mach-rpc/ecard.h b/arch/arm/mach-rpc/ecard.h
new file mode 100644
index 000000000000..4642d436be2a
--- /dev/null
+++ b/arch/arm/mach-rpc/ecard.h
@@ -0,0 +1,69 @@
+/*
+ * ecard.h
+ *
+ * Copyright 2007 Russell King
+ *
+ * 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.
+ */
+
+/* Definitions internal to ecard.c - for it's use only!!
+ *
+ * External expansion card header as read from the card
+ */
+struct ex_ecid {
+ unsigned char r_irq:1;
+ unsigned char r_zero:1;
+ unsigned char r_fiq:1;
+ unsigned char r_id:4;
+ unsigned char r_a:1;
+
+ unsigned char r_cd:1;
+ unsigned char r_is:1;
+ unsigned char r_w:2;
+ unsigned char r_r1:4;
+
+ unsigned char r_r2:8;
+
+ unsigned char r_prod[2];
+
+ unsigned char r_manu[2];
+
+ unsigned char r_country;
+
+ unsigned char r_fiqmask;
+ unsigned char r_fiqoff[3];
+
+ unsigned char r_irqmask;
+ unsigned char r_irqoff[3];
+};
+
+/*
+ * Chunk directory entry as read from the card
+ */
+struct ex_chunk_dir {
+ unsigned char r_id;
+ unsigned char r_len[3];
+ unsigned long r_start;
+ union {
+ char string[256];
+ char data[1];
+ } d;
+#define c_id(x) ((x)->r_id)
+#define c_len(x) ((x)->r_len[0]|((x)->r_len[1]<<8)|((x)->r_len[2]<<16))
+#define c_start(x) ((x)->r_start)
+};
+
+typedef enum ecard_type { /* Cards address space */
+ ECARD_IOC,
+ ECARD_MEMC,
+ ECARD_EASI
+} card_type_t;
+
+typedef enum { /* Speed for ECARD_IOC space */
+ ECARD_SLOW = 0,
+ ECARD_MEDIUM = 1,
+ ECARD_FAST = 2,
+ ECARD_SYNC = 3
+} card_speed_t;