summaryrefslogtreecommitdiff
path: root/packages/linux/ixp4xx-kernel/2.6.16/97-ds101-includes.patch
blob: e9127dbbb4edf8f9f4eff28d74f4fb2e66a1239a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
 include/asm-arm/arch-ixp4xx/ds101.h    |   70 +++++++++++++++++++++++++++++++++
 include/asm-arm/arch-ixp4xx/hardware.h |    1 
 include/asm-arm/arch-ixp4xx/irqs.h     |    7 +++
 3 files changed, 78 insertions(+)

Index: linux-2.6.15/include/asm-arm/arch-ixp4xx/ds101.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.15/include/asm-arm/arch-ixp4xx/ds101.h	2006-02-15 22:35:31.000000000 +0100
@@ -0,0 +1,89 @@
+/*
+ * include/asm-arm/arch-ixp4xx/ds101.h
+ *
+ * DS101 platform specific definitions
+ *
+ * Author: Øyvind Repvik <nail@nslu2-linux.org>
+ *
+ * based on ixdp425.h:
+ *     Copyright 2004 (c) MontaVista, Software, Inc.
+ *
+ * This file is licensed under  the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+
+#ifndef __ASM_ARCH_HARDWARE_H__
+#error "Do not include this directly, instead #include <asm/hardware.h>"
+#endif
+
+#define DS101_SCL_PIN		DS101_GPIO0
+#define DS101_SDA_PIN		DS101_GPIO1
+#define DS101_GPIO_BUZZ		DS101_GPIO2
+#define DS101_POWER_LED		DS101_GPIO3
+#define DS101_USBCOPYB_GPIO	DS101_GPIO4
+#define DS101_USBCOPY_SOLID_LED	DS101_GPIO4	/* The led and button share GPIO */
+#define DS101_USBCOPY_BLINK_LED	DS101_GPIO5
+/* GPIO6 is unknown */
+#define DS101_POWEROFF_GPIO	DS101_GPIO7
+#define DS101_POWERB_GPIO	DS101_GPIO8
+#define DS101_PCI_INTC_PIN	DS101_GPIO9
+#define DS101_PCI_INTB_PIN	DS101_GPIO10
+#define DS101_PCI_INTA_PIN	DS101_GPIO11
+#define DS101_RESETB_GPIO	DS101_GPIO12
+#define DS101_STATUSOK_LED	DS101_GPIO14
+#define DS101_STATUSBAD_LED	DS101_GPIO15
+
+#define DS101_PCI_MAX_DEV	2
+#define DS101_PCI_IRQ_LINES	3
+
+#define DS101_POWERB_IRQ	IRQ_IXP4XX_GPIO8
+#define DS101_RESETB_IRQ	IRQ_IXP4XX_GPIO12
+#define DS101_USBCOPYB_IRQ	IRQ_IXP4XX_GPIO4
+
+#define DS101_GPIO_IN		IXP4XX_GPIO_IN
+#define DS101_GPIO_OUT		IXP4XX_GPIO_OUT
+#define DS101_GPIO_HIGH		1
+#define DS101_GPIO_LOW		0
+
+#define DS101_GPIO_CLK0_ENABLE	0x100
+#define DS101_GPIO_CLK1_ENABLE	0x1000000
+/* GPIO */
+
+#define DS101_GPIO0           0
+#define DS101_GPIO1           1
+#define DS101_GPIO2           2
+#define DS101_GPIO3           3
+#define DS101_GPIO4           4
+#define DS101_GPIO5           5
+#define DS101_GPIO6           6
+#define DS101_GPIO7           7
+#define DS101_GPIO8           8
+#define DS101_GPIO9           9
+#define DS101_GPIO10          10
+#define DS101_GPIO11          11
+#define DS101_GPIO12          12
+#define DS101_GPIO13          13
+#define DS101_GPIO14          14
+#define DS101_GPIO15          15
+
+/* Stuff needed to setup the IXP expansion
+ * bus on the DS101
+ */
+ 
+#define DS101_EXP_RECOVERY_T(x)	(((x) & 15) << 16)
+#define DS101_EXP_HOLD_T(x)	(((x) & 3) << 20)
+#define DS101_EXP_STROBE_T(x)	(((x) & 15) << 22)
+#define DS101_EXP_SETUP_T(x)	(((x) & 3) << 26)
+#define DS101_EXP_ADDR_T(x)	(((x) & 3) << 28)
+
+#define DS101_EXP_SZ_16M	(15 << 10)
+#define DS101_EXP_WR_EN		(1 << 1)
+#define DS101_EXP_BYTE_RD16	(1 << 6)
+#define DS101_EXP_CS_EN		(1 << 31)
+
+#define DS101_EXP_CS0_INIT	(DS101_EXP_ADDR_T(1) | \
+        DS101_EXP_SETUP_T(1) | DS101_EXP_STROBE_T(1) | \
+        DS101_EXP_HOLD_T(1) | DS101_EXP_RECOVERY_T(1)| \
+        DS101_EXP_SZ_16M | DS101_EXP_WR_EN | \
+        DS101_EXP_BYTE_RD16 | DS101_EXP_CS_EN)
Index: linux-2.6.15/include/asm-arm/arch-ixp4xx/hardware.h
===================================================================
--- linux-2.6.15.orig/include/asm-arm/arch-ixp4xx/hardware.h	2006-02-13 21:23:22.000000000 +0100
+++ linux-2.6.15/include/asm-arm/arch-ixp4xx/hardware.h	2006-02-13 21:23:26.000000000 +0100
@@ -46,5 +46,6 @@
 #include "prpmc1100.h"
 #include "nslu2.h"
 #include "nas100d.h"
+#include "ds101.h"
 
 #endif  /* _ASM_ARCH_HARDWARE_H */
Index: linux-2.6.15/include/asm-arm/arch-ixp4xx/irqs.h
===================================================================
--- linux-2.6.15.orig/include/asm-arm/arch-ixp4xx/irqs.h	2006-02-13 21:23:22.000000000 +0100
+++ linux-2.6.15/include/asm-arm/arch-ixp4xx/irqs.h	2006-02-13 21:23:26.000000000 +0100
@@ -108,5 +108,12 @@
 #define        IRQ_NAS100D_PCI_INTC    IRQ_IXP4XX_GPIO9
 #define        IRQ_NAS100D_PCI_INTD    IRQ_IXP4XX_GPIO8
 #define        IRQ_NAS100D_PCI_INTE    IRQ_IXP4XX_GPIO7
+/*
+ * DS101 board IRQs
+ */
+
+#define        IRQ_DS101_PCI_INTA    IRQ_IXP4XX_GPIO11
+#define        IRQ_DS101_PCI_INTB    IRQ_IXP4XX_GPIO10
+#define        IRQ_DS101_PCI_INTC    IRQ_IXP4XX_GPIO9
 
 #endif