aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/landisk
diff options
context:
space:
mode:
authorkogiidena <kogiidena@eggplant.ddo.jp>2006-09-27 14:53:35 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 14:53:35 +0900
commit94c0fa520cc169ccf661e9c03b5b95f74d1520b8 (patch)
tree2fc73ea11df222998a363083e03ef6c9e8066b28 /include/asm-sh/landisk
parentsh: Fix libata build. (diff)
downloadlinux-dev-94c0fa520cc169ccf661e9c03b5b95f74d1520b8.tar.xz
linux-dev-94c0fa520cc169ccf661e9c03b5b95f74d1520b8.zip
sh: landisk board support.
This adds support for the I-O DATA Landisk. Signed-off-by: kogiidena <kogiidena@eggplant.ddo.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/landisk')
-rw-r--r--include/asm-sh/landisk/gio.h45
-rw-r--r--include/asm-sh/landisk/ide.h14
-rw-r--r--include/asm-sh/landisk/iodata_landisk.h78
3 files changed, 137 insertions, 0 deletions
diff --git a/include/asm-sh/landisk/gio.h b/include/asm-sh/landisk/gio.h
new file mode 100644
index 000000000000..3fce4c451a46
--- /dev/null
+++ b/include/asm-sh/landisk/gio.h
@@ -0,0 +1,45 @@
+#ifndef __ASM_SH_LANDISK_GIO_H
+#define __ASM_SH_LANDISK_GIO_H
+
+#include <linux/ioctl.h>
+
+/* version */
+#define VERSION_STR "1.00"
+
+/* Driver name */
+#define GIO_DRIVER_NAME "/dev/giodrv"
+
+/* Use 'k' as magic number */
+#define GIODRV_IOC_MAGIC 'k'
+
+#define GIODRV_IOCRESET _IO(GIODRV_IOC_MAGIC, 0)
+/*
+ * S means "Set" through a ptr,
+ * T means "Tell" directly
+ * G means "Get" (to a pointed var)
+ * Q means "Query", response is on the return value
+ * X means "eXchange": G and S atomically
+ * H means "sHift": T and Q atomically
+ */
+#define GIODRV_IOCSGIODATA1 _IOW(GIODRV_IOC_MAGIC, 1, unsigned char *)
+#define GIODRV_IOCGGIODATA1 _IOR(GIODRV_IOC_MAGIC, 2, unsigned char *)
+#define GIODRV_IOCSGIODATA2 _IOW(GIODRV_IOC_MAGIC, 3, unsigned short *)
+#define GIODRV_IOCGGIODATA2 _IOR(GIODRV_IOC_MAGIC, 4, unsigned short *)
+#define GIODRV_IOCSGIODATA4 _IOW(GIODRV_IOC_MAGIC, 5, unsigned long *)
+#define GIODRV_IOCGGIODATA4 _IOR(GIODRV_IOC_MAGIC, 6, unsigned long *)
+#define GIODRV_IOCSGIOSETADDR _IOW(GIODRV_IOC_MAGIC, 7, unsigned long *)
+#define GIODRV_IOCHARDRESET _IO(GIODRV_IOC_MAGIC, 8) /* debugging tool */
+
+#define GIODRV_IOCSGIO_LED _IOW(GIODRV_IOC_MAGIC, 9, unsigned long *)
+#define GIODRV_IOCGGIO_LED _IOR(GIODRV_IOC_MAGIC, 10, unsigned long *)
+#define GIODRV_IOCSGIO_BUZZER _IOW(GIODRV_IOC_MAGIC, 11, unsigned long *)
+#define GIODRV_IOCGGIO_LANDISK _IOR(GIODRV_IOC_MAGIC, 14, unsigned long *)
+#define GIODRV_IOCGGIO_BTN _IOR(GIODRV_IOC_MAGIC, 22, unsigned long *)
+#define GIODRV_IOCSGIO_BTNPID _IOW(GIODRV_IOC_MAGIC, 23, unsigned long *)
+#define GIODRV_IOCGGIO_BTNPID _IOR(GIODRV_IOC_MAGIC, 24, unsigned long *)
+
+#define GIODRV_IOC_MAXNR 8
+#define GIO_READ 0x00000000
+#define GIO_WRITE 0x00000001
+
+#endif /* __ASM_SH_LANDISK_GIO_H */
diff --git a/include/asm-sh/landisk/ide.h b/include/asm-sh/landisk/ide.h
new file mode 100644
index 000000000000..6490e28415ed
--- /dev/null
+++ b/include/asm-sh/landisk/ide.h
@@ -0,0 +1,14 @@
+/*
+ * modifed by kogiidena
+ * 2005.03.03
+ */
+
+#ifndef __ASM_SH_LANDISK_IDE_H
+#define __ASM_SH_LANDISK_IDE_H
+
+/* Nothing to see here.. */
+#include <asm/landisk/iodata_landisk.h>
+#define IRQ_CFCARD IRQ_FATA /* CF Card IRQ */
+#define IRQ_PCMCIA IRQ_ATA /* PCMCIA IRQ */
+
+#endif /* __ASM_SH_LANDISK_IDE_H */
diff --git a/include/asm-sh/landisk/iodata_landisk.h b/include/asm-sh/landisk/iodata_landisk.h
new file mode 100644
index 000000000000..7189d3a36384
--- /dev/null
+++ b/include/asm-sh/landisk/iodata_landisk.h
@@ -0,0 +1,78 @@
+#ifndef __ASM_SH_IODATA_LANDISK_H
+#define __ASM_SH_IODATA_LANDISK_H
+
+/*
+ * linux/include/asm-sh/landisk/iodata_landisk.h
+ *
+ * Copyright (C) 2000 Atom Create Engineering Co., Ltd.
+ *
+ * IO-DATA LANDISK support
+ */
+
+/* Box specific addresses. */
+
+#define PA_USB 0xa4000000 /* USB Controller M66590 */
+
+#define PA_ATARST 0xb0000000 /* ATA/FATA Access Control Register */
+#define PA_LED 0xb0000001 /* LED Control Register */
+#define PA_STATUS 0xb0000002 /* Switch Status Register */
+#define PA_SHUTDOWN 0xb0000003 /* Shutdown Control Register */
+#define PA_PCIPME 0xb0000004 /* PCI PME Status Register */
+#define PA_IMASK 0xb0000005 /* Interrupt Mask Register */
+/* 2003.10.31 I-O DATA NSD NWG add. for shutdown port clear */
+#define PA_PWRINT_CLR 0xb0000006 /* Shutdown Interrupt clear Register */
+
+#define PA_AREA5_IO 0xb4000000 /* Area 5 IO Memory */
+#define PA_AREA6_IO 0xb8000000 /* Area 6 IO Memory */
+#define PA_LCD_CLRDSP 0x00 /* LCD Clear Display Offset */
+#define PA_LCD_RTNHOME 0x00 /* LCD Return Home Offset */
+#define PA_LCD_ENTMODE 0x00 /* LCD Entry Mode Offset */
+#define PA_LCD_DSPCTL 0x00 /* LCD Display ON/OFF Control Offset */
+#define PA_LCD_FUNC 0x00 /* LCD Function Set Offset */
+#define PA_LCD_CGRAM 0x00 /* LCD Set CGRAM Address Offset */
+#define PA_LCD_DDRAM 0x00 /* LCD Set DDRAM Address Offset */
+#define PA_LCD_RDFLAG 0x01 /* LCD Read Busy Flag Offset */
+#define PA_LCD_WTDATA 0x02 /* LCD Write Datat to RAM Offset */
+#define PA_LCD_RDDATA 0x03 /* LCD Read Data from RAM Offset */
+#define PA_PIDE_OFFSET 0x40 /* CF IDE Offset */
+#define PA_SIDE_OFFSET 0x40 /* HDD IDE Offset */
+
+#define IRQ_PCIINTA 5 /* PCI INTA IRQ */
+#define IRQ_PCIINTB 6 /* PCI INTB IRQ */
+#define IRQ_PCIINDC 7 /* PCI INTC IRQ */
+#define IRQ_PCIINTD 8 /* PCI INTD IRQ */
+#define IRQ_ATA 9 /* ATA IRQ */
+#define IRQ_FATA 10 /* FATA IRQ */
+#define IRQ_POWER 11 /* Power Switch IRQ */
+#define IRQ_BUTTON 12 /* USL-5P Button IRQ */
+#define IRQ_FAULT 13 /* USL-5P Fault IRQ */
+
+#define SHUTDOWN_BTN_MAJOR 99 /* Shutdown button device major no. */
+
+#define SHUTDOWN_LOOP_CNT 5 /* Shutdown button Detection loop */
+#define SHUTDOWN_DELAY 200 /* Shutdown button delay value(ms) */
+
+
+/* added by kogiidena */
+/*
+ * landisk_ledparam
+ *
+ * led ------10 -6543210 -6543210 -6543210
+ * |000000..|0.......|0.......|U.......|
+ * | HARD |fastblik| blink | on |
+ *
+ * led0: power U:update flag
+ * led1: error
+ * led2: usb1
+ * led3: usb2
+ * led4: usb3
+ * led5: usb4
+ * led6: usb5
+ *
+ */
+extern int landisk_ledparam; /* from setup.c */
+extern int landisk_buzzerparam; /* from setup.c */
+extern int landisk_arch; /* from setup.c */
+
+#endif /* __ASM_SH_IODATA_LANDISK_H */
+