aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/landisk
diff options
context:
space:
mode:
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 @@
1#ifndef __ASM_SH_LANDISK_GIO_H
2#define __ASM_SH_LANDISK_GIO_H
3
4#include <linux/ioctl.h>
5
6/* version */
7#define VERSION_STR "1.00"
8
9/* Driver name */
10#define GIO_DRIVER_NAME "/dev/giodrv"
11
12/* Use 'k' as magic number */
13#define GIODRV_IOC_MAGIC 'k'
14
15#define GIODRV_IOCRESET _IO(GIODRV_IOC_MAGIC, 0)
16/*
17 * S means "Set" through a ptr,
18 * T means "Tell" directly
19 * G means "Get" (to a pointed var)
20 * Q means "Query", response is on the return value
21 * X means "eXchange": G and S atomically
22 * H means "sHift": T and Q atomically
23 */
24#define GIODRV_IOCSGIODATA1 _IOW(GIODRV_IOC_MAGIC, 1, unsigned char *)
25#define GIODRV_IOCGGIODATA1 _IOR(GIODRV_IOC_MAGIC, 2, unsigned char *)
26#define GIODRV_IOCSGIODATA2 _IOW(GIODRV_IOC_MAGIC, 3, unsigned short *)
27#define GIODRV_IOCGGIODATA2 _IOR(GIODRV_IOC_MAGIC, 4, unsigned short *)
28#define GIODRV_IOCSGIODATA4 _IOW(GIODRV_IOC_MAGIC, 5, unsigned long *)
29#define GIODRV_IOCGGIODATA4 _IOR(GIODRV_IOC_MAGIC, 6, unsigned long *)
30#define GIODRV_IOCSGIOSETADDR _IOW(GIODRV_IOC_MAGIC, 7, unsigned long *)
31#define GIODRV_IOCHARDRESET _IO(GIODRV_IOC_MAGIC, 8) /* debugging tool */
32
33#define GIODRV_IOCSGIO_LED _IOW(GIODRV_IOC_MAGIC, 9, unsigned long *)
34#define GIODRV_IOCGGIO_LED _IOR(GIODRV_IOC_MAGIC, 10, unsigned long *)
35#define GIODRV_IOCSGIO_BUZZER _IOW(GIODRV_IOC_MAGIC, 11, unsigned long *)
36#define GIODRV_IOCGGIO_LANDISK _IOR(GIODRV_IOC_MAGIC, 14, unsigned long *)
37#define GIODRV_IOCGGIO_BTN _IOR(GIODRV_IOC_MAGIC, 22, unsigned long *)
38#define GIODRV_IOCSGIO_BTNPID _IOW(GIODRV_IOC_MAGIC, 23, unsigned long *)
39#define GIODRV_IOCGGIO_BTNPID _IOR(GIODRV_IOC_MAGIC, 24, unsigned long *)
40
41#define GIODRV_IOC_MAXNR 8
42#define GIO_READ 0x00000000
43#define GIO_WRITE 0x00000001
44
45#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 @@
1/*
2 * modifed by kogiidena
3 * 2005.03.03
4 */
5
6#ifndef __ASM_SH_LANDISK_IDE_H
7#define __ASM_SH_LANDISK_IDE_H
8
9/* Nothing to see here.. */
10#include <asm/landisk/iodata_landisk.h>
11#define IRQ_CFCARD IRQ_FATA /* CF Card IRQ */
12#define IRQ_PCMCIA IRQ_ATA /* PCMCIA IRQ */
13
14#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 @@
1#ifndef __ASM_SH_IODATA_LANDISK_H
2#define __ASM_SH_IODATA_LANDISK_H
3
4/*
5 * linux/include/asm-sh/landisk/iodata_landisk.h
6 *
7 * Copyright (C) 2000 Atom Create Engineering Co., Ltd.
8 *
9 * IO-DATA LANDISK support
10 */
11
12/* Box specific addresses. */
13
14#define PA_USB 0xa4000000 /* USB Controller M66590 */
15
16#define PA_ATARST 0xb0000000 /* ATA/FATA Access Control Register */
17#define PA_LED 0xb0000001 /* LED Control Register */
18#define PA_STATUS 0xb0000002 /* Switch Status Register */
19#define PA_SHUTDOWN 0xb0000003 /* Shutdown Control Register */
20#define PA_PCIPME 0xb0000004 /* PCI PME Status Register */
21#define PA_IMASK 0xb0000005 /* Interrupt Mask Register */
22/* 2003.10.31 I-O DATA NSD NWG add. for shutdown port clear */
23#define PA_PWRINT_CLR 0xb0000006 /* Shutdown Interrupt clear Register */
24
25#define PA_AREA5_IO 0xb4000000 /* Area 5 IO Memory */
26#define PA_AREA6_IO 0xb8000000 /* Area 6 IO Memory */
27#define PA_LCD_CLRDSP 0x00 /* LCD Clear Display Offset */
28#define PA_LCD_RTNHOME 0x00 /* LCD Return Home Offset */
29#define PA_LCD_ENTMODE 0x00 /* LCD Entry Mode Offset */
30#define PA_LCD_DSPCTL 0x00 /* LCD Display ON/OFF Control Offset */
31#define PA_LCD_FUNC 0x00 /* LCD Function Set Offset */
32#define PA_LCD_CGRAM 0x00 /* LCD Set CGRAM Address Offset */
33#define PA_LCD_DDRAM 0x00 /* LCD Set DDRAM Address Offset */
34#define PA_LCD_RDFLAG 0x01 /* LCD Read Busy Flag Offset */
35#define PA_LCD_WTDATA 0x02 /* LCD Write Datat to RAM Offset */
36#define PA_LCD_RDDATA 0x03 /* LCD Read Data from RAM Offset */
37#define PA_PIDE_OFFSET 0x40 /* CF IDE Offset */
38#define PA_SIDE_OFFSET 0x40 /* HDD IDE Offset */
39
40#define IRQ_PCIINTA 5 /* PCI INTA IRQ */
41#define IRQ_PCIINTB 6 /* PCI INTB IRQ */
42#define IRQ_PCIINDC 7 /* PCI INTC IRQ */
43#define IRQ_PCIINTD 8 /* PCI INTD IRQ */
44#define IRQ_ATA 9 /* ATA IRQ */
45#define IRQ_FATA 10 /* FATA IRQ */
46#define IRQ_POWER 11 /* Power Switch IRQ */
47#define IRQ_BUTTON 12 /* USL-5P Button IRQ */
48#define IRQ_FAULT 13 /* USL-5P Fault IRQ */
49
50#define SHUTDOWN_BTN_MAJOR 99 /* Shutdown button device major no. */
51
52#define SHUTDOWN_LOOP_CNT 5 /* Shutdown button Detection loop */
53#define SHUTDOWN_DELAY 200 /* Shutdown button delay value(ms) */
54
55
56/* added by kogiidena */
57/*
58 * landisk_ledparam
59 *
60 * led ------10 -6543210 -6543210 -6543210
61 * |000000..|0.......|0.......|U.......|
62 * | HARD |fastblik| blink | on |
63 *
64 * led0: power U:update flag
65 * led1: error
66 * led2: usb1
67 * led3: usb2
68 * led4: usb3
69 * led5: usb4
70 * led6: usb5
71 *
72 */
73extern int landisk_ledparam; /* from setup.c */
74extern int landisk_buzzerparam; /* from setup.c */
75extern int landisk_arch; /* from setup.c */
76
77#endif /* __ASM_SH_IODATA_LANDISK_H */
78