strip the kernel version suffix from target directories, except for brcm-2.4 (the...
[15.05/openwrt.git] / target / linux / at91 / 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
3359 +# define machine_is_mx21ads()  (0)
3360 +#endif
3361 +
3362 +#ifdef CONFIG_MACH_MB87M3400
3363 +# ifdef machine_arch_type
3364 +#  undef machine_arch_type
3365 +#  define machine_arch_type    __machine_arch_type
3366 +# else
3367 +#  define machine_arch_type    MACH_TYPE_MB87M3400
3368 +# endif
3369 +# define machine_is_mb87m3400()        (machine_arch_type == MACH_TYPE_MB87M3400)
3370 +#else
3371 +# define machine_is_mb87m3400()        (0)
3372 +#endif
3373 +
3374 +#ifdef CONFIG_MACH_MGUARD_DELTA
3375 +# ifdef machine_arch_type
3376 +#  undef machine_arch_type
3377 +#  define machine_arch_type    __machine_arch_type
3378 +# else
3379 +#  define machine_arch_type    MACH_TYPE_MGUARD_DELTA
3380 +# endif
3381 +# define machine_is_mguard_delta()     (machine_arch_type == MACH_TYPE_MGUARD_DELTA)
3382 +#else
3383 +# define machine_is_mguard_delta()     (0)
3384 +#endif
3385 +
3386 +#ifdef CONFIG_MACH_DAVINCI_DVDP
3387 +# ifdef machine_arch_type
3388 +#  undef machine_arch_type
3389 +#  define machine_arch_type    __machine_arch_type
3390 +# else
3391 +#  define machine_arch_type    MACH_TYPE_DAVINCI_DVDP
3392 +# endif
3393 +# define machine_is_davinci_dvdp()     (machine_arch_type == MACH_TYPE_DAVINCI_DVDP)
3394 +#else
3395 +# define machine_is_davinci_dvdp()     (0)
3396 +#endif
3397 +
3398 +#ifdef CONFIG_MACH_HTCUNIVERSAL
3399 +# ifdef machine_arch_type
3400 +#  undef machine_arch_type
3401 +#  define machine_arch_type    __machine_arch_type
3402 +# else
3403 +#  define machine_arch_type    MACH_TYPE_HTCUNIVERSAL
3404 +# endif
3405 +# define machine_is_htcuniversal()     (machine_arch_type == MACH_TYPE_HTCUNIVERSAL)
3406 +#else
3407 +# define machine_is_htcuniversal()     (0)
3408 +#endif
3409 +
3410 +#ifdef CONFIG_MACH_TPAD
3411 +# ifdef machine_arch_type
3412 +#  undef machine_arch_type
3413 +#  define machine_arch_type    __machine_arch_type
3414 +# else
3415 +#  define machine_arch_type    MACH_TYPE_TPAD
3416 +# endif
3417 +# define machine_is_tpad()     (machine_arch_type == MACH_TYPE_TPAD)
3418 +#else
3419 +# define machine_is_tpad()     (0)
3420 +#endif
3421 +
3422 +#ifdef CONFIG_MACH_ROVERP3
3423 +# ifdef machine_arch_type
3424 +#  undef machine_arch_type
3425 +#  define machine_arch_type    __machine_arch_type
3426 +# else
3427 +#  define machine_arch_type    MACH_TYPE_ROVERP3
3428 +# endif
3429 +# define machine_is_roverp3()  (machine_arch_type == MACH_TYPE_ROVERP3)
3430 +#else
3431 +# define machine_is_roverp3()  (0)
3432 +#endif
3433 +
3434 +#ifdef CONFIG_MACH_JORNADA928
3435 +# ifdef machine_arch_type
3436 +#  undef machine_arch_type
3437 +#  define machine_arch_type    __machine_arch_type
3438 +# else
3439 +#  define machine_arch_type    MACH_TYPE_JORNADA928
3440 +# endif
3441 +# define machine_is_jornada928()       (machine_arch_type == MACH_TYPE_JORNADA928)
3442 +#else
3443 +# define machine_is_jornada928()       (0)
3444 +#endif
3445 +
3446 +#ifdef CONFIG_MACH_MV88FXX81
3447 +# ifdef machine_arch_type
3448 +#  undef machine_arch_type
3449 +#  define machine_arch_type    __machine_arch_type
3450 +# else
3451 +#  define machine_arch_type    MACH_TYPE_MV88FXX81
3452 +# endif
3453 +# define machine_is_mv88fxx81()        (machine_arch_type == MACH_TYPE_MV88FXX81)
3454 +#else
3455 +# define machine_is_mv88fxx81()        (0)
3456 +#endif
3457 +
3458 +#ifdef CONFIG_MACH_STMP36XX
3459 +# ifdef machine_arch_type
3460 +#  undef machine_arch_type
3461 +#  define machine_arch_type    __machine_arch_type
3462 +# else
3463 +#  define machine_arch_type    MACH_TYPE_STMP36XX
3464 +# endif
3465 +# define machine_is_stmp36xx() (machine_arch_type == MACH_TYPE_STMP36XX)
3466 +#else
3467 +# define machine_is_stmp36xx() (0)
3468 +#endif
3469 +
3470 +#ifdef CONFIG_MACH_SXNI79524
3471 +# ifdef machine_arch_type
3472 +#  undef machine_arch_type
3473 +#  define machine_arch_type    __machine_arch_type
3474 +# else
3475 +#  define machine_arch_type    MACH_TYPE_SXNI79524
3476 +# endif
3477 +# define machine_is_sxni79524()        (machine_arch_type == MACH_TYPE_SXNI79524)
3478 +#else
3479 +# define machine_is_sxni79524()        (0)
3480 +#endif
3481 +
3482 +#ifdef CONFIG_MACH_AMS_DELTA
3483 +# ifdef machine_arch_type
3484 +#  undef machine_arch_type
3485 +#  define machine_arch_type    __machine_arch_type
3486 +# else
3487 +#  define machine_arch_type    MACH_TYPE_AMS_DELTA
3488 +# endif
3489 +# define machine_is_ams_delta()        (machine_arch_type == MACH_TYPE_AMS_DELTA)
3490 +#else
3491 +# define machine_is_ams_delta()        (0)
3492 +#endif
3493 +
3494 +#ifdef CONFIG_MACH_URANIUM
3495 +# ifdef machine_arch_type
3496 +#  undef machine_arch_type
3497 +#  define machine_arch_type    __machine_arch_type
3498 +# else
3499 +#  define machine_arch_type    MACH_TYPE_URANIUM
3500 +# endif
3501 +# define machine_is_uranium()  (machine_arch_type == MACH_TYPE_URANIUM)
3502 +#else
3503 +# define machine_is_uranium()  (0)
3504 +#endif
3505 +
3506 +#ifdef CONFIG_MACH_UCON
3507 +# ifdef machine_arch_type
3508 +#  undef machine_arch_type
3509 +#  define machine_arch_type    __machine_arch_type
3510 +# else
3511 +#  define machine_arch_type    MACH_TYPE_UCON
3512 +# endif
3513 +# define machine_is_ucon()     (machine_arch_type == MACH_TYPE_UCON)
3514 +#else
3515 +# define machine_is_ucon()     (0)
3516 +#endif
3517 +
3518 +#ifdef CONFIG_MACH_NAS100D
3519 +# ifdef machine_arch_type
3520 +#  undef machine_arch_type
3521 +#  define machine_arch_type    __machine_arch_type
3522 +# else
3523 +#  define machine_arch_type    MACH_TYPE_NAS100D
3524 +# endif
3525 +# define machine_is_nas100d()  (machine_arch_type == MACH_TYPE_NAS100D)
3526 +#else
3527 +# define machine_is_nas100d()  (0)
3528 +#endif
3529 +
3530 +#ifdef CONFIG_MACH_L083_1000
3531 +# ifdef machine_arch_type
3532 +#  undef machine_arch_type
3533 +#  define machine_arch_type    __machine_arch_type
3534 +# else
3535 +#  define machine_arch_type    MACH_TYPE_L083_1000
3536 +# endif
3537 +# define machine_is_l083()     (machine_arch_type == MACH_TYPE_L083_1000)
3538 +#else
3539 +# define machine_is_l083()     (0)
3540 +#endif
3541 +
3542 +#ifdef CONFIG_MACH_EZX
3543 +# ifdef machine_arch_type
3544 +#  undef machine_arch_type
3545 +#  define machine_arch_type    __machine_arch_type
3546 +# else
3547 +#  define machine_arch_type    MACH_TYPE_EZX
3548 +# endif
3549 +# define machine_is_ezx()      (machine_arch_type == MACH_TYPE_EZX)
3550 +#else
3551 +# define machine_is_ezx()      (0)
3552 +#endif
3553 +
3554 +#ifdef CONFIG_MACH_PNX5220
3555 +# ifdef machine_arch_type
3556 +#  undef machine_arch_type
3557 +#  define machine_arch_type    __machine_arch_type
3558 +# else
3559 +#  define machine_arch_type    MACH_TYPE_PNX5220
3560 +# endif
3561 +# define machine_is_pnx5220()  (machine_arch_type == MACH_TYPE_PNX5220)
3562 +#else
3563 +# define machine_is_pnx5220()  (0)
3564 +#endif
3565 +
3566 +#ifdef CONFIG_MACH_BUTTE
3567 +# ifdef machine_arch_type
3568 +#  undef machine_arch_type
3569 +#  define machine_arch_type    __machine_arch_type
3570 +# else
3571 +#  define machine_arch_type    MACH_TYPE_BUTTE
3572 +# endif
3573 +# define machine_is_butte()    (machine_arch_type == MACH_TYPE_BUTTE)
3574 +#else
3575 +# define machine_is_butte()    (0)
3576 +#endif
3577 +
3578 +#ifdef CONFIG_MACH_SRM2
3579 +# ifdef machine_arch_type
3580 +#  undef machine_arch_type
3581 +#  define machine_arch_type    __machine_arch_type
3582 +# else
3583 +#  define machine_arch_type    MACH_TYPE_SRM2
3584 +# endif
3585 +# define machine_is_srm2()     (machine_arch_type == MACH_TYPE_SRM2)
3586 +#else
3587 +# define machine_is_srm2()     (0)
3588 +#endif
3589 +
3590 +#ifdef CONFIG_MACH_DSBR
3591 +# ifdef machine_arch_type
3592 +#  undef machine_arch_type
3593 +#  define machine_arch_type    __machine_arch_type
3594 +# else
3595 +#  define machine_arch_type    MACH_TYPE_DSBR
3596 +# endif
3597 +# define machine_is_dsbr()     (machine_arch_type == MACH_TYPE_DSBR)
3598 +#else
3599 +# define machine_is_dsbr()     (0)
3600 +#endif
3601 +
3602 +#ifdef CONFIG_MACH_CRYSTALBALL
3603 +# ifdef machine_arch_type
3604 +#  undef machine_arch_type
3605 +#  define machine_arch_type    __machine_arch_type
3606 +# else
3607 +#  define machine_arch_type    MACH_TYPE_CRYSTALBALL
3608 +# endif
3609 +# define machine_is_crystalball()      (machine_arch_type == MACH_TYPE_CRYSTALBALL)
3610 +#else
3611 +# define machine_is_crystalball()      (0)
3612 +#endif
3613 +
3614 +#ifdef CONFIG_MACH_TINYPXA27X
3615 +# ifdef machine_arch_type
3616 +#  undef machine_arch_type
3617 +#  define machine_arch_type    __machine_arch_type
3618 +# else
3619 +#  define machine_arch_type    MACH_TYPE_TINYPXA27X
3620 +# endif
3621 +# define machine_is_tinypxa27x()       (machine_arch_type == MACH_TYPE_TINYPXA27X)
3622 +#else
3623 +# define machine_is_tinypxa27x()       (0)
3624 +#endif
3625 +
3626 +#ifdef CONFIG_MACH_HERBIE
3627 +# ifdef machine_arch_type
3628 +#  undef machine_arch_type
3629 +#  define machine_arch_type    __machine_arch_type
3630 +# else
3631 +#  define machine_arch_type    MACH_TYPE_HERBIE
3632 +# endif
3633 +# define machine_is_herbie()   (machine_arch_type == MACH_TYPE_HERBIE)
3634 +#else
3635 +# define machine_is_herbie()   (0)
3636 +#endif
3637 +
3638 +#ifdef CONFIG_MACH_MAGICIAN
3639 +# ifdef machine_arch_type
3640 +#  undef machine_arch_type
3641 +#  define machine_arch_type    __machine_arch_type
3642 +# else
3643 +#  define machine_arch_type    MACH_TYPE_MAGICIAN
3644 +# endif
3645 +# define machine_is_magician() (machine_arch_type == MACH_TYPE_MAGICIAN)
3646 +#else
3647 +# define machine_is_magician() (0)
3648 +#endif
3649 +
3650 +#ifdef CONFIG_MACH_CM4002
3651 +# ifdef machine_arch_type
3652 +#  undef machine_arch_type
3653 +#  define machine_arch_type    __machine_arch_type
3654 +# else
3655 +#  define machine_arch_type    MACH_TYPE_CM4002
3656 +# endif
3657 +# define machine_is_cm4002()   (machine_arch_type == MACH_TYPE_CM4002)
3658 +#else
3659 +# define machine_is_cm4002()   (0)
3660 +#endif
3661 +
3662 +#ifdef CONFIG_MACH_B4
3663 +# ifdef machine_arch_type
3664 +#  undef machine_arch_type
3665 +#  define machine_arch_type    __machine_arch_type
3666 +# else
3667 +#  define machine_arch_type    MACH_TYPE_B4
3668 +# endif
3669 +# define machine_is_b4()       (machine_arch_type == MACH_TYPE_B4)
3670 +#else
3671 +# define machine_is_b4()       (0)
3672 +#endif
3673 +
3674 +#ifdef CONFIG_MACH_MAUI
3675 +# ifdef machine_arch_type
3676 +#  undef machine_arch_type
3677 +#  define machine_arch_type    __machine_arch_type
3678 +# else
3679 +#  define machine_arch_type    MACH_TYPE_MAUI
3680 +# endif
3681 +# define machine_is_maui()     (machine_arch_type == MACH_TYPE_MAUI)
3682 +#else
3683 +# define machine_is_maui()     (0)
3684 +#endif
3685 +
3686 +#ifdef CONFIG_MACH_CYBERTRACKER_G
3687 +# ifdef machine_arch_type
3688 +#  undef machine_arch_type
3689 +#  define machine_arch_type    __machine_arch_type
3690 +# else
3691 +#  define machine_arch_type    MACH_TYPE_CYBERTRACKER_G
3692 +# endif
3693 +# define machine_is_cybertracker_g()   (machine_arch_type == MACH_TYPE_CYBERTRACKER_G)
3694 +#else
3695 +# define machine_is_cybertracker_g()   (0)
3696 +#endif
3697 +
3698 +#ifdef CONFIG_MACH_NXDKN
3699 +# ifdef machine_arch_type
3700 +#  undef machine_arch_type
3701 +#  define machine_arch_type    __machine_arch_type
3702 +# else
3703 +#  define machine_arch_type    MACH_TYPE_NXDKN
3704 +# endif
3705 +# define machine_is_nxdkn()    (machine_arch_type == MACH_TYPE_NXDKN)
3706 +#else
3707 +# define machine_is_nxdkn()    (0)
3708 +#endif
3709 +
3710 +#ifdef CONFIG_MACH_MIO8390
3711 +# ifdef machine_arch_type
3712 +#  undef machine_arch_type
3713 +#  define machine_arch_type    __machine_arch_type
3714 +# else
3715 +#  define machine_arch_type    MACH_TYPE_MIO8390
3716 +# endif
3717 +# define machine_is_mio8390()  (machine_arch_type == MACH_TYPE_MIO8390)
3718 +#else
3719 +# define machine_is_mio8390()  (0)
3720 +#endif
3721 +
3722 +#ifdef CONFIG_MACH_OMI_BOARD
3723 +# ifdef machine_arch_type
3724 +#  undef machine_arch_type
3725 +#  define machine_arch_type    __machine_arch_type
3726 +# else
3727 +#  define machine_arch_type    MACH_TYPE_OMI_BOARD
3728 +# endif
3729 +# define machine_is_omi_board()        (machine_arch_type == MACH_TYPE_OMI_BOARD)
3730 +#else
3731 +# define machine_is_omi_board()        (0)
3732 +#endif
3733 +
3734 +#ifdef CONFIG_MACH_MX21CIV
3735 +# ifdef machine_arch_type
3736 +#  undef machine_arch_type
3737 +#  define machine_arch_type    __machine_arch_type
3738 +# else
3739 +#  define machine_arch_type    MACH_TYPE_MX21CIV
3740 +# endif
3741 +# define machine_is_mx21civ()  (machine_arch_type == MACH_TYPE_MX21CIV)
3742 +#else
3743 +# define machine_is_mx21civ()  (0)
3744 +#endif
3745 +
3746 +#ifdef CONFIG_MACH_MAHI_CDAC
3747 +# ifdef machine_arch_type
3748 +#  undef machine_arch_type
3749 +#  define machine_arch_type    __machine_arch_type
3750 +# else
3751 +#  define machine_arch_type    MACH_TYPE_MAHI_CDAC
3752 +# endif
3753 +# define machine_is_mahi_cdac()        (machine_arch_type == MACH_TYPE_MAHI_CDAC)
3754 +#else
3755 +# define machine_is_mahi_cdac()        (0)
3756 +#endif
3757 +
3758 +#ifdef CONFIG_MACH_XSCALE_PALMTX
3759 +# ifdef machine_arch_type
3760 +#  undef machine_arch_type
3761 +#  define machine_arch_type    __machine_arch_type
3762 +# else
3763 +#  define machine_arch_type    MACH_TYPE_XSCALE_PALMTX
3764 +# endif
3765 +# define machine_is_xscale_palmtx()    (machine_arch_type == MACH_TYPE_XSCALE_PALMTX)
3766 +#else
3767 +# define machine_is_xscale_palmtx()    (0)
3768 +#endif
3769 +
3770 +#ifdef CONFIG_MACH_S3C2413
3771 +# ifdef machine_arch_type
3772 +#  undef machine_arch_type
3773 +#  define machine_arch_type    __machine_arch_type
3774 +# else
3775 +#  define machine_arch_type    MACH_TYPE_S3C2413
3776 +# endif
3777 +# define machine_is_s3c2413()  (machine_arch_type == MACH_TYPE_S3C2413)
3778 +#else
3779 +# define machine_is_s3c2413()  (0)
3780 +#endif
3781 +
3782 +#ifdef CONFIG_MACH_SAMSYS_EP0
3783 +# ifdef machine_arch_type
3784 +#  undef machine_arch_type
3785 +#  define machine_arch_type    __machine_arch_type
3786 +# else
3787 +#  define machine_arch_type    MACH_TYPE_SAMSYS_EP0
3788 +# endif
3789 +# define machine_is_samsys_ep0()       (machine_arch_type == MACH_TYPE_SAMSYS_EP0)
3790 +#else
3791 +# define machine_is_samsys_ep0()       (0)
3792 +#endif
3793 +
3794 +#ifdef CONFIG_MACH_WG302V1
3795 +# ifdef machine_arch_type
3796 +#  undef machine_arch_type
3797 +#  define machine_arch_type    __machine_arch_type
3798 +# else
3799 +#  define machine_arch_type    MACH_TYPE_WG302V1
3800 +# endif
3801 +# define machine_is_wg302v1()  (machine_arch_type == MACH_TYPE_WG302V1)
3802 +#else
3803 +# define machine_is_wg302v1()  (0)
3804 +#endif
3805 +
3806 +#ifdef CONFIG_MACH_WG302V2
3807 +# ifdef machine_arch_type
3808 +#  undef machine_arch_type
3809 +#  define machine_arch_type    __machine_arch_type
3810 +# else
3811 +#  define machine_arch_type    MACH_TYPE_WG302V2
3812 +# endif
3813 +# define machine_is_wg302v2()  (machine_arch_type == MACH_TYPE_WG302V2)
3814 +#else
3815 +# define machine_is_wg302v2()  (0)
3816 +#endif
3817 +
3818 +#ifdef CONFIG_MACH_EB42X
3819 +# ifdef machine_arch_type
3820 +#  undef machine_arch_type
3821 +#  define machine_arch_type    __machine_arch_type
3822 +# else
3823 +#  define machine_arch_type    MACH_TYPE_EB42X
3824 +# endif
3825 +# define machine_is_eb42x()    (machine_arch_type == MACH_TYPE_EB42X)
3826 +#else
3827 +# define machine_is_eb42x()    (0)
3828 +#endif
3829 +
3830 +#ifdef CONFIG_MACH_IQ331ES
3831 +# ifdef machine_arch_type
3832 +#  undef machine_arch_type
3833 +#  define machine_arch_type    __machine_arch_type
3834 +# else
3835 +#  define machine_arch_type    MACH_TYPE_IQ331ES
3836 +# endif
3837 +# define machine_is_iq331es()  (machine_arch_type == MACH_TYPE_IQ331ES)
3838 +#else
3839 +# define machine_is_iq331es()  (0)
3840 +#endif
3841 +
3842 +#ifdef CONFIG_MACH_COSYDSP
3843 +# ifdef machine_arch_type
3844 +#  undef machine_arch_type
3845 +#  define machine_arch_type    __machine_arch_type
3846 +# else
3847 +#  define machine_arch_type    MACH_TYPE_COSYDSP
3848 +# endif
3849 +# define machine_is_cosydsp()  (machine_arch_type == MACH_TYPE_COSYDSP)
3850 +#else
3851 +# define machine_is_cosydsp()  (0)
3852 +#endif
3853 +
3854 +#ifdef CONFIG_MACH_UPLAT7D
3855 +# ifdef machine_arch_type
3856 +#  undef machine_arch_type
3857 +#  define machine_arch_type    __machine_arch_type
3858 +# else
3859 +#  define machine_arch_type    MACH_TYPE_UPLAT7D
3860 +# endif
3861 +# define machine_is_uplat7d_proto()    (machine_arch_type == MACH_TYPE_UPLAT7D)
3862 +#else
3863 +# define machine_is_uplat7d_proto()    (0)
3864 +#endif
3865 +
3866 +#ifdef CONFIG_MACH_PTDAVINCI
3867 +# ifdef machine_arch_type
3868 +#  undef machine_arch_type
3869 +#  define machine_arch_type    __machine_arch_type
3870 +# else
3871 +#  define machine_arch_type    MACH_TYPE_PTDAVINCI
3872 +# endif
3873 +# define machine_is_ptdavinci()        (machine_arch_type == MACH_TYPE_PTDAVINCI)
3874 +#else
3875 +# define machine_is_ptdavinci()        (0)
3876 +#endif
3877 +
3878 +#ifdef CONFIG_MACH_MBUS
3879 +# ifdef machine_arch_type
3880 +#  undef machine_arch_type
3881 +#  define machine_arch_type    __machine_arch_type
3882 +# else
3883 +#  define machine_arch_type    MACH_TYPE_MBUS
3884 +# endif
3885 +# define machine_is_mbus()     (machine_arch_type == MACH_TYPE_MBUS)
3886 +#else
3887 +# define machine_is_mbus()     (0)
3888 +#endif
3889 +
3890 +#ifdef CONFIG_MACH_NADIA2VB
3891 +# ifdef machine_arch_type
3892 +#  undef machine_arch_type
3893 +#  define machine_arch_type    __machine_arch_type
3894 +# else
3895 +#  define machine_arch_type    MACH_TYPE_NADIA2VB
3896 +# endif
3897 +# define machine_is_nadia2vb() (machine_arch_type == MACH_TYPE_NADIA2VB)
3898 +#else
3899 +# define machine_is_nadia2vb() (0)
3900 +#endif
3901 +
3902 +#ifdef CONFIG_MACH_R1000
3903 +# ifdef machine_arch_type
3904 +#  undef machine_arch_type
3905 +#  define machine_arch_type    __machine_arch_type
3906 +# else
3907 +#  define machine_arch_type    MACH_TYPE_R1000
3908 +# endif
3909 +# define machine_is_r1000()    (machine_arch_type == MACH_TYPE_R1000)
3910 +#else
3911 +# define machine_is_r1000()    (0)
3912 +#endif
3913 +
3914 +#ifdef CONFIG_MACH_HW90250
3915 +# ifdef machine_arch_type
3916 +#  undef machine_arch_type
3917 +#  define machine_arch_type    __machine_arch_type
3918 +# else
3919 +#  define machine_arch_type    MACH_TYPE_HW90250
3920 +# endif
3921 +# define machine_is_hw90250()  (machine_arch_type == MACH_TYPE_HW90250)
3922 +#else
3923 +# define machine_is_hw90250()  (0)
3924 +#endif
3925 +
3926 +#ifdef CONFIG_MACH_OMAP_2430SDP
3927 +# ifdef machine_arch_type
3928 +#  undef machine_arch_type
3929 +#  define machine_arch_type    __machine_arch_type
3930 +# else
3931 +#  define machine_arch_type    MACH_TYPE_OMAP_2430SDP
3932 +# endif
3933 +# define machine_is_omap_2430sdp()     (machine_arch_type == MACH_TYPE_OMAP_2430SDP)
3934 +#else
3935 +# define machine_is_omap_2430sdp()     (0)
3936 +#endif
3937 +
3938 +#ifdef CONFIG_MACH_DAVINCI_EVM
3939 +# ifdef machine_arch_type
3940 +#  undef machine_arch_type
3941 +#  define machine_arch_type    __machine_arch_type
3942 +# else
3943 +#  define machine_arch_type    MACH_TYPE_DAVINCI_EVM
3944 +# endif
3945 +# define machine_is_davinci_evm()      (machine_arch_type == MACH_TYPE_DAVINCI_EVM)
3946 +#else
3947 +# define machine_is_davinci_evm()      (0)
3948 +#endif
3949 +
3950 +#ifdef CONFIG_MACH_OMAP_TORNADO
3951 +# ifdef machine_arch_type
3952 +#  undef machine_arch_type
3953 +#  define machine_arch_type    __machine_arch_type
3954 +# else
3955 +#  define machine_arch_type    MACH_TYPE_OMAP_TORNADO
3956 +# endif
3957 +# define machine_is_omap_tornado()     (machine_arch_type == MACH_TYPE_OMAP_TORNADO)
3958 +#else
3959 +# define machine_is_omap_tornado()     (0)
3960 +#endif
3961 +
3962 +#ifdef CONFIG_MACH_OLOCREEK
3963 +# ifdef machine_arch_type
3964 +#  undef machine_arch_type
3965 +#  define machine_arch_type    __machine_arch_type
3966 +# else
3967 +#  define machine_arch_type    MACH_TYPE_OLOCREEK
3968 +# endif
3969 +# define machine_is_olocreek() (machine_arch_type == MACH_TYPE_OLOCREEK)
3970 +#else
3971 +# define machine_is_olocreek() (0)
3972 +#endif
3973 +
3974 +#ifdef CONFIG_MACH_PALMZ72
3975 +# ifdef machine_arch_type
3976 +#  undef machine_arch_type
3977 +#  define machine_arch_type    __machine_arch_type
3978 +# else
3979 +#  define machine_arch_type    MACH_TYPE_PALMZ72
3980 +# endif
3981 +# define machine_is_palmz72()  (machine_arch_type == MACH_TYPE_PALMZ72)
3982 +#else
3983 +# define machine_is_palmz72()  (0)
3984 +#endif
3985 +
3986 +#ifdef CONFIG_MACH_NXDB500
3987 +# ifdef machine_arch_type
3988 +#  undef machine_arch_type
3989 +#  define machine_arch_type    __machine_arch_type
3990 +# else
3991 +#  define machine_arch_type    MACH_TYPE_NXDB500
3992 +# endif
3993 +# define machine_is_nxdb500()  (machine_arch_type == MACH_TYPE_NXDB500)
3994 +#else
3995 +# define machine_is_nxdb500()  (0)
3996 +#endif
3997 +
3998 +#ifdef CONFIG_MACH_APF9328
3999 +# ifdef machine_arch_type
4000 +#  undef machine_arch_type
4001 +#  define machine_arch_type    __machine_arch_type
4002 +# else
4003 +#  define machine_arch_type    MACH_TYPE_APF9328
4004 +# endif
4005 +# define machine_is_apf9328()  (machine_arch_type == MACH_TYPE_APF9328)
4006 +#else
4007 +# define machine_is_apf9328()  (0)
4008 +#endif
4009 +
4010 +#ifdef CONFIG_MACH_OMAP_WIPOQ
4011 +# ifdef machine_arch_type
4012 +#  undef machine_arch_type
4013 +#  define machine_arch_type    __machine_arch_type
4014 +# else
4015 +#  define machine_arch_type    MACH_TYPE_OMAP_WIPOQ
4016 +# endif
4017 +# define machine_is_omap_wipoq()       (machine_arch_type == MACH_TYPE_OMAP_WIPOQ)
4018 +#else
4019 +# define machine_is_omap_wipoq()       (0)
4020 +#endif
4021 +
4022 +#ifdef CONFIG_MACH_OMAP_TWIP
4023 +# ifdef machine_arch_type
4024 +#  undef machine_arch_type
4025 +#  define machine_arch_type    __machine_arch_type
4026 +# else
4027 +#  define machine_arch_type    MACH_TYPE_OMAP_TWIP
4028 +# endif
4029 +# define machine_is_omap_twip()        (machine_arch_type == MACH_TYPE_OMAP_TWIP)
4030 +#else
4031 +# define machine_is_omap_twip()        (0)
4032 +#endif
4033 +
4034 +#ifdef CONFIG_MACH_XSCALE_PALMTREO650
4035 +# ifdef machine_arch_type
4036 +#  undef machine_arch_type
4037 +#  define machine_arch_type    __machine_arch_type
4038 +# else
4039 +#  define machine_arch_type    MACH_TYPE_XSCALE_PALMTREO650
4040 +# endif
4041 +# define machine_is_xscale_treo650()   (machine_arch_type == MACH_TYPE_XSCALE_PALMTREO650)
4042 +#else
4043 +# define machine_is_xscale_treo650()   (0)
4044 +#endif
4045 +
4046 +#ifdef CONFIG_MACH_ACUMEN
4047 +# ifdef machine_arch_type
4048 +#  undef machine_arch_type
4049 +#  define machine_arch_type    __machine_arch_type
4050 +# else
4051 +#  define machine_arch_type    MACH_TYPE_ACUMEN
4052 +# endif
4053 +# define machine_is_acumen()   (machine_arch_type == MACH_TYPE_ACUMEN)
4054 +#else
4055 +# define machine_is_acumen()   (0)
4056 +#endif
4057 +
4058 +#ifdef CONFIG_MACH_XP100
4059 +# ifdef machine_arch_type
4060 +#  undef machine_arch_type
4061 +#  define machine_arch_type    __machine_arch_type
4062 +# else
4063 +#  define machine_arch_type    MACH_TYPE_XP100
4064 +# endif
4065 +# define machine_is_xp100()    (machine_arch_type == MACH_TYPE_XP100)
4066 +#else
4067 +# define machine_is_xp100()    (0)
4068 +#endif
4069 +
4070 +#ifdef CONFIG_MACH_FS2410
4071 +# ifdef machine_arch_type
4072 +#  undef machine_arch_type
4073 +#  define machine_arch_type    __machine_arch_type
4074 +# else
4075 +#  define machine_arch_type    MACH_TYPE_FS2410
4076 +# endif
4077 +# define machine_is_fs2410()   (machine_arch_type == MACH_TYPE_FS2410)
4078 +#else
4079 +# define machine_is_fs2410()   (0)
4080 +#endif
4081 +
4082 +#ifdef CONFIG_MACH_PXA270_CERF
4083 +# ifdef machine_arch_type
4084 +#  undef machine_arch_type
4085 +#  define machine_arch_type    __machine_arch_type
4086 +# else
4087 +#  define machine_arch_type    MACH_TYPE_PXA270_CERF
4088 +# endif
4089 +# define machine_is_pxa270_cerf()      (machine_arch_type == MACH_TYPE_PXA270_CERF)
4090 +#else
4091 +# define machine_is_pxa270_cerf()      (0)
4092 +#endif
4093 +
4094 +#ifdef CONFIG_MACH_SQ2FTLPALM
4095 +# ifdef machine_arch_type
4096 +#  undef machine_arch_type
4097 +#  define machine_arch_type    __machine_arch_type
4098 +# else
4099 +#  define machine_arch_type    MACH_TYPE_SQ2FTLPALM
4100 +# endif
4101 +# define machine_is_sq2ftlpalm()       (machine_arch_type == MACH_TYPE_SQ2FTLPALM)
4102 +#else
4103 +# define machine_is_sq2ftlpalm()       (0)
4104 +#endif
4105 +
4106 +#ifdef CONFIG_MACH_BSEMSERVER
4107 +# ifdef machine_arch_type
4108 +#  undef machine_arch_type
4109 +#  define machine_arch_type    __machine_arch_type
4110 +# else
4111 +#  define machine_arch_type    MACH_TYPE_BSEMSERVER
4112 +# endif
4113 +# define machine_is_bsemserver()       (machine_arch_type == MACH_TYPE_BSEMSERVER)
4114 +#else
4115 +# define machine_is_bsemserver()       (0)
4116 +#endif
4117 +
4118 +#ifdef CONFIG_MACH_NETCLIENT
4119 +# ifdef machine_arch_type
4120 +#  undef machine_arch_type
4121 +#  define machine_arch_type    __machine_arch_type
4122 +# else
4123 +#  define machine_arch_type    MACH_TYPE_NETCLIENT
4124 +# endif
4125 +# define machine_is_netclient()        (machine_arch_type == MACH_TYPE_NETCLIENT)
4126 +#else
4127 +# define machine_is_netclient()        (0)
4128 +#endif
4129 +
4130 +#ifdef CONFIG_MACH_XSCALE_PALMTT5
4131 +# ifdef machine_arch_type
4132 +#  undef machine_arch_type
4133 +#  define machine_arch_type    __machine_arch_type
4134 +# else
4135 +#  define machine_arch_type    MACH_TYPE_XSCALE_PALMTT5
4136 +# endif
4137 +# define machine_is_xscale_palmtt5()   (machine_arch_type == MACH_TYPE_XSCALE_PALMTT5)
4138 +#else
4139 +# define machine_is_xscale_palmtt5()   (0)
4140 +#endif
4141 +
4142 +#ifdef CONFIG_MACH_OMAP_PALMTC
4143 +# ifdef machine_arch_type
4144 +#  undef machine_arch_type
4145 +#  define machine_arch_type    __machine_arch_type
4146 +# else
4147 +#  define machine_arch_type    MACH_TYPE_OMAP_PALMTC
4148 +# endif
4149 +# define machine_is_xscale_palmtc()    (machine_arch_type == MACH_TYPE_OMAP_PALMTC)
4150 +#else
4151 +# define machine_is_xscale_palmtc()    (0)
4152 +#endif
4153 +
4154 +#ifdef CONFIG_MACH_OMAP_APOLLON
4155 +# ifdef machine_arch_type
4156 +#  undef machine_arch_type
4157 +#  define machine_arch_type    __machine_arch_type
4158 +# else
4159 +#  define machine_arch_type    MACH_TYPE_OMAP_APOLLON
4160 +# endif
4161 +# define machine_is_omap_apollon()     (machine_arch_type == MACH_TYPE_OMAP_APOLLON)
4162 +#else
4163 +# define machine_is_omap_apollon()     (0)
4164 +#endif
4165 +
4166 +#ifdef CONFIG_MACH_MXC30030EVB
4167 +# ifdef machine_arch_type
4168 +#  undef machine_arch_type
4169 +#  define machine_arch_type    __machine_arch_type
4170 +# else
4171 +#  define machine_arch_type    MACH_TYPE_MXC30030EVB
4172 +# endif
4173 +# define machine_is_mxc30030evb()      (machine_arch_type == MACH_TYPE_MXC30030EVB)
4174 +#else
4175 +# define machine_is_mxc30030evb()      (0)
4176 +#endif
4177 +
4178 +#ifdef CONFIG_MACH_REA_2D
4179 +# ifdef machine_arch_type
4180 +#  undef machine_arch_type
4181 +#  define machine_arch_type    __machine_arch_type
4182 +# else
4183 +#  define machine_arch_type    MACH_TYPE_REA_2D
4184 +# endif
4185 +# define machine_is_rea_2d()   (machine_arch_type == MACH_TYPE_REA_2D)
4186 +#else
4187 +# define machine_is_rea_2d()   (0)
4188 +#endif
4189 +
4190 +#ifdef CONFIG_MACH_TI3E524
4191 +# ifdef machine_arch_type
4192 +#  undef machine_arch_type
4193 +#  define machine_arch_type    __machine_arch_type
4194 +# else
4195 +#  define machine_arch_type    MACH_TYPE_TI3E524
4196 +# endif
4197 +# define machine_is_eti3e524() (machine_arch_type == MACH_TYPE_TI3E524)
4198 +#else
4199 +# define machine_is_eti3e524() (0)
4200 +#endif
4201 +
4202 +#ifdef CONFIG_MACH_ATEB9200
4203 +# ifdef machine_arch_type
4204 +#  undef machine_arch_type
4205 +#  define machine_arch_type    __machine_arch_type
4206 +# else
4207 +#  define machine_arch_type    MACH_TYPE_ATEB9200
4208 +# endif
4209 +# define machine_is_ateb9200() (machine_arch_type == MACH_TYPE_ATEB9200)
4210 +#else
4211 +# define machine_is_ateb9200() (0)
4212 +#endif
4213 +
4214 +#ifdef CONFIG_MACH_AUCKLAND
4215 +# ifdef machine_arch_type
4216 +#  undef machine_arch_type
4217 +#  define machine_arch_type    __machine_arch_type
4218 +# else
4219 +#  define machine_arch_type    MACH_TYPE_AUCKLAND
4220 +# endif
4221 +# define machine_is_auckland() (machine_arch_type == MACH_TYPE_AUCKLAND)
4222 +#else
4223 +# define machine_is_auckland() (0)
4224 +#endif
4225 +
4226 +#ifdef CONFIG_MACH_AK3320M
4227 +# ifdef machine_arch_type
4228 +#  undef machine_arch_type
4229 +#  define machine_arch_type    __machine_arch_type
4230 +# else
4231 +#  define machine_arch_type    MACH_TYPE_AK3320M
4232 +# endif
4233 +# define machine_is_ak3220m()  (machine_arch_type == MACH_TYPE_AK3320M)
4234 +#else
4235 +# define machine_is_ak3220m()  (0)
4236 +#endif
4237 +
4238 +#ifdef CONFIG_MACH_DURAMAX
4239 +# ifdef machine_arch_type
4240 +#  undef machine_arch_type
4241 +#  define machine_arch_type    __machine_arch_type
4242 +# else
4243 +#  define machine_arch_type    MACH_TYPE_DURAMAX
4244 +# endif
4245 +# define machine_is_duramax()  (machine_arch_type == MACH_TYPE_DURAMAX)
4246 +#else
4247 +# define machine_is_duramax()  (0)
4248 +#endif
4249 +
4250 +#ifdef CONFIG_MACH_N35
4251 +# ifdef machine_arch_type
4252 +#  undef machine_arch_type
4253 +#  define machine_arch_type    __machine_arch_type
4254 +# else
4255 +#  define machine_arch_type    MACH_TYPE_N35
4256 +# endif
4257 +# define machine_is_n35()      (machine_arch_type == MACH_TYPE_N35)
4258 +#else
4259 +# define machine_is_n35()      (0)
4260 +#endif
4261 +
4262 +#ifdef CONFIG_MACH_PRONGHORN
4263 +# ifdef machine_arch_type
4264 +#  undef machine_arch_type
4265 +#  define machine_arch_type    __machine_arch_type
4266 +# else
4267 +#  define machine_arch_type    MACH_TYPE_PRONGHORN
4268 +# endif
4269 +# define machine_is_pronghorn()        (machine_arch_type == MACH_TYPE_PRONGHORN)
4270 +#else
4271 +# define machine_is_pronghorn()        (0)
4272 +#endif
4273 +
4274 +#ifdef CONFIG_MACH_FUNDY
4275 +# ifdef machine_arch_type
4276 +#  undef machine_arch_type
4277 +#  define machine_arch_type    __machine_arch_type
4278 +# else
4279 +#  define machine_arch_type    MACH_TYPE_FUNDY
4280 +# endif
4281 +# define machine_is_fundy()    (machine_arch_type == MACH_TYPE_FUNDY)
4282 +#else
4283 +# define machine_is_fundy()    (0)
4284 +#endif
4285 +
4286 +#ifdef CONFIG_MACH_LOGICPD_PXA270
4287 +# ifdef machine_arch_type
4288 +#  undef machine_arch_type
4289 +#  define machine_arch_type    __machine_arch_type
4290 +# else
4291 +#  define machine_arch_type    MACH_TYPE_LOGICPD_PXA270
4292 +# endif
4293 +# define machine_is_logicpd_pxa270()   (machine_arch_type == MACH_TYPE_LOGICPD_PXA270)
4294 +#else
4295 +# define machine_is_logicpd_pxa270()   (0)
4296 +#endif
4297 +
4298 +#ifdef CONFIG_MACH_CPU777
4299 +# ifdef machine_arch_type
4300 +#  undef machine_arch_type
4301 +#  define machine_arch_type    __machine_arch_type
4302 +# else
4303 +#  define machine_arch_type    MACH_TYPE_CPU777
4304 +# endif
4305 +# define machine_is_cpu777()   (machine_arch_type == MACH_TYPE_CPU777)
4306 +#else
4307 +# define machine_is_cpu777()   (0)
4308 +#endif
4309 +
4310 +#ifdef CONFIG_MACH_SIMICON9201
4311 +# ifdef machine_arch_type
4312 +#  undef machine_arch_type
4313 +#  define machine_arch_type    __machine_arch_type
4314 +# else
4315 +#  define machine_arch_type    MACH_TYPE_SIMICON9201
4316 +# endif
4317 +# define machine_is_simicon9201()      (machine_arch_type == MACH_TYPE_SIMICON9201)
4318 +#else
4319 +# define machine_is_simicon9201()      (0)
4320 +#endif
4321 +
4322 +#ifdef CONFIG_MACH_LEAP2_HPM
4323 +# ifdef machine_arch_type
4324 +#  undef machine_arch_type
4325 +#  define machine_arch_type    __machine_arch_type
4326 +# else
4327 +#  define machine_arch_type    MACH_TYPE_LEAP2_HPM
4328 +# endif
4329 +# define machine_is_leap2_hpm()        (machine_arch_type == MACH_TYPE_LEAP2_HPM)
4330 +#else
4331 +# define machine_is_leap2_hpm()        (0)
4332 +#endif
4333 +
4334 +#ifdef CONFIG_MACH_CM922TXA10
4335 +# ifdef machine_arch_type
4336 +#  undef machine_arch_type
4337 +#  define machine_arch_type    __machine_arch_type
4338 +# else
4339 +#  define machine_arch_type    MACH_TYPE_CM922TXA10
4340 +# endif
4341 +# define machine_is_cm922txa10()       (machine_arch_type == MACH_TYPE_CM922TXA10)
4342 +#else
4343 +# define machine_is_cm922txa10()       (0)
4344 +#endif
4345 +
4346 +#ifdef CONFIG_MACH_PXA
4347 +# ifdef machine_arch_type
4348 +#  undef machine_arch_type
4349 +#  define machine_arch_type    __machine_arch_type
4350 +# else
4351 +#  define machine_arch_type    MACH_TYPE_PXA
4352 +# endif
4353 +# define machine_is_sandgate() (machine_arch_type == MACH_TYPE_PXA)
4354 +#else
4355 +# define machine_is_sandgate() (0)
4356 +#endif
4357 +
4358 +#ifdef CONFIG_MACH_SANDGATE2
4359 +# ifdef machine_arch_type
4360 +#  undef machine_arch_type
4361 +#  define machine_arch_type    __machine_arch_type
4362 +# else
4363 +#  define machine_arch_type    MACH_TYPE_SANDGATE2
4364 +# endif
4365 +# define machine_is_sandgate2()        (machine_arch_type == MACH_TYPE_SANDGATE2)
4366 +#else
4367 +# define machine_is_sandgate2()        (0)
4368 +#endif
4369 +
4370 +#ifdef CONFIG_MACH_SANDGATE2G
4371 +# ifdef machine_arch_type
4372 +#  undef machine_arch_type
4373 +#  define machine_arch_type    __machine_arch_type
4374 +# else
4375 +#  define machine_arch_type    MACH_TYPE_SANDGATE2G
4376 +# endif
4377 +# define machine_is_sandgate2g()       (machine_arch_type == MACH_TYPE_SANDGATE2G)
4378 +#else
4379 +# define machine_is_sandgate2g()       (0)
4380 +#endif
4381 +
4382 +#ifdef CONFIG_MACH_SANDGATE2P
4383 +# ifdef machine_arch_type
4384 +#  undef machine_arch_type
4385 +#  define machine_arch_type    __machine_arch_type
4386 +# else
4387 +#  define machine_arch_type    MACH_TYPE_SANDGATE2P
4388 +# endif
4389 +# define machine_is_sandgate2p()       (machine_arch_type == MACH_TYPE_SANDGATE2P)
4390 +#else
4391 +# define machine_is_sandgate2p()       (0)
4392 +#endif
4393 +
4394 +#ifdef CONFIG_MACH_FRED_JACK
4395 +# ifdef machine_arch_type
4396 +#  undef machine_arch_type
4397 +#  define machine_arch_type    __machine_arch_type
4398 +# else
4399 +#  define machine_arch_type    MACH_TYPE_FRED_JACK
4400 +# endif
4401 +# define machine_is_fred_jack()        (machine_arch_type == MACH_TYPE_FRED_JACK)
4402 +#else
4403 +# define machine_is_fred_jack()        (0)
4404 +#endif
4405 +
4406 +#ifdef CONFIG_MACH_TTG_COLOR1
4407 +# ifdef machine_arch_type
4408 +#  undef machine_arch_type
4409 +#  define machine_arch_type    __machine_arch_type
4410 +# else
4411 +#  define machine_arch_type    MACH_TYPE_TTG_COLOR1
4412 +# endif
4413 +# define machine_is_ttg_color1()       (machine_arch_type == MACH_TYPE_TTG_COLOR1)
4414 +#else
4415 +# define machine_is_ttg_color1()       (0)
4416 +#endif
4417 +
4418 +#ifdef CONFIG_MACH_NXEB500HMI
4419 +# ifdef machine_arch_type
4420 +#  undef machine_arch_type
4421 +#  define machine_arch_type    __machine_arch_type
4422 +# else
4423 +#  define machine_arch_type    MACH_TYPE_NXEB500HMI
4424 +# endif
4425 +# define machine_is_nxeb500hmi()       (machine_arch_type == MACH_TYPE_NXEB500HMI)
4426 +#else
4427 +# define machine_is_nxeb500hmi()       (0)
4428 +#endif
4429 +
4430 +#ifdef CONFIG_MACH_NETDCU8
4431 +# ifdef machine_arch_type
4432 +#  undef machine_arch_type
4433 +#  define machine_arch_type    __machine_arch_type
4434 +# else
4435 +#  define machine_arch_type    MACH_TYPE_NETDCU8
4436 +# endif
4437 +# define machine_is_netdcu8()  (machine_arch_type == MACH_TYPE_NETDCU8)
4438 +#else
4439 +# define machine_is_netdcu8()  (0)
4440 +#endif
4441 +
4442 +#ifdef CONFIG_MACH_ML675050_CPU_BOA
4443 +# ifdef machine_arch_type
4444 +#  undef machine_arch_type
4445 +#  define machine_arch_type    __machine_arch_type
4446 +# else
4447 +#  define machine_arch_type    MACH_TYPE_ML675050_CPU_BOA
4448 +# endif
4449 +# define machine_is_ml675050_cpu_boa() (machine_arch_type == MACH_TYPE_ML675050_CPU_BOA)
4450 +#else
4451 +# define machine_is_ml675050_cpu_boa() (0)
4452 +#endif
4453 +
4454 +#ifdef CONFIG_MACH_NG_FVX538
4455 +# ifdef machine_arch_type
4456 +#  undef machine_arch_type
4457 +#  define machine_arch_type    __machine_arch_type
4458 +# else
4459 +#  define machine_arch_type    MACH_TYPE_NG_FVX538
4460 +# endif
4461 +# define machine_is_ng_fvx538()        (machine_arch_type == MACH_TYPE_NG_FVX538)
4462 +#else
4463 +# define machine_is_ng_fvx538()        (0)
4464 +#endif
4465 +
4466 +#ifdef CONFIG_MACH_NG_FVS338
4467 +# ifdef machine_arch_type
4468 +#  undef machine_arch_type
4469 +#  define machine_arch_type    __machine_arch_type
4470 +# else
4471 +#  define machine_arch_type    MACH_TYPE_NG_FVS338
4472 +# endif
4473 +# define machine_is_ng_fvs338()        (machine_arch_type == MACH_TYPE_NG_FVS338)
4474 +#else
4475 +# define machine_is_ng_fvs338()        (0)
4476 +#endif
4477 +
4478 +#ifdef CONFIG_MACH_PNX4103
4479 +# ifdef machine_arch_type
4480 +#  undef machine_arch_type
4481 +#  define machine_arch_type    __machine_arch_type
4482 +# else
4483 +#  define machine_arch_type    MACH_TYPE_PNX4103
4484 +# endif
4485 +# define machine_is_pnx4103()  (machine_arch_type == MACH_TYPE_PNX4103)
4486 +#else
4487 +# define machine_is_pnx4103()  (0)
4488 +#endif
4489 +
4490 +#ifdef CONFIG_MACH_HESDB
4491 +# ifdef machine_arch_type
4492 +#  undef machine_arch_type
4493 +#  define machine_arch_type    __machine_arch_type
4494 +# else
4495 +#  define machine_arch_type    MACH_TYPE_HESDB
4496 +# endif
4497 +# define machine_is_hesdb()    (machine_arch_type == MACH_TYPE_HESDB)
4498 +#else
4499 +# define machine_is_hesdb()    (0)
4500 +#endif
4501 +
4502 +#ifdef CONFIG_MACH_XSILO
4503 +# ifdef machine_arch_type
4504 +#  undef machine_arch_type
4505 +#  define machine_arch_type    __machine_arch_type
4506 +# else
4507 +#  define machine_arch_type    MACH_TYPE_XSILO
4508 +# endif
4509 +# define machine_is_xsilo()    (machine_arch_type == MACH_TYPE_XSILO)
4510 +#else
4511 +# define machine_is_xsilo()    (0)
4512 +#endif
4513 +
4514 +#ifdef CONFIG_MACH_ESPRESSO
4515 +# ifdef machine_arch_type
4516 +#  undef machine_arch_type
4517 +#  define machine_arch_type    __machine_arch_type
4518 +# else
4519 +#  define machine_arch_type    MACH_TYPE_ESPRESSO
4520 +# endif
4521 +# define machine_is_espresso() (machine_arch_type == MACH_TYPE_ESPRESSO)
4522 +#else
4523 +# define machine_is_espresso() (0)
4524 +#endif
4525 +
4526 +#ifdef CONFIG_MACH_EMLC
4527 +# ifdef machine_arch_type
4528 +#  undef machine_arch_type
4529 +#  define machine_arch_type    __machine_arch_type
4530 +# else
4531 +#  define machine_arch_type    MACH_TYPE_EMLC
4532 +# endif
4533 +# define machine_is_emlc()     (machine_arch_type == MACH_TYPE_EMLC)
4534 +#else
4535 +# define machine_is_emlc()     (0)
4536 +#endif
4537 +
4538 +#ifdef CONFIG_MACH_SISTERON
4539 +# ifdef machine_arch_type
4540 +#  undef machine_arch_type
4541 +#  define machine_arch_type    __machine_arch_type
4542 +# else
4543 +#  define machine_arch_type    MACH_TYPE_SISTERON
4544 +# endif
4545 +# define machine_is_sisteron() (machine_arch_type == MACH_TYPE_SISTERON)
4546 +#else
4547 +# define machine_is_sisteron() (0)
4548 +#endif
4549 +
4550 +#ifdef CONFIG_MACH_RX1950
4551 +# ifdef machine_arch_type
4552 +#  undef machine_arch_type
4553 +#  define machine_arch_type    __machine_arch_type
4554 +# else
4555 +#  define machine_arch_type    MACH_TYPE_RX1950
4556 +# endif
4557 +# define machine_is_rx1950()   (machine_arch_type == MACH_TYPE_RX1950)
4558 +#else
4559 +# define machine_is_rx1950()   (0)
4560 +#endif
4561 +
4562 +#ifdef CONFIG_MACH_TSC_VENUS
4563 +# ifdef machine_arch_type
4564 +#  undef machine_arch_type
4565 +#  define machine_arch_type    __machine_arch_type
4566 +# else
4567 +#  define machine_arch_type    MACH_TYPE_TSC_VENUS
4568 +# endif
4569 +# define machine_is_tsc_venus()        (machine_arch_type == MACH_TYPE_TSC_VENUS)
4570 +#else
4571 +# define machine_is_tsc_venus()        (0)
4572 +#endif
4573 +
4574 +#ifdef CONFIG_MACH_DS101J
4575 +# ifdef machine_arch_type
4576 +#  undef machine_arch_type
4577 +#  define machine_arch_type    __machine_arch_type
4578 +# else
4579 +#  define machine_arch_type    MACH_TYPE_DS101J
4580 +# endif
4581 +# define machine_is_ds101j()   (machine_arch_type == MACH_TYPE_DS101J)
4582 +#else
4583 +# define machine_is_ds101j()   (0)
4584 +#endif
4585 +
4586 +#ifdef CONFIG_MACH_MXC30030ADS
4587 +# ifdef machine_arch_type
4588 +#  undef machine_arch_type
4589 +#  define machine_arch_type    __machine_arch_type
4590 +# else
4591 +#  define machine_arch_type    MACH_TYPE_MXC30030ADS
4592 +# endif
4593 +# define machine_is_mxc30030ads()      (machine_arch_type == MACH_TYPE_MXC30030ADS)
4594 +#else
4595 +# define machine_is_mxc30030ads()      (0)
4596 +#endif
4597 +
4598 +#ifdef CONFIG_MACH_FUJITSU_WIMAXSOC
4599 +# ifdef machine_arch_type
4600 +#  undef machine_arch_type
4601 +#  define machine_arch_type    __machine_arch_type
4602 +# else
4603 +#  define machine_arch_type    MACH_TYPE_FUJITSU_WIMAXSOC
4604 +# endif
4605 +# define machine_is_fujitsu_wimaxsoc() (machine_arch_type == MACH_TYPE_FUJITSU_WIMAXSOC)
4606 +#else
4607 +# define machine_is_fujitsu_wimaxsoc() (0)
4608 +#endif
4609 +
4610 +#ifdef CONFIG_MACH_DUALPCMODEM
4611 +# ifdef machine_arch_type
4612 +#  undef machine_arch_type
4613 +#  define machine_arch_type    __machine_arch_type
4614 +# else
4615 +#  define machine_arch_type    MACH_TYPE_DUALPCMODEM
4616 +# endif
4617 +# define machine_is_dualpcmodem()      (machine_arch_type == MACH_TYPE_DUALPCMODEM)
4618 +#else
4619 +# define machine_is_dualpcmodem()      (0)
4620 +#endif
4621 +
4622 +#ifdef CONFIG_MACH_GESBC9312
4623 +# ifdef machine_arch_type
4624 +#  undef machine_arch_type
4625 +#  define machine_arch_type    __machine_arch_type
4626 +# else
4627 +#  define machine_arch_type    MACH_TYPE_GESBC9312
4628 +# endif
4629 +# define machine_is_gesbc9312()        (machine_arch_type == MACH_TYPE_GESBC9312)
4630 +#else
4631 +# define machine_is_gesbc9312()        (0)
4632 +#endif
4633 +
4634 +#ifdef CONFIG_MACH_HTCAPACHE
4635 +# ifdef machine_arch_type
4636 +#  undef machine_arch_type
4637 +#  define machine_arch_type    __machine_arch_type
4638 +# else
4639 +#  define machine_arch_type    MACH_TYPE_HTCAPACHE
4640 +# endif
4641 +# define machine_is_htcapache()        (machine_arch_type == MACH_TYPE_HTCAPACHE)
4642 +#else
4643 +# define machine_is_htcapache()        (0)
4644 +#endif
4645 +
4646 +#ifdef CONFIG_MACH_IXDP435
4647 +# ifdef machine_arch_type
4648 +#  undef machine_arch_type
4649 +#  define machine_arch_type    __machine_arch_type
4650 +# else
4651 +#  define machine_arch_type    MACH_TYPE_IXDP435
4652 +# endif
4653 +# define machine_is_ixdp435()  (machine_arch_type == MACH_TYPE_IXDP435)
4654 +#else
4655 +# define machine_is_ixdp435()  (0)
4656 +#endif
4657 +
4658 +#ifdef CONFIG_MACH_CATPROVT100
4659 +# ifdef machine_arch_type
4660 +#  undef machine_arch_type
4661 +#  define machine_arch_type    __machine_arch_type
4662 +# else
4663 +#  define machine_arch_type    MACH_TYPE_CATPROVT100
4664 +# endif
4665 +# define machine_is_catprovt100()      (machine_arch_type == MACH_TYPE_CATPROVT100)
4666 +#else
4667 +# define machine_is_catprovt100()      (0)
4668 +#endif
4669 +
4670 +#ifdef CONFIG_MACH_PICOTUX1XX
4671 +# ifdef machine_arch_type
4672 +#  undef machine_arch_type
4673 +#  define machine_arch_type    __machine_arch_type
4674 +# else
4675 +#  define machine_arch_type    MACH_TYPE_PICOTUX1XX
4676 +# endif
4677 +# define machine_is_picotux1xx()       (machine_arch_type == MACH_TYPE_PICOTUX1XX)
4678 +#else
4679 +# define machine_is_picotux1xx()       (0)
4680 +#endif
4681 +
4682 +#ifdef CONFIG_MACH_PICOTUX2XX
4683 +# ifdef machine_arch_type
4684 +#  undef machine_arch_type
4685 +#  define machine_arch_type    __machine_arch_type
4686 +# else
4687 +#  define machine_arch_type    MACH_TYPE_PICOTUX2XX
4688 +# endif
4689 +# define machine_is_picotux2xx()       (machine_arch_type == MACH_TYPE_PICOTUX2XX)
4690 +#else
4691 +# define machine_is_picotux2xx()       (0)
4692 +#endif
4693 +
4694 +#ifdef CONFIG_MACH_DSMG600
4695 +# ifdef machine_arch_type
4696 +#  undef machine_arch_type
4697 +#  define machine_arch_type    __machine_arch_type
4698 +# else
4699 +#  define machine_arch_type    MACH_TYPE_DSMG600
4700 +# endif
4701 +# define machine_is_dsmg600()  (machine_arch_type == MACH_TYPE_DSMG600)
4702 +#else
4703 +# define machine_is_dsmg600()  (0)
4704 +#endif
4705 +
4706 +#ifdef CONFIG_MACH_EMPC2
4707 +# ifdef machine_arch_type
4708 +#  undef machine_arch_type
4709 +#  define machine_arch_type    __machine_arch_type
4710 +# else
4711 +#  define machine_arch_type    MACH_TYPE_EMPC2
4712 +# endif
4713 +# define machine_is_empc2()    (machine_arch_type == MACH_TYPE_EMPC2)
4714 +#else
4715 +# define machine_is_empc2()    (0)
4716 +#endif
4717 +
4718 +#ifdef CONFIG_MACH_VENTURA
4719 +# ifdef machine_arch_type
4720 +#  undef machine_arch_type
4721 +#  define machine_arch_type    __machine_arch_type
4722 +# else
4723 +#  define machine_arch_type    MACH_TYPE_VENTURA
4724 +# endif
4725 +# define machine_is_ventura()  (machine_arch_type == MACH_TYPE_VENTURA)
4726 +#else
4727 +# define machine_is_ventura()  (0)
4728 +#endif
4729 +
4730 +#ifdef CONFIG_MACH_PHIDGET_SBC
4731 +# ifdef machine_arch_type
4732 +#  undef machine_arch_type
4733 +#  define machine_arch_type    __machine_arch_type
4734 +# else
4735 +#  define machine_arch_type    MACH_TYPE_PHIDGET_SBC
4736 +# endif
4737 +# define machine_is_phidget_sbc()      (machine_arch_type == MACH_TYPE_PHIDGET_SBC)
4738 +#else
4739 +# define machine_is_phidget_sbc()      (0)
4740 +#endif
4741 +
4742 +#ifdef CONFIG_MACH_IJ3K
4743 +# ifdef machine_arch_type
4744 +#  undef machine_arch_type
4745 +#  define machine_arch_type    __machine_arch_type
4746 +# else
4747 +#  define machine_arch_type    MACH_TYPE_IJ3K
4748 +# endif
4749 +# define machine_is_ij3k()     (machine_arch_type == MACH_TYPE_IJ3K)
4750 +#else
4751 +# define machine_is_ij3k()     (0)
4752 +#endif
4753 +
4754 +#ifdef CONFIG_MACH_PISGAH
4755 +# ifdef machine_arch_type
4756 +#  undef machine_arch_type
4757 +#  define machine_arch_type    __machine_arch_type
4758 +# else
4759 +#  define machine_arch_type    MACH_TYPE_PISGAH
4760 +# endif
4761 +# define machine_is_pisgah()   (machine_arch_type == MACH_TYPE_PISGAH)
4762 +#else
4763 +# define machine_is_pisgah()   (0)
4764 +#endif
4765 +
4766 +#ifdef CONFIG_MACH_OMAP_FSAMPLE
4767 +# ifdef machine_arch_type
4768 +#  undef machine_arch_type
4769 +#  define machine_arch_type    __machine_arch_type
4770 +# else
4771 +#  define machine_arch_type    MACH_TYPE_OMAP_FSAMPLE
4772 +# endif
4773 +# define machine_is_omap_fsample()     (machine_arch_type == MACH_TYPE_OMAP_FSAMPLE)
4774 +#else
4775 +# define machine_is_omap_fsample()     (0)
4776 +#endif
4777 +
4778 +#ifdef CONFIG_MACH_SG720
4779 +# ifdef machine_arch_type
4780 +#  undef machine_arch_type
4781 +#  define machine_arch_type    __machine_arch_type
4782 +# else
4783 +#  define machine_arch_type    MACH_TYPE_SG720
4784 +# endif
4785 +# define machine_is_sg720()    (machine_arch_type == MACH_TYPE_SG720)
4786 +#else
4787 +# define machine_is_sg720()    (0)
4788 +#endif
4789 +
4790 +#ifdef CONFIG_MACH_REDFOX
4791 +# ifdef machine_arch_type
4792 +#  undef machine_arch_type
4793 +#  define machine_arch_type    __machine_arch_type
4794 +# else
4795 +#  define machine_arch_type    MACH_TYPE_REDFOX
4796 +# endif
4797 +# define machine_is_redfox()   (machine_arch_type == MACH_TYPE_REDFOX)
4798 +#else
4799 +# define machine_is_redfox()   (0)
4800 +#endif
4801 +
4802 +#ifdef CONFIG_MACH_MYSH_EP9315_1
4803 +# ifdef machine_arch_type
4804 +#  undef machine_arch_type
4805 +#  define machine_arch_type    __machine_arch_type
4806 +# else
4807 +#  define machine_arch_type    MACH_TYPE_MYSH_EP9315_1
4808 +# endif
4809 +# define machine_is_mysh_ep9315_1()    (machine_arch_type == MACH_TYPE_MYSH_EP9315_1)
4810 +#else
4811 +# define machine_is_mysh_ep9315_1()    (0)
4812 +#endif
4813 +
4814 +#ifdef CONFIG_MACH_TPF106
4815 +# ifdef machine_arch_type
4816 +#  undef machine_arch_type
4817 +#  define machine_arch_type    __machine_arch_type
4818 +# else
4819 +#  define machine_arch_type    MACH_TYPE_TPF106
4820 +# endif
4821 +# define machine_is_tpf106()   (machine_arch_type == MACH_TYPE_TPF106)
4822 +#else
4823 +# define machine_is_tpf106()   (0)
4824 +#endif
4825 +
4826 +#ifdef CONFIG_MACH_AT91RM9200KG
4827 +# ifdef machine_arch_type
4828 +#  undef machine_arch_type
4829 +#  define machine_arch_type    __machine_arch_type
4830 +# else
4831 +#  define machine_arch_type    MACH_TYPE_AT91RM9200KG
4832 +# endif
4833 +# define machine_is_at91rm9200kg()     (machine_arch_type == MACH_TYPE_AT91RM9200KG)
4834 +#else
4835 +# define machine_is_at91rm9200kg()     (0)
4836 +#endif
4837 +
4838 +#ifdef CONFIG_MACH_SLEDB
4839 +# ifdef machine_arch_type
4840 +#  undef machine_arch_type
4841 +#  define machine_arch_type    __machine_arch_type
4842 +# else
4843 +#  define machine_arch_type    MACH_TYPE_SLEDB
4844 +# endif
4845 +# define machine_is_racemt2()  (machine_arch_type == MACH_TYPE_SLEDB)
4846 +#else
4847 +# define machine_is_racemt2()  (0)
4848 +#endif
4849 +
4850 +#ifdef CONFIG_MACH_ONTRACK
4851 +# ifdef machine_arch_type
4852 +#  undef machine_arch_type
4853 +#  define machine_arch_type    __machine_arch_type
4854 +# else
4855 +#  define machine_arch_type    MACH_TYPE_ONTRACK
4856 +# endif
4857 +# define machine_is_ontrack()  (machine_arch_type == MACH_TYPE_ONTRACK)
4858 +#else
4859 +# define machine_is_ontrack()  (0)
4860 +#endif
4861 +
4862 +#ifdef CONFIG_MACH_PM1200
4863 +# ifdef machine_arch_type
4864 +#  undef machine_arch_type
4865 +#  define machine_arch_type    __machine_arch_type
4866 +# else
4867 +#  define machine_arch_type    MACH_TYPE_PM1200
4868 +# endif
4869 +# define machine_is_pm1200()   (machine_arch_type == MACH_TYPE_PM1200)
4870 +#else
4871 +# define machine_is_pm1200()   (0)
4872 +#endif
4873 +
4874 +#ifdef CONFIG_MACH_ESS24XXX
4875 +# ifdef machine_arch_type
4876 +#  undef machine_arch_type
4877 +#  define machine_arch_type    __machine_arch_type
4878 +# else
4879 +#  define machine_arch_type    MACH_TYPE_ESS24XXX
4880 +# endif
4881 +# define machine_is_ess24562() (machine_arch_type == MACH_TYPE_ESS24XXX)
4882 +#else
4883 +# define machine_is_ess24562() (0)
4884 +#endif
4885 +
4886 +#ifdef CONFIG_MACH_COREMP7
4887 +# ifdef machine_arch_type
4888 +#  undef machine_arch_type
4889 +#  define machine_arch_type    __machine_arch_type
4890 +# else
4891 +#  define machine_arch_type    MACH_TYPE_COREMP7
4892 +# endif
4893 +# define machine_is_coremp7()  (machine_arch_type == MACH_TYPE_COREMP7)
4894 +#else
4895 +# define machine_is_coremp7()  (0)
4896 +#endif
4897 +
4898 +#ifdef CONFIG_MACH_NEXCODER_6446
4899 +# ifdef machine_arch_type
4900 +#  undef machine_arch_type
4901 +#  define machine_arch_type    __machine_arch_type
4902 +# else
4903 +#  define machine_arch_type    MACH_TYPE_NEXCODER_6446
4904 +# endif
4905 +# define machine_is_nexcoder_6446()    (machine_arch_type == MACH_TYPE_NEXCODER_6446)
4906 +#else
4907 +# define machine_is_nexcoder_6446()    (0)
4908 +#endif
4909 +
4910 +#ifdef CONFIG_MACH_STVC8380
4911 +# ifdef machine_arch_type
4912 +#  undef machine_arch_type
4913 +#  define machine_arch_type    __machine_arch_type
4914 +# else
4915 +#  define machine_arch_type    MACH_TYPE_STVC8380
4916 +# endif
4917 +# define machine_is_stvc8380() (machine_arch_type == MACH_TYPE_STVC8380)
4918 +#else
4919 +# define machine_is_stvc8380() (0)
4920 +#endif
4921 +
4922 +#ifdef CONFIG_MACH_TEKLYNX
4923 +# ifdef machine_arch_type
4924 +#  undef machine_arch_type
4925 +#  define machine_arch_type    __machine_arch_type
4926 +# else
4927 +#  define machine_arch_type    MACH_TYPE_TEKLYNX
4928 +# endif
4929 +# define machine_is_teklynx()  (machine_arch_type == MACH_TYPE_TEKLYNX)
4930 +#else
4931 +# define machine_is_teklynx()  (0)
4932 +#endif
4933 +
4934 +#ifdef CONFIG_MACH_CARBONADO
4935 +# ifdef machine_arch_type
4936 +#  undef machine_arch_type
4937 +#  define machine_arch_type    __machine_arch_type
4938 +# else
4939 +#  define machine_arch_type    MACH_TYPE_CARBONADO
4940 +# endif
4941 +# define machine_is_carbonado()        (machine_arch_type == MACH_TYPE_CARBONADO)
4942 +#else
4943 +# define machine_is_carbonado()        (0)
4944 +#endif
4945 +
4946 +#ifdef CONFIG_MACH_SYSMOS_MP730
4947 +# ifdef machine_arch_type
4948 +#  undef machine_arch_type
4949 +#  define machine_arch_type    __machine_arch_type
4950 +# else
4951 +#  define machine_arch_type    MACH_TYPE_SYSMOS_MP730
4952 +# endif
4953 +# define machine_is_sysmos_mp730()     (machine_arch_type == MACH_TYPE_SYSMOS_MP730)
4954 +#else
4955 +# define machine_is_sysmos_mp730()     (0)
4956 +#endif
4957 +
4958 +#ifdef CONFIG_MACH_SNAPPER_CL15
4959 +# ifdef machine_arch_type
4960 +#  undef machine_arch_type
4961 +#  define machine_arch_type    __machine_arch_type
4962 +# else
4963 +#  define machine_arch_type    MACH_TYPE_SNAPPER_CL15
4964 +# endif
4965 +# define machine_is_snapper_cl15()     (machine_arch_type == MACH_TYPE_SNAPPER_CL15)
4966 +#else
4967 +# define machine_is_snapper_cl15()     (0)
4968 +#endif
4969 +
4970 +#ifdef CONFIG_MACH_PGIGIM
4971 +# ifdef machine_arch_type
4972 +#  undef machine_arch_type
4973 +#  define machine_arch_type    __machine_arch_type
4974 +# else
4975 +#  define machine_arch_type    MACH_TYPE_PGIGIM
4976 +# endif
4977 +# define machine_is_pgigim()   (machine_arch_type == MACH_TYPE_PGIGIM)
4978 +#else
4979 +# define machine_is_pgigim()   (0)
4980 +#endif
4981 +
4982 +#ifdef CONFIG_MACH_PTX9160P2
4983 +# ifdef machine_arch_type
4984 +#  undef machine_arch_type
4985 +#  define machine_arch_type    __machine_arch_type
4986 +# else
4987 +#  define machine_arch_type    MACH_TYPE_PTX9160P2
4988 +# endif
4989 +# define machine_is_ptx9160p2()        (machine_arch_type == MACH_TYPE_PTX9160P2)
4990 +#else
4991 +# define machine_is_ptx9160p2()        (0)
4992 +#endif
4993 +
4994 +#ifdef CONFIG_MACH_DCORE1
4995 +# ifdef machine_arch_type
4996 +#  undef machine_arch_type
4997 +#  define machine_arch_type    __machine_arch_type
4998 +# else
4999 +#  define machine_arch_type    MACH_TYPE_DCORE1
5000 +# endif
5001 +# define machine_is_dcore1()   (machine_arch_type == MACH_TYPE_DCORE1)
5002 +#else
5003 +# define machine_is_dcore1()   (0)
5004 +#endif
5005 +
5006 +#ifdef CONFIG_MACH_VICTORPXA
5007 +# ifdef machine_arch_type
5008 +#  undef machine_arch_type
5009 +#  define machine_arch_type    __machine_arch_type
5010 +# else
5011 +#  define machine_arch_type    MACH_TYPE_VICTORPXA
5012 +# endif
5013 +# define machine_is_victorpxa()        (machine_arch_type == MACH_TYPE_VICTORPXA)
5014 +#else
5015 +# define machine_is_victorpxa()        (0)
5016 +#endif
5017 +
5018 +#ifdef CONFIG_MACH_MX2DTB
5019 +# ifdef machine_arch_type
5020 +#  undef machine_arch_type
5021 +#  define machine_arch_type    __machine_arch_type
5022 +# else
5023 +#  define machine_arch_type    MACH_TYPE_MX2DTB
5024 +# endif
5025 +# define machine_is_mx2dtb()   (machine_arch_type == MACH_TYPE_MX2DTB)
5026 +#else
5027 +# define machine_is_mx2dtb()   (0)
5028 +#endif
5029 +
5030 +#ifdef CONFIG_MACH_PXA_IREX_ER0100
5031 +# ifdef machine_arch_type
5032 +#  undef machine_arch_type
5033 +#  define machine_arch_type    __machine_arch_type
5034 +# else
5035 +#  define machine_arch_type    MACH_TYPE_PXA_IREX_ER0100
5036 +# endif
5037 +# define machine_is_pxa_irex_er0100()  (machine_arch_type == MACH_TYPE_PXA_IREX_ER0100)
5038 +#else
5039 +# define machine_is_pxa_irex_er0100()  (0)
5040 +#endif
5041 +
5042 +#ifdef CONFIG_MACH_OMAP_PALMZ71
5043 +# ifdef machine_arch_type
5044 +#  undef machine_arch_type
5045 +#  define machine_arch_type    __machine_arch_type
5046 +# else
5047 +#  define machine_arch_type    MACH_TYPE_OMAP_PALMZ71
5048 +# endif
5049 +# define machine_is_omap_palmz71()     (machine_arch_type == MACH_TYPE_OMAP_PALMZ71)
5050 +#else
5051 +# define machine_is_omap_palmz71()     (0)
5052 +#endif
5053 +
5054 +#ifdef CONFIG_MACH_BARTEC_DEG
5055 +# ifdef machine_arch_type
5056 +#  undef machine_arch_type
5057 +#  define machine_arch_type    __machine_arch_type
5058 +# else
5059 +#  define machine_arch_type    MACH_TYPE_BARTEC_DEG
5060 +# endif
5061 +# define machine_is_bartec_deg()       (machine_arch_type == MACH_TYPE_BARTEC_DEG)
5062 +#else
5063 +# define machine_is_bartec_deg()       (0)
5064 +#endif
5065 +
5066 +#ifdef CONFIG_MACH_HW50251
5067 +# ifdef machine_arch_type
5068 +#  undef machine_arch_type
5069 +#  define machine_arch_type    __machine_arch_type
5070 +# else
5071 +#  define machine_arch_type    MACH_TYPE_HW50251
5072 +# endif
5073 +# define machine_is_hw50251()  (machine_arch_type == MACH_TYPE_HW50251)
5074 +#else
5075 +# define machine_is_hw50251()  (0)
5076 +#endif
5077 +
5078 +#ifdef CONFIG_MACH_IBOX
5079 +# ifdef machine_arch_type
5080 +#  undef machine_arch_type
5081 +#  define machine_arch_type    __machine_arch_type
5082 +# else
5083 +#  define machine_arch_type    MACH_TYPE_IBOX
5084 +# endif
5085 +# define machine_is_ibox()     (machine_arch_type == MACH_TYPE_IBOX)
5086 +#else
5087 +# define machine_is_ibox()     (0)
5088 +#endif
5089 +
5090 +#ifdef CONFIG_MACH_ATLASLH7A404
5091 +# ifdef machine_arch_type
5092 +#  undef machine_arch_type
5093 +#  define machine_arch_type    __machine_arch_type
5094 +# else
5095 +#  define machine_arch_type    MACH_TYPE_ATLASLH7A404
5096 +# endif
5097 +# define machine_is_atlaslh7a404()     (machine_arch_type == MACH_TYPE_ATLASLH7A404)
5098 +#else
5099 +# define machine_is_atlaslh7a404()     (0)
5100 +#endif
5101 +
5102 +#ifdef CONFIG_MACH_PT2026
5103 +# ifdef machine_arch_type
5104 +#  undef machine_arch_type
5105 +#  define machine_arch_type    __machine_arch_type
5106 +# else
5107 +#  define machine_arch_type    MACH_TYPE_PT2026
5108 +# endif
5109 +# define machine_is_pt2026()   (machine_arch_type == MACH_TYPE_PT2026)
5110 +#else
5111 +# define machine_is_pt2026()   (0)
5112 +#endif
5113 +
5114 +#ifdef CONFIG_MACH_HTCALPINE
5115 +# ifdef machine_arch_type
5116 +#  undef machine_arch_type
5117 +#  define machine_arch_type    __machine_arch_type
5118 +# else
5119 +#  define machine_arch_type    MACH_TYPE_HTCALPINE
5120 +# endif
5121 +# define machine_is_htcalpine()        (machine_arch_type == MACH_TYPE_HTCALPINE)
5122 +#else
5123 +# define machine_is_htcalpine()        (0)
5124 +#endif
5125 +
5126 +#ifdef CONFIG_MACH_BARTEC_VTU
5127 +# ifdef machine_arch_type
5128 +#  undef machine_arch_type
5129 +#  define machine_arch_type    __machine_arch_type
5130 +# else
5131 +#  define machine_arch_type    MACH_TYPE_BARTEC_VTU
5132 +# endif
5133 +# define machine_is_bartec_vtu()       (machine_arch_type == MACH_TYPE_BARTEC_VTU)
5134 +#else
5135 +# define machine_is_bartec_vtu()       (0)
5136 +#endif
5137 +
5138 +#ifdef CONFIG_MACH_VCOREII
5139 +# ifdef machine_arch_type
5140 +#  undef machine_arch_type
5141 +#  define machine_arch_type    __machine_arch_type
5142 +# else
5143 +#  define machine_arch_type    MACH_TYPE_VCOREII
5144 +# endif
5145 +# define machine_is_vcoreii()  (machine_arch_type == MACH_TYPE_VCOREII)
5146 +#else
5147 +# define machine_is_vcoreii()  (0)
5148 +#endif
5149 +
5150 +#ifdef CONFIG_MACH_PDNB3
5151 +# ifdef machine_arch_type
5152 +#  undef machine_arch_type
5153 +#  define machine_arch_type    __machine_arch_type
5154 +# else
5155 +#  define machine_arch_type    MACH_TYPE_PDNB3
5156 +# endif
5157 +# define machine_is_pdnb3()    (machine_arch_type == MACH_TYPE_PDNB3)
5158 +#else
5159 +# define machine_is_pdnb3()    (0)
5160 +#endif
5161 +
5162 +#ifdef CONFIG_MACH_HTCBEETLES
5163 +# ifdef machine_arch_type
5164 +#  undef machine_arch_type
5165 +#  define machine_arch_type    __machine_arch_type
5166 +# else
5167 +#  define machine_arch_type    MACH_TYPE_HTCBEETLES
5168 +# endif
5169 +# define machine_is_htcbeetles()       (machine_arch_type == MACH_TYPE_HTCBEETLES)
5170 +#else
5171 +# define machine_is_htcbeetles()       (0)
5172 +#endif
5173 +
5174 +#ifdef CONFIG_MACH_S3C6400
5175 +# ifdef machine_arch_type
5176 +#  undef machine_arch_type
5177 +#  define machine_arch_type    __machine_arch_type
5178 +# else
5179 +#  define machine_arch_type    MACH_TYPE_S3C6400
5180 +# endif
5181 +# define machine_is_s3c6400()  (machine_arch_type == MACH_TYPE_S3C6400)
5182 +#else
5183 +# define machine_is_s3c6400()  (0)
5184 +#endif
5185 +
5186 +#ifdef CONFIG_MACH_S3C2443
5187 +# ifdef machine_arch_type
5188 +#  undef machine_arch_type
5189 +#  define machine_arch_type    __machine_arch_type
5190 +# else
5191 +#  define machine_arch_type    MACH_TYPE_S3C2443
5192 +# endif
5193 +# define machine_is_s3c2443()  (machine_arch_type == MACH_TYPE_S3C2443)
5194 +#else
5195 +# define machine_is_s3c2443()  (0)
5196 +#endif
5197 +
5198 +#ifdef CONFIG_MACH_OMAP_LDK
5199 +# ifdef machine_arch_type
5200 +#  undef machine_arch_type
5201 +#  define machine_arch_type    __machine_arch_type
5202 +# else
5203 +#  define machine_arch_type    MACH_TYPE_OMAP_LDK
5204 +# endif
5205 +# define machine_is_omap_ldk() (machine_arch_type == MACH_TYPE_OMAP_LDK)
5206 +#else
5207 +# define machine_is_omap_ldk() (0)
5208 +#endif
5209 +
5210 +#ifdef CONFIG_MACH_SMDK2460
5211 +# ifdef machine_arch_type
5212 +#  undef machine_arch_type
5213 +#  define machine_arch_type    __machine_arch_type
5214 +# else
5215 +#  define machine_arch_type    MACH_TYPE_SMDK2460
5216 +# endif
5217 +# define machine_is_smdk2460() (machine_arch_type == MACH_TYPE_SMDK2460)
5218 +#else
5219 +# define machine_is_smdk2460() (0)
5220 +#endif
5221 +
5222 +#ifdef CONFIG_MACH_SMDK2440
5223 +# ifdef machine_arch_type
5224 +#  undef machine_arch_type
5225 +#  define machine_arch_type    __machine_arch_type
5226 +# else
5227 +#  define machine_arch_type    MACH_TYPE_SMDK2440
5228 +# endif
5229 +# define machine_is_smdk2440() (machine_arch_type == MACH_TYPE_SMDK2440)
5230 +#else
5231 +# define machine_is_smdk2440() (0)
5232 +#endif
5233 +
5234 +#ifdef CONFIG_MACH_SMDK2412
5235 +# ifdef machine_arch_type
5236 +#  undef machine_arch_type
5237 +#  define machine_arch_type    __machine_arch_type
5238 +# else
5239 +#  define machine_arch_type    MACH_TYPE_SMDK2412
5240 +# endif
5241 +# define machine_is_smdk2412() (machine_arch_type == MACH_TYPE_SMDK2412)
5242 +#else
5243 +# define machine_is_smdk2412() (0)
5244 +#endif
5245 +
5246 +#ifdef CONFIG_MACH_WEBBOX
5247 +# ifdef machine_arch_type
5248 +#  undef machine_arch_type
5249 +#  define machine_arch_type    __machine_arch_type
5250 +# else
5251 +#  define machine_arch_type    MACH_TYPE_WEBBOX
5252 +# endif
5253 +# define machine_is_webbox()   (machine_arch_type == MACH_TYPE_WEBBOX)
5254 +#else
5255 +# define machine_is_webbox()   (0)
5256 +#endif
5257 +
5258 +#ifdef CONFIG_MACH_CWWNDP
5259 +# ifdef machine_arch_type
5260 +#  undef machine_arch_type
5261 +#  define machine_arch_type    __machine_arch_type
5262 +# else
5263 +#  define machine_arch_type    MACH_TYPE_CWWNDP
5264 +# endif
5265 +# define machine_is_cwwndp()   (machine_arch_type == MACH_TYPE_CWWNDP)
5266 +#else
5267 +# define machine_is_cwwndp()   (0)
5268 +#endif
5269 +
5270 +#ifdef CONFIG_MACH_DRAGON
5271 +# ifdef machine_arch_type
5272 +#  undef machine_arch_type
5273 +#  define machine_arch_type    __machine_arch_type
5274 +# else
5275 +#  define machine_arch_type    MACH_TYPE_DRAGON
5276 +# endif
5277 +# define machine_is_dragon()   (machine_arch_type == MACH_TYPE_DRAGON)
5278 +#else
5279 +# define machine_is_dragon()   (0)
5280 +#endif
5281 +
5282 +#ifdef CONFIG_MACH_OPENDO_CPU_BOARD
5283 +# ifdef machine_arch_type
5284 +#  undef machine_arch_type
5285 +#  define machine_arch_type    __machine_arch_type
5286 +# else
5287 +#  define machine_arch_type    MACH_TYPE_OPENDO_CPU_BOARD
5288 +# endif
5289 +# define machine_is_opendo_cpu_board() (machine_arch_type == MACH_TYPE_OPENDO_CPU_BOARD)
5290 +#else
5291 +# define machine_is_opendo_cpu_board() (0)
5292 +#endif
5293 +
5294 +#ifdef CONFIG_MACH_CCM2200
5295 +# ifdef machine_arch_type
5296 +#  undef machine_arch_type
5297 +#  define machine_arch_type    __machine_arch_type
5298 +# else
5299 +#  define machine_arch_type    MACH_TYPE_CCM2200
5300 +# endif
5301 +# define machine_is_ccm2200()  (machine_arch_type == MACH_TYPE_CCM2200)
5302 +#else
5303 +# define machine_is_ccm2200()  (0)
5304 +#endif
5305 +
5306 +#ifdef CONFIG_MACH_ETWARM
5307 +# ifdef machine_arch_type
5308 +#  undef machine_arch_type
5309 +#  define machine_arch_type    __machine_arch_type
5310 +# else
5311 +#  define machine_arch_type    MACH_TYPE_ETWARM
5312 +# endif
5313 +# define machine_is_etwarm()   (machine_arch_type == MACH_TYPE_ETWARM)
5314 +#else
5315 +# define machine_is_etwarm()   (0)
5316 +#endif
5317 +
5318 +#ifdef CONFIG_MACH_M93030
5319 +# ifdef machine_arch_type
5320 +#  undef machine_arch_type
5321 +#  define machine_arch_type    __machine_arch_type
5322 +# else
5323 +#  define machine_arch_type    MACH_TYPE_M93030
5324 +# endif
5325 +# define machine_is_m93030()   (machine_arch_type == MACH_TYPE_M93030)
5326 +#else
5327 +# define machine_is_m93030()   (0)
5328 +#endif
5329 +
5330 +#ifdef CONFIG_MACH_CC7U
5331 +# ifdef machine_arch_type
5332 +#  undef machine_arch_type
5333 +#  define machine_arch_type    __machine_arch_type
5334 +# else
5335 +#  define machine_arch_type    MACH_TYPE_CC7U
5336 +# endif
5337 +# define machine_is_cc7u()     (machine_arch_type == MACH_TYPE_CC7U)
5338 +#else
5339 +# define machine_is_cc7u()     (0)
5340 +#endif
5341 +
5342 +#ifdef CONFIG_MACH_MTT_RANGER
5343 +# ifdef machine_arch_type
5344 +#  undef machine_arch_type
5345 +#  define machine_arch_type    __machine_arch_type
5346 +# else
5347 +#  define machine_arch_type    MACH_TYPE_MTT_RANGER
5348 +# endif
5349 +# define machine_is_mtt_ranger()       (machine_arch_type == MACH_TYPE_MTT_RANGER)
5350 +#else
5351 +# define machine_is_mtt_ranger()       (0)
5352 +#endif
5353 +
5354 +#ifdef CONFIG_MACH_NEXUS
5355 +# ifdef machine_arch_type
5356 +#  undef machine_arch_type
5357 +#  define machine_arch_type    __machine_arch_type
5358 +# else
5359 +#  define machine_arch_type    MACH_TYPE_NEXUS
5360 +# endif
5361 +# define machine_is_nexus()    (machine_arch_type == MACH_TYPE_NEXUS)
5362 +#else
5363 +# define machine_is_nexus()    (0)
5364 +#endif
5365 +
5366 +#ifdef CONFIG_MACH_DESMAN
5367 +# ifdef machine_arch_type
5368 +#  undef machine_arch_type
5369 +#  define machine_arch_type    __machine_arch_type
5370 +# else
5371 +#  define machine_arch_type    MACH_TYPE_DESMAN
5372 +# endif
5373 +# define machine_is_desman()   (machine_arch_type == MACH_TYPE_DESMAN)
5374 +#else
5375 +# define machine_is_desman()   (0)
5376 +#endif
5377 +
5378 +#ifdef CONFIG_MACH_BKDE303
5379 +# ifdef machine_arch_type
5380 +#  undef machine_arch_type
5381 +#  define machine_arch_type    __machine_arch_type
5382 +# else
5383 +#  define machine_arch_type    MACH_TYPE_BKDE303
5384 +# endif
5385 +# define machine_is_bkde303()  (machine_arch_type == MACH_TYPE_BKDE303)
5386 +#else
5387 +# define machine_is_bkde303()  (0)
5388 +#endif
5389 +
5390 +#ifdef CONFIG_MACH_SMDK2413
5391 +# ifdef machine_arch_type
5392 +#  undef machine_arch_type
5393 +#  define machine_arch_type    __machine_arch_type
5394 +# else
5395 +#  define machine_arch_type    MACH_TYPE_SMDK2413
5396 +# endif
5397 +# define machine_is_smdk2413() (machine_arch_type == MACH_TYPE_SMDK2413)
5398 +#else
5399 +# define machine_is_smdk2413() (0)
5400 +#endif
5401 +
5402 +#ifdef CONFIG_MACH_AML_M7200
5403 +# ifdef machine_arch_type
5404 +#  undef machine_arch_type
5405 +#  define machine_arch_type    __machine_arch_type
5406 +# else
5407 +#  define machine_arch_type    MACH_TYPE_AML_M7200
5408 +# endif
5409 +# define machine_is_aml_m7200()        (machine_arch_type == MACH_TYPE_AML_M7200)
5410 +#else
5411 +# define machine_is_aml_m7200()        (0)
5412 +#endif
5413 +
5414 +#ifdef CONFIG_MACH_AML_M5900
5415 +# ifdef machine_arch_type
5416 +#  undef machine_arch_type
5417 +#  define machine_arch_type    __machine_arch_type
5418 +# else
5419 +#  define machine_arch_type    MACH_TYPE_AML_M5900
5420 +# endif
5421 +# define machine_is_aml_m5900()        (machine_arch_type == MACH_TYPE_AML_M5900)
5422 +#else
5423 +# define machine_is_aml_m5900()        (0)
5424 +#endif
5425 +
5426 +#ifdef CONFIG_MACH_SG640
5427 +# ifdef machine_arch_type
5428 +#  undef machine_arch_type
5429 +#  define machine_arch_type    __machine_arch_type
5430 +# else
5431 +#  define machine_arch_type    MACH_TYPE_SG640
5432 +# endif
5433 +# define machine_is_sg640()    (machine_arch_type == MACH_TYPE_SG640)
5434 +#else
5435 +# define machine_is_sg640()    (0)
5436 +#endif
5437 +
5438 +#ifdef CONFIG_MACH_EDG79524
5439 +# ifdef machine_arch_type
5440 +#  undef machine_arch_type
5441 +#  define machine_arch_type    __machine_arch_type
5442 +# else
5443 +#  define machine_arch_type    MACH_TYPE_EDG79524
5444 +# endif
5445 +# define machine_is_edg79524() (machine_arch_type == MACH_TYPE_EDG79524)
5446 +#else
5447 +# define machine_is_edg79524() (0)
5448 +#endif
5449 +
5450 +#ifdef CONFIG_MACH_AI2410
5451 +# ifdef machine_arch_type
5452 +#  undef machine_arch_type
5453 +#  define machine_arch_type    __machine_arch_type
5454 +# else
5455 +#  define machine_arch_type    MACH_TYPE_AI2410
5456 +# endif
5457 +# define machine_is_ai2410()   (machine_arch_type == MACH_TYPE_AI2410)
5458 +#else
5459 +# define machine_is_ai2410()   (0)
5460 +#endif
5461 +
5462 +#ifdef CONFIG_MACH_IXP465
5463 +# ifdef machine_arch_type
5464 +#  undef machine_arch_type
5465 +#  define machine_arch_type    __machine_arch_type
5466 +# else
5467 +#  define machine_arch_type    MACH_TYPE_IXP465
5468 +# endif
5469 +# define machine_is_ixp465()   (machine_arch_type == MACH_TYPE_IXP465)
5470 +#else
5471 +# define machine_is_ixp465()   (0)
5472 +#endif
5473 +
5474 +#ifdef CONFIG_MACH_BALLOON3
5475 +# ifdef machine_arch_type
5476 +#  undef machine_arch_type
5477 +#  define machine_arch_type    __machine_arch_type
5478 +# else
5479 +#  define machine_arch_type    MACH_TYPE_BALLOON3
5480 +# endif
5481 +# define machine_is_balloon3() (machine_arch_type == MACH_TYPE_BALLOON3)
5482 +#else
5483 +# define machine_is_balloon3() (0)
5484 +#endif
5485 +
5486 +#ifdef CONFIG_MACH_HEINS
5487 +# ifdef machine_arch_type
5488 +#  undef machine_arch_type
5489 +#  define machine_arch_type    __machine_arch_type
5490 +# else
5491 +#  define machine_arch_type    MACH_TYPE_HEINS
5492 +# endif
5493 +# define machine_is_heins()    (machine_arch_type == MACH_TYPE_HEINS)
5494 +#else
5495 +# define machine_is_heins()    (0)
5496 +#endif
5497 +
5498 +#ifdef CONFIG_MACH_MPLUSEVA
5499 +# ifdef machine_arch_type
5500 +#  undef machine_arch_type
5501 +#  define machine_arch_type    __machine_arch_type
5502 +# else
5503 +#  define machine_arch_type    MACH_TYPE_MPLUSEVA
5504 +# endif
5505 +# define machine_is_mpluseva() (machine_arch_type == MACH_TYPE_MPLUSEVA)
5506 +#else
5507 +# define machine_is_mpluseva() (0)
5508 +#endif
5509 +
5510 +#ifdef CONFIG_MACH_RT042
5511 +# ifdef machine_arch_type
5512 +#  undef machine_arch_type
5513 +#  define machine_arch_type    __machine_arch_type
5514 +# else
5515 +#  define machine_arch_type    MACH_TYPE_RT042
5516 +# endif
5517 +# define machine_is_rt042()    (machine_arch_type == MACH_TYPE_RT042)
5518 +#else
5519 +# define machine_is_rt042()    (0)
5520 +#endif
5521 +
5522 +#ifdef CONFIG_MACH_CWIEM
5523 +# ifdef machine_arch_type
5524 +#  undef machine_arch_type
5525 +#  define machine_arch_type    __machine_arch_type
5526 +# else
5527 +#  define machine_arch_type    MACH_TYPE_CWIEM
5528 +# endif
5529 +# define machine_is_cwiem()    (machine_arch_type == MACH_TYPE_CWIEM)
5530 +#else
5531 +# define machine_is_cwiem()    (0)
5532 +#endif
5533 +
5534 +#ifdef CONFIG_MACH_CM_X270
5535 +# ifdef machine_arch_type
5536 +#  undef machine_arch_type
5537 +#  define machine_arch_type    __machine_arch_type
5538 +# else
5539 +#  define machine_arch_type    MACH_TYPE_CM_X270
5540 +# endif
5541 +# define machine_is_cm_x270()  (machine_arch_type == MACH_TYPE_CM_X270)
5542 +#else
5543 +# define machine_is_cm_x270()  (0)
5544 +#endif
5545 +
5546 +#ifdef CONFIG_MACH_CM_X255
5547 +# ifdef machine_arch_type
5548 +#  undef machine_arch_type
5549 +#  define machine_arch_type    __machine_arch_type
5550 +# else
5551 +#  define machine_arch_type    MACH_TYPE_CM_X255
5552 +# endif
5553 +# define machine_is_cm_x255()  (machine_arch_type == MACH_TYPE_CM_X255)
5554 +#else
5555 +# define machine_is_cm_x255()  (0)
5556 +#endif
5557 +
5558 +#ifdef CONFIG_MACH_ESH_AT91
5559 +# ifdef machine_arch_type
5560 +#  undef machine_arch_type
5561 +#  define machine_arch_type    __machine_arch_type
5562 +# else
5563 +#  define machine_arch_type    MACH_TYPE_ESH_AT91
5564 +# endif
5565 +# define machine_is_esh_at91() (machine_arch_type == MACH_TYPE_ESH_AT91)
5566 +#else
5567 +# define machine_is_esh_at91() (0)
5568 +#endif
5569 +
5570 +#ifdef CONFIG_MACH_SANDGATE3
5571 +# ifdef machine_arch_type
5572 +#  undef machine_arch_type
5573 +#  define machine_arch_type    __machine_arch_type
5574 +# else
5575 +#  define machine_arch_type    MACH_TYPE_SANDGATE3
5576 +# endif
5577 +# define machine_is_sandgate3()        (machine_arch_type == MACH_TYPE_SANDGATE3)
5578 +#else
5579 +# define machine_is_sandgate3()        (0)
5580 +#endif
5581 +
5582 +#ifdef CONFIG_MACH_PRIMO
5583 +# ifdef machine_arch_type
5584 +#  undef machine_arch_type
5585 +#  define machine_arch_type    __machine_arch_type
5586 +# else
5587 +#  define machine_arch_type    MACH_TYPE_PRIMO
5588 +# endif
5589 +# define machine_is_primo()    (machine_arch_type == MACH_TYPE_PRIMO)
5590 +#else
5591 +# define machine_is_primo()    (0)
5592 +#endif
5593 +
5594 +#ifdef CONFIG_MACH_GEMSTONE
5595 +# ifdef machine_arch_type
5596 +#  undef machine_arch_type
5597 +#  define machine_arch_type    __machine_arch_type
5598 +# else
5599 +#  define machine_arch_type    MACH_TYPE_GEMSTONE
5600 +# endif
5601 +# define machine_is_gemstone() (machine_arch_type == MACH_TYPE_GEMSTONE)
5602 +#else
5603 +# define machine_is_gemstone() (0)
5604 +#endif
5605 +
5606 +#ifdef CONFIG_MACH_PRONGHORNMETRO
5607 +# ifdef machine_arch_type
5608 +#  undef machine_arch_type
5609 +#  define machine_arch_type    __machine_arch_type
5610 +# else
5611 +#  define machine_arch_type    MACH_TYPE_PRONGHORNMETRO
5612 +# endif
5613 +# define machine_is_pronghorn_metro()  (machine_arch_type == MACH_TYPE_PRONGHORNMETRO)
5614 +#else
5615 +# define machine_is_pronghorn_metro()  (0)
5616 +#endif
5617 +
5618 +#ifdef CONFIG_MACH_SIDEWINDER
5619 +# ifdef machine_arch_type
5620 +#  undef machine_arch_type
5621 +#  define machine_arch_type    __machine_arch_type
5622 +# else
5623 +#  define machine_arch_type    MACH_TYPE_SIDEWINDER
5624 +# endif
5625 +# define machine_is_sidewinder()       (machine_arch_type == MACH_TYPE_SIDEWINDER)
5626 +#else
5627 +# define machine_is_sidewinder()       (0)
5628 +#endif
5629 +
5630 +#ifdef CONFIG_MACH_PICOMOD1
5631 +# ifdef machine_arch_type
5632 +#  undef machine_arch_type
5633 +#  define machine_arch_type    __machine_arch_type
5634 +# else
5635 +#  define machine_arch_type    MACH_TYPE_PICOMOD1
5636 +# endif
5637 +# define machine_is_picomod1() (machine_arch_type == MACH_TYPE_PICOMOD1)
5638 +#else
5639 +# define machine_is_picomod1() (0)
5640 +#endif
5641 +
5642 +#ifdef CONFIG_MACH_SG590
5643 +# ifdef machine_arch_type
5644 +#  undef machine_arch_type
5645 +#  define machine_arch_type    __machine_arch_type
5646 +# else
5647 +#  define machine_arch_type    MACH_TYPE_SG590
5648 +# endif
5649 +# define machine_is_sg590()    (machine_arch_type == MACH_TYPE_SG590)
5650 +#else
5651 +# define machine_is_sg590()    (0)
5652 +#endif
5653 +
5654 +#ifdef CONFIG_MACH_AKAI9307
5655 +# ifdef machine_arch_type
5656 +#  undef machine_arch_type
5657 +#  define machine_arch_type    __machine_arch_type
5658 +# else
5659 +#  define machine_arch_type    MACH_TYPE_AKAI9307
5660 +# endif
5661 +# define machine_is_akai9307() (machine_arch_type == MACH_TYPE_AKAI9307)
5662 +#else
5663 +# define machine_is_akai9307() (0)
5664 +#endif
5665 +
5666 +#ifdef CONFIG_MACH_FONTAINE
5667 +# ifdef machine_arch_type
5668 +#  undef machine_arch_type
5669 +#  define machine_arch_type    __machine_arch_type
5670 +# else
5671 +#  define machine_arch_type    MACH_TYPE_FONTAINE
5672 +# endif
5673 +# define machine_is_fontaine() (machine_arch_type == MACH_TYPE_FONTAINE)
5674 +#else
5675 +# define machine_is_fontaine() (0)
5676 +#endif
5677 +
5678 +#ifdef CONFIG_MACH_WOMBAT
5679 +# ifdef machine_arch_type
5680 +#  undef machine_arch_type
5681 +#  define machine_arch_type    __machine_arch_type
5682 +# else
5683 +#  define machine_arch_type    MACH_TYPE_WOMBAT
5684 +# endif
5685 +# define machine_is_wombat()   (machine_arch_type == MACH_TYPE_WOMBAT)
5686 +#else
5687 +# define machine_is_wombat()   (0)
5688 +#endif
5689 +
5690 +#ifdef CONFIG_MACH_ACQ300
5691 +# ifdef machine_arch_type
5692 +#  undef machine_arch_type
5693 +#  define machine_arch_type    __machine_arch_type
5694 +# else
5695 +#  define machine_arch_type    MACH_TYPE_ACQ300
5696 +# endif
5697 +# define machine_is_acq300()   (machine_arch_type == MACH_TYPE_ACQ300)
5698 +#else
5699 +# define machine_is_acq300()   (0)
5700 +#endif
5701 +
5702 +#ifdef CONFIG_MACH_MOD_270
5703 +# ifdef machine_arch_type
5704 +#  undef machine_arch_type
5705 +#  define machine_arch_type    __machine_arch_type
5706 +# else
5707 +#  define machine_arch_type    MACH_TYPE_MOD_270
5708 +# endif
5709 +# define machine_is_mod_270()  (machine_arch_type == MACH_TYPE_MOD_270)
5710 +#else
5711 +# define machine_is_mod_270()  (0)
5712 +#endif
5713 +
5714 +#ifdef CONFIG_MACH_VC0820
5715 +# ifdef machine_arch_type
5716 +#  undef machine_arch_type
5717 +#  define machine_arch_type    __machine_arch_type
5718 +# else
5719 +#  define machine_arch_type    MACH_TYPE_VC0820
5720 +# endif
5721 +# define machine_is_vmc_vc0820()       (machine_arch_type == MACH_TYPE_VC0820)
5722 +#else
5723 +# define machine_is_vmc_vc0820()       (0)
5724 +#endif
5725 +
5726 +#ifdef CONFIG_MACH_ANI_AIM
5727 +# ifdef machine_arch_type
5728 +#  undef machine_arch_type
5729 +#  define machine_arch_type    __machine_arch_type
5730 +# else
5731 +#  define machine_arch_type    MACH_TYPE_ANI_AIM
5732 +# endif
5733 +# define machine_is_ani_aim()  (machine_arch_type == MACH_TYPE_ANI_AIM)
5734 +#else
5735 +# define machine_is_ani_aim()  (0)
5736 +#endif
5737 +
5738 +#ifdef CONFIG_MACH_JELLYFISH
5739 +# ifdef machine_arch_type
5740 +#  undef machine_arch_type
5741 +#  define machine_arch_type    __machine_arch_type
5742 +# else
5743 +#  define machine_arch_type    MACH_TYPE_JELLYFISH
5744 +# endif
5745 +# define machine_is_jellyfish()        (machine_arch_type == MACH_TYPE_JELLYFISH)
5746 +#else
5747 +# define machine_is_jellyfish()        (0)
5748 +#endif
5749 +
5750 +#ifdef CONFIG_MACH_AMANITA
5751 +# ifdef machine_arch_type
5752 +#  undef machine_arch_type
5753 +#  define machine_arch_type    __machine_arch_type
5754 +# else
5755 +#  define machine_arch_type    MACH_TYPE_AMANITA
5756 +# endif
5757 +# define machine_is_amanita()  (machine_arch_type == MACH_TYPE_AMANITA)
5758 +#else
5759 +# define machine_is_amanita()  (0)
5760 +#endif
5761 +
5762 +#ifdef CONFIG_MACH_VLINK
5763 +# ifdef machine_arch_type
5764 +#  undef machine_arch_type
5765 +#  define machine_arch_type    __machine_arch_type
5766 +# else
5767 +#  define machine_arch_type    MACH_TYPE_VLINK
5768 +# endif
5769 +# define machine_is_vlink()    (machine_arch_type == MACH_TYPE_VLINK)
5770 +#else
5771 +# define machine_is_vlink()    (0)
5772 +#endif
5773 +
5774  /*
5775   * These have not yet been registered
5776   */
5777 diff -Naur u-boot-1.1.4.org/include/config.h u-boot-1.1.4.tmp/include/config.h
5778 --- u-boot-1.1.4.org/include/config.h   2006-06-05 05:04:25.000000000 +0200
5779 +++ u-boot-1.1.4.tmp/include/config.h   2006-06-05 05:03:47.000000000 +0200
5780 @@ -1,2 +1,2 @@
5781  /* Automatically generated - do not edit */
5782 -#include <configs/at91rm9200dk.h>
5783 +#include <configs/vlink.h>
5784 diff -Naur u-boot-1.1.4.org/include/config.mk u-boot-1.1.4.tmp/include/config.mk
5785 --- u-boot-1.1.4.org/include/config.mk  2006-06-05 05:04:25.000000000 +0200
5786 +++ u-boot-1.1.4.tmp/include/config.mk  2006-06-05 05:03:47.000000000 +0200
5787 @@ -1,4 +1,4 @@
5788  ARCH   = arm
5789  CPU    = arm920t
5790 -BOARD  = at91rm9200dk
5791 +BOARD  = vlink
5792  SOC    = at91rm9200
5793 diff -Naur u-boot-1.1.4.org/include/configs/vlink.h u-boot-1.1.4.tmp/include/configs/vlink.h
5794 --- u-boot-1.1.4.org/include/configs/vlink.h    1970-01-01 01:00:00.000000000 +0100
5795 +++ u-boot-1.1.4.tmp/include/configs/vlink.h    2006-06-05 03:37:15.000000000 +0200
5796 @@ -0,0 +1,244 @@
5797 +/*
5798 + * Hamish Guthrie <hamish@prodigi.ch>
5799 + *
5800 + * Configuation settings for the Figment Designs Versalink board.
5801 + *
5802 + * See file CREDITS for list of people who contributed to this
5803 + * project.
5804 + *
5805 + * This program is free software; you can redistribute it and/or
5806 + * modify it under the terms of the GNU General Public License as
5807 + * published by the Free Software Foundation; either version 2 of
5808 + * the License, or (at your option) any later version.
5809 + *
5810 + * This program is distributed in the hope that it will be useful,
5811 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5812 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5813 + * GNU General Public License for more details.
5814 + *
5815 + * You should have received a copy of the GNU General Public License
5816 + * along with this program; if not, write to the Free Software
5817 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
5818 + * MA 02111-1307 USA
5819 + */
5820 +
5821 +#ifndef __CONFIG_H
5822 +#define __CONFIG_H
5823 +
5824 +// Added 2 defines to skip re-init lowlevel and relocate HCG HLH
5825 +//
5826 +#define CONFIG_SKIP_LOWLEVEL_INIT
5827 +#define CONFIG_SKIP_RELOCATE_UBOOT
5828 +
5829 +/* ARM asynchronous clock */
5830 +#define AT91C_MAIN_CLOCK       179712000       /* from 18.432 MHz crystal (18432000 / 4 * 39) */
5831 +#define AT91C_MASTER_CLOCK     59904000        /* peripheral clock (AT91C_MASTER_CLOCK / 3) */
5832 +/* #define AT91C_MASTER_CLOCK  44928000 */     /* peripheral clock (AT91C_MASTER_CLOCK / 4) */
5833 +
5834 +#define AT91_SLOW_CLOCK                32768   /* slow clock */
5835 +
5836 +#define CONFIG_ARM920T         1       /* This is an ARM920T Core      */
5837 +#define CONFIG_AT91RM9200      1       /* It's an Atmel AT91RM9200 SoC */
5838 +#define CONFIG_VLINK           1       /* on a Versalink Board         */
5839 +#define CONFIG_IDENT_STRING    " FDL Versalink"
5840 +#undef  CONFIG_USE_IRQ                 /* we don't need IRQ/FIQ stuff  */
5841 +#define USE_920T_MMU           1
5842 +
5843 +#define CONFIG_CMDLINE_TAG     1       /* enable passing of ATAGs      */
5844 +#define CONFIG_SETUP_MEMORY_TAGS 1
5845 +#define CONFIG_INITRD_TAG      1
5846 +
5847 +#ifndef CONFIG_SKIP_LOWLEVEL_INIT
5848 +#define CFG_USE_MAIN_OSCILLATOR                1
5849 +/* flash */
5850 +#define MC_PUIA_VAL    0x00000000
5851 +#define MC_PUP_VAL     0x00000000
5852 +#define MC_PUER_VAL    0x00000000
5853 +#define MC_ASR_VAL     0x00000000
5854 +#define MC_AASR_VAL    0x00000000
5855 +#define EBI_CFGR_VAL   0x00000000
5856 +#define SMC2_CSR_VAL   0x00003284 /* 16bit, 2 TDF, 4 WS */
5857 +
5858 +/* clocks */
5859 +#define PLLAR_VAL      0x20263E04 /* 179.712000 MHz for PCK */
5860 +#define PLLBR_VAL      0x10483E0E /* 48.054857 MHz (divider by 2 for USB) */
5861 +#define MCKR_VAL       0x00000202 /* PCK/3 = MCK Master Clock = 59.904000MHz from PLLA */
5862 +
5863 +/* sdram */
5864 +#define PIOC_ASR_VAL   0xFFFF0000 /* Configure PIOC as peripheral (D16/D31) */
5865 +#define PIOC_BSR_VAL   0x00000000
5866 +#define PIOC_PDR_VAL   0xFFFF0000
5867 +#define EBI_CSA_VAL    0x00000002 /* CS1=SDRAM */
5868 +#define SDRC_CR_VAL    0x2188c155 /* set up the SDRAM */
5869 +#define SDRAM          0x20000000 /* address of the SDRAM */
5870 +#define SDRAM1         0x20000080 /* address of the SDRAM */
5871 +#define SDRAM_VAL      0x00000000 /* value written to SDRAM */
5872 +#define SDRC_MR_VAL    0x00000002 /* Precharge All */
5873 +#define SDRC_MR_VAL1   0x00000004 /* refresh */
5874 +#define SDRC_MR_VAL2   0x00000003 /* Load Mode Register */
5875 +#define SDRC_MR_VAL3   0x00000000 /* Normal Mode */
5876 +#define SDRC_TR_VAL    0x000002E0 /* Write refresh rate */
5877 +#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
5878 +/*
5879 + * Size of malloc() pool
5880 + */
5881 +#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
5882 +#define CFG_GBL_DATA_SIZE      128     /* size in bytes reserved for initial data */
5883 +
5884 +#define CONFIG_BAUDRATE 115200
5885 +
5886 +/*
5887 + * Hardware drivers
5888 + */
5889 +
5890 +/* define one of these to choose the DBGU, USART0  or USART1 as console */
5891 +#define CONFIG_DBGU
5892 +#undef CONFIG_USART0
5893 +#undef CONFIG_USART1
5894 +
5895 +#undef CONFIG_HWFLOW                   /* don't include RTS/CTS flow control support   */
5896 +
5897 +#undef CONFIG_MODEM_SUPPORT            /* disable modem initialization stuff */
5898 +
5899 +#define CONFIG_BOOTDELAY      3
5900 +/* #define CONFIG_ENV_OVERWRITE        1 */
5901 +
5902 +#define CONFIG_COMMANDS                \
5903 +                      ((CONFIG_CMD_DFL | CFG_CMD_MII |\
5904 +                       CFG_CMD_DHCP ) & \
5905 +                     ~(CFG_CMD_BDI | \
5906 +                       CFG_CMD_IMI | \
5907 +                       CFG_CMD_AUTOSCRIPT | \
5908 +                       CFG_CMD_FPGA | \
5909 +                       CFG_CMD_MISC | \
5910 +                       CFG_CMD_LOADS ))
5911 +
5912 +/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
5913 +#include <cmd_confdefs.h>
5914 +
5915 +#ifndef CONFIG_VLINK
5916 +#define CFG_MAX_NAND_DEVICE    1       /* Max number of NAND devices           */
5917 +#define SECTORSIZE 512
5918 +
5919 +#define ADDR_COLUMN 1
5920 +#define ADDR_PAGE 2
5921 +#define ADDR_COLUMN_PAGE 3
5922 +
5923 +#define NAND_ChipID_UNKNOWN    0x00
5924 +#define NAND_MAX_FLOORS 1
5925 +#define NAND_MAX_CHIPS 1
5926 +
5927 +#define AT91_SMART_MEDIA_ALE (1 << 22) /* our ALE is AD22 */
5928 +#define AT91_SMART_MEDIA_CLE (1 << 21) /* our CLE is AD21 */
5929 +
5930 +#define NAND_DISABLE_CE(nand) do { *AT91C_PIOC_SODR = AT91C_PIO_PC0;} while(0)
5931 +#define NAND_ENABLE_CE(nand) do { *AT91C_PIOC_CODR = AT91C_PIO_PC0;} while(0)
5932 +
5933 +#define NAND_WAIT_READY(nand) while (!(*AT91C_PIOC_PDSR & AT91C_PIO_PC2))
5934 +
5935 +#define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | AT91_SMART_MEDIA_CLE) = (__u8)(d); } while(0)
5936 +#define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | AT91_SMART_MEDIA_ALE) = (__u8)(d); } while(0)
5937 +#define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0)
5938 +#define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr))
5939 +/* the following are NOP's in our implementation */
5940 +#define NAND_CTL_CLRALE(nandptr)
5941 +#define NAND_CTL_SETALE(nandptr)
5942 +#define NAND_CTL_CLRCLE(nandptr)
5943 +#define NAND_CTL_SETCLE(nandptr)
5944 +#endif
5945 +
5946 +#define CONFIG_NR_DRAM_BANKS 1
5947 +#define PHYS_SDRAM 0x20000000
5948 +#define PHYS_SDRAM_SIZE 0x2000000  /* 32 megs */
5949 +
5950 +#define CFG_MEMTEST_START              PHYS_SDRAM
5951 +#define CFG_MEMTEST_END                        CFG_MEMTEST_START + PHYS_SDRAM_SIZE - 262144
5952 +
5953 +#define CONFIG_DRIVER_ETHER
5954 +#define CONFIG_NET_RETRY_COUNT         20
5955 +#define CONFIG_AT91C_USE_RMII
5956 +
5957 +#define CONFIG_HAS_DATAFLASH           1
5958 +#define CFG_SPI_WRITE_TOUT             (5*CFG_HZ)
5959 +#define CFG_MAX_DATAFLASH_BANKS        2
5960 +#define CFG_MAX_DATAFLASH_PAGES        16384
5961 +#define CFG_DATAFLASH_LOGIC_ADDR_CS0   0xC0000000      /* Logical adress for CS0 */
5962 +#define CFG_DATAFLASH_LOGIC_ADDR_CS3   0xD0000000      /* Logical adress for CS3 */
5963 +
5964 +#ifdef CONFIG_VLINK
5965 +#define PHYS_FLASH_1                   0x10000000
5966 +#define PHYS_FLASH_SIZE                        0x200000  /* 2 megs main flash */
5967 +#define CFG_FLASH_BASE                 PHYS_FLASH_1
5968 +#define CFG_MAX_FLASH_BANKS            1
5969 +#define CFG_MAX_FLASH_SECT             256
5970 +#define CFG_FLASH_ERASE_TOUT           (2*CFG_HZ) /* Timeout for Flash Erase */
5971 +#define CFG_FLASH_WRITE_TOUT           (2*CFG_HZ) /* Timeout for Flash Write */
5972 +#endif
5973 +
5974 +#define        CFG_ENV_IS_IN_DATAFLASH
5975 +
5976 +#ifdef CFG_ENV_IS_IN_DATAFLASH
5977 +#define CFG_ENV_OFFSET                 0x21000
5978 +#define CFG_ENV_ADDR                   (CFG_DATAFLASH_LOGIC_ADDR_CS0 + CFG_ENV_OFFSET)
5979 +#define CFG_ENV_SIZE                   0x8400  /* 0x8000 */
5980 +#else
5981 +#define CFG_ENV_IS_IN_FLASH            1
5982 +#ifdef CONFIG_SKIP_LOWLEVEL_INIT
5983 +#define CFG_ENV_ADDR                   (PHYS_FLASH_1 + 0x60000)  /* after u-boot.bin */
5984 +#define CFG_ENV_SIZE                   0x10000 /* sectors are 64K here */
5985 +#else
5986 +#define CFG_ENV_ADDR                   (PHYS_FLASH_1 + 0xe000)  /* between boot.bin and u-boot.bin.gz */
5987 +#define CFG_ENV_SIZE                   0x2000  /* 0x8000 */
5988 +#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
5989 +#endif /* CFG_ENV_IS_IN_DATAFLASH */
5990 +
5991 +
5992 +#define CFG_LOAD_ADDR          0x21000000  /* default load address */
5993 +
5994 +#ifdef CONFIG_SKIP_LOWLEVEL_INIT
5995 +#define CFG_BOOT_SIZE          0x00 /* 0 KBytes */
5996 +#define CFG_U_BOOT_BASE                PHYS_FLASH_1
5997 +#define CFG_U_BOOT_SIZE                0x60000 /* 384 KBytes */
5998 +#else
5999 +#define CFG_BOOT_SIZE          0x6000 /* 24 KBytes */
6000 +#define CFG_U_BOOT_BASE                (PHYS_FLASH_1 + 0x10000)
6001 +#define CFG_U_BOOT_SIZE                0x10000 /* 64 KBytes */
6002 +#endif /* CONFIG_SKIP_LOWLEVEL_INIT */
6003 +
6004 +#define CFG_BAUDRATE_TABLE     {115200 , 19200, 38400, 57600, 9600 }
6005 +
6006 +#define CFG_PROMPT             "U-Boot> "      /* Monitor Command Prompt */
6007 +#define CFG_CBSIZE             256             /* Console I/O Buffer Size */
6008 +#define CFG_MAXARGS            16              /* max number of command args */
6009 +#define CFG_PBSIZE             (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
6010 +
6011 +#ifndef __ASSEMBLY__
6012 +/*-----------------------------------------------------------------------
6013 + * Board specific extension for bd_info
6014 + *
6015 + * This structure is embedded in the global bd_info (bd_t) structure
6016 + * and can be used by the board specific code (eg board/...)
6017 + */
6018 +
6019 +struct bd_info_ext {
6020 +       /* helper variable for board environment handling
6021 +        *
6022 +        * env_crc_valid == 0    =>   uninitialised
6023 +        * env_crc_valid  > 0    =>   environment crc in flash is valid
6024 +        * env_crc_valid  < 0    =>   environment crc in flash is invalid
6025 +        */
6026 +       int env_crc_valid;
6027 +};
6028 +#endif
6029 +
6030 +#define CFG_HZ 1000
6031 +#define CFG_HZ_CLOCK AT91C_MASTER_CLOCK/2      /* AT91C_TC0_CMR is implicitly set to */
6032 +                                       /* AT91C_TC_TIMER_DIV1_CLOCK */
6033 +
6034 +#define CONFIG_STACKSIZE       (32*1024)       /* regular stack */
6035 +
6036 +#ifdef CONFIG_USE_IRQ
6037 +#error CONFIG_USE_IRQ not supported
6038 +#endif
6039 +
6040 +#endif
6041 diff -Naur u-boot-1.1.4.org/MAKEALL u-boot-1.1.4.tmp/MAKEALL
6042 --- u-boot-1.1.4.org/MAKEALL    2005-12-16 17:39:27.000000000 +0100
6043 +++ u-boot-1.1.4.tmp/MAKEALL    2006-06-05 02:44:24.000000000 +0200
6044 @@ -180,7 +180,7 @@
6045         mx1ads          mx1fs2          omap1510inn     omap1610h2      \
6046         omap1610inn     omap730p2       scb9328         smdk2400        \
6047         smdk2410        trab            VCMA9           versatile       \
6048 -       versatileab     versatilepb     voiceblue
6049 +       versatileab     versatilepb     voiceblue       vlink
6050  "
6051  
6052  #########################################################################
6053 diff -Naur u-boot-1.1.4.org/Makefile u-boot-1.1.4.tmp/Makefile
6054 --- u-boot-1.1.4.org/Makefile   2006-06-02 15:58:57.000000000 +0200
6055 +++ u-boot-1.1.4.tmp/Makefile   2006-06-05 04:40:45.000000000 +0200
6056 @@ -1419,6 +1419,9 @@
6057  mp2usb_config  :       unconfig
6058         @./mkconfig $(@:_config=) arm arm920t mp2usb NULL at91rm9200
6059  
6060 +vlink_config   :       unconfig
6061 +       @./mkconfig $(@:_config=) arm arm920t vlink NULL at91rm9200
6062 +
6063  
6064  ########################################################################
6065  ## ARM Integrator boards - see doc/README-integrator for more info.