Added primary and secondary bootloaders
[openwrt/svn-archive/archive.git] / target / linux / at91-2.6 / image / u-boot / patches / 002-dataflash_machine.patch
1 diff -Naur u-boot-1.1.4.org/board/vlink/at45.c u-boot-1.1.4.tmp/board/vlink/at45.c
2 --- u-boot-1.1.4.org/board/vlink/at45.c 1970-01-01 01:00:00.000000000 +0100
3 +++ u-boot-1.1.4.tmp/board/vlink/at45.c 2005-12-16 17:39:27.000000000 +0100
4 @@ -0,0 +1,621 @@
5 +/* Driver for ATMEL DataFlash support
6 + * Author : Hamid Ikdoumi (Atmel)
7 + *
8 + * This program is free software; you can redistribute it and/or
9 + * modify it under the terms of the GNU General Public License as
10 + * published by the Free Software Foundation; either version 2 of
11 + * the License, or (at your option) any later version.
12 + *
13 + * This program is distributed in the hope that it will be useful,
14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 + * GNU General Public License for more details.
17 + *
18 + * You should have received a copy of the GNU General Public License
19 + * along with this program; if not, write to the Free Software
20 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 + * MA 02111-1307 USA
22 + *
23 + */
24 +
25 +#include <config.h>
26 +#include <common.h>
27 +#include <asm/hardware.h>
28 +
29 +#ifdef CONFIG_HAS_DATAFLASH
30 +#include <dataflash.h>
31 +
32 +#define AT91C_SPI_CLK 10000000 /* Max Value = 10MHz to be compliant to
33 +the Continuous Array Read function */
34 +
35 +/* AC Characteristics */
36 +/* DLYBS = tCSS = 250ns min and DLYBCT = tCSH = 250ns */
37 +#define DATAFLASH_TCSS (0xC << 16)
38 +#define DATAFLASH_TCHS (0x1 << 24)
39 +
40 +#define AT91C_TIMEOUT_WRDY 200000
41 +#define AT91C_SPI_PCS0_SERIAL_DATAFLASH 0xE /* Chip Select 0 : NPCS0 %1110 */
42 +#define AT91C_SPI_PCS3_DATAFLASH_CARD 0x7 /* Chip Select 3 : NPCS3 %0111 */
43 +
44 +void AT91F_SpiInit(void) {
45 +
46 +/*-------------------------------------------------------------------*/
47 +/* SPI DataFlash Init */
48 +/*-------------------------------------------------------------------*/
49 + /* Configure PIOs */
50 + AT91C_BASE_PIOA->PIO_ASR = AT91C_PA3_NPCS0 | AT91C_PA4_NPCS1 | AT91C_PA1_MOSI | AT91C_PA5_NPCS2 |
51 + AT91C_PA6_NPCS3 | AT91C_PA0_MISO | AT91C_PA2_SPCK;
52 + AT91C_BASE_PIOA->PIO_PDR = AT91C_PA3_NPCS0 | AT91C_PA4_NPCS1 | AT91C_PA1_MOSI | AT91C_PA5_NPCS2 |
53 + AT91C_PA6_NPCS3 | AT91C_PA0_MISO | AT91C_PA2_SPCK;
54 + /* Enable CLock */
55 + AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_SPI;
56 +
57 + /* Reset the SPI */
58 + AT91C_BASE_SPI->SPI_CR = AT91C_SPI_SWRST;
59 +
60 + /* Configure SPI in Master Mode with No CS selected !!! */
61 + AT91C_BASE_SPI->SPI_MR = AT91C_SPI_MSTR | AT91C_SPI_MODFDIS | AT91C_SPI_PCS;
62 +
63 + /* Configure CS0 and CS3 */
64 + *(AT91C_SPI_CSR + 0) = AT91C_SPI_CPOL | (AT91C_SPI_DLYBS & DATAFLASH_TCSS) | (AT91C_SPI_DLYBCT &
65 + DATAFLASH_TCHS) | ((AT91C_MASTER_CLOCK / (2*AT91C_SPI_CLK)) << 8);
66 +
67 + *(AT91C_SPI_CSR + 3) = AT91C_SPI_CPOL | (AT91C_SPI_DLYBS & DATAFLASH_TCSS) | (AT91C_SPI_DLYBCT &
68 + DATAFLASH_TCHS) | ((AT91C_MASTER_CLOCK / (2*AT91C_SPI_CLK)) << 8);
69 +
70 +}
71 +
72 +void AT91F_SpiEnable(int cs) {
73 + switch(cs) {
74 + case 0: /* Configure SPI CS0 for Serial DataFlash AT45DBxx */
75 + AT91C_BASE_SPI->SPI_MR &= 0xFFF0FFFF;
76 + AT91C_BASE_SPI->SPI_MR |= ((AT91C_SPI_PCS0_SERIAL_DATAFLASH<<16) & AT91C_SPI_PCS);
77 + break;
78 + case 3: /* Configure SPI CS3 for Serial DataFlash Card */
79 + /* Set up PIO SDC_TYPE to switch on DataFlash Card and not MMC/SDCard */
80 + AT91C_BASE_PIOB->PIO_PER = AT91C_PIO_PB7; /* Set in PIO mode */
81 + AT91C_BASE_PIOB->PIO_OER = AT91C_PIO_PB7; /* Configure in output */
82 + /* Clear Output */
83 + AT91C_BASE_PIOB->PIO_CODR = AT91C_PIO_PB7;
84 + /* Configure PCS */
85 + AT91C_BASE_SPI->SPI_MR &= 0xFFF0FFFF;
86 + AT91C_BASE_SPI->SPI_MR |= ((AT91C_SPI_PCS3_DATAFLASH_CARD<<16) & AT91C_SPI_PCS);
87 + break;
88 + }
89 +
90 + /* SPI_Enable */
91 + AT91C_BASE_SPI->SPI_CR = AT91C_SPI_SPIEN;
92 +}
93 +
94 +/*----------------------------------------------------------------------------*/
95 +/* \fn AT91F_SpiWrite */
96 +/* \brief Set the PDC registers for a transfert */
97 +/*----------------------------------------------------------------------------*/
98 +unsigned int AT91F_SpiWrite ( AT91PS_DataflashDesc pDesc )
99 +{
100 + unsigned int timeout;
101 +
102 + pDesc->state = BUSY;
103 +
104 + AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS;
105 +
106 + /* Initialize the Transmit and Receive Pointer */
107 + AT91C_BASE_SPI->SPI_RPR = (unsigned int)pDesc->rx_cmd_pt ;
108 + AT91C_BASE_SPI->SPI_TPR = (unsigned int)pDesc->tx_cmd_pt ;
109 +
110 + /* Intialize the Transmit and Receive Counters */
111 + AT91C_BASE_SPI->SPI_RCR = pDesc->rx_cmd_size;
112 + AT91C_BASE_SPI->SPI_TCR = pDesc->tx_cmd_size;
113 +
114 + if ( pDesc->tx_data_size != 0 ) {
115 + /* Initialize the Next Transmit and Next Receive Pointer */
116 + AT91C_BASE_SPI->SPI_RNPR = (unsigned int)pDesc->rx_data_pt ;
117 + AT91C_BASE_SPI->SPI_TNPR = (unsigned int)pDesc->tx_data_pt ;
118 +
119 + /* Intialize the Next Transmit and Next Receive Counters */
120 + AT91C_BASE_SPI->SPI_RNCR = pDesc->rx_data_size ;
121 + AT91C_BASE_SPI->SPI_TNCR = pDesc->tx_data_size ;
122 + }
123 +
124 + /* arm simple, non interrupt dependent timer */
125 + reset_timer_masked();
126 + timeout = 0;
127 +
128 + AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTEN + AT91C_PDC_RXTEN;
129 + while(!(AT91C_BASE_SPI->SPI_SR & AT91C_SPI_RXBUFF) && ((timeout = get_timer_masked() ) < CFG_SPI_WRITE_TOUT));
130 + AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS;
131 + pDesc->state = IDLE;
132 +
133 + if (timeout >= CFG_SPI_WRITE_TOUT){
134 + printf("Error Timeout\n\r");
135 + return DATAFLASH_ERROR;
136 + }
137 +
138 + return DATAFLASH_OK;
139 +}
140 +
141 +
142 +/*----------------------------------------------------------------------*/
143 +/* \fn AT91F_DataFlashSendCommand */
144 +/* \brief Generic function to send a command to the dataflash */
145 +/*----------------------------------------------------------------------*/
146 +AT91S_DataFlashStatus AT91F_DataFlashSendCommand(
147 + AT91PS_DataFlash pDataFlash,
148 + unsigned char OpCode,
149 + unsigned int CmdSize,
150 + unsigned int DataflashAddress)
151 +{
152 + unsigned int adr;
153 +
154 + if ( (pDataFlash->pDataFlashDesc->state) != IDLE)
155 + return DATAFLASH_BUSY;
156 +
157 + /* process the address to obtain page address and byte address */
158 + adr = ((DataflashAddress / (pDataFlash->pDevice->pages_size)) << pDataFlash->pDevice->page_offset) + (DataflashAddress % (pDataFlash->pDevice->pages_size));
159 +
160 + /* fill the command buffer */
161 + pDataFlash->pDataFlashDesc->command[0] = OpCode;
162 + if (pDataFlash->pDevice->pages_number >= 16384) {
163 + pDataFlash->pDataFlashDesc->command[1] = (unsigned char)((adr & 0x0F000000) >> 24);
164 + pDataFlash->pDataFlashDesc->command[2] = (unsigned char)((adr & 0x00FF0000) >> 16);
165 + pDataFlash->pDataFlashDesc->command[3] = (unsigned char)((adr & 0x0000FF00) >> 8);
166 + pDataFlash->pDataFlashDesc->command[4] = (unsigned char)(adr & 0x000000FF);
167 + } else {
168 + pDataFlash->pDataFlashDesc->command[1] = (unsigned char)((adr & 0x00FF0000) >> 16);
169 + pDataFlash->pDataFlashDesc->command[2] = (unsigned char)((adr & 0x0000FF00) >> 8);
170 + pDataFlash->pDataFlashDesc->command[3] = (unsigned char)(adr & 0x000000FF) ;
171 + pDataFlash->pDataFlashDesc->command[4] = 0;
172 + }
173 + pDataFlash->pDataFlashDesc->command[5] = 0;
174 + pDataFlash->pDataFlashDesc->command[6] = 0;
175 + pDataFlash->pDataFlashDesc->command[7] = 0;
176 +
177 + /* Initialize the SpiData structure for the spi write fuction */
178 + pDataFlash->pDataFlashDesc->tx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
179 + pDataFlash->pDataFlashDesc->tx_cmd_size = CmdSize ;
180 + pDataFlash->pDataFlashDesc->rx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
181 + pDataFlash->pDataFlashDesc->rx_cmd_size = CmdSize ;
182 +
183 + /* send the command and read the data */
184 + return AT91F_SpiWrite (pDataFlash->pDataFlashDesc);
185 +}
186 +
187 +
188 +/*----------------------------------------------------------------------*/
189 +/* \fn AT91F_DataFlashGetStatus */
190 +/* \brief Read the status register of the dataflash */
191 +/*----------------------------------------------------------------------*/
192 +AT91S_DataFlashStatus AT91F_DataFlashGetStatus(AT91PS_DataflashDesc pDesc)
193 +{
194 + AT91S_DataFlashStatus status;
195 +
196 + /* if a transfert is in progress ==> return 0 */
197 + if( (pDesc->state) != IDLE)
198 + return DATAFLASH_BUSY;
199 +
200 + /* first send the read status command (D7H) */
201 + pDesc->command[0] = DB_STATUS;
202 + pDesc->command[1] = 0;
203 +
204 + pDesc->DataFlash_state = GET_STATUS;
205 + pDesc->tx_data_size = 0 ; /* Transmit the command and receive response */
206 + pDesc->tx_cmd_pt = pDesc->command ;
207 + pDesc->rx_cmd_pt = pDesc->command ;
208 + pDesc->rx_cmd_size = 2 ;
209 + pDesc->tx_cmd_size = 2 ;
210 + status = AT91F_SpiWrite (pDesc);
211 +
212 + pDesc->DataFlash_state = *( (unsigned char *) (pDesc->rx_cmd_pt) +1);
213 +
214 + return status;
215 +}
216 +
217 +
218 +/*----------------------------------------------------------------------*/
219 +/* \fn AT91F_DataFlashWaitReady */
220 +/* \brief wait for dataflash ready (bit7 of the status register == 1) */
221 +/*----------------------------------------------------------------------*/
222 +AT91S_DataFlashStatus AT91F_DataFlashWaitReady(AT91PS_DataflashDesc pDataFlashDesc, unsigned int timeout)
223 +{
224 + pDataFlashDesc->DataFlash_state = IDLE;
225 +
226 + do {
227 + AT91F_DataFlashGetStatus(pDataFlashDesc);
228 + timeout--;
229 + } while( ((pDataFlashDesc->DataFlash_state & 0x80) != 0x80) && (timeout > 0) );
230 +
231 + if((pDataFlashDesc->DataFlash_state & 0x80) != 0x80)
232 + return DATAFLASH_ERROR;
233 +
234 + return DATAFLASH_OK;
235 +}
236 +
237 +
238 +/*------------------------------------------------------------------------------*/
239 +/* Function Name : AT91F_DataFlashContinuousRead */
240 +/* Object : Continuous stream Read */
241 +/* Input Parameters : DataFlash Service */
242 +/* : <src> = dataflash address */
243 +/* : <*dataBuffer> = data buffer pointer */
244 +/* : <sizeToRead> = data buffer size */
245 +/* Return value : State of the dataflash */
246 +/*------------------------------------------------------------------------------*/
247 +AT91S_DataFlashStatus AT91F_DataFlashContinuousRead (
248 + AT91PS_DataFlash pDataFlash,
249 + int src,
250 + unsigned char *dataBuffer,
251 + int sizeToRead )
252 +{
253 + AT91S_DataFlashStatus status;
254 + /* Test the size to read in the device */
255 + if ( (src + sizeToRead) > (pDataFlash->pDevice->pages_size * (pDataFlash->pDevice->pages_number)))
256 + return DATAFLASH_MEMORY_OVERFLOW;
257 +
258 + pDataFlash->pDataFlashDesc->rx_data_pt = dataBuffer;
259 + pDataFlash->pDataFlashDesc->rx_data_size = sizeToRead;
260 + pDataFlash->pDataFlashDesc->tx_data_pt = dataBuffer;
261 + pDataFlash->pDataFlashDesc->tx_data_size = sizeToRead;
262 +
263 + status = AT91F_DataFlashSendCommand (pDataFlash, DB_CONTINUOUS_ARRAY_READ, 8, src);
264 + /* Send the command to the dataflash */
265 + return(status);
266 +}
267 +
268 +
269 +/*------------------------------------------------------------------------------*/
270 +/* Function Name : AT91F_DataFlashPagePgmBuf */
271 +/* Object : Main memory page program through buffer 1 or buffer 2 */
272 +/* Input Parameters : DataFlash Service */
273 +/* : <*src> = Source buffer */
274 +/* : <dest> = dataflash destination address */
275 +/* : <SizeToWrite> = data buffer size */
276 +/* Return value : State of the dataflash */
277 +/*------------------------------------------------------------------------------*/
278 +AT91S_DataFlashStatus AT91F_DataFlashPagePgmBuf(
279 + AT91PS_DataFlash pDataFlash,
280 + unsigned char *src,
281 + unsigned int dest,
282 + unsigned int SizeToWrite)
283 +{
284 + int cmdsize;
285 + pDataFlash->pDataFlashDesc->tx_data_pt = src ;
286 + pDataFlash->pDataFlashDesc->tx_data_size = SizeToWrite ;
287 + pDataFlash->pDataFlashDesc->rx_data_pt = src;
288 + pDataFlash->pDataFlashDesc->rx_data_size = SizeToWrite;
289 +
290 + cmdsize = 4;
291 + /* Send the command to the dataflash */
292 + if (pDataFlash->pDevice->pages_number >= 16384)
293 + cmdsize = 5;
294 + return(AT91F_DataFlashSendCommand (pDataFlash, DB_PAGE_PGM_BUF1, cmdsize, dest));
295 +}
296 +
297 +
298 +/*------------------------------------------------------------------------------*/
299 +/* Function Name : AT91F_MainMemoryToBufferTransfert */
300 +/* Object : Read a page in the SRAM Buffer 1 or 2 */
301 +/* Input Parameters : DataFlash Service */
302 +/* : Page concerned */
303 +/* : */
304 +/* Return value : State of the dataflash */
305 +/*------------------------------------------------------------------------------*/
306 +AT91S_DataFlashStatus AT91F_MainMemoryToBufferTransfert(
307 + AT91PS_DataFlash pDataFlash,
308 + unsigned char BufferCommand,
309 + unsigned int page)
310 +{
311 + int cmdsize;
312 + /* Test if the buffer command is legal */
313 + if ((BufferCommand != DB_PAGE_2_BUF1_TRF) && (BufferCommand != DB_PAGE_2_BUF2_TRF))
314 + return DATAFLASH_BAD_COMMAND;
315 +
316 + /* no data to transmit or receive */
317 + pDataFlash->pDataFlashDesc->tx_data_size = 0;
318 + cmdsize = 4;
319 + if (pDataFlash->pDevice->pages_number >= 16384)
320 + cmdsize = 5;
321 + return(AT91F_DataFlashSendCommand (pDataFlash, BufferCommand, cmdsize, page*pDataFlash->pDevice->pages_size));
322 +}
323 +
324 +
325 +/*----------------------------------------------------------------------------- */
326 +/* Function Name : AT91F_DataFlashWriteBuffer */
327 +/* Object : Write data to the internal sram buffer 1 or 2 */
328 +/* Input Parameters : DataFlash Service */
329 +/* : <BufferCommand> = command to write buffer1 or buffer2 */
330 +/* : <*dataBuffer> = data buffer to write */
331 +/* : <bufferAddress> = address in the internal buffer */
332 +/* : <SizeToWrite> = data buffer size */
333 +/* Return value : State of the dataflash */
334 +/*------------------------------------------------------------------------------*/
335 +AT91S_DataFlashStatus AT91F_DataFlashWriteBuffer (
336 + AT91PS_DataFlash pDataFlash,
337 + unsigned char BufferCommand,
338 + unsigned char *dataBuffer,
339 + unsigned int bufferAddress,
340 + int SizeToWrite )
341 +{
342 + int cmdsize;
343 + /* Test if the buffer command is legal */
344 + if ((BufferCommand != DB_BUF1_WRITE) && (BufferCommand != DB_BUF2_WRITE))
345 + return DATAFLASH_BAD_COMMAND;
346 +
347 + /* buffer address must be lower than page size */
348 + if (bufferAddress > pDataFlash->pDevice->pages_size)
349 + return DATAFLASH_BAD_ADDRESS;
350 +
351 + if ( (pDataFlash->pDataFlashDesc->state) != IDLE)
352 + return DATAFLASH_BUSY;
353 +
354 + /* Send first Write Command */
355 + pDataFlash->pDataFlashDesc->command[0] = BufferCommand;
356 + pDataFlash->pDataFlashDesc->command[1] = 0;
357 + if (pDataFlash->pDevice->pages_number >= 16384) {
358 + pDataFlash->pDataFlashDesc->command[2] = 0;
359 + pDataFlash->pDataFlashDesc->command[3] = (unsigned char)(((unsigned int)(bufferAddress & pDataFlash->pDevice->byte_mask)) >> 8) ;
360 + pDataFlash->pDataFlashDesc->command[4] = (unsigned char)((unsigned int)bufferAddress & 0x00FF) ;
361 + cmdsize = 5;
362 + } else {
363 + pDataFlash->pDataFlashDesc->command[2] = (unsigned char)(((unsigned int)(bufferAddress & pDataFlash->pDevice->byte_mask)) >> 8) ;
364 + pDataFlash->pDataFlashDesc->command[3] = (unsigned char)((unsigned int)bufferAddress & 0x00FF) ;
365 + pDataFlash->pDataFlashDesc->command[4] = 0;
366 + cmdsize = 4;
367 + }
368 +
369 + pDataFlash->pDataFlashDesc->tx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
370 + pDataFlash->pDataFlashDesc->tx_cmd_size = cmdsize ;
371 + pDataFlash->pDataFlashDesc->rx_cmd_pt = pDataFlash->pDataFlashDesc->command ;
372 + pDataFlash->pDataFlashDesc->rx_cmd_size = cmdsize ;
373 +
374 + pDataFlash->pDataFlashDesc->rx_data_pt = dataBuffer ;
375 + pDataFlash->pDataFlashDesc->tx_data_pt = dataBuffer ;
376 + pDataFlash->pDataFlashDesc->rx_data_size = SizeToWrite ;
377 + pDataFlash->pDataFlashDesc->tx_data_size = SizeToWrite ;
378 +
379 + return AT91F_SpiWrite(pDataFlash->pDataFlashDesc);
380 +}
381 +
382 +/*------------------------------------------------------------------------------*/
383 +/* Function Name : AT91F_PageErase */
384 +/* Object : Erase a page */
385 +/* Input Parameters : DataFlash Service */
386 +/* : Page concerned */
387 +/* : */
388 +/* Return value : State of the dataflash */
389 +/*------------------------------------------------------------------------------*/
390 +AT91S_DataFlashStatus AT91F_PageErase(
391 + AT91PS_DataFlash pDataFlash,
392 + unsigned int page)
393 +{
394 + int cmdsize;
395 + /* Test if the buffer command is legal */
396 + /* no data to transmit or receive */
397 + pDataFlash->pDataFlashDesc->tx_data_size = 0;
398 +
399 + cmdsize = 4;
400 + if (pDataFlash->pDevice->pages_number >= 16384)
401 + cmdsize = 5;
402 + return(AT91F_DataFlashSendCommand (pDataFlash, DB_PAGE_ERASE, cmdsize, page*pDataFlash->pDevice->pages_size));
403 +}
404 +
405 +
406 +/*------------------------------------------------------------------------------*/
407 +/* Function Name : AT91F_BlockErase */
408 +/* Object : Erase a Block */
409 +/* Input Parameters : DataFlash Service */
410 +/* : Page concerned */
411 +/* : */
412 +/* Return value : State of the dataflash */
413 +/*------------------------------------------------------------------------------*/
414 +AT91S_DataFlashStatus AT91F_BlockErase(
415 + AT91PS_DataFlash pDataFlash,
416 + unsigned int block)
417 +{
418 + int cmdsize;
419 + /* Test if the buffer command is legal */
420 + /* no data to transmit or receive */
421 + pDataFlash->pDataFlashDesc->tx_data_size = 0;
422 + cmdsize = 4;
423 + if (pDataFlash->pDevice->pages_number >= 16384)
424 + cmdsize = 5;
425 + return(AT91F_DataFlashSendCommand (pDataFlash, DB_BLOCK_ERASE,cmdsize, block*8*pDataFlash->pDevice->pages_size));
426 +}
427 +
428 +/*------------------------------------------------------------------------------*/
429 +/* Function Name : AT91F_WriteBufferToMain */
430 +/* Object : Write buffer to the main memory */
431 +/* Input Parameters : DataFlash Service */
432 +/* : <BufferCommand> = command to send to buffer1 or buffer2 */
433 +/* : <dest> = main memory address */
434 +/* Return value : State of the dataflash */
435 +/*------------------------------------------------------------------------------*/
436 +AT91S_DataFlashStatus AT91F_WriteBufferToMain (
437 + AT91PS_DataFlash pDataFlash,
438 + unsigned char BufferCommand,
439 + unsigned int dest )
440 +{
441 + int cmdsize;
442 + /* Test if the buffer command is correct */
443 + if ((BufferCommand != DB_BUF1_PAGE_PGM) &&
444 + (BufferCommand != DB_BUF1_PAGE_ERASE_PGM) &&
445 + (BufferCommand != DB_BUF2_PAGE_PGM) &&
446 + (BufferCommand != DB_BUF2_PAGE_ERASE_PGM) )
447 + return DATAFLASH_BAD_COMMAND;
448 +
449 + /* no data to transmit or receive */
450 + pDataFlash->pDataFlashDesc->tx_data_size = 0;
451 +
452 + cmdsize = 4;
453 + if (pDataFlash->pDevice->pages_number >= 16384)
454 + cmdsize = 5;
455 + /* Send the command to the dataflash */
456 + return(AT91F_DataFlashSendCommand (pDataFlash, BufferCommand, cmdsize, dest));
457 +}
458 +
459 +
460 +/*------------------------------------------------------------------------------*/
461 +/* Function Name : AT91F_PartialPageWrite */
462 +/* Object : Erase partielly a page */
463 +/* Input Parameters : <page> = page number */
464 +/* : <AdrInpage> = adr to begin the fading */
465 +/* : <length> = Number of bytes to erase */
466 +/*------------------------------------------------------------------------------*/
467 +AT91S_DataFlashStatus AT91F_PartialPageWrite (
468 + AT91PS_DataFlash pDataFlash,
469 + unsigned char *src,
470 + unsigned int dest,
471 + unsigned int size)
472 +{
473 + unsigned int page;
474 + unsigned int AdrInPage;
475 +
476 + page = dest / (pDataFlash->pDevice->pages_size);
477 + AdrInPage = dest % (pDataFlash->pDevice->pages_size);
478 +
479 + /* Read the contents of the page in the Sram Buffer */
480 + AT91F_MainMemoryToBufferTransfert(pDataFlash, DB_PAGE_2_BUF1_TRF, page);
481 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
482 + /*Update the SRAM buffer */
483 + AT91F_DataFlashWriteBuffer(pDataFlash, DB_BUF1_WRITE, src, AdrInPage, size);
484 +
485 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
486 +
487 + /* Erase page if a 128 Mbits device */
488 + if (pDataFlash->pDevice->pages_number >= 16384) {
489 + AT91F_PageErase(pDataFlash, page);
490 + /* Rewrite the modified Sram Buffer in the main memory */
491 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
492 + }
493 +
494 + /* Rewrite the modified Sram Buffer in the main memory */
495 + return(AT91F_WriteBufferToMain(pDataFlash, DB_BUF1_PAGE_ERASE_PGM, (page*pDataFlash->pDevice->pages_size)));
496 +}
497 +
498 +
499 +/*------------------------------------------------------------------------------*/
500 +/* Function Name : AT91F_DataFlashWrite */
501 +/* Object : */
502 +/* Input Parameters : <*src> = Source buffer */
503 +/* : <dest> = dataflash adress */
504 +/* : <size> = data buffer size */
505 +/*------------------------------------------------------------------------------*/
506 +AT91S_DataFlashStatus AT91F_DataFlashWrite(
507 + AT91PS_DataFlash pDataFlash,
508 + unsigned char *src,
509 + int dest,
510 + int size )
511 +{
512 + unsigned int length;
513 + unsigned int page;
514 + unsigned int status;
515 +
516 + AT91F_SpiEnable(pDataFlash->pDevice->cs);
517 +
518 + if ( (dest + size) > (pDataFlash->pDevice->pages_size * (pDataFlash->pDevice->pages_number)))
519 + return DATAFLASH_MEMORY_OVERFLOW;
520 +
521 + /* If destination does not fit a page start address */
522 + if ((dest % ((unsigned int)(pDataFlash->pDevice->pages_size))) != 0 ) {
523 + length = pDataFlash->pDevice->pages_size - (dest % ((unsigned int)(pDataFlash->pDevice->pages_size)));
524 +
525 + if (size < length)
526 + length = size;
527 +
528 + if(!AT91F_PartialPageWrite(pDataFlash,src, dest, length))
529 + return DATAFLASH_ERROR;
530 +
531 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
532 +
533 + /* Update size, source and destination pointers */
534 + size -= length;
535 + dest += length;
536 + src += length;
537 + }
538 +
539 + while (( size - pDataFlash->pDevice->pages_size ) >= 0 ) {
540 + /* program dataflash page */
541 + page = (unsigned int)dest / (pDataFlash->pDevice->pages_size);
542 +
543 + status = AT91F_DataFlashWriteBuffer(pDataFlash, DB_BUF1_WRITE, src, 0, pDataFlash->pDevice->pages_size);
544 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
545 +
546 + status = AT91F_PageErase(pDataFlash, page);
547 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
548 + if (!status)
549 + return DATAFLASH_ERROR;
550 +
551 + status = AT91F_WriteBufferToMain (pDataFlash, DB_BUF1_PAGE_PGM, dest);
552 + if(!status)
553 + return DATAFLASH_ERROR;
554 +
555 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
556 +
557 + /* Update size, source and destination pointers */
558 + size -= pDataFlash->pDevice->pages_size ;
559 + dest += pDataFlash->pDevice->pages_size ;
560 + src += pDataFlash->pDevice->pages_size ;
561 + }
562 +
563 + /* If still some bytes to read */
564 + if ( size > 0 ) {
565 + /* program dataflash page */
566 + if(!AT91F_PartialPageWrite(pDataFlash, src, dest, size) )
567 + return DATAFLASH_ERROR;
568 +
569 + AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY);
570 + }
571 + return DATAFLASH_OK;
572 +}
573 +
574 +
575 +/*------------------------------------------------------------------------------*/
576 +/* Function Name : AT91F_DataFlashRead */
577 +/* Object : Read a block in dataflash */
578 +/* Input Parameters : */
579 +/* Return value : */
580 +/*------------------------------------------------------------------------------*/
581 +int AT91F_DataFlashRead(
582 + AT91PS_DataFlash pDataFlash,
583 + unsigned long addr,
584 + unsigned long size,
585 + char *buffer)
586 +{
587 + unsigned long SizeToRead;
588 +
589 + AT91F_SpiEnable(pDataFlash->pDevice->cs);
590 +
591 + if(AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY) != DATAFLASH_OK)
592 + return -1;
593 +
594 + while (size) {
595 + SizeToRead = (size < 0x8000)? size:0x8000;
596 +
597 + if (AT91F_DataFlashWaitReady(pDataFlash->pDataFlashDesc, AT91C_TIMEOUT_WRDY) != DATAFLASH_OK)
598 + return -1;
599 +
600 + if (AT91F_DataFlashContinuousRead (pDataFlash, addr, buffer, SizeToRead) != DATAFLASH_OK)
601 + return -1;
602 +
603 + size -= SizeToRead;
604 + addr += SizeToRead;
605 + buffer += SizeToRead;
606 + }
607 +
608 + return DATAFLASH_OK;
609 +}
610 +
611 +
612 +/*------------------------------------------------------------------------------*/
613 +/* Function Name : AT91F_DataflashProbe */
614 +/* Object : */
615 +/* Input Parameters : */
616 +/* Return value : Dataflash status register */
617 +/*------------------------------------------------------------------------------*/
618 +int AT91F_DataflashProbe(int cs, AT91PS_DataflashDesc pDesc)
619 +{
620 + AT91F_SpiEnable(cs);
621 + AT91F_DataFlashGetStatus(pDesc);
622 + return((pDesc->command[1] == 0xFF)? 0: pDesc->command[1] & 0x3C);
623 +}
624 +
625 +#endif
626 diff -Naur u-boot-1.1.4.org/board/vlink/config.mk u-boot-1.1.4.tmp/board/vlink/config.mk
627 --- u-boot-1.1.4.org/board/vlink/config.mk 1970-01-01 01:00:00.000000000 +0100
628 +++ u-boot-1.1.4.tmp/board/vlink/config.mk 2005-12-16 17:39:27.000000000 +0100
629 @@ -0,0 +1 @@
630 +TEXT_BASE = 0x21f00000
631 diff -Naur u-boot-1.1.4.org/board/vlink/flash.c u-boot-1.1.4.tmp/board/vlink/flash.c
632 --- u-boot-1.1.4.org/board/vlink/flash.c 1970-01-01 01:00:00.000000000 +0100
633 +++ u-boot-1.1.4.tmp/board/vlink/flash.c 2006-06-05 02:44:43.000000000 +0200
634 @@ -0,0 +1,504 @@
635 +/*
636 + * (C) Copyright 2002
637 + * Lineo, Inc. <www.lineo.com>
638 + * Bernhard Kuhn <bkuhn@lineo.com>
639 + *
640 + * (C) Copyright 2002
641 + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
642 + * Alex Zuepke <azu@sysgo.de>
643 + *
644 + * See file CREDITS for list of people who contributed to this
645 + * project.
646 + *
647 + * This program is free software; you can redistribute it and/or
648 + * modify it under the terms of the GNU General Public License as
649 + * published by the Free Software Foundation; either version 2 of
650 + * the License, or (at your option) any later version.
651 + *
652 + * This program is distributed in the hope that it will be useful,
653 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
654 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
655 + * GNU General Public License for more details.
656 + *
657 + * You should have received a copy of the GNU General Public License
658 + * along with this program; if not, write to the Free Software
659 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
660 + * MA 02111-1307 USA
661 + */
662 +
663 +#include <common.h>
664 +
665 +ulong myflush(void);
666 +
667 +
668 +/* Flash Organization Structure */
669 +typedef struct OrgDef
670 +{
671 + unsigned int sector_number;
672 + unsigned int sector_size;
673 +} OrgDef;
674 +
675 +
676 +/* Flash Organizations */
677 +OrgDef OrgAT49BV16x4[] =
678 +{
679 + { 8, 8*1024 }, /* 8 * 8 kBytes sectors */
680 + { 2, 32*1024 }, /* 2 * 32 kBytes sectors */
681 + { 30, 64*1024 }, /* 30 * 64 kBytes sectors */
682 +};
683 +
684 +OrgDef OrgAT49BV16x4A[] =
685 +{
686 + { 8, 8*1024 }, /* 8 * 8 kBytes sectors */
687 + { 31, 64*1024 }, /* 31 * 64 kBytes sectors */
688 +};
689 +
690 +OrgDef OrgAT49BV6416[] =
691 +{
692 + { 8, 8*1024 }, /* 8 * 8 kBytes sectors */
693 + { 127, 64*1024 }, /* 127 * 64 kBytes sectors */
694 +};
695 +
696 +flash_info_t flash_info[CFG_MAX_FLASH_BANKS];
697 +
698 +/* AT49BV1614A Codes */
699 +#define FLASH_CODE1 0xAA
700 +#define FLASH_CODE2 0x55
701 +#define ID_IN_CODE 0x90
702 +#define ID_OUT_CODE 0xF0
703 +
704 +
705 +#define CMD_READ_ARRAY 0x00F0
706 +#define CMD_UNLOCK1 0x00AA
707 +#define CMD_UNLOCK2 0x0055
708 +#define CMD_ERASE_SETUP 0x0080
709 +#define CMD_ERASE_CONFIRM 0x0030
710 +#define CMD_PROGRAM 0x00A0
711 +#define CMD_UNLOCK_BYPASS 0x0020
712 +#define CMD_SECTOR_UNLOCK 0x0070
713 +
714 +#define MEM_FLASH_ADDR1 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00005555<<1)))
715 +#define MEM_FLASH_ADDR2 (*(volatile u16 *)(CFG_FLASH_BASE + (0x00002AAA<<1)))
716 +
717 +#define BIT_ERASE_DONE 0x0080
718 +#define BIT_RDY_MASK 0x0080
719 +#define BIT_PROGRAM_ERROR 0x0020
720 +#define BIT_TIMEOUT 0x80000000 /* our flag */
721 +
722 +#define READY 1
723 +#define ERR 2
724 +#define TMO 4
725 +
726 +/*-----------------------------------------------------------------------
727 + */
728 +void flash_identification (flash_info_t * info)
729 +{
730 + volatile u16 manuf_code, device_code, add_device_code;
731 +
732 + MEM_FLASH_ADDR1 = FLASH_CODE1;
733 + MEM_FLASH_ADDR2 = FLASH_CODE2;
734 + MEM_FLASH_ADDR1 = ID_IN_CODE;
735 +
736 + manuf_code = *(volatile u16 *) CFG_FLASH_BASE;
737 + device_code = *(volatile u16 *) (CFG_FLASH_BASE + 2);
738 + add_device_code = *(volatile u16 *) (CFG_FLASH_BASE + (3 << 1));
739 +
740 + MEM_FLASH_ADDR1 = FLASH_CODE1;
741 + MEM_FLASH_ADDR2 = FLASH_CODE2;
742 + MEM_FLASH_ADDR1 = ID_OUT_CODE;
743 +
744 + /* Vendor type */
745 + info->flash_id = ATM_MANUFACT & FLASH_VENDMASK;
746 + printf ("Atmel: ");
747 +
748 + if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV1614 & FLASH_TYPEMASK)) {
749 +
750 + if ((add_device_code & FLASH_TYPEMASK) ==
751 + (ATM_ID_BV1614A & FLASH_TYPEMASK)) {
752 + info->flash_id |= ATM_ID_BV1614A & FLASH_TYPEMASK;
753 + printf ("AT49BV1614A (16Mbit)\n");
754 + } else { /* AT49BV1614 Flash */
755 + info->flash_id |= ATM_ID_BV1614 & FLASH_TYPEMASK;
756 + printf ("AT49BV1614 (16Mbit)\n");
757 + }
758 +
759 + } else if ((device_code & FLASH_TYPEMASK) == (ATM_ID_BV6416 & FLASH_TYPEMASK)) {
760 + info->flash_id |= ATM_ID_BV6416 & FLASH_TYPEMASK;
761 + printf ("AT49BV6416 (64Mbit)\n");
762 + }
763 +}
764 +
765 +ushort flash_number_sector(OrgDef *pOrgDef, unsigned int nb_blocks)
766 +{
767 + int i, nb_sectors = 0;
768 +
769 + for (i=0; i<nb_blocks; i++){
770 + nb_sectors += pOrgDef[i].sector_number;
771 + }
772 +
773 + return nb_sectors;
774 +}
775 +
776 +void flash_unlock_sector(flash_info_t * info, unsigned int sector)
777 +{
778 + volatile u16 *addr = (volatile u16 *) (info->start[sector]);
779 +
780 + MEM_FLASH_ADDR1 = CMD_UNLOCK1;
781 + *addr = CMD_SECTOR_UNLOCK;
782 +}
783 +
784 +
785 +ulong flash_init (void)
786 +{
787 + int i, j, k;
788 + unsigned int flash_nb_blocks, sector;
789 + unsigned int start_address;
790 + OrgDef *pOrgDef;
791 +
792 + ulong size = 0;
793 +
794 + for (i = 0; i < CFG_MAX_FLASH_BANKS; i++) {
795 + ulong flashbase = 0;
796 +
797 + flash_identification (&flash_info[i]);
798 +
799 + if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
800 + (ATM_ID_BV1614 & FLASH_TYPEMASK)) {
801 +
802 + pOrgDef = OrgAT49BV16x4;
803 + flash_nb_blocks = sizeof (OrgAT49BV16x4) / sizeof (OrgDef);
804 + } else if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
805 + (ATM_ID_BV1614A & FLASH_TYPEMASK)){ /* AT49BV1614A Flash */
806 +
807 + pOrgDef = OrgAT49BV16x4A;
808 + flash_nb_blocks = sizeof (OrgAT49BV16x4A) / sizeof (OrgDef);
809 + } else if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
810 + (ATM_ID_BV6416 & FLASH_TYPEMASK)){ /* AT49BV6416 Flash */
811 +
812 + pOrgDef = OrgAT49BV6416;
813 + flash_nb_blocks = sizeof (OrgAT49BV6416) / sizeof (OrgDef);
814 + } else {
815 + flash_nb_blocks = 0;
816 + pOrgDef = OrgAT49BV16x4;
817 + }
818 +
819 + flash_info[i].sector_count = flash_number_sector(pOrgDef, flash_nb_blocks);
820 + memset (flash_info[i].protect, 0, flash_info[i].sector_count);
821 +
822 + if (i == 0)
823 + flashbase = PHYS_FLASH_1;
824 + else
825 + panic ("configured too many flash banks!\n");
826 +
827 + sector = 0;
828 + start_address = flashbase;
829 + flash_info[i].size = 0;
830 +
831 + for (j = 0; j < flash_nb_blocks; j++) {
832 + for (k = 0; k < pOrgDef[j].sector_number; k++) {
833 + flash_info[i].start[sector++] = start_address;
834 + start_address += pOrgDef[j].sector_size;
835 + flash_info[i].size += pOrgDef[j].sector_size;
836 + }
837 + }
838 +
839 + size += flash_info[i].size;
840 +
841 + if ((flash_info[i].flash_id & FLASH_TYPEMASK) ==
842 + (ATM_ID_BV6416 & FLASH_TYPEMASK)){ /* AT49BV6416 Flash */
843 +
844 + /* Unlock all sectors at reset */
845 + for (j=0; j<flash_info[i].sector_count; j++){
846 + flash_unlock_sector(&flash_info[i], j);
847 + }
848 + }
849 + }
850 +
851 + /* Protect binary boot image */
852 + flash_protect (FLAG_PROTECT_SET,
853 + CFG_FLASH_BASE,
854 + CFG_FLASH_BASE + CFG_BOOT_SIZE - 1, &flash_info[0]);
855 +
856 + /* Protect environment variables */
857 + flash_protect (FLAG_PROTECT_SET,
858 + CFG_ENV_ADDR,
859 + CFG_ENV_ADDR + CFG_ENV_SIZE - 1, &flash_info[0]);
860 +
861 + /* Protect U-Boot gzipped image */
862 + flash_protect (FLAG_PROTECT_SET,
863 + CFG_U_BOOT_BASE,
864 + CFG_U_BOOT_BASE + CFG_U_BOOT_SIZE - 1, &flash_info[0]);
865 +
866 + return size;
867 +}
868 +
869 +/*-----------------------------------------------------------------------
870 + */
871 +void flash_print_info (flash_info_t * info)
872 +{
873 + int i;
874 +
875 + switch (info->flash_id & FLASH_VENDMASK) {
876 + case (ATM_MANUFACT & FLASH_VENDMASK):
877 + printf ("Atmel: ");
878 + break;
879 + default:
880 + printf ("Unknown Vendor ");
881 + break;
882 + }
883 +
884 + switch (info->flash_id & FLASH_TYPEMASK) {
885 + case (ATM_ID_BV1614 & FLASH_TYPEMASK):
886 + printf ("AT49BV1614 (16Mbit)\n");
887 + break;
888 + case (ATM_ID_BV1614A & FLASH_TYPEMASK):
889 + printf ("AT49BV1614A (16Mbit)\n");
890 + break;
891 + case (ATM_ID_BV6416 & FLASH_TYPEMASK):
892 + printf ("AT49BV6416 (64Mbit)\n");
893 + break;
894 + default:
895 + printf ("Unknown Chip Type\n");
896 + return;
897 + }
898 +
899 + printf (" Size: %ld MB in %d Sectors\n",
900 + info->size >> 20, info->sector_count);
901 +
902 + printf (" Sector Start Addresses:");
903 + for (i = 0; i < info->sector_count; i++) {
904 + if ((i % 5) == 0) {
905 + printf ("\n ");
906 + }
907 + printf (" %08lX%s", info->start[i],
908 + info->protect[i] ? " (RO)" : " ");
909 + }
910 + printf ("\n");
911 +}
912 +
913 +/*-----------------------------------------------------------------------
914 + */
915 +
916 +int flash_erase (flash_info_t * info, int s_first, int s_last)
917 +{
918 + ulong result;
919 + int iflag, cflag, prot, sect;
920 + int rc = ERR_OK;
921 + int chip1;
922 +
923 + /* first look for protection bits */
924 +
925 + if (info->flash_id == FLASH_UNKNOWN)
926 + return ERR_UNKNOWN_FLASH_TYPE;
927 +
928 + if ((s_first < 0) || (s_first > s_last)) {
929 + return ERR_INVAL;
930 + }
931 +
932 + if ((info->flash_id & FLASH_VENDMASK) !=
933 + (ATM_MANUFACT & FLASH_VENDMASK)) {
934 + return ERR_UNKNOWN_FLASH_VENDOR;
935 + }
936 +
937 + prot = 0;
938 + for (sect = s_first; sect <= s_last; ++sect) {
939 + if (info->protect[sect]) {
940 + prot++;
941 + }
942 + }
943 + if (prot)
944 + return ERR_PROTECTED;
945 +
946 + /*
947 + * Disable interrupts which might cause a timeout
948 + * here. Remember that our exception vectors are
949 + * at address 0 in the flash, and we don't want a
950 + * (ticker) exception to happen while the flash
951 + * chip is in programming mode.
952 + */
953 + cflag = icache_status ();
954 + icache_disable ();
955 + iflag = disable_interrupts ();
956 +
957 + /* Start erase on unprotected sectors */
958 + for (sect = s_first; sect <= s_last && !ctrlc (); sect++) {
959 + printf ("Erasing sector %2d ... ", sect);
960 +
961 + /* arm simple, non interrupt dependent timer */
962 + reset_timer_masked ();
963 +
964 + if (info->protect[sect] == 0) { /* not protected */
965 + volatile u16 *addr = (volatile u16 *) (info->start[sect]);
966 +
967 + MEM_FLASH_ADDR1 = CMD_UNLOCK1;
968 + MEM_FLASH_ADDR2 = CMD_UNLOCK2;
969 + MEM_FLASH_ADDR1 = CMD_ERASE_SETUP;
970 +
971 + MEM_FLASH_ADDR1 = CMD_UNLOCK1;
972 + MEM_FLASH_ADDR2 = CMD_UNLOCK2;
973 + *addr = CMD_ERASE_CONFIRM;
974 +
975 + /* wait until flash is ready */
976 + chip1 = 0;
977 +
978 + do {
979 + result = *addr;
980 +
981 + /* check timeout */
982 + if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) {
983 + MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
984 + chip1 = TMO;
985 + break;
986 + }
987 +
988 + if (!chip1 && (result & 0xFFFF) & BIT_ERASE_DONE)
989 + chip1 = READY;
990 +
991 + } while (!chip1);
992 +
993 + MEM_FLASH_ADDR1 = CMD_READ_ARRAY;
994 +
995 + if (chip1 == ERR) {
996 + rc = ERR_PROG_ERROR;
997 + goto outahere;
998 + }
999 + if (chip1 == TMO) {
1000 + rc = ERR_TIMOUT;
1001 + goto outahere;
1002 + }
1003 +
1004 + printf ("ok.\n");
1005 + } else { /* it was protected */
1006 + printf ("protected!\n");
1007 + }
1008 + }
1009 +
1010 + if (ctrlc ())
1011 + printf ("User Interrupt!\n");
1012 +
1013 +outahere:
1014 + /* allow flash to settle - wait 10 ms */
1015 + udelay_masked (10000);
1016 +
1017 + if (iflag)
1018 + enable_interrupts ();
1019 +
1020 + if (cflag)
1021 + icache_enable ();
1022 +
1023 + return rc;
1024 +}
1025 +
1026 +/*-----------------------------------------------------------------------
1027 + * Copy memory to flash
1028 + */
1029 +
1030 +volatile static int write_word (flash_info_t * info, ulong dest,
1031 + ulong data)
1032 +{
1033 + volatile u16 *addr = (volatile u16 *) dest;
1034 + ulong result;
1035 + int rc = ERR_OK;
1036 + int cflag, iflag;
1037 + int chip1;
1038 +
1039 + /*
1040 + * Check if Flash is (sufficiently) erased
1041 + */
1042 + result = *addr;
1043 + if ((result & data) != data)
1044 + return ERR_NOT_ERASED;
1045 +
1046 +
1047 + /*
1048 + * Disable interrupts which might cause a timeout
1049 + * here. Remember that our exception vectors are
1050 + * at address 0 in the flash, and we don't want a
1051 + * (ticker) exception to happen while the flash
1052 + * chip is in programming mode.
1053 + */
1054 + cflag = icache_status ();
1055 + icache_disable ();
1056 + iflag = disable_interrupts ();
1057 +
1058 + MEM_FLASH_ADDR1 = CMD_UNLOCK1;
1059 + MEM_FLASH_ADDR2 = CMD_UNLOCK2;
1060 + MEM_FLASH_ADDR1 = CMD_PROGRAM;
1061 + *addr = data;
1062 +
1063 + /* arm simple, non interrupt dependent timer */
1064 + reset_timer_masked ();
1065 +
1066 + /* wait until flash is ready */
1067 + chip1 = 0;
1068 + do {
1069 + result = *addr;
1070 +
1071 + /* check timeout */
1072 + if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) {
1073 + chip1 = ERR | TMO;
1074 + break;
1075 + }
1076 + if (!chip1 && ((result & 0x80) == (data & 0x80)))
1077 + chip1 = READY;
1078 +
1079 + } while (!chip1);
1080 +
1081 + *addr = CMD_READ_ARRAY;
1082 +
1083 + if (chip1 == ERR || *addr != data)
1084 + rc = ERR_PROG_ERROR;
1085 +
1086 + if (iflag)
1087 + enable_interrupts ();
1088 +
1089 + if (cflag)
1090 + icache_enable ();
1091 +
1092 + return rc;
1093 +}
1094 +
1095 +/*-----------------------------------------------------------------------
1096 + * Copy memory to flash.
1097 + */
1098 +
1099 +int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
1100 +{
1101 + ulong wp, data;
1102 + int rc;
1103 +
1104 + if (addr & 1) {
1105 + printf ("unaligned destination not supported\n");
1106 + return ERR_ALIGN;
1107 + };
1108 +
1109 + if ((int) src & 1) {
1110 + printf ("unaligned source not supported\n");
1111 + return ERR_ALIGN;
1112 + };
1113 +
1114 + wp = addr;
1115 +
1116 + while (cnt >= 2) {
1117 + data = *((volatile u16 *) src);
1118 + if ((rc = write_word (info, wp, data)) != 0) {
1119 + return (rc);
1120 + }
1121 + src += 2;
1122 + wp += 2;
1123 + cnt -= 2;
1124 + }
1125 +
1126 + if (cnt == 1) {
1127 + data = (*((volatile u8 *) src)) | (*((volatile u8 *) (wp + 1)) <<
1128 + 8);
1129 + if ((rc = write_word (info, wp, data)) != 0) {
1130 + return (rc);
1131 + }
1132 + src += 1;
1133 + wp += 1;
1134 + cnt -= 1;
1135 + };
1136 +
1137 + return ERR_OK;
1138 +}
1139 diff -Naur u-boot-1.1.4.org/board/vlink/Makefile u-boot-1.1.4.tmp/board/vlink/Makefile
1140 --- u-boot-1.1.4.org/board/vlink/Makefile 1970-01-01 01:00:00.000000000 +0100
1141 +++ u-boot-1.1.4.tmp/board/vlink/Makefile 2006-06-05 02:48:33.000000000 +0200
1142 @@ -0,0 +1,46 @@
1143 +#
1144 +# (C) Copyright 2003
1145 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
1146 +#
1147 +# See file CREDITS for list of people who contributed to this
1148 +# project.
1149 +#
1150 +# This program is free software; you can redistribute it and/or
1151 +# modify it under the terms of the GNU General Public License as
1152 +# published by the Free Software Foundation; either version 2 of
1153 +# the License, or (at your option) any later version.
1154 +#
1155 +# This program is distributed in the hope that it will be useful,
1156 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
1157 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1158 +# GNU General Public License for more details.
1159 +#
1160 +# You should have received a copy of the GNU General Public License
1161 +# along with this program; if not, write to the Free Software
1162 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1163 +# MA 02111-1307 USA
1164 +#
1165 +
1166 +include $(TOPDIR)/config.mk
1167 +
1168 +LIB = lib$(BOARD).a
1169 +
1170 +OBJS := vlink.o at45.o flash.o
1171 +
1172 +$(LIB): $(OBJS) $(SOBJS)
1173 + $(AR) crv $@ $(OBJS) $(SOBJS)
1174 +
1175 +clean:
1176 + rm -f $(SOBJS) $(OBJS)
1177 +
1178 +distclean: clean
1179 + rm -f $(LIB) core *.bak .depend
1180 +
1181 +#########################################################################
1182 +
1183 +.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
1184 + $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
1185 +
1186 +-include .depend
1187 +
1188 +#########################################################################
1189 diff -Naur u-boot-1.1.4.org/board/vlink/u-boot.lds u-boot-1.1.4.tmp/board/vlink/u-boot.lds
1190 --- u-boot-1.1.4.org/board/vlink/u-boot.lds 1970-01-01 01:00:00.000000000 +0100
1191 +++ u-boot-1.1.4.tmp/board/vlink/u-boot.lds 2005-12-16 17:39:27.000000000 +0100
1192 @@ -0,0 +1,57 @@
1193 +/*
1194 + * (C) Copyright 2002
1195 + * Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
1196 + *
1197 + * See file CREDITS for list of people who contributed to this
1198 + * project.
1199 + *
1200 + * This program is free software; you can redistribute it and/or
1201 + * modify it under the terms of the GNU General Public License as
1202 + * published by the Free Software Foundation; either version 2 of
1203 + * the License, or (at your option) any later version.
1204 + *
1205 + * This program is distributed in the hope that it will be useful,
1206 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1207 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1208 + * GNU General Public License for more details.
1209 + *
1210 + * You should have received a copy of the GNU General Public License
1211 + * along with this program; if not, write to the Free Software
1212 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1213 + * MA 02111-1307 USA
1214 + */
1215 +
1216 +OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
1217 +/*OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm")*/
1218 +OUTPUT_ARCH(arm)
1219 +ENTRY(_start)
1220 +SECTIONS
1221 +{
1222 + . = 0x00000000;
1223 +
1224 + . = ALIGN(4);
1225 + .text :
1226 + {
1227 + cpu/arm920t/start.o (.text)
1228 + *(.text)
1229 + }
1230 +
1231 + . = ALIGN(4);
1232 + .rodata : { *(.rodata) }
1233 +
1234 + . = ALIGN(4);
1235 + .data : { *(.data) }
1236 +
1237 + . = ALIGN(4);
1238 + .got : { *(.got) }
1239 +
1240 + . = .;
1241 + __u_boot_cmd_start = .;
1242 + .u_boot_cmd : { *(.u_boot_cmd) }
1243 + __u_boot_cmd_end = .;
1244 +
1245 + . = ALIGN(4);
1246 + __bss_start = .;
1247 + .bss : { *(.bss) }
1248 + _end = .;
1249 +}
1250 diff -Naur u-boot-1.1.4.org/board/vlink/vlink.c u-boot-1.1.4.tmp/board/vlink/vlink.c
1251 --- u-boot-1.1.4.org/board/vlink/vlink.c 1970-01-01 01:00:00.000000000 +0100
1252 +++ u-boot-1.1.4.tmp/board/vlink/vlink.c 2006-06-05 03:10:22.000000000 +0200
1253 @@ -0,0 +1,89 @@
1254 +/*
1255 + * (C) Copyright 2002
1256 + * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
1257 + * Marius Groeger <mgroeger@sysgo.de>
1258 + *
1259 + * See file CREDITS for list of people who contributed to this
1260 + * project.
1261 + *
1262 + * This program is free software; you can redistribute it and/or
1263 + * modify it under the terms of the GNU General Public License as
1264 + * published by the Free Software Foundation; either version 2 of
1265 + * the License, or (at your option) any later version.
1266 + *
1267 + * This program is distributed in the hope that it will be useful,
1268 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1269 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1270 + * GNU General Public License for more details.
1271 + *
1272 + * You should have received a copy of the GNU General Public License
1273 + * along with this program; if not, write to the Free Software
1274 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
1275 + * MA 02111-1307 USA
1276 + */
1277 +
1278 +#include <common.h>
1279 +#include <asm/arch/AT91RM9200.h>
1280 +#include <at91rm9200_net.h>
1281 +#include <dm9161.h>
1282 +#include <asm/mach-types.h>
1283 +
1284 +/* ------------------------------------------------------------------------- */
1285 +/*
1286 + * Miscelaneous platform dependent initialisations
1287 + */
1288 +
1289 +int board_init (void)
1290 +{
1291 + DECLARE_GLOBAL_DATA_PTR;
1292 +
1293 + /* Enable Ctrlc */
1294 + console_init_f ();
1295 +
1296 + /* Correct IRDA resistor problem */
1297 + /* Set PA23_TXD in Output */
1298 + (AT91PS_PIO) AT91C_BASE_PIOA->PIO_OER = AT91C_PA23_TXD2;
1299 +
1300 + /* memory and cpu-speed are setup before relocation */
1301 + /* so we do _nothing_ here */
1302 +
1303 + /* arch number of Versalink-Board */
1304 + gd->bd->bi_arch_number = MACH_TYPE_VLINK;
1305 + /* adress of boot parameters */
1306 + gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
1307 +
1308 + return 0;
1309 +}
1310 +
1311 +int dram_init (void)
1312 +{
1313 + DECLARE_GLOBAL_DATA_PTR;
1314 +
1315 + gd->bd->bi_dram[0].start = PHYS_SDRAM;
1316 + gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
1317 + return 0;
1318 +}
1319 +
1320 +#ifdef CONFIG_DRIVER_ETHER
1321 +#if (CONFIG_COMMANDS & CFG_CMD_NET)
1322 +
1323 +/*
1324 + * Name:
1325 + * at91rm9200_GetPhyInterface
1326 + * Description:
1327 + * Initialise the interface functions to the PHY
1328 + * Arguments:
1329 + * None
1330 + * Return value:
1331 + * None
1332 + */
1333 +void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
1334 +{
1335 + p_phyops->Init = dm9161_InitPhy;
1336 + p_phyops->IsPhyConnected = dm9161_IsPhyConnected;
1337 + p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed;
1338 + p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
1339 +}
1340 +
1341 +#endif /* CONFIG_COMMANDS & CFG_CMD_NET */
1342 +#endif /* CONFIG_DRIVER_ETHER */
1343 diff -Naur u-boot-1.1.4.org/include/asm-arm/mach-types.h u-boot-1.1.4.tmp/include/asm-arm/mach-types.h
1344 --- u-boot-1.1.4.org/include/asm-arm/mach-types.h 2005-12-16 17:39:27.000000000 +0100
1345 +++ u-boot-1.1.4.tmp/include/asm-arm/mach-types.h 2006-06-05 01:29:25.000000000 +0200
1346 @@ -424,7 +424,7 @@
1347 #define MACH_TYPE_MPORT3S 411
1348 #define MACH_TYPE_RA_ALPHA 412
1349 #define MACH_TYPE_XCEP 413
1350 -#define MACH_TYPE_ARCOM_MERCURY 414
1351 +#define MACH_TYPE_ARCOM_VULCAN 414
1352 #define MACH_TYPE_STARGATE 415
1353 #define MACH_TYPE_ARMADILLOJ 416
1354 #define MACH_TYPE_ELROY_JACK 417
1355 @@ -457,7 +457,7 @@
1356 #define MACH_TYPE_XM250 444
1357 #define MACH_TYPE_T6TC1XB 445
1358 #define MACH_TYPE_ESS710 446
1359 -#define MACH_TYPE_MX3ADS 447
1360 +#define MACH_TYPE_MX31ADS 447
1361 #define MACH_TYPE_HIMALAYA 448
1362 #define MACH_TYPE_BOLFENK 449
1363 #define MACH_TYPE_AT91RM9200KR 450
1364 @@ -563,8 +563,8 @@
1365 #define MACH_TYPE_ENS_CMU 550
1366 #define MACH_TYPE_MM6_SDB 551
1367 #define MACH_TYPE_SATURN 552
1368 -#define MACH_TYPE_ARGONPLUSEVB 553
1369 -#define MACH_TYPE_SCMA11EVB 554
1370 +#define MACH_TYPE_I30030EVB 553
1371 +#define MACH_TYPE_MXC27530EVB 554
1372 #define MACH_TYPE_SMDK2800 555
1373 #define MACH_TYPE_MTWILSON 556
1374 #define MACH_TYPE_ZITI 557
1375 @@ -644,7 +644,7 @@
1376 #define MACH_TYPE_MX2JAZZ 631
1377 #define MACH_TYPE_MULTIIO 632
1378 #define MACH_TYPE_HRDISPLAY 633
1379 -#define MACH_TYPE_SCMA11BB 634
1380 +#define MACH_TYPE_MXC27530ADS 634
1381 #define MACH_TYPE_TRIZEPS3 635
1382 #define MACH_TYPE_ZEFEERDZA 636
1383 #define MACH_TYPE_ZEFEERDZB 637
1384 @@ -718,7 +718,7 @@
1385 #define MACH_TYPE_GEM 707
1386 #define MACH_TYPE_I858 708
1387 #define MACH_TYPE_HX2750 709
1388 -#define MACH_TYPE_ZEUSEVB 710
1389 +#define MACH_TYPE_MXC91131EVB 710
1390 #define MACH_TYPE_P700 711
1391 #define MACH_TYPE_CPE 712
1392 #define MACH_TYPE_SPITZ 713
1393 @@ -736,6 +736,331 @@
1394 #define MACH_TYPE_LN2410SBC 725
1395 #define MACH_TYPE_CB3RUFC 726
1396 #define MACH_TYPE_MP2USB 727
1397 +#define MACH_TYPE_NTNP425C 728
1398 +#define MACH_TYPE_COLIBRI 729
1399 +#define MACH_TYPE_PCM7220 730
1400 +#define MACH_TYPE_GATEWAY7001 731
1401 +#define MACH_TYPE_PCM027 732
1402 +#define MACH_TYPE_CMPXA 733
1403 +#define MACH_TYPE_ANUBIS 734
1404 +#define MACH_TYPE_ITE8152 735
1405 +#define MACH_TYPE_LPC3XXX 736
1406 +#define MACH_TYPE_PUPPETEER 737
1407 +#define MACH_TYPE_MACH_VADATECH 738
1408 +#define MACH_TYPE_E570 739
1409 +#define MACH_TYPE_X50 740
1410 +#define MACH_TYPE_RECON 741
1411 +#define MACH_TYPE_XBOARDGP8 742
1412 +#define MACH_TYPE_FPIC2 743
1413 +#define MACH_TYPE_AKITA 744
1414 +#define MACH_TYPE_A81 745
1415 +#define MACH_TYPE_SVM_SC25X 746
1416 +#define MACH_TYPE_VADATECH020 747
1417 +#define MACH_TYPE_TLI 748
1418 +#define MACH_TYPE_EDB9315LC 749
1419 +#define MACH_TYPE_PASSEC 750
1420 +#define MACH_TYPE_DS_TIGER 751
1421 +#define MACH_TYPE_E310 752
1422 +#define MACH_TYPE_E330 753
1423 +#define MACH_TYPE_RT3000 754
1424 +#define MACH_TYPE_NOKIA770 755
1425 +#define MACH_TYPE_PNX0106 756
1426 +#define MACH_TYPE_HX21XX 757
1427 +#define MACH_TYPE_FARADAY 758
1428 +#define MACH_TYPE_SBC9312 759
1429 +#define MACH_TYPE_BATMAN 760
1430 +#define MACH_TYPE_JPD201 761
1431 +#define MACH_TYPE_MIPSA 762
1432 +#define MACH_TYPE_KACOM 763
1433 +#define MACH_TYPE_SWARCOCPU 764
1434 +#define MACH_TYPE_SWARCODSL 765
1435 +#define MACH_TYPE_BLUEANGEL 766
1436 +#define MACH_TYPE_HAIRYGRAMA 767
1437 +#define MACH_TYPE_BANFF 768
1438 +#define MACH_TYPE_CARMEVA 769
1439 +#define MACH_TYPE_SAM255 770
1440 +#define MACH_TYPE_PPM10 771
1441 +#define MACH_TYPE_EDB9315A 772
1442 +#define MACH_TYPE_SUNSET 773
1443 +#define MACH_TYPE_STARGATE2 774
1444 +#define MACH_TYPE_INTELMOTE2 775
1445 +#define MACH_TYPE_TRIZEPS4 776
1446 +#define MACH_TYPE_MAINSTONE2 777
1447 +#define MACH_TYPE_EZ_IXP42X 778
1448 +#define MACH_TYPE_TAPWAVE_ZODIAC 779
1449 +#define MACH_TYPE_UNIVERSALMETER 780
1450 +#define MACH_TYPE_HICOARM9 781
1451 +#define MACH_TYPE_PNX4008 782
1452 +#define MACH_TYPE_KWS6000 783
1453 +#define MACH_TYPE_PORTUX920T 784
1454 +#define MACH_TYPE_EZ_X5 785
1455 +#define MACH_TYPE_OMAP_RUDOLPH 786
1456 +#define MACH_TYPE_CPUAT91 787
1457 +#define MACH_TYPE_REA9200 788
1458 +#define MACH_TYPE_ACTS_PUNE_SA1110 789
1459 +#define MACH_TYPE_IXP425 790
1460 +#define MACH_TYPE_I30030ADS 791
1461 +#define MACH_TYPE_PERCH 792
1462 +#define MACH_TYPE_EIS05R1 793
1463 +#define MACH_TYPE_PEPPERPAD 794
1464 +#define MACH_TYPE_SB3010 795
1465 +#define MACH_TYPE_RM9200 796
1466 +#define MACH_TYPE_DMA03 797
1467 +#define MACH_TYPE_ROAD_S101 798
1468 +#define MACH_TYPE_IQ_NEXTGEN_A 799
1469 +#define MACH_TYPE_IQ_NEXTGEN_B 800
1470 +#define MACH_TYPE_IQ_NEXTGEN_C 801
1471 +#define MACH_TYPE_IQ_NEXTGEN_D 802
1472 +#define MACH_TYPE_IQ_NEXTGEN_E 803
1473 +#define MACH_TYPE_MALLOW_AT91 804
1474 +#define MACH_TYPE_CYBERTRACKER_I 805
1475 +#define MACH_TYPE_GESBC931X 806
1476 +#define MACH_TYPE_CENTIPAD 807
1477 +#define MACH_TYPE_ARMSOC 808
1478 +#define MACH_TYPE_SE4200 809
1479 +#define MACH_TYPE_EMS197A 810
1480 +#define MACH_TYPE_MICRO9 811
1481 +#define MACH_TYPE_MICRO9L 812
1482 +#define MACH_TYPE_UC5471DSP 813
1483 +#define MACH_TYPE_SJ5471ENG 814
1484 +#define MACH_TYPE_CMPXA26X 815
1485 +#define MACH_TYPE_NC 816
1486 +#define MACH_TYPE_OMAP_PALMTE 817
1487 +#define MACH_TYPE_AJAX52X 818
1488 +#define MACH_TYPE_SIRIUSTAR 819
1489 +#define MACH_TYPE_IODATA_HDLG 820
1490 +#define MACH_TYPE_AT91RM9200UTL 821
1491 +#define MACH_TYPE_BIOSAFE 822
1492 +#define MACH_TYPE_MP1000 823
1493 +#define MACH_TYPE_PARSY 824
1494 +#define MACH_TYPE_CCXP 825
1495 +#define MACH_TYPE_OMAP_GSAMPLE 826
1496 +#define MACH_TYPE_REALVIEW_EB 827
1497 +#define MACH_TYPE_SAMOA 828
1498 +#define MACH_TYPE_T3XSCALE 829
1499 +#define MACH_TYPE_I878 830
1500 +#define MACH_TYPE_BORZOI 831
1501 +#define MACH_TYPE_GECKO 832
1502 +#define MACH_TYPE_DS101 833
1503 +#define MACH_TYPE_OMAP_PALMTT2 834
1504 +#define MACH_TYPE_XSCALE_PALMLD 835
1505 +#define MACH_TYPE_CC9C 836
1506 +#define MACH_TYPE_SBC1670 837
1507 +#define MACH_TYPE_IXDP28X5 838
1508 +#define MACH_TYPE_OMAP_PALMTT 839
1509 +#define MACH_TYPE_ML696K 840
1510 +#define MACH_TYPE_ARCOM_ZEUS 841
1511 +#define MACH_TYPE_OSIRIS 842
1512 +#define MACH_TYPE_MAESTRO 843
1513 +#define MACH_TYPE_TUNGE2 844
1514 +#define MACH_TYPE_IXBBM 845
1515 +#define MACH_TYPE_MX27 846
1516 +#define MACH_TYPE_AX8004 847
1517 +#define MACH_TYPE_AT91SAM9261EK 848
1518 +#define MACH_TYPE_LOFT 849
1519 +#define MACH_TYPE_MAGPIE 850
1520 +#define MACH_TYPE_MX21 851
1521 +#define MACH_TYPE_MB87M3400 852
1522 +#define MACH_TYPE_MGUARD_DELTA 853
1523 +#define MACH_TYPE_DAVINCI_DVDP 854
1524 +#define MACH_TYPE_HTCUNIVERSAL 855
1525 +#define MACH_TYPE_TPAD 856
1526 +#define MACH_TYPE_ROVERP3 857
1527 +#define MACH_TYPE_JORNADA928 858
1528 +#define MACH_TYPE_MV88FXX81 859
1529 +#define MACH_TYPE_STMP36XX 860
1530 +#define MACH_TYPE_SXNI79524 861
1531 +#define MACH_TYPE_AMS_DELTA 862
1532 +#define MACH_TYPE_URANIUM 863
1533 +#define MACH_TYPE_UCON 864
1534 +#define MACH_TYPE_NAS100D 865
1535 +#define MACH_TYPE_L083_1000 866
1536 +#define MACH_TYPE_EZX 867
1537 +#define MACH_TYPE_PNX5220 868
1538 +#define MACH_TYPE_BUTTE 869
1539 +#define MACH_TYPE_SRM2 870
1540 +#define MACH_TYPE_DSBR 871
1541 +#define MACH_TYPE_CRYSTALBALL 872
1542 +#define MACH_TYPE_TINYPXA27X 873
1543 +#define MACH_TYPE_HERBIE 874
1544 +#define MACH_TYPE_MAGICIAN 875
1545 +#define MACH_TYPE_CM4002 876
1546 +#define MACH_TYPE_B4 877
1547 +#define MACH_TYPE_MAUI 878
1548 +#define MACH_TYPE_CYBERTRACKER_G 879
1549 +#define MACH_TYPE_NXDKN 880
1550 +#define MACH_TYPE_MIO8390 881
1551 +#define MACH_TYPE_OMI_BOARD 882
1552 +#define MACH_TYPE_MX21CIV 883
1553 +#define MACH_TYPE_MAHI_CDAC 884
1554 +#define MACH_TYPE_XSCALE_PALMTX 885
1555 +#define MACH_TYPE_S3C2413 887
1556 +#define MACH_TYPE_SAMSYS_EP0 888
1557 +#define MACH_TYPE_WG302V1 889
1558 +#define MACH_TYPE_WG302V2 890
1559 +#define MACH_TYPE_EB42X 891
1560 +#define MACH_TYPE_IQ331ES 892
1561 +#define MACH_TYPE_COSYDSP 893
1562 +#define MACH_TYPE_UPLAT7D 894
1563 +#define MACH_TYPE_PTDAVINCI 895
1564 +#define MACH_TYPE_MBUS 896
1565 +#define MACH_TYPE_NADIA2VB 897
1566 +#define MACH_TYPE_R1000 898
1567 +#define MACH_TYPE_HW90250 899
1568 +#define MACH_TYPE_OMAP_2430SDP 900
1569 +#define MACH_TYPE_DAVINCI_EVM 901
1570 +#define MACH_TYPE_OMAP_TORNADO 902
1571 +#define MACH_TYPE_OLOCREEK 903
1572 +#define MACH_TYPE_PALMZ72 904
1573 +#define MACH_TYPE_NXDB500 905
1574 +#define MACH_TYPE_APF9328 906
1575 +#define MACH_TYPE_OMAP_WIPOQ 907
1576 +#define MACH_TYPE_OMAP_TWIP 908
1577 +#define MACH_TYPE_XSCALE_PALMTREO650 909
1578 +#define MACH_TYPE_ACUMEN 910
1579 +#define MACH_TYPE_XP100 911
1580 +#define MACH_TYPE_FS2410 912
1581 +#define MACH_TYPE_PXA270_CERF 913
1582 +#define MACH_TYPE_SQ2FTLPALM 914
1583 +#define MACH_TYPE_BSEMSERVER 915
1584 +#define MACH_TYPE_NETCLIENT 916
1585 +#define MACH_TYPE_XSCALE_PALMTT5 917
1586 +#define MACH_TYPE_OMAP_PALMTC 918
1587 +#define MACH_TYPE_OMAP_APOLLON 919
1588 +#define MACH_TYPE_MXC30030EVB 920
1589 +#define MACH_TYPE_REA_2D 921
1590 +#define MACH_TYPE_TI3E524 922
1591 +#define MACH_TYPE_ATEB9200 923
1592 +#define MACH_TYPE_AUCKLAND 924
1593 +#define MACH_TYPE_AK3320M 925
1594 +#define MACH_TYPE_DURAMAX 926
1595 +#define MACH_TYPE_N35 927
1596 +#define MACH_TYPE_PRONGHORN 928
1597 +#define MACH_TYPE_FUNDY 929
1598 +#define MACH_TYPE_LOGICPD_PXA270 930
1599 +#define MACH_TYPE_CPU777 931
1600 +#define MACH_TYPE_SIMICON9201 932
1601 +#define MACH_TYPE_LEAP2_HPM 933
1602 +#define MACH_TYPE_CM922TXA10 934
1603 +#define MACH_TYPE_PXA 935
1604 +#define MACH_TYPE_SANDGATE2 936
1605 +#define MACH_TYPE_SANDGATE2G 937
1606 +#define MACH_TYPE_SANDGATE2P 938
1607 +#define MACH_TYPE_FRED_JACK 939
1608 +#define MACH_TYPE_TTG_COLOR1 940
1609 +#define MACH_TYPE_NXEB500HMI 941
1610 +#define MACH_TYPE_NETDCU8 942
1611 +#define MACH_TYPE_ML675050_CPU_BOA 943
1612 +#define MACH_TYPE_NG_FVX538 944
1613 +#define MACH_TYPE_NG_FVS338 945
1614 +#define MACH_TYPE_PNX4103 946
1615 +#define MACH_TYPE_HESDB 947
1616 +#define MACH_TYPE_XSILO 948
1617 +#define MACH_TYPE_ESPRESSO 949
1618 +#define MACH_TYPE_EMLC 950
1619 +#define MACH_TYPE_SISTERON 951
1620 +#define MACH_TYPE_RX1950 952
1621 +#define MACH_TYPE_TSC_VENUS 953
1622 +#define MACH_TYPE_DS101J 954
1623 +#define MACH_TYPE_MXC30030ADS 955
1624 +#define MACH_TYPE_FUJITSU_WIMAXSOC 956
1625 +#define MACH_TYPE_DUALPCMODEM 957
1626 +#define MACH_TYPE_GESBC9312 958
1627 +#define MACH_TYPE_HTCAPACHE 959
1628 +#define MACH_TYPE_IXDP435 960
1629 +#define MACH_TYPE_CATPROVT100 961
1630 +#define MACH_TYPE_PICOTUX1XX 962
1631 +#define MACH_TYPE_PICOTUX2XX 963
1632 +#define MACH_TYPE_DSMG600 964
1633 +#define MACH_TYPE_EMPC2 965
1634 +#define MACH_TYPE_VENTURA 966
1635 +#define MACH_TYPE_PHIDGET_SBC 967
1636 +#define MACH_TYPE_IJ3K 968
1637 +#define MACH_TYPE_PISGAH 969
1638 +#define MACH_TYPE_OMAP_FSAMPLE 970
1639 +#define MACH_TYPE_SG720 971
1640 +#define MACH_TYPE_REDFOX 972
1641 +#define MACH_TYPE_MYSH_EP9315_1 973
1642 +#define MACH_TYPE_TPF106 974
1643 +#define MACH_TYPE_AT91RM9200KG 975
1644 +#define MACH_TYPE_SLEDB 976
1645 +#define MACH_TYPE_ONTRACK 977
1646 +#define MACH_TYPE_PM1200 978
1647 +#define MACH_TYPE_ESS24XXX 979
1648 +#define MACH_TYPE_COREMP7 980
1649 +#define MACH_TYPE_NEXCODER_6446 981
1650 +#define MACH_TYPE_STVC8380 982
1651 +#define MACH_TYPE_TEKLYNX 983
1652 +#define MACH_TYPE_CARBONADO 984
1653 +#define MACH_TYPE_SYSMOS_MP730 985
1654 +#define MACH_TYPE_SNAPPER_CL15 986
1655 +#define MACH_TYPE_PGIGIM 987
1656 +#define MACH_TYPE_PTX9160P2 988
1657 +#define MACH_TYPE_DCORE1 989
1658 +#define MACH_TYPE_VICTORPXA 990
1659 +#define MACH_TYPE_MX2DTB 991
1660 +#define MACH_TYPE_PXA_IREX_ER0100 992
1661 +#define MACH_TYPE_OMAP_PALMZ71 993
1662 +#define MACH_TYPE_BARTEC_DEG 994
1663 +#define MACH_TYPE_HW50251 995
1664 +#define MACH_TYPE_IBOX 996
1665 +#define MACH_TYPE_ATLASLH7A404 997
1666 +#define MACH_TYPE_PT2026 998
1667 +#define MACH_TYPE_HTCALPINE 999
1668 +#define MACH_TYPE_BARTEC_VTU 1000
1669 +#define MACH_TYPE_VCOREII 1001
1670 +#define MACH_TYPE_PDNB3 1002
1671 +#define MACH_TYPE_HTCBEETLES 1003
1672 +#define MACH_TYPE_S3C6400 1004
1673 +#define MACH_TYPE_S3C2443 1005
1674 +#define MACH_TYPE_OMAP_LDK 1006
1675 +#define MACH_TYPE_SMDK2460 1007
1676 +#define MACH_TYPE_SMDK2440 1008
1677 +#define MACH_TYPE_SMDK2412 1009
1678 +#define MACH_TYPE_WEBBOX 1010
1679 +#define MACH_TYPE_CWWNDP 1011
1680 +#define MACH_TYPE_DRAGON 1012
1681 +#define MACH_TYPE_OPENDO_CPU_BOARD 1013
1682 +#define MACH_TYPE_CCM2200 1014
1683 +#define MACH_TYPE_ETWARM 1015
1684 +#define MACH_TYPE_M93030 1016
1685 +#define MACH_TYPE_CC7U 1017
1686 +#define MACH_TYPE_MTT_RANGER 1018
1687 +#define MACH_TYPE_NEXUS 1019
1688 +#define MACH_TYPE_DESMAN 1020
1689 +#define MACH_TYPE_BKDE303 1021
1690 +#define MACH_TYPE_SMDK2413 1022
1691 +#define MACH_TYPE_AML_M7200 1023
1692 +#define MACH_TYPE_AML_M5900 1024
1693 +#define MACH_TYPE_SG640 1025
1694 +#define MACH_TYPE_EDG79524 1026
1695 +#define MACH_TYPE_AI2410 1027
1696 +#define MACH_TYPE_IXP465 1028
1697 +#define MACH_TYPE_BALLOON3 1029
1698 +#define MACH_TYPE_HEINS 1030
1699 +#define MACH_TYPE_MPLUSEVA 1031
1700 +#define MACH_TYPE_RT042 1032
1701 +#define MACH_TYPE_CWIEM 1033
1702 +#define MACH_TYPE_CM_X270 1034
1703 +#define MACH_TYPE_CM_X255 1035
1704 +#define MACH_TYPE_ESH_AT91 1036
1705 +#define MACH_TYPE_SANDGATE3 1037
1706 +#define MACH_TYPE_PRIMO 1038
1707 +#define MACH_TYPE_GEMSTONE 1039
1708 +#define MACH_TYPE_PRONGHORNMETRO 1040
1709 +#define MACH_TYPE_SIDEWINDER 1041
1710 +#define MACH_TYPE_PICOMOD1 1042
1711 +#define MACH_TYPE_SG590 1043
1712 +#define MACH_TYPE_AKAI9307 1044
1713 +#define MACH_TYPE_FONTAINE 1045
1714 +#define MACH_TYPE_WOMBAT 1046
1715 +#define MACH_TYPE_ACQ300 1047
1716 +#define MACH_TYPE_MOD_270 1048
1717 +#define MACH_TYPE_VC0820 1049
1718 +#define MACH_TYPE_ANI_AIM 1050
1719 +#define MACH_TYPE_JELLYFISH 1051
1720 +#define MACH_TYPE_AMANITA 1052
1721 +#define MACH_TYPE_VLINK 1053
1722
1723 #ifdef CONFIG_ARCH_EBSA110
1724 # ifdef machine_arch_type
1725 @@ -3540,9 +3865,9 @@
1726 # else
1727 # define machine_arch_type MACH_TYPE_RAMSES
1728 # endif
1729 -# define machine_is_ramses() (machine_arch_type == MACH_TYPE_RAMSES)
1730 +# define machine_is_mnci() (machine_arch_type == MACH_TYPE_RAMSES)
1731 #else
1732 -# define machine_is_ramses() (0)
1733 +# define machine_is_mnci() (0)
1734 #endif
1735
1736 #ifdef CONFIG_ARCH_S28X
1737 @@ -4500,9 +4825,9 @@
1738 # else
1739 # define machine_arch_type MACH_TYPE_M825XX
1740 # endif
1741 -# define machine_is_m825xx() (machine_arch_type == MACH_TYPE_M825XX)
1742 +# define machine_is_comcerto() (machine_arch_type == MACH_TYPE_M825XX)
1743 #else
1744 -# define machine_is_m825xx() (0)
1745 +# define machine_is_comcerto() (0)
1746 #endif
1747
1748 #ifdef CONFIG_SA1100_M7100
1749 @@ -5657,16 +5982,16 @@
1750 # define machine_is_xcep() (0)
1751 #endif
1752
1753 -#ifdef CONFIG_MACH_ARCOM_MERCURY
1754 +#ifdef CONFIG_MACH_ARCOM_VULCAN
1755 # ifdef machine_arch_type
1756 # undef machine_arch_type
1757 # define machine_arch_type __machine_arch_type
1758 # else
1759 -# define machine_arch_type MACH_TYPE_ARCOM_MERCURY
1760 +# define machine_arch_type MACH_TYPE_ARCOM_VULCAN
1761 # endif
1762 -# define machine_is_arcom_mercury() (machine_arch_type == MACH_TYPE_ARCOM_MERCURY)
1763 +# define machine_is_arcom_vulcan() (machine_arch_type == MACH_TYPE_ARCOM_VULCAN)
1764 #else
1765 -# define machine_is_arcom_mercury() (0)
1766 +# define machine_is_arcom_vulcan() (0)
1767 #endif
1768
1769 #ifdef CONFIG_MACH_STARGATE
1770 @@ -6053,16 +6378,16 @@
1771 # define machine_is_ess710() (0)
1772 #endif
1773
1774 -#ifdef CONFIG_MACH_MX3ADS
1775 +#ifdef CONFIG_MACH_MX31ADS
1776 # ifdef machine_arch_type
1777 # undef machine_arch_type
1778 # define machine_arch_type __machine_arch_type
1779 # else
1780 -# define machine_arch_type MACH_TYPE_MX3ADS
1781 +# define machine_arch_type MACH_TYPE_MX31ADS
1782 # endif
1783 -# define machine_is_mx3ads() (machine_arch_type == MACH_TYPE_MX3ADS)
1784 +# define machine_is_mx31ads() (machine_arch_type == MACH_TYPE_MX31ADS)
1785 #else
1786 -# define machine_is_mx3ads() (0)
1787 +# define machine_is_mx31ads() (0)
1788 #endif
1789
1790 #ifdef CONFIG_MACH_HIMALAYA
1791 @@ -7325,28 +7650,28 @@
1792 # define machine_is_saturn() (0)
1793 #endif
1794
1795 -#ifdef CONFIG_MACH_ARGONPLUSEVB
1796 +#ifdef CONFIG_MACH_I30030EVB
1797 # ifdef machine_arch_type
1798 # undef machine_arch_type
1799 # define machine_arch_type __machine_arch_type
1800 # else
1801 -# define machine_arch_type MACH_TYPE_ARGONPLUSEVB
1802 +# define machine_arch_type MACH_TYPE_I30030EVB
1803 # endif
1804 -# define machine_is_argonplusevb() (machine_arch_type == MACH_TYPE_ARGONPLUSEVB)
1805 +# define machine_is_i30030evb() (machine_arch_type == MACH_TYPE_I30030EVB)
1806 #else
1807 -# define machine_is_argonplusevb() (0)
1808 +# define machine_is_i30030evb() (0)
1809 #endif
1810
1811 -#ifdef CONFIG_MACH_SCMA11EVB
1812 +#ifdef CONFIG_MACH_MXC27530EVB
1813 # ifdef machine_arch_type
1814 # undef machine_arch_type
1815 # define machine_arch_type __machine_arch_type
1816 # else
1817 -# define machine_arch_type MACH_TYPE_SCMA11EVB
1818 +# define machine_arch_type MACH_TYPE_MXC27530EVB
1819 # endif
1820 -# define machine_is_scma11evb() (machine_arch_type == MACH_TYPE_SCMA11EVB)
1821 +# define machine_is_mxc27530evb() (machine_arch_type == MACH_TYPE_MXC27530EVB)
1822 #else
1823 -# define machine_is_scma11evb() (0)
1824 +# define machine_is_mxc27530evb() (0)
1825 #endif
1826
1827 #ifdef CONFIG_MACH_SMDK2800
1828 @@ -8297,16 +8622,16 @@
1829 # define machine_is_hrdisplay() (0)
1830 #endif
1831
1832 -#ifdef CONFIG_MACH_SCMA11BB
1833 +#ifdef CONFIG_MACH_MXC27530ADS
1834 # ifdef machine_arch_type
1835 # undef machine_arch_type
1836 # define machine_arch_type __machine_arch_type
1837 # else
1838 -# define machine_arch_type MACH_TYPE_SCMA11BB
1839 +# define machine_arch_type MACH_TYPE_MXC27530ADS
1840 # endif
1841 -# define machine_is_scma11bb() (machine_arch_type == MACH_TYPE_SCMA11BB)
1842 +# define machine_is_mxc27530ads() (machine_arch_type == MACH_TYPE_MXC27530ADS)
1843 #else
1844 -# define machine_is_scma11bb() (0)
1845 +# define machine_is_mxc27530ads() (0)
1846 #endif
1847
1848 #ifdef CONFIG_MACH_TRIZEPS3
1849 @@ -9185,16 +9510,16 @@
1850 # define machine_is_hx2750() (0)
1851 #endif
1852
1853 -#ifdef CONFIG_MACH_ZEUSEVB
1854 +#ifdef CONFIG_MACH_MXC91131EVB
1855 # ifdef machine_arch_type
1856 # undef machine_arch_type
1857 # define machine_arch_type __machine_arch_type
1858 # else
1859 -# define machine_arch_type MACH_TYPE_ZEUSEVB
1860 +# define machine_arch_type MACH_TYPE_MXC91131EVB
1861 # endif
1862 -# define machine_is_zeusevb() (machine_arch_type == MACH_TYPE_ZEUSEVB)
1863 +# define machine_is_mxc91131evb() (machine_arch_type == MACH_TYPE_MXC91131EVB)
1864 #else
1865 -# define machine_is_zeusevb() (0)
1866 +# define machine_is_mxc91131evb() (0)
1867 #endif
1868
1869 #ifdef CONFIG_MACH_P700
1870 @@ -9401,6 +9726,3906 @@
1871 # define machine_is_mp2usb() (0)
1872 #endif
1873
1874 +#ifdef CONFIG_MACH_NTNP425C
1875 +# ifdef machine_arch_type
1876 +# undef machine_arch_type
1877 +# define machine_arch_type __machine_arch_type
1878 +# else
1879 +# define machine_arch_type MACH_TYPE_NTNP425C
1880 +# endif
1881 +# define machine_is_ntnp425c() (machine_arch_type == MACH_TYPE_NTNP425C)
1882 +#else
1883 +# define machine_is_ntnp425c() (0)
1884 +#endif
1885 +
1886 +#ifdef CONFIG_MACH_COLIBRI
1887 +# ifdef machine_arch_type
1888 +# undef machine_arch_type
1889 +# define machine_arch_type __machine_arch_type
1890 +# else
1891 +# define machine_arch_type MACH_TYPE_COLIBRI
1892 +# endif
1893 +# define machine_is_colibri() (machine_arch_type == MACH_TYPE_COLIBRI)
1894 +#else
1895 +# define machine_is_colibri() (0)
1896 +#endif
1897 +
1898 +#ifdef CONFIG_MACH_PCM7220
1899 +# ifdef machine_arch_type
1900 +# undef machine_arch_type
1901 +# define machine_arch_type __machine_arch_type
1902 +# else
1903 +# define machine_arch_type MACH_TYPE_PCM7220
1904 +# endif
1905 +# define machine_is_pcm7220() (machine_arch_type == MACH_TYPE_PCM7220)
1906 +#else
1907 +# define machine_is_pcm7220() (0)
1908 +#endif
1909 +
1910 +#ifdef CONFIG_MACH_GATEWAY7001
1911 +# ifdef machine_arch_type
1912 +# undef machine_arch_type
1913 +# define machine_arch_type __machine_arch_type
1914 +# else
1915 +# define machine_arch_type MACH_TYPE_GATEWAY7001
1916 +# endif
1917 +# define machine_is_gateway7001() (machine_arch_type == MACH_TYPE_GATEWAY7001)
1918 +#else
1919 +# define machine_is_gateway7001() (0)
1920 +#endif
1921 +
1922 +#ifdef CONFIG_MACH_PCM027
1923 +# ifdef machine_arch_type
1924 +# undef machine_arch_type
1925 +# define machine_arch_type __machine_arch_type
1926 +# else
1927 +# define machine_arch_type MACH_TYPE_PCM027
1928 +# endif
1929 +# define machine_is_pcm027() (machine_arch_type == MACH_TYPE_PCM027)
1930 +#else
1931 +# define machine_is_pcm027() (0)
1932 +#endif
1933 +
1934 +#ifdef CONFIG_MACH_CMPXA
1935 +# ifdef machine_arch_type
1936 +# undef machine_arch_type
1937 +# define machine_arch_type __machine_arch_type
1938 +# else
1939 +# define machine_arch_type MACH_TYPE_CMPXA
1940 +# endif
1941 +# define machine_is_cmpxa() (machine_arch_type == MACH_TYPE_CMPXA)
1942 +#else
1943 +# define machine_is_cmpxa() (0)
1944 +#endif
1945 +
1946 +#ifdef CONFIG_MACH_ANUBIS
1947 +# ifdef machine_arch_type
1948 +# undef machine_arch_type
1949 +# define machine_arch_type __machine_arch_type
1950 +# else
1951 +# define machine_arch_type MACH_TYPE_ANUBIS
1952 +# endif
1953 +# define machine_is_anubis() (machine_arch_type == MACH_TYPE_ANUBIS)
1954 +#else
1955 +# define machine_is_anubis() (0)
1956 +#endif
1957 +
1958 +#ifdef CONFIG_MACH_ITE8152
1959 +# ifdef machine_arch_type
1960 +# undef machine_arch_type
1961 +# define machine_arch_type __machine_arch_type
1962 +# else
1963 +# define machine_arch_type MACH_TYPE_ITE8152
1964 +# endif
1965 +# define machine_is_ite8152() (machine_arch_type == MACH_TYPE_ITE8152)
1966 +#else
1967 +# define machine_is_ite8152() (0)
1968 +#endif
1969 +
1970 +#ifdef CONFIG_MACH_LPC3XXX
1971 +# ifdef machine_arch_type
1972 +# undef machine_arch_type
1973 +# define machine_arch_type __machine_arch_type
1974 +# else
1975 +# define machine_arch_type MACH_TYPE_LPC3XXX
1976 +# endif
1977 +# define machine_is_lpc3xxx() (machine_arch_type == MACH_TYPE_LPC3XXX)
1978 +#else
1979 +# define machine_is_lpc3xxx() (0)
1980 +#endif
1981 +
1982 +#ifdef CONFIG_MACH_PUPPETEER
1983 +# ifdef machine_arch_type
1984 +# undef machine_arch_type
1985 +# define machine_arch_type __machine_arch_type
1986 +# else
1987 +# define machine_arch_type MACH_TYPE_PUPPETEER
1988 +# endif
1989 +# define machine_is_puppeteer() (machine_arch_type == MACH_TYPE_PUPPETEER)
1990 +#else
1991 +# define machine_is_puppeteer() (0)
1992 +#endif
1993 +
1994 +#ifdef CONFIG_MACH_MACH_VADATECH
1995 +# ifdef machine_arch_type
1996 +# undef machine_arch_type
1997 +# define machine_arch_type __machine_arch_type
1998 +# else
1999 +# define machine_arch_type MACH_TYPE_MACH_VADATECH
2000 +# endif
2001 +# define machine_is_vt001() (machine_arch_type == MACH_TYPE_MACH_VADATECH)
2002 +#else
2003 +# define machine_is_vt001() (0)
2004 +#endif
2005 +
2006 +#ifdef CONFIG_MACH_E570
2007 +# ifdef machine_arch_type
2008 +# undef machine_arch_type
2009 +# define machine_arch_type __machine_arch_type
2010 +# else
2011 +# define machine_arch_type MACH_TYPE_E570
2012 +# endif
2013 +# define machine_is_e570() (machine_arch_type == MACH_TYPE_E570)
2014 +#else
2015 +# define machine_is_e570() (0)
2016 +#endif
2017 +
2018 +#ifdef CONFIG_MACH_X50
2019 +# ifdef machine_arch_type
2020 +# undef machine_arch_type
2021 +# define machine_arch_type __machine_arch_type
2022 +# else
2023 +# define machine_arch_type MACH_TYPE_X50
2024 +# endif
2025 +# define machine_is_x50() (machine_arch_type == MACH_TYPE_X50)
2026 +#else
2027 +# define machine_is_x50() (0)
2028 +#endif
2029 +
2030 +#ifdef CONFIG_MACH_RECON
2031 +# ifdef machine_arch_type
2032 +# undef machine_arch_type
2033 +# define machine_arch_type __machine_arch_type
2034 +# else
2035 +# define machine_arch_type MACH_TYPE_RECON
2036 +# endif
2037 +# define machine_is_recon() (machine_arch_type == MACH_TYPE_RECON)
2038 +#else
2039 +# define machine_is_recon() (0)
2040 +#endif
2041 +
2042 +#ifdef CONFIG_MACH_XBOARDGP8
2043 +# ifdef machine_arch_type
2044 +# undef machine_arch_type
2045 +# define machine_arch_type __machine_arch_type
2046 +# else
2047 +# define machine_arch_type MACH_TYPE_XBOARDGP8
2048 +# endif
2049 +# define machine_is_xboardgp8() (machine_arch_type == MACH_TYPE_XBOARDGP8)
2050 +#else
2051 +# define machine_is_xboardgp8() (0)
2052 +#endif
2053 +
2054 +#ifdef CONFIG_MACH_FPIC2
2055 +# ifdef machine_arch_type
2056 +# undef machine_arch_type
2057 +# define machine_arch_type __machine_arch_type
2058 +# else
2059 +# define machine_arch_type MACH_TYPE_FPIC2
2060 +# endif
2061 +# define machine_is_fpic2() (machine_arch_type == MACH_TYPE_FPIC2)
2062 +#else
2063 +# define machine_is_fpic2() (0)
2064 +#endif
2065 +
2066 +#ifdef CONFIG_MACH_AKITA
2067 +# ifdef machine_arch_type
2068 +# undef machine_arch_type
2069 +# define machine_arch_type __machine_arch_type
2070 +# else
2071 +# define machine_arch_type MACH_TYPE_AKITA
2072 +# endif
2073 +# define machine_is_akita() (machine_arch_type == MACH_TYPE_AKITA)
2074 +#else
2075 +# define machine_is_akita() (0)
2076 +#endif
2077 +
2078 +#ifdef CONFIG_MACH_A81
2079 +# ifdef machine_arch_type
2080 +# undef machine_arch_type
2081 +# define machine_arch_type __machine_arch_type
2082 +# else
2083 +# define machine_arch_type MACH_TYPE_A81
2084 +# endif
2085 +# define machine_is_a81() (machine_arch_type == MACH_TYPE_A81)
2086 +#else
2087 +# define machine_is_a81() (0)
2088 +#endif
2089 +
2090 +#ifdef CONFIG_MACH_SVM_SC25X
2091 +# ifdef machine_arch_type
2092 +# undef machine_arch_type
2093 +# define machine_arch_type __machine_arch_type
2094 +# else
2095 +# define machine_arch_type MACH_TYPE_SVM_SC25X
2096 +# endif
2097 +# define machine_is_svm_sc25x() (machine_arch_type == MACH_TYPE_SVM_SC25X)
2098 +#else
2099 +# define machine_is_svm_sc25x() (0)
2100 +#endif
2101 +
2102 +#ifdef CONFIG_MACH_VADATECH020
2103 +# ifdef machine_arch_type
2104 +# undef machine_arch_type
2105 +# define machine_arch_type __machine_arch_type
2106 +# else
2107 +# define machine_arch_type MACH_TYPE_VADATECH020
2108 +# endif
2109 +# define machine_is_vt020() (machine_arch_type == MACH_TYPE_VADATECH020)
2110 +#else
2111 +# define machine_is_vt020() (0)
2112 +#endif
2113 +
2114 +#ifdef CONFIG_MACH_TLI
2115 +# ifdef machine_arch_type
2116 +# undef machine_arch_type
2117 +# define machine_arch_type __machine_arch_type
2118 +# else
2119 +# define machine_arch_type MACH_TYPE_TLI
2120 +# endif
2121 +# define machine_is_tli() (machine_arch_type == MACH_TYPE_TLI)
2122 +#else
2123 +# define machine_is_tli() (0)
2124 +#endif
2125 +
2126 +#ifdef CONFIG_MACH_EDB9315LC
2127 +# ifdef machine_arch_type
2128 +# undef machine_arch_type
2129 +# define machine_arch_type __machine_arch_type
2130 +# else
2131 +# define machine_arch_type MACH_TYPE_EDB9315LC
2132 +# endif
2133 +# define machine_is_edb9315lc() (machine_arch_type == MACH_TYPE_EDB9315LC)
2134 +#else
2135 +# define machine_is_edb9315lc() (0)
2136 +#endif
2137 +
2138 +#ifdef CONFIG_MACH_PASSEC
2139 +# ifdef machine_arch_type
2140 +# undef machine_arch_type
2141 +# define machine_arch_type __machine_arch_type
2142 +# else
2143 +# define machine_arch_type MACH_TYPE_PASSEC
2144 +# endif
2145 +# define machine_is_passec() (machine_arch_type == MACH_TYPE_PASSEC)
2146 +#else
2147 +# define machine_is_passec() (0)
2148 +#endif
2149 +
2150 +#ifdef CONFIG_MACH_DS_TIGER
2151 +# ifdef machine_arch_type
2152 +# undef machine_arch_type
2153 +# define machine_arch_type __machine_arch_type
2154 +# else
2155 +# define machine_arch_type MACH_TYPE_DS_TIGER
2156 +# endif
2157 +# define machine_is_ds_tiger() (machine_arch_type == MACH_TYPE_DS_TIGER)
2158 +#else
2159 +# define machine_is_ds_tiger() (0)
2160 +#endif
2161 +
2162 +#ifdef CONFIG_MACH_E310
2163 +# ifdef machine_arch_type
2164 +# undef machine_arch_type
2165 +# define machine_arch_type __machine_arch_type
2166 +# else
2167 +# define machine_arch_type MACH_TYPE_E310
2168 +# endif
2169 +# define machine_is_e310() (machine_arch_type == MACH_TYPE_E310)
2170 +#else
2171 +# define machine_is_e310() (0)
2172 +#endif
2173 +
2174 +#ifdef CONFIG_MACH_E330
2175 +# ifdef machine_arch_type
2176 +# undef machine_arch_type
2177 +# define machine_arch_type __machine_arch_type
2178 +# else
2179 +# define machine_arch_type MACH_TYPE_E330
2180 +# endif
2181 +# define machine_is_e330() (machine_arch_type == MACH_TYPE_E330)
2182 +#else
2183 +# define machine_is_e330() (0)
2184 +#endif
2185 +
2186 +#ifdef CONFIG_MACH_RT3000
2187 +# ifdef machine_arch_type
2188 +# undef machine_arch_type
2189 +# define machine_arch_type __machine_arch_type
2190 +# else
2191 +# define machine_arch_type MACH_TYPE_RT3000
2192 +# endif
2193 +# define machine_is_rt3000() (machine_arch_type == MACH_TYPE_RT3000)
2194 +#else
2195 +# define machine_is_rt3000() (0)
2196 +#endif
2197 +
2198 +#ifdef CONFIG_MACH_NOKIA770
2199 +# ifdef machine_arch_type
2200 +# undef machine_arch_type
2201 +# define machine_arch_type __machine_arch_type
2202 +# else
2203 +# define machine_arch_type MACH_TYPE_NOKIA770
2204 +# endif
2205 +# define machine_is_nokia770() (machine_arch_type == MACH_TYPE_NOKIA770)
2206 +#else
2207 +# define machine_is_nokia770() (0)
2208 +#endif
2209 +
2210 +#ifdef CONFIG_MACH_PNX0106
2211 +# ifdef machine_arch_type
2212 +# undef machine_arch_type
2213 +# define machine_arch_type __machine_arch_type
2214 +# else
2215 +# define machine_arch_type MACH_TYPE_PNX0106
2216 +# endif
2217 +# define machine_is_pnx0106() (machine_arch_type == MACH_TYPE_PNX0106)
2218 +#else
2219 +# define machine_is_pnx0106() (0)
2220 +#endif
2221 +
2222 +#ifdef CONFIG_MACH_HX21XX
2223 +# ifdef machine_arch_type
2224 +# undef machine_arch_type
2225 +# define machine_arch_type __machine_arch_type
2226 +# else
2227 +# define machine_arch_type MACH_TYPE_HX21XX
2228 +# endif
2229 +# define machine_is_hx21xx() (machine_arch_type == MACH_TYPE_HX21XX)
2230 +#else
2231 +# define machine_is_hx21xx() (0)
2232 +#endif
2233 +
2234 +#ifdef CONFIG_MACH_FARADAY
2235 +# ifdef machine_arch_type
2236 +# undef machine_arch_type
2237 +# define machine_arch_type __machine_arch_type
2238 +# else
2239 +# define machine_arch_type MACH_TYPE_FARADAY
2240 +# endif
2241 +# define machine_is_faraday() (machine_arch_type == MACH_TYPE_FARADAY)
2242 +#else
2243 +# define machine_is_faraday() (0)
2244 +#endif
2245 +
2246 +#ifdef CONFIG_MACH_SBC9312
2247 +# ifdef machine_arch_type
2248 +# undef machine_arch_type
2249 +# define machine_arch_type __machine_arch_type
2250 +# else
2251 +# define machine_arch_type MACH_TYPE_SBC9312
2252 +# endif
2253 +# define machine_is_sbc9312() (machine_arch_type == MACH_TYPE_SBC9312)
2254 +#else
2255 +# define machine_is_sbc9312() (0)
2256 +#endif
2257 +
2258 +#ifdef CONFIG_MACH_BATMAN
2259 +# ifdef machine_arch_type
2260 +# undef machine_arch_type
2261 +# define machine_arch_type __machine_arch_type
2262 +# else
2263 +# define machine_arch_type MACH_TYPE_BATMAN
2264 +# endif
2265 +# define machine_is_batman() (machine_arch_type == MACH_TYPE_BATMAN)
2266 +#else
2267 +# define machine_is_batman() (0)
2268 +#endif
2269 +
2270 +#ifdef CONFIG_MACH_JPD201
2271 +# ifdef machine_arch_type
2272 +# undef machine_arch_type
2273 +# define machine_arch_type __machine_arch_type
2274 +# else
2275 +# define machine_arch_type MACH_TYPE_JPD201
2276 +# endif
2277 +# define machine_is_jpd201() (machine_arch_type == MACH_TYPE_JPD201)
2278 +#else
2279 +# define machine_is_jpd201() (0)
2280 +#endif
2281 +
2282 +#ifdef CONFIG_MACH_MIPSA
2283 +# ifdef machine_arch_type
2284 +# undef machine_arch_type
2285 +# define machine_arch_type __machine_arch_type
2286 +# else
2287 +# define machine_arch_type MACH_TYPE_MIPSA
2288 +# endif
2289 +# define machine_is_mipsa() (machine_arch_type == MACH_TYPE_MIPSA)
2290 +#else
2291 +# define machine_is_mipsa() (0)
2292 +#endif
2293 +
2294 +#ifdef CONFIG_MACH_KACOM
2295 +# ifdef machine_arch_type
2296 +# undef machine_arch_type
2297 +# define machine_arch_type __machine_arch_type
2298 +# else
2299 +# define machine_arch_type MACH_TYPE_KACOM
2300 +# endif
2301 +# define machine_is_kacom() (machine_arch_type == MACH_TYPE_KACOM)
2302 +#else
2303 +# define machine_is_kacom() (0)
2304 +#endif
2305 +
2306 +#ifdef CONFIG_MACH_SWARCOCPU
2307 +# ifdef machine_arch_type
2308 +# undef machine_arch_type
2309 +# define machine_arch_type __machine_arch_type
2310 +# else
2311 +# define machine_arch_type MACH_TYPE_SWARCOCPU
2312 +# endif
2313 +# define machine_is_swarcocpu() (machine_arch_type == MACH_TYPE_SWARCOCPU)
2314 +#else
2315 +# define machine_is_swarcocpu() (0)
2316 +#endif
2317 +
2318 +#ifdef CONFIG_MACH_SWARCODSL
2319 +# ifdef machine_arch_type
2320 +# undef machine_arch_type
2321 +# define machine_arch_type __machine_arch_type
2322 +# else
2323 +# define machine_arch_type MACH_TYPE_SWARCODSL
2324 +# endif
2325 +# define machine_is_swarcodsl() (machine_arch_type == MACH_TYPE_SWARCODSL)
2326 +#else
2327 +# define machine_is_swarcodsl() (0)
2328 +#endif
2329 +
2330 +#ifdef CONFIG_MACH_BLUEANGEL
2331 +# ifdef machine_arch_type
2332 +# undef machine_arch_type
2333 +# define machine_arch_type __machine_arch_type
2334 +# else
2335 +# define machine_arch_type MACH_TYPE_BLUEANGEL
2336 +# endif
2337 +# define machine_is_blueangel() (machine_arch_type == MACH_TYPE_BLUEANGEL)
2338 +#else
2339 +# define machine_is_blueangel() (0)
2340 +#endif
2341 +
2342 +#ifdef CONFIG_MACH_HAIRYGRAMA
2343 +# ifdef machine_arch_type
2344 +# undef machine_arch_type
2345 +# define machine_arch_type __machine_arch_type
2346 +# else
2347 +# define machine_arch_type MACH_TYPE_HAIRYGRAMA
2348 +# endif
2349 +# define machine_is_hairygrama() (machine_arch_type == MACH_TYPE_HAIRYGRAMA)
2350 +#else
2351 +# define machine_is_hairygrama() (0)
2352 +#endif
2353 +
2354 +#ifdef CONFIG_MACH_BANFF
2355 +# ifdef machine_arch_type
2356 +# undef machine_arch_type
2357 +# define machine_arch_type __machine_arch_type
2358 +# else
2359 +# define machine_arch_type MACH_TYPE_BANFF
2360 +# endif
2361 +# define machine_is_banff() (machine_arch_type == MACH_TYPE_BANFF)
2362 +#else
2363 +# define machine_is_banff() (0)
2364 +#endif
2365 +
2366 +#ifdef CONFIG_MACH_CARMEVA
2367 +# ifdef machine_arch_type
2368 +# undef machine_arch_type
2369 +# define machine_arch_type __machine_arch_type
2370 +# else
2371 +# define machine_arch_type MACH_TYPE_CARMEVA
2372 +# endif
2373 +# define machine_is_carmeva() (machine_arch_type == MACH_TYPE_CARMEVA)
2374 +#else
2375 +# define machine_is_carmeva() (0)
2376 +#endif
2377 +
2378 +#ifdef CONFIG_MACH_SAM255
2379 +# ifdef machine_arch_type
2380 +# undef machine_arch_type
2381 +# define machine_arch_type __machine_arch_type
2382 +# else
2383 +# define machine_arch_type MACH_TYPE_SAM255
2384 +# endif
2385 +# define machine_is_sam255() (machine_arch_type == MACH_TYPE_SAM255)
2386 +#else
2387 +# define machine_is_sam255() (0)
2388 +#endif
2389 +
2390 +#ifdef CONFIG_MACH_PPM10
2391 +# ifdef machine_arch_type
2392 +# undef machine_arch_type
2393 +# define machine_arch_type __machine_arch_type
2394 +# else
2395 +# define machine_arch_type MACH_TYPE_PPM10
2396 +# endif
2397 +# define machine_is_ppm10() (machine_arch_type == MACH_TYPE_PPM10)
2398 +#else
2399 +# define machine_is_ppm10() (0)
2400 +#endif
2401 +
2402 +#ifdef CONFIG_MACH_EDB9315A
2403 +# ifdef machine_arch_type
2404 +# undef machine_arch_type
2405 +# define machine_arch_type __machine_arch_type
2406 +# else
2407 +# define machine_arch_type MACH_TYPE_EDB9315A
2408 +# endif
2409 +# define machine_is_edb9315a() (machine_arch_type == MACH_TYPE_EDB9315A)
2410 +#else
2411 +# define machine_is_edb9315a() (0)
2412 +#endif
2413 +
2414 +#ifdef CONFIG_MACH_SUNSET
2415 +# ifdef machine_arch_type
2416 +# undef machine_arch_type
2417 +# define machine_arch_type __machine_arch_type
2418 +# else
2419 +# define machine_arch_type MACH_TYPE_SUNSET
2420 +# endif
2421 +# define machine_is_sunset() (machine_arch_type == MACH_TYPE_SUNSET)
2422 +#else
2423 +# define machine_is_sunset() (0)
2424 +#endif
2425 +
2426 +#ifdef CONFIG_MACH_STARGATE2
2427 +# ifdef machine_arch_type
2428 +# undef machine_arch_type
2429 +# define machine_arch_type __machine_arch_type
2430 +# else
2431 +# define machine_arch_type MACH_TYPE_STARGATE2
2432 +# endif
2433 +# define machine_is_stargate2() (machine_arch_type == MACH_TYPE_STARGATE2)
2434 +#else
2435 +# define machine_is_stargate2() (0)
2436 +#endif
2437 +
2438 +#ifdef CONFIG_MACH_INTELMOTE2
2439 +# ifdef machine_arch_type
2440 +# undef machine_arch_type
2441 +# define machine_arch_type __machine_arch_type
2442 +# else
2443 +# define machine_arch_type MACH_TYPE_INTELMOTE2
2444 +# endif
2445 +# define machine_is_intelmote2() (machine_arch_type == MACH_TYPE_INTELMOTE2)
2446 +#else
2447 +# define machine_is_intelmote2() (0)
2448 +#endif
2449 +
2450 +#ifdef CONFIG_MACH_TRIZEPS4
2451 +# ifdef machine_arch_type
2452 +# undef machine_arch_type
2453 +# define machine_arch_type __machine_arch_type
2454 +# else
2455 +# define machine_arch_type MACH_TYPE_TRIZEPS4
2456 +# endif
2457 +# define machine_is_trizeps4() (machine_arch_type == MACH_TYPE_TRIZEPS4)
2458 +#else
2459 +# define machine_is_trizeps4() (0)
2460 +#endif
2461 +
2462 +#ifdef CONFIG_MACH_MAINSTONE2
2463 +# ifdef machine_arch_type
2464 +# undef machine_arch_type
2465 +# define machine_arch_type __machine_arch_type
2466 +# else
2467 +# define machine_arch_type MACH_TYPE_MAINSTONE2
2468 +# endif
2469 +# define machine_is_mainstone2() (machine_arch_type == MACH_TYPE_MAINSTONE2)
2470 +#else
2471 +# define machine_is_mainstone2() (0)
2472 +#endif
2473 +
2474 +#ifdef CONFIG_MACH_EZ_IXP42X
2475 +# ifdef machine_arch_type
2476 +# undef machine_arch_type
2477 +# define machine_arch_type __machine_arch_type
2478 +# else
2479 +# define machine_arch_type MACH_TYPE_EZ_IXP42X
2480 +# endif
2481 +# define machine_is_ez_ixp42x() (machine_arch_type == MACH_TYPE_EZ_IXP42X)
2482 +#else
2483 +# define machine_is_ez_ixp42x() (0)
2484 +#endif
2485 +
2486 +#ifdef CONFIG_MACH_TAPWAVE_ZODIAC
2487 +# ifdef machine_arch_type
2488 +# undef machine_arch_type
2489 +# define machine_arch_type __machine_arch_type
2490 +# else
2491 +# define machine_arch_type MACH_TYPE_TAPWAVE_ZODIAC
2492 +# endif
2493 +# define machine_is_tapwave_zodiac() (machine_arch_type == MACH_TYPE_TAPWAVE_ZODIAC)
2494 +#else
2495 +# define machine_is_tapwave_zodiac() (0)
2496 +#endif
2497 +
2498 +#ifdef CONFIG_MACH_UNIVERSALMETER
2499 +# ifdef machine_arch_type
2500 +# undef machine_arch_type
2501 +# define machine_arch_type __machine_arch_type
2502 +# else
2503 +# define machine_arch_type MACH_TYPE_UNIVERSALMETER
2504 +# endif
2505 +# define machine_is_universalmeter() (machine_arch_type == MACH_TYPE_UNIVERSALMETER)
2506 +#else
2507 +# define machine_is_universalmeter() (0)
2508 +#endif
2509 +
2510 +#ifdef CONFIG_MACH_HICOARM9
2511 +# ifdef machine_arch_type
2512 +# undef machine_arch_type
2513 +# define machine_arch_type __machine_arch_type
2514 +# else
2515 +# define machine_arch_type MACH_TYPE_HICOARM9
2516 +# endif
2517 +# define machine_is_hicoarm9() (machine_arch_type == MACH_TYPE_HICOARM9)
2518 +#else
2519 +# define machine_is_hicoarm9() (0)
2520 +#endif
2521 +
2522 +#ifdef CONFIG_MACH_PNX4008
2523 +# ifdef machine_arch_type
2524 +# undef machine_arch_type
2525 +# define machine_arch_type __machine_arch_type
2526 +# else
2527 +# define machine_arch_type MACH_TYPE_PNX4008
2528 +# endif
2529 +# define machine_is_pnx4008() (machine_arch_type == MACH_TYPE_PNX4008)
2530 +#else
2531 +# define machine_is_pnx4008() (0)
2532 +#endif
2533 +
2534 +#ifdef CONFIG_MACH_KWS6000
2535 +# ifdef machine_arch_type
2536 +# undef machine_arch_type
2537 +# define machine_arch_type __machine_arch_type
2538 +# else
2539 +# define machine_arch_type MACH_TYPE_KWS6000
2540 +# endif
2541 +# define machine_is_kws6000() (machine_arch_type == MACH_TYPE_KWS6000)
2542 +#else
2543 +# define machine_is_kws6000() (0)
2544 +#endif
2545 +
2546 +#ifdef CONFIG_MACH_PORTUX920T
2547 +# ifdef machine_arch_type
2548 +# undef machine_arch_type
2549 +# define machine_arch_type __machine_arch_type
2550 +# else
2551 +# define machine_arch_type MACH_TYPE_PORTUX920T
2552 +# endif
2553 +# define machine_is_portux920t() (machine_arch_type == MACH_TYPE_PORTUX920T)
2554 +#else
2555 +# define machine_is_portux920t() (0)
2556 +#endif
2557 +
2558 +#ifdef CONFIG_MACH_EZ_X5
2559 +# ifdef machine_arch_type
2560 +# undef machine_arch_type
2561 +# define machine_arch_type __machine_arch_type
2562 +# else
2563 +# define machine_arch_type MACH_TYPE_EZ_X5
2564 +# endif
2565 +# define machine_is_ez_x5() (machine_arch_type == MACH_TYPE_EZ_X5)
2566 +#else
2567 +# define machine_is_ez_x5() (0)
2568 +#endif
2569 +
2570 +#ifdef CONFIG_MACH_OMAP_RUDOLPH
2571 +# ifdef machine_arch_type
2572 +# undef machine_arch_type
2573 +# define machine_arch_type __machine_arch_type
2574 +# else
2575 +# define machine_arch_type MACH_TYPE_OMAP_RUDOLPH
2576 +# endif
2577 +# define machine_is_omap_rudolph() (machine_arch_type == MACH_TYPE_OMAP_RUDOLPH)
2578 +#else
2579 +# define machine_is_omap_rudolph() (0)
2580 +#endif
2581 +
2582 +#ifdef CONFIG_MACH_CPUAT91
2583 +# ifdef machine_arch_type
2584 +# undef machine_arch_type
2585 +# define machine_arch_type __machine_arch_type
2586 +# else
2587 +# define machine_arch_type MACH_TYPE_CPUAT91
2588 +# endif
2589 +# define machine_is_cpuat91() (machine_arch_type == MACH_TYPE_CPUAT91)
2590 +#else
2591 +# define machine_is_cpuat91() (0)
2592 +#endif
2593 +
2594 +#ifdef CONFIG_MACH_REA9200
2595 +# ifdef machine_arch_type
2596 +# undef machine_arch_type
2597 +# define machine_arch_type __machine_arch_type
2598 +# else
2599 +# define machine_arch_type MACH_TYPE_REA9200
2600 +# endif
2601 +# define machine_is_rea9200() (machine_arch_type == MACH_TYPE_REA9200)
2602 +#else
2603 +# define machine_is_rea9200() (0)
2604 +#endif
2605 +
2606 +#ifdef CONFIG_MACH_ACTS_PUNE_SA1110
2607 +# ifdef machine_arch_type
2608 +# undef machine_arch_type
2609 +# define machine_arch_type __machine_arch_type
2610 +# else
2611 +# define machine_arch_type MACH_TYPE_ACTS_PUNE_SA1110
2612 +# endif
2613 +# define machine_is_acts_pune_sa1110() (machine_arch_type == MACH_TYPE_ACTS_PUNE_SA1110)
2614 +#else
2615 +# define machine_is_acts_pune_sa1110() (0)
2616 +#endif
2617 +
2618 +#ifdef CONFIG_MACH_IXP425
2619 +# ifdef machine_arch_type
2620 +# undef machine_arch_type
2621 +# define machine_arch_type __machine_arch_type
2622 +# else
2623 +# define machine_arch_type MACH_TYPE_IXP425
2624 +# endif
2625 +# define machine_is_ixp425() (machine_arch_type == MACH_TYPE_IXP425)
2626 +#else
2627 +# define machine_is_ixp425() (0)
2628 +#endif
2629 +
2630 +#ifdef CONFIG_MACH_I30030ADS
2631 +# ifdef machine_arch_type
2632 +# undef machine_arch_type
2633 +# define machine_arch_type __machine_arch_type
2634 +# else
2635 +# define machine_arch_type MACH_TYPE_I30030ADS
2636 +# endif
2637 +# define machine_is_i30030ads() (machine_arch_type == MACH_TYPE_I30030ADS)
2638 +#else
2639 +# define machine_is_i30030ads() (0)
2640 +#endif
2641 +
2642 +#ifdef CONFIG_MACH_PERCH
2643 +# ifdef machine_arch_type
2644 +# undef machine_arch_type
2645 +# define machine_arch_type __machine_arch_type
2646 +# else
2647 +# define machine_arch_type MACH_TYPE_PERCH
2648 +# endif
2649 +# define machine_is_perch() (machine_arch_type == MACH_TYPE_PERCH)
2650 +#else
2651 +# define machine_is_perch() (0)
2652 +#endif
2653 +
2654 +#ifdef CONFIG_MACH_EIS05R1
2655 +# ifdef machine_arch_type
2656 +# undef machine_arch_type
2657 +# define machine_arch_type __machine_arch_type
2658 +# else
2659 +# define machine_arch_type MACH_TYPE_EIS05R1
2660 +# endif
2661 +# define machine_is_eis05r1() (machine_arch_type == MACH_TYPE_EIS05R1)
2662 +#else
2663 +# define machine_is_eis05r1() (0)
2664 +#endif
2665 +
2666 +#ifdef CONFIG_MACH_PEPPERPAD
2667 +# ifdef machine_arch_type
2668 +# undef machine_arch_type
2669 +# define machine_arch_type __machine_arch_type
2670 +# else
2671 +# define machine_arch_type MACH_TYPE_PEPPERPAD
2672 +# endif
2673 +# define machine_is_pepperpad() (machine_arch_type == MACH_TYPE_PEPPERPAD)
2674 +#else
2675 +# define machine_is_pepperpad() (0)
2676 +#endif
2677 +
2678 +#ifdef CONFIG_MACH_SB3010
2679 +# ifdef machine_arch_type
2680 +# undef machine_arch_type
2681 +# define machine_arch_type __machine_arch_type
2682 +# else
2683 +# define machine_arch_type MACH_TYPE_SB3010
2684 +# endif
2685 +# define machine_is_sb3010() (machine_arch_type == MACH_TYPE_SB3010)
2686 +#else
2687 +# define machine_is_sb3010() (0)
2688 +#endif
2689 +
2690 +#ifdef CONFIG_MACH_RM9200
2691 +# ifdef machine_arch_type
2692 +# undef machine_arch_type
2693 +# define machine_arch_type __machine_arch_type
2694 +# else
2695 +# define machine_arch_type MACH_TYPE_RM9200
2696 +# endif
2697 +# define machine_is_rm9200() (machine_arch_type == MACH_TYPE_RM9200)
2698 +#else
2699 +# define machine_is_rm9200() (0)
2700 +#endif
2701 +
2702 +#ifdef CONFIG_MACH_DMA03
2703 +# ifdef machine_arch_type
2704 +# undef machine_arch_type
2705 +# define machine_arch_type __machine_arch_type
2706 +# else
2707 +# define machine_arch_type MACH_TYPE_DMA03
2708 +# endif
2709 +# define machine_is_dma03() (machine_arch_type == MACH_TYPE_DMA03)
2710 +#else
2711 +# define machine_is_dma03() (0)
2712 +#endif
2713 +
2714 +#ifdef CONFIG_MACH_ROAD_S101
2715 +# ifdef machine_arch_type
2716 +# undef machine_arch_type
2717 +# define machine_arch_type __machine_arch_type
2718 +# else
2719 +# define machine_arch_type MACH_TYPE_ROAD_S101
2720 +# endif
2721 +# define machine_is_road_s101() (machine_arch_type == MACH_TYPE_ROAD_S101)
2722 +#else
2723 +# define machine_is_road_s101() (0)
2724 +#endif
2725 +
2726 +#ifdef CONFIG_MACH_IQ_NEXTGEN_A
2727 +# ifdef machine_arch_type
2728 +# undef machine_arch_type
2729 +# define machine_arch_type __machine_arch_type
2730 +# else
2731 +# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_A
2732 +# endif
2733 +# define machine_is_iq_nextgen_a() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_A)
2734 +#else
2735 +# define machine_is_iq_nextgen_a() (0)
2736 +#endif
2737 +
2738 +#ifdef CONFIG_MACH_IQ_NEXTGEN_B
2739 +# ifdef machine_arch_type
2740 +# undef machine_arch_type
2741 +# define machine_arch_type __machine_arch_type
2742 +# else
2743 +# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_B
2744 +# endif
2745 +# define machine_is_iq_nextgen_b() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_B)
2746 +#else
2747 +# define machine_is_iq_nextgen_b() (0)
2748 +#endif
2749 +
2750 +#ifdef CONFIG_MACH_IQ_NEXTGEN_C
2751 +# ifdef machine_arch_type
2752 +# undef machine_arch_type
2753 +# define machine_arch_type __machine_arch_type
2754 +# else
2755 +# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_C
2756 +# endif
2757 +# define machine_is_iq_nextgen_c() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_C)
2758 +#else
2759 +# define machine_is_iq_nextgen_c() (0)
2760 +#endif
2761 +
2762 +#ifdef CONFIG_MACH_IQ_NEXTGEN_D
2763 +# ifdef machine_arch_type
2764 +# undef machine_arch_type
2765 +# define machine_arch_type __machine_arch_type
2766 +# else
2767 +# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_D
2768 +# endif
2769 +# define machine_is_iq_nextgen_d() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_D)
2770 +#else
2771 +# define machine_is_iq_nextgen_d() (0)
2772 +#endif
2773 +
2774 +#ifdef CONFIG_MACH_IQ_NEXTGEN_E
2775 +# ifdef machine_arch_type
2776 +# undef machine_arch_type
2777 +# define machine_arch_type __machine_arch_type
2778 +# else
2779 +# define machine_arch_type MACH_TYPE_IQ_NEXTGEN_E
2780 +# endif
2781 +# define machine_is_iq_nextgen_e() (machine_arch_type == MACH_TYPE_IQ_NEXTGEN_E)
2782 +#else
2783 +# define machine_is_iq_nextgen_e() (0)
2784 +#endif
2785 +
2786 +#ifdef CONFIG_MACH_MALLOW_AT91
2787 +# ifdef machine_arch_type
2788 +# undef machine_arch_type
2789 +# define machine_arch_type __machine_arch_type
2790 +# else
2791 +# define machine_arch_type MACH_TYPE_MALLOW_AT91
2792 +# endif
2793 +# define machine_is_mallow_at91() (machine_arch_type == MACH_TYPE_MALLOW_AT91)
2794 +#else
2795 +# define machine_is_mallow_at91() (0)
2796 +#endif
2797 +
2798 +#ifdef CONFIG_MACH_CYBERTRACKER_I
2799 +# ifdef machine_arch_type
2800 +# undef machine_arch_type
2801 +# define machine_arch_type __machine_arch_type
2802 +# else
2803 +# define machine_arch_type MACH_TYPE_CYBERTRACKER_I
2804 +# endif
2805 +# define machine_is_cybertracker_i() (machine_arch_type == MACH_TYPE_CYBERTRACKER_I)
2806 +#else
2807 +# define machine_is_cybertracker_i() (0)
2808 +#endif
2809 +
2810 +#ifdef CONFIG_MACH_GESBC931X
2811 +# ifdef machine_arch_type
2812 +# undef machine_arch_type
2813 +# define machine_arch_type __machine_arch_type
2814 +# else
2815 +# define machine_arch_type MACH_TYPE_GESBC931X
2816 +# endif
2817 +# define machine_is_gesbc931x() (machine_arch_type == MACH_TYPE_GESBC931X)
2818 +#else
2819 +# define machine_is_gesbc931x() (0)
2820 +#endif
2821 +
2822 +#ifdef CONFIG_MACH_CENTIPAD
2823 +# ifdef machine_arch_type
2824 +# undef machine_arch_type
2825 +# define machine_arch_type __machine_arch_type
2826 +# else
2827 +# define machine_arch_type MACH_TYPE_CENTIPAD
2828 +# endif
2829 +# define machine_is_centipad() (machine_arch_type == MACH_TYPE_CENTIPAD)
2830 +#else
2831 +# define machine_is_centipad() (0)
2832 +#endif
2833 +
2834 +#ifdef CONFIG_MACH_ARMSOC
2835 +# ifdef machine_arch_type
2836 +# undef machine_arch_type
2837 +# define machine_arch_type __machine_arch_type
2838 +# else
2839 +# define machine_arch_type MACH_TYPE_ARMSOC
2840 +# endif
2841 +# define machine_is_armsoc() (machine_arch_type == MACH_TYPE_ARMSOC)
2842 +#else
2843 +# define machine_is_armsoc() (0)
2844 +#endif
2845 +
2846 +#ifdef CONFIG_MACH_SE4200
2847 +# ifdef machine_arch_type
2848 +# undef machine_arch_type
2849 +# define machine_arch_type __machine_arch_type
2850 +# else
2851 +# define machine_arch_type MACH_TYPE_SE4200
2852 +# endif
2853 +# define machine_is_se4200() (machine_arch_type == MACH_TYPE_SE4200)
2854 +#else
2855 +# define machine_is_se4200() (0)
2856 +#endif
2857 +
2858 +#ifdef CONFIG_MACH_EMS197A
2859 +# ifdef machine_arch_type
2860 +# undef machine_arch_type
2861 +# define machine_arch_type __machine_arch_type
2862 +# else
2863 +# define machine_arch_type MACH_TYPE_EMS197A
2864 +# endif
2865 +# define machine_is_ems197a() (machine_arch_type == MACH_TYPE_EMS197A)
2866 +#else
2867 +# define machine_is_ems197a() (0)
2868 +#endif
2869 +
2870 +#ifdef CONFIG_MACH_MICRO9
2871 +# ifdef machine_arch_type
2872 +# undef machine_arch_type
2873 +# define machine_arch_type __machine_arch_type
2874 +# else
2875 +# define machine_arch_type MACH_TYPE_MICRO9
2876 +# endif
2877 +# define machine_is_micro9() (machine_arch_type == MACH_TYPE_MICRO9)
2878 +#else
2879 +# define machine_is_micro9() (0)
2880 +#endif
2881 +
2882 +#ifdef CONFIG_MACH_MICRO9L
2883 +# ifdef machine_arch_type
2884 +# undef machine_arch_type
2885 +# define machine_arch_type __machine_arch_type
2886 +# else
2887 +# define machine_arch_type MACH_TYPE_MICRO9L
2888 +# endif
2889 +# define machine_is_micro9l() (machine_arch_type == MACH_TYPE_MICRO9L)
2890 +#else
2891 +# define machine_is_micro9l() (0)
2892 +#endif
2893 +
2894 +#ifdef CONFIG_MACH_UC5471DSP
2895 +# ifdef machine_arch_type
2896 +# undef machine_arch_type
2897 +# define machine_arch_type __machine_arch_type
2898 +# else
2899 +# define machine_arch_type MACH_TYPE_UC5471DSP
2900 +# endif
2901 +# define machine_is_uc5471dsp() (machine_arch_type == MACH_TYPE_UC5471DSP)
2902 +#else
2903 +# define machine_is_uc5471dsp() (0)
2904 +#endif
2905 +
2906 +#ifdef CONFIG_MACH_SJ5471ENG
2907 +# ifdef machine_arch_type
2908 +# undef machine_arch_type
2909 +# define machine_arch_type __machine_arch_type
2910 +# else
2911 +# define machine_arch_type MACH_TYPE_SJ5471ENG
2912 +# endif
2913 +# define machine_is_sj5471eng() (machine_arch_type == MACH_TYPE_SJ5471ENG)
2914 +#else
2915 +# define machine_is_sj5471eng() (0)
2916 +#endif
2917 +
2918 +#ifdef CONFIG_MACH_CMPXA26X
2919 +# ifdef machine_arch_type
2920 +# undef machine_arch_type
2921 +# define machine_arch_type __machine_arch_type
2922 +# else
2923 +# define machine_arch_type MACH_TYPE_CMPXA26X
2924 +# endif
2925 +# define machine_is_none() (machine_arch_type == MACH_TYPE_CMPXA26X)
2926 +#else
2927 +# define machine_is_none() (0)
2928 +#endif
2929 +
2930 +#ifdef CONFIG_MACH_NC
2931 +# ifdef machine_arch_type
2932 +# undef machine_arch_type
2933 +# define machine_arch_type __machine_arch_type
2934 +# else
2935 +# define machine_arch_type MACH_TYPE_NC
2936 +# endif
2937 +# define machine_is_nc1() (machine_arch_type == MACH_TYPE_NC)
2938 +#else
2939 +# define machine_is_nc1() (0)
2940 +#endif
2941 +
2942 +#ifdef CONFIG_MACH_OMAP_PALMTE
2943 +# ifdef machine_arch_type
2944 +# undef machine_arch_type
2945 +# define machine_arch_type __machine_arch_type
2946 +# else
2947 +# define machine_arch_type MACH_TYPE_OMAP_PALMTE
2948 +# endif
2949 +# define machine_is_omap_palmte() (machine_arch_type == MACH_TYPE_OMAP_PALMTE)
2950 +#else
2951 +# define machine_is_omap_palmte() (0)
2952 +#endif
2953 +
2954 +#ifdef CONFIG_MACH_AJAX52X
2955 +# ifdef machine_arch_type
2956 +# undef machine_arch_type
2957 +# define machine_arch_type __machine_arch_type
2958 +# else
2959 +# define machine_arch_type MACH_TYPE_AJAX52X
2960 +# endif
2961 +# define machine_is_ajax52x() (machine_arch_type == MACH_TYPE_AJAX52X)
2962 +#else
2963 +# define machine_is_ajax52x() (0)
2964 +#endif
2965 +
2966 +#ifdef CONFIG_MACH_SIRIUSTAR
2967 +# ifdef machine_arch_type
2968 +# undef machine_arch_type
2969 +# define machine_arch_type __machine_arch_type
2970 +# else
2971 +# define machine_arch_type MACH_TYPE_SIRIUSTAR
2972 +# endif
2973 +# define machine_is_siriustar() (machine_arch_type == MACH_TYPE_SIRIUSTAR)
2974 +#else
2975 +# define machine_is_siriustar() (0)
2976 +#endif
2977 +
2978 +#ifdef CONFIG_MACH_IODATA_HDLG
2979 +# ifdef machine_arch_type
2980 +# undef machine_arch_type
2981 +# define machine_arch_type __machine_arch_type
2982 +# else
2983 +# define machine_arch_type MACH_TYPE_IODATA_HDLG
2984 +# endif
2985 +# define machine_is_iodata_hdlg() (machine_arch_type == MACH_TYPE_IODATA_HDLG)
2986 +#else
2987 +# define machine_is_iodata_hdlg() (0)
2988 +#endif
2989 +
2990 +#ifdef CONFIG_MACH_AT91RM9200UTL
2991 +# ifdef machine_arch_type
2992 +# undef machine_arch_type
2993 +# define machine_arch_type __machine_arch_type
2994 +# else
2995 +# define machine_arch_type MACH_TYPE_AT91RM9200UTL
2996 +# endif
2997 +# define machine_is_at91rm9200utl() (machine_arch_type == MACH_TYPE_AT91RM9200UTL)
2998 +#else
2999 +# define machine_is_at91rm9200utl() (0)
3000 +#endif
3001 +
3002 +#ifdef CONFIG_MACH_BIOSAFE
3003 +# ifdef machine_arch_type
3004 +# undef machine_arch_type
3005 +# define machine_arch_type __machine_arch_type
3006 +# else
3007 +# define machine_arch_type MACH_TYPE_BIOSAFE
3008 +# endif
3009 +# define machine_is_biosafe() (machine_arch_type == MACH_TYPE_BIOSAFE)
3010 +#else
3011 +# define machine_is_biosafe() (0)
3012 +#endif
3013 +
3014 +#ifdef CONFIG_MACH_MP1000
3015 +# ifdef machine_arch_type
3016 +# undef machine_arch_type
3017 +# define machine_arch_type __machine_arch_type
3018 +# else
3019 +# define machine_arch_type MACH_TYPE_MP1000
3020 +# endif
3021 +# define machine_is_mp1000() (machine_arch_type == MACH_TYPE_MP1000)
3022 +#else
3023 +# define machine_is_mp1000() (0)
3024 +#endif
3025 +
3026 +#ifdef CONFIG_MACH_PARSY
3027 +# ifdef machine_arch_type
3028 +# undef machine_arch_type
3029 +# define machine_arch_type __machine_arch_type
3030 +# else
3031 +# define machine_arch_type MACH_TYPE_PARSY
3032 +# endif
3033 +# define machine_is_parsy() (machine_arch_type == MACH_TYPE_PARSY)
3034 +#else
3035 +# define machine_is_parsy() (0)
3036 +#endif
3037 +
3038 +#ifdef CONFIG_MACH_CCXP
3039 +# ifdef machine_arch_type
3040 +# undef machine_arch_type
3041 +# define machine_arch_type __machine_arch_type
3042 +# else
3043 +# define machine_arch_type MACH_TYPE_CCXP
3044 +# endif
3045 +# define machine_is_ccxp270() (machine_arch_type == MACH_TYPE_CCXP)
3046 +#else
3047 +# define machine_is_ccxp270() (0)
3048 +#endif
3049 +
3050 +#ifdef CONFIG_MACH_OMAP_GSAMPLE
3051 +# ifdef machine_arch_type
3052 +# undef machine_arch_type
3053 +# define machine_arch_type __machine_arch_type
3054 +# else
3055 +# define machine_arch_type MACH_TYPE_OMAP_GSAMPLE
3056 +# endif
3057 +# define machine_is_omap_gsample() (machine_arch_type == MACH_TYPE_OMAP_GSAMPLE)
3058 +#else
3059 +# define machine_is_omap_gsample() (0)
3060 +#endif
3061 +
3062 +#ifdef CONFIG_MACH_REALVIEW_EB
3063 +# ifdef machine_arch_type
3064 +# undef machine_arch_type
3065 +# define machine_arch_type __machine_arch_type
3066 +# else
3067 +# define machine_arch_type MACH_TYPE_REALVIEW_EB
3068 +# endif
3069 +# define machine_is_realview_eb() (machine_arch_type == MACH_TYPE_REALVIEW_EB)
3070 +#else
3071 +# define machine_is_realview_eb() (0)
3072 +#endif
3073 +
3074 +#ifdef CONFIG_MACH_SAMOA
3075 +# ifdef machine_arch_type
3076 +# undef machine_arch_type
3077 +# define machine_arch_type __machine_arch_type
3078 +# else
3079 +# define machine_arch_type MACH_TYPE_SAMOA
3080 +# endif
3081 +# define machine_is_samoa() (machine_arch_type == MACH_TYPE_SAMOA)
3082 +#else
3083 +# define machine_is_samoa() (0)
3084 +#endif
3085 +
3086 +#ifdef CONFIG_MACH_T3XSCALE
3087 +# ifdef machine_arch_type
3088 +# undef machine_arch_type
3089 +# define machine_arch_type __machine_arch_type
3090 +# else
3091 +# define machine_arch_type MACH_TYPE_T3XSCALE
3092 +# endif
3093 +# define machine_is_t3xscale() (machine_arch_type == MACH_TYPE_T3XSCALE)
3094 +#else
3095 +# define machine_is_t3xscale() (0)
3096 +#endif
3097 +
3098 +#ifdef CONFIG_MACH_I878
3099 +# ifdef machine_arch_type
3100 +# undef machine_arch_type
3101 +# define machine_arch_type __machine_arch_type
3102 +# else
3103 +# define machine_arch_type MACH_TYPE_I878
3104 +# endif
3105 +# define machine_is_i878() (machine_arch_type == MACH_TYPE_I878)
3106 +#else
3107 +# define machine_is_i878() (0)
3108 +#endif
3109 +
3110 +#ifdef CONFIG_MACH_BORZOI
3111 +# ifdef machine_arch_type
3112 +# undef machine_arch_type
3113 +# define machine_arch_type __machine_arch_type
3114 +# else
3115 +# define machine_arch_type MACH_TYPE_BORZOI
3116 +# endif
3117 +# define machine_is_borzoi() (machine_arch_type == MACH_TYPE_BORZOI)
3118 +#else
3119 +# define machine_is_borzoi() (0)
3120 +#endif
3121 +
3122 +#ifdef CONFIG_MACH_GECKO
3123 +# ifdef machine_arch_type
3124 +# undef machine_arch_type
3125 +# define machine_arch_type __machine_arch_type
3126 +# else
3127 +# define machine_arch_type MACH_TYPE_GECKO
3128 +# endif
3129 +# define machine_is_gecko() (machine_arch_type == MACH_TYPE_GECKO)
3130 +#else
3131 +# define machine_is_gecko() (0)
3132 +#endif
3133 +
3134 +#ifdef CONFIG_MACH_DS101
3135 +# ifdef machine_arch_type
3136 +# undef machine_arch_type
3137 +# define machine_arch_type __machine_arch_type
3138 +# else
3139 +# define machine_arch_type MACH_TYPE_DS101
3140 +# endif
3141 +# define machine_is_ds101() (machine_arch_type == MACH_TYPE_DS101)
3142 +#else
3143 +# define machine_is_ds101() (0)
3144 +#endif
3145 +
3146 +#ifdef CONFIG_MACH_OMAP_PALMTT2
3147 +# ifdef machine_arch_type
3148 +# undef machine_arch_type
3149 +# define machine_arch_type __machine_arch_type
3150 +# else
3151 +# define machine_arch_type MACH_TYPE_OMAP_PALMTT2
3152 +# endif
3153 +# define machine_is_omap_palmtt2() (machine_arch_type == MACH_TYPE_OMAP_PALMTT2)
3154 +#else
3155 +# define machine_is_omap_palmtt2() (0)
3156 +#endif
3157 +
3158 +#ifdef CONFIG_MACH_XSCALE_PALMLD
3159 +# ifdef machine_arch_type
3160 +# undef machine_arch_type
3161 +# define machine_arch_type __machine_arch_type
3162 +# else
3163 +# define machine_arch_type MACH_TYPE_XSCALE_PALMLD
3164 +# endif
3165 +# define machine_is_xscale_palmld() (machine_arch_type == MACH_TYPE_XSCALE_PALMLD)
3166 +#else
3167 +# define machine_is_xscale_palmld() (0)
3168 +#endif
3169 +
3170 +#ifdef CONFIG_MACH_CC9C
3171 +# ifdef machine_arch_type
3172 +# undef machine_arch_type
3173 +# define machine_arch_type __machine_arch_type
3174 +# else
3175 +# define machine_arch_type MACH_TYPE_CC9C
3176 +# endif
3177 +# define machine_is_cc9c() (machine_arch_type == MACH_TYPE_CC9C)
3178 +#else
3179 +# define machine_is_cc9c() (0)
3180 +#endif
3181 +
3182 +#ifdef CONFIG_MACH_SBC1670
3183 +# ifdef machine_arch_type
3184 +# undef machine_arch_type
3185 +# define machine_arch_type __machine_arch_type
3186 +# else
3187 +# define machine_arch_type MACH_TYPE_SBC1670
3188 +# endif
3189 +# define machine_is_sbc1670() (machine_arch_type == MACH_TYPE_SBC1670)
3190 +#else
3191 +# define machine_is_sbc1670() (0)
3192 +#endif
3193 +
3194 +#ifdef CONFIG_MACH_IXDP28X5
3195 +# ifdef machine_arch_type
3196 +# undef machine_arch_type
3197 +# define machine_arch_type __machine_arch_type
3198 +# else
3199 +# define machine_arch_type MACH_TYPE_IXDP28X5
3200 +# endif
3201 +# define machine_is_ixdp28x5() (machine_arch_type == MACH_TYPE_IXDP28X5)
3202 +#else
3203 +# define machine_is_ixdp28x5() (0)
3204 +#endif
3205 +
3206 +#ifdef CONFIG_MACH_OMAP_PALMTT
3207 +# ifdef machine_arch_type
3208 +# undef machine_arch_type
3209 +# define machine_arch_type __machine_arch_type
3210 +# else
3211 +# define machine_arch_type MACH_TYPE_OMAP_PALMTT
3212 +# endif
3213 +# define machine_is_omap_palmtt() (machine_arch_type == MACH_TYPE_OMAP_PALMTT)
3214 +#else
3215 +# define machine_is_omap_palmtt() (0)
3216 +#endif
3217 +
3218 +#ifdef CONFIG_MACH_ML696K
3219 +# ifdef machine_arch_type
3220 +# undef machine_arch_type
3221 +# define machine_arch_type __machine_arch_type
3222 +# else
3223 +# define machine_arch_type MACH_TYPE_ML696K
3224 +# endif
3225 +# define machine_is_ml696k() (machine_arch_type == MACH_TYPE_ML696K)
3226 +#else
3227 +# define machine_is_ml696k() (0)
3228 +#endif
3229 +
3230 +#ifdef CONFIG_MACH_ARCOM_ZEUS
3231 +# ifdef machine_arch_type
3232 +# undef machine_arch_type
3233 +# define machine_arch_type __machine_arch_type
3234 +# else
3235 +# define machine_arch_type MACH_TYPE_ARCOM_ZEUS
3236 +# endif
3237 +# define machine_is_arcom_zeus() (machine_arch_type == MACH_TYPE_ARCOM_ZEUS)
3238 +#else
3239 +# define machine_is_arcom_zeus() (0)
3240 +#endif
3241 +
3242 +#ifdef CONFIG_MACH_OSIRIS
3243 +# ifdef machine_arch_type
3244 +# undef machine_arch_type
3245 +# define machine_arch_type __machine_arch_type
3246 +# else
3247 +# define machine_arch_type MACH_TYPE_OSIRIS
3248 +# endif
3249 +# define machine_is_osiris() (machine_arch_type == MACH_TYPE_OSIRIS)
3250 +#else
3251 +# define machine_is_osiris() (0)
3252 +#endif
3253 +
3254 +#ifdef CONFIG_MACH_MAESTRO
3255 +# ifdef machine_arch_type
3256 +# undef machine_arch_type
3257 +# define machine_arch_type __machine_arch_type
3258 +# else
3259 +# define machine_arch_type MACH_TYPE_MAESTRO
3260 +# endif
3261 +# define machine_is_maestro() (machine_arch_type == MACH_TYPE_MAESTRO)
3262 +#else
3263 +# define machine_is_maestro() (0)
3264 +#endif
3265 +
3266 +#ifdef CONFIG_MACH_TUNGE2
3267 +# ifdef machine_arch_type
3268 +# undef machine_arch_type
3269 +# define machine_arch_type __machine_arch_type
3270 +# else
3271 +# define machine_arch_type MACH_TYPE_TUNGE2
3272 +# endif
3273 +# define machine_is_tunge2() (machine_arch_type == MACH_TYPE_TUNGE2)
3274 +#else
3275 +# define machine_is_tunge2() (0)
3276 +#endif
3277 +
3278 +#ifdef CONFIG_MACH_IXBBM
3279 +# ifdef machine_arch_type
3280 +# undef machine_arch_type
3281 +# define machine_arch_type __machine_arch_type
3282 +# else
3283 +# define machine_arch_type MACH_TYPE_IXBBM
3284 +# endif
3285 +# define machine_is_ixbbm() (machine_arch_type == MACH_TYPE_IXBBM)
3286 +#else
3287 +# define machine_is_ixbbm() (0)
3288 +#endif
3289 +
3290 +#ifdef CONFIG_MACH_MX27
3291 +# ifdef machine_arch_type
3292 +# undef machine_arch_type
3293 +# define machine_arch_type __machine_arch_type
3294 +# else
3295 +# define machine_arch_type MACH_TYPE_MX27
3296 +# endif
3297 +# define machine_is_mx27ads() (machine_arch_type == MACH_TYPE_MX27)
3298 +#else
3299 +# define machine_is_mx27ads() (0)
3300 +#endif
3301 +
3302 +#ifdef CONFIG_MACH_AX8004
3303 +# ifdef machine_arch_type
3304 +# undef machine_arch_type
3305 +# define machine_arch_type __machine_arch_type
3306 +# else
3307 +# define machine_arch_type MACH_TYPE_AX8004
3308 +# endif
3309 +# define machine_is_ax8004() (machine_arch_type == MACH_TYPE_AX8004)
3310 +#else
3311 +# define machine_is_ax8004() (0)
3312 +#endif
3313 +
3314 +#ifdef CONFIG_MACH_AT91SAM9261EK
3315 +# ifdef machine_arch_type
3316 +# undef machine_arch_type
3317 +# define machine_arch_type __machine_arch_type
3318 +# else
3319 +# define machine_arch_type MACH_TYPE_AT91SAM9261EK
3320 +# endif
3321 +# define machine_is_at91sam9261ek() (machine_arch_type == MACH_TYPE_AT91SAM9261EK)
3322 +#else
3323 +# define machine_is_at91sam9261ek() (0)
3324 +#endif
3325 +
3326 +#ifdef CONFIG_MACH_LOFT
3327 +# ifdef machine_arch_type
3328 +# undef machine_arch_type
3329 +# define machine_arch_type __machine_arch_type
3330 +# else
3331 +# define machine_arch_type MACH_TYPE_LOFT
3332 +# endif
3333 +# define machine_is_loft() (machine_arch_type == MACH_TYPE_LOFT)
3334 +#else
3335 +# define machine_is_loft() (0)
3336 +#endif
3337 +
3338 +#ifdef CONFIG_MACH_MAGPIE
3339 +# ifdef machine_arch_type
3340 +# undef machine_arch_type
3341 +# define machine_arch_type __machine_arch_type
3342 +# else
3343 +# define machine_arch_type MACH_TYPE_MAGPIE
3344 +# endif
3345 +# define machine_is_magpie() (machine_arch_type == MACH_TYPE_MAGPIE)
3346 +#else
3347 +# define machine_is_magpie() (0)
3348 +#endif
3349 +
3350 +#ifdef CONFIG_MACH_MX21
3351 +# ifdef machine_arch_type
3352 +# undef machine_arch_type
3353 +# define machine_arch_type __machine_arch_type
3354 +# else
3355 +# define machine_arch_type MACH_TYPE_MX21
3356 +# endif
3357 +# define machine_is_mx21ads() (machine_arch_type == MACH_TYPE_MX21)
3358 +#else