summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMike Shaver <shaver@ingenia.com>1997-08-10 22:24:11 +0000
committerMike Shaver <shaver@ingenia.com>1997-08-10 22:24:11 +0000
commit5c10bcd1cd1bc411076fdc3bb414193f2d78f57d (patch)
tree8d612b6a2ded7ce44a67cc2634003975aa05602c /include
parent52365146a9da3ea5defe960af8b6d320d4dd7fcc (diff)
Added skeletal support for /dev/usema and /dev/usemaclone.
Still need to figure out how to do SVR-style clone devices with fops->open(), and I need a good poll() tutorial. =) Other than that, I think I know how to do: /dev/usemaclone open()ing, poll()ing /dev/usema ioctls: - UIOCATTACHSEMA - UIOCBLOCK - UIOCUNBLOCK Also, some minor additions to sysirix.c:syssgi().
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/shmiq.h4
-rw-r--r--include/asm-mips/usioctl.h26
-rw-r--r--include/linux/major.h1
-rw-r--r--include/linux/miscdevice.h3
4 files changed, 33 insertions, 1 deletions
diff --git a/include/asm-mips/shmiq.h b/include/asm-mips/shmiq.h
index 2e845113f..d07633d79 100644
--- a/include/asm-mips/shmiq.h
+++ b/include/asm-mips/shmiq.h
@@ -174,8 +174,10 @@ typedef struct {
char *nothing_for_now;
} idevInfo;
+#define IDEV_KEYMAP_NAME_LEN 15
+
typedef struct {
- char name [16];
+ char name[IDEV_KEYMAP_NAME_LEN+1];
} idevKeymapDesc;
#define IDEVINITDEVICE _IOW('i', 51, unsigned int)
diff --git a/include/asm-mips/usioctl.h b/include/asm-mips/usioctl.h
new file mode 100644
index 000000000..b4edeb5cf
--- /dev/null
+++ b/include/asm-mips/usioctl.h
@@ -0,0 +1,26 @@
+/*
+ * usema/usemaclone-related stuff.
+ *
+ * `Inspired' by IRIX's sys/usioctl.h
+ *
+ * Mike.
+ */
+
+/* ioctls */
+#define UIOC ('u' << 16 | 's' << 8)
+
+#define UIOCATTACHSEMA (UIOC|2) /* attach to sema */
+#define UIOCBLOCK (UIOC|3) /* block sync "intr"? */
+#define UIOCABLOCK (UIOC|4) /* block async */
+#define UIOCNOIBLOCK (UIOC|5) /* block sync "intr"?
+ How is this different from
+ UIOCNOIBLOCK? */
+#define UIOCUNBLOCK (UIOC|6) /* unblock sync */
+#define UIOCAUNBLOCK (UIOC|7) /* unblock async */
+#define UIOCINIT (UIOC|8) /* init sema (async) */
+
+typedef struct usattach_s {
+ dev_t us_dev; /* attach dev */
+ void *us_handle; /* userland semaphore handle */
+} usattach_t;
+
diff --git a/include/linux/major.h b/include/linux/major.h
index d72e6c2be..9daaad805 100644
--- a/include/linux/major.h
+++ b/include/linux/major.h
@@ -59,6 +59,7 @@
#define AZTECH_CDROM_MAJOR 29
#define GRAPHDEV_MAJOR 29 /* SparcLinux & Linux/68k /dev/fb */
#define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */
+#define USEMA_MAJOR 86 /* Linux/MIPS, SGI /dev/usema */
#define CM206_CDROM_MAJOR 32
#define IDE2_MAJOR 33
#define IDE3_MAJOR 34
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index 4886d464c..75d69db93 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -19,6 +19,9 @@
#define SGI_GFX_MINOR 148
#define SGI_STREAMS_MOUSE 149
#define SGI_STREAMS_KEYBOARD 150
+/* drivers/sgi/char/usema.c */
+#define SGI_USEMA 151
+#define SGI_USEMACLONE 152
extern int misc_init(void);