SlugOS: packages - deprecate ctrlproxy, depends on unstaged tbd.h (samba)
[openembedded.git] / recipes / ixp4xx / ixp4xx-csr-1.5 / 2.6.patch
1 diff -Naur ixp400_xscale_sw.orig/Makefile ixp400_xscale_sw/Makefile
2 --- ixp400_xscale_sw.orig/Makefile      2005-08-24 00:16:35.000000000 +0200
3 +++ ixp400_xscale_sw/Makefile   2005-08-30 19:01:47.000000000 +0200
4 @@ -93,15 +93,16 @@
5  # platforms. Components that work only for a subset of platforms
6  # should be added to the relevant *_COMPONENTS lists.
7  #
8 -BI_ENDIAN_COMPONENTS := atmdAcc atmm atmsch qmgr npeMh npeDl ethAcc ethDB ethMii hssAcc usb uartAcc featureCtrl ossl osServices
9  
10 +# Intel default value: atmdAcc atmm atmsch qmgr npeMh npeDl ethAcc ethDB ethMii hssAcc usb uartAcc featureCtrl ossl osServices
11 +BI_ENDIAN_COMPONENTS := qmgr npeMh npeDl ethAcc ethDB ethMii ossl osServices featureCtrl
12  
13  # The lists below contain the set of components available for each target platform
14  vxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc dmaAcc
15  vxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc
16  vxsim_COMPONENTS := $(BI_ENDIAN_COMPONENTS) dmaAcc
17 -linuxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc dmaAcc 
18 -linuxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc
19 +linuxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) # perfProfAcc dmaAcc 
20 +linuxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) # perfProfAcc
21  
22  # To facilitate automated builds, do not modify the value of COMPONENTS directly - 
23  # just change the per-platform component lists above.
24 @@ -222,10 +223,12 @@
25  else # IX_TARGET_OS == vxworks
26  
27  # Linux tool names
28 -ifeq ($(IX_TARGET), linuxbe)
29 -LINUX_CROSS_COMPILE := $(HARDHAT_BASE)/devkit/arm/xscale_be/bin/xscale_be-
30 -else
31 -LINUX_CROSS_COMPILE := $(HARDHAT_BASE)/devkit/arm/xscale_le/bin/xscale_le-
32 +ifeq "$(LINUX_CROSS_COMPILE)" "" 
33 + ifeq ($(IX_TARGET), linuxbe)
34 +  LINUX_CROSS_COMPILE := $(HARDHAT_BASE)/devkit/arm/xscale_be/bin/xscale_be-
35 + else
36 +  LINUX_CROSS_COMPILE := $(HARDHAT_BASE)/devkit/arm/xscale_le/bin/xscale_le-
37 + endif
38  endif
39  
40  LD := $(LINUX_CROSS_COMPILE)ld
41 @@ -253,7 +256,9 @@
42  
43  LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
44  
45 -CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE -Isrc/include -I$(NPE_OUTPUT_DIR) -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
46 +CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -msoft-float -DMODULE -Isrc/include -I$(NPE_OUTPUT_DIR) -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
47 +
48 +# -mshort-load-bytes removed by Marc Singer's patch TODO(hannes) why?
49  
50  # Linux linker flags
51  LDFLAGS := -r
52 @@ -1139,9 +1144,14 @@
53  
54  ixp400.o : $(OBJ_DIR)/ixp400.o
55  
56 +ixp400.ko : $(OBJ_DIR)/ixp400.o
57  
58 -$(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(NPE_PRODUCTION_HEADER_OBJ) $(OSAL_MODULE)
59 +$(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(NPE_PRODUCTION_HEADER_OBJ) $(OSAL_MODULE) # add this to hack in the ethAcc codelet: $(OBJ_DIR)/ixp400_codelets_ethAcc.o
60 +       touch $(OBJ_DIR)/ixp400.c
61 +       cp Makefile.kmod26 $(OBJ_DIR)/Makefile
62 +       make -C $(OBJ_DIR)
63         $(LD) $(LDFLAGS) $^ -o $@
64 +       make -C $(OBJ_DIR)
65  
66  
67  
68 diff -Naur ixp400_xscale_sw.orig/Makefile.kmod26 ixp400_xscale_sw/Makefile.kmod26
69 --- ixp400_xscale_sw.orig/Makefile.kmod26       1970-01-01 01:00:00.000000000 +0100
70 +++ ixp400_xscale_sw/Makefile.kmod26    2005-08-24 22:33:12.000000000 +0200
71 @@ -0,0 +1,11 @@
72 +obj-m := ixp400.o
73 +
74 +PWD         := $(shell pwd)
75 +
76 +LINUX_SRC := $($(IX_TARGET)_KERNEL_DIR)
77 +
78 +default:
79 +       $(MAKE) ARCH=arm CROSS_COMPILE=$(LINUX_CROSS_COMPILE) V=1 -C $(LINUX_SRC) SUBDIRS=$(PWD) modules
80 +
81 +clean:
82 +       rm -f ixp400.ko
83 diff -Naur ixp400_xscale_sw.orig/Readme-Kernel-2_6-Patch.txt ixp400_xscale_sw/Readme-Kernel-2_6-Patch.txt
84 --- ixp400_xscale_sw.orig/Readme-Kernel-2_6-Patch.txt   1970-01-01 01:00:00.000000000 +0100
85 +++ ixp400_xscale_sw/Readme-Kernel-2_6-Patch.txt        2005-09-28 19:50:30.000000000 +0200
86 @@ -0,0 +1,49 @@
87 +This file describes a patch to use version 1.5 of the Intel Ixp4XX
88 +Access Library with Linux 2.6 kernels.
89 +
90 +Authors/History
91 +---------------
92 +
93 +This patch consists of the changes made by Marc Singer for use of
94 +version 1.5 of the library with the APEX bootloader, and a patch made
95 +by Robin Farine and Tom Winkler for use of version 1.4 of the library
96 +with Linux-2.6 kernels. These changes were merged together by Hannes
97 +Reich.
98 +
99 +Both patches are incorporated in their entirety, with the exception of
100 +some tweaks to sleep times in the ethAcc code and modifications to
101 +the code in src/codelets/usb/ from the Robin Farine / Tom Winkler
102 +patch.
103 +
104 +Status
105 +------
106 +
107 +This code has been tested on a Linksys NSLU2. It works in big-endian
108 +mode, performance seems around 10% faster than 1.4.
109 +
110 +The code does not work in little-endian mode. It appears as though the
111 +hardware is initialised correctly, but packet receive / transmit done
112 +callbacks are never called.
113 +
114 +Licence Information
115 +-------------------
116 +
117 +The patch is licenced under the same conditions as the original Access
118 +Library 1.5 (INTEL SOFTWARE LICENSE AGREEMENT). The full text of the
119 +licence can be downloaded from:
120 +http://www.intel.com/design/network/swsup/np_sla/ixp400.htm
121 +
122 +The patch is free, unsupported and the authors make no warranties.
123 +Use it at your own risk, do with it as you see fit so long as you do
124 +not violate the original licence agreement.
125 +
126 +The authors permit derivative works based upon the patch.
127 +
128 +References
129 +----------
130 +
131 +The version 1.4 patch by Robin Farine and Tom Winkler is available from
132 +http://www.wnk.at/ixp400_accesslib_kernel26/data/patch_accesslib_kernel26_20040811.diff
133 +
134 +The version 1.5 patch by Marc Singer is at
135 +http://wiki.buici.com/bin/view/Main/IXPAccessLibrary
136 diff -Naur ixp400_xscale_sw.orig/src/codelets/dmaAcc/IxDmaAccCodelet_p.h ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h
137 --- ixp400_xscale_sw.orig/src/codelets/dmaAcc/IxDmaAccCodelet_p.h       2005-08-24 00:16:36.000000000 +0200
138 +++ ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h    2005-08-24 00:18:02.000000000 +0200
139 @@ -113,7 +113,7 @@
140   * @return IX_FAIL - Error initialising codelet
141   */
142  IX_STATUS
143 -ixDmaAccCodeletInit(IxDmaNpeId npeId);
144 +ixDmaAccCodeletInit(IxNpeDlNpeId npeId);
145  
146  /**
147   * @fn ixDmaAccCodeletTestPerform( UINT16 transferLength, 
148 diff -Naur ixp400_xscale_sw.orig/src/ethDB/include/IxEthDB_p.h ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h
149 --- ixp400_xscale_sw.orig/src/ethDB/include/IxEthDB_p.h 2005-08-24 00:16:36.000000000 +0200
150 +++ ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h      2005-08-24 00:18:02.000000000 +0200
151 @@ -633,7 +633,7 @@
152  IX_ETH_DB_PUBLIC UINT32 ixEthDBKeyXORHash(void *macAddress);
153  
154  /* Port updates */
155 -IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBFeature type);
156 +IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType type);
157  IX_ETH_DB_PUBLIC void ixEthDBUpdatePortLearningTrees(IxEthDBPortMap triggerPorts);
158  IX_ETH_DB_PUBLIC void ixEthDBNPEAccessRequest(IxEthDBPortId portID);
159  IX_ETH_DB_PUBLIC void ixEthDBUpdateLock(void);
160 diff -Naur ixp400_xscale_sw.orig/src/include/IxTypes.h ixp400_xscale_sw/src/include/IxTypes.h
161 --- ixp400_xscale_sw.orig/src/include/IxTypes.h 2005-08-24 00:16:36.000000000 +0200
162 +++ ixp400_xscale_sw/src/include/IxTypes.h      2005-08-26 01:19:15.000000000 +0200
163 @@ -79,6 +79,10 @@
164  #endif
165  #endif
166  
167 +#ifndef BIT
168 +#define BIT(x)  ((1)<<(x))
169 +#endif
170 +
171  #include "IxOsalBackward.h"
172  
173  #endif /* IxTypes_H */
174 diff -Naur ixp400_xscale_sw.orig/src/usb/include/usbprivatetypes.h ixp400_xscale_sw/src/usb/include/usbprivatetypes.h
175 --- ixp400_xscale_sw.orig/src/usb/include/usbprivatetypes.h     2005-08-24 00:16:36.000000000 +0200
176 +++ ixp400_xscale_sw/src/usb/include/usbprivatetypes.h  2005-08-24 00:18:02.000000000 +0200
177 @@ -164,6 +164,53 @@
178  } USBEventProcessor;
179  
180  /*  UDC Registers */
181 +
182 +#undef UDCCR
183 +#undef UDCCS0
184 +#undef UDCCS1
185 +#undef UDCCS2
186 +#undef UDCCS3
187 +#undef UDCCS4
188 +#undef UDCCS5
189 +#undef UDCCS6
190 +#undef UDCCS7
191 +#undef UDCCS8
192 +#undef UDCCS9
193 +#undef UDCCS10
194 +#undef UDCCS11
195 +#undef UDCCS12
196 +#undef UDCCS13
197 +#undef UDCCS14
198 +#undef UDCCS15
199 +#undef UICR0
200 +#undef UICR1
201 +#undef USIR0
202 +#undef USIR1
203 +#undef UFNHR
204 +#undef UFNLR
205 +#undef UBCR2
206 +#undef UBCR4
207 +#undef UBCR7
208 +#undef UBCR9
209 +#undef UBCR12
210 +#undef UBCR14
211 +#undef UDDR0
212 +#undef UDDR5
213 +#undef UDDR10
214 +#undef UDDR15
215 +#undef UDDR1
216 +#undef UDDR2
217 +#undef UDDR3
218 +#undef UDDR4
219 +#undef UDDR6
220 +#undef UDDR7
221 +#undef UDDR8
222 +#undef UDDR9
223 +#undef UDDR11
224 +#undef UDDR12
225 +#undef UDDR13
226 +#undef UDDR14
227 +
228  typedef struct  /* UDCRegisters */
229  {
230      volatile UINT32 UDCCR;
231 @@ -229,6 +276,7 @@
232      volatile UINT32    UDDR14;                 
233  } UDCRegisters;
234  
235 +
236  typedef struct /* USBDeviceContext */
237  {
238      UINT32 checkPattern;                      /* Check pattern for verifying the context */